diff --git a/.gitignore b/.gitignore index aa332681474..6aa74f44ed0 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ htdocs/includes/autoload.php htdocs/includes/bin/ htdocs/includes/composer/ /.pydevproject +/dolibarr_genesis.mp4 diff --git a/.stickler.yml b/.stickler.yml index b68804448b2..642dec27412 100644 --- a/.stickler.yml +++ b/.stickler.yml @@ -8,3 +8,7 @@ linters: fixers: enable: true + +files: + ignore: + - 'htdocs/includes/*' diff --git a/.travis.yml b/.travis.yml index d5583ef6ff2..3a996915ca7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -347,7 +347,7 @@ script: mysql -e 'DROP DATABASE IF EXISTS travis;' mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' - mysql -e 'FLUSH PRIVILEGES;' + mysql -e 'FLUSH PRIVILEGES;' mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql fi if [ "$DB" = 'postgresql' ]; then @@ -362,7 +362,7 @@ script: #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis fi echo - + - | echo "Upgrading Dolibarr" # Ensure we catch errors. Set this to +e if you want to go to the end to see log files. diff --git a/COPYRIGHT b/COPYRIGHT index 1af09e6fdaf..fe707c1d63d 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -2,7 +2,7 @@ License ------- -Dolibarr is released under the terms of the GNU General Public License as +Dolibarr is released 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 (GPL-3+). More information: https://www.gnu.org/licenses/gpl-3.0.txt @@ -15,13 +15,13 @@ PHP libraries: AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package) CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG 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 +Escpos-php 2.2 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.33 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 ParseDown 1.6 MIT License Yes Markdown parser -PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers +PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP @@ -37,7 +37,7 @@ TCPDF 6.3.2 LGPL-3+ Yes TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement JS libraries: -Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea. +Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea. jQuery 3.4.1 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect diff --git a/ChangeLog b/ChangeLog index 0f4d3c30ddf..2d398c83535 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,10 +23,84 @@ Following changes may create regressions for some external modules, but were nec * If you have developed your own emailing target selector and used parent::add_to_target(...), you must now use parent::addToTargets(...) * Removed function dol_micro_time. Use native PHP microtime instead. * The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE. +* The constant INVOICE_SHOW_POS_IN_EXPORT has been renamed into INVOICE_SHOW_POS. +* If your logo was visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible agin in menu. +* All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed into 'labelStatus'. +* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'. +* All properties 'type_libelle' were renamed into 'type_label'. +* Renamed property of thirdparty "statut_commercial" into "status_prospect_label" +***** ChangeLog for 10.0.3 compared to 10.0.2 ***** +IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card. +The unit were not saved correctly in database making calculation on shipments wrong. +Update to this version must be done if you use them and have installed version 10.0.0, 10.0.1 or 10.0.2 and set some products after installing or upgrading to one of this version. +Once update is done you must then edit (manually) the product that has bad unit to set the correct unit to have features restored. + +FIX: #11702 +FIX: #11861 No consistent code to manage measuring units +FIX: #11942 +FIX: #12026 +FIX: #12040 +FIX: #12041 +FIX: #12054 +FIX: #12083 +FIX: #12088 +FIX: CVE-2019-17578 CVE-2019-17577 CVE-2019-17576 +FIX: Clean the + of categories on the product view only in POS module +FIX: access to public interface when origin email has an alias. +FIX: Alias name is not into the email recipient label. +FIX: allow standalone credit note even if no invoice +FIX: an admin can not access his own permissions after enabling advanced permissions +FIX: Attachement of linked files on ticket when sending a message +FIX: avoid non numeric warning +FIX: Bad currency var used in stripe for connect +FIX: Bad list of ticket on public interface for ticket emailcollector +FIX: Can't modify vendor invoice if transfered into accountancy +FIX: change product type must be allowed if we activate hidden conf +FIX: colspan on VAT quadri report +FIX: CSS +FIX: Debug feature orderstoinvoice for suppliers +FIX: do not output return code on screen after a select of bank account +FIX: Edit of ticket module parameters erased others +FIX: empty cache when we want to load specific warehouses in select +FIX: escape email alias +FIX: expedition.class.php +FIX: Export of leave request show the number of open days +FIX: Filtering the HTTP Header "Accept-Language". +FIX: Filter on project on ticket list +FIX: Filter "Open all" of ticket was ko. +FIX: Force downlaod of file with .noexe as octet-stream mime type +FIX: form not closed. +FIX: hidden conf to prevent from changing product_type +FIX: If product account not suggested during bind, it is not preselected +FIX: If we share invoice, we need to see discount created from a deposit on each entity +FIX: Import of product using units +FIX: label of thirdparty is wrong on open project list +FIX: Look and feel v10 +FIX: missing begin() +FIX: missing "$this->id" in "fetch" function +FIX: navigation on ticket tab of projects +FIX: new invoice with generic thirdparty in takepos +FIX: Pb in units of shipments +FIX: regression with option to hide picto on top menu +FIX: selection of project i am contact of. +FIX: Send email from expense report card. +FIX: shipping card: missing user error messages when classifying closed or billed +FIX: SQL injection on qty +FIX: stripe payment when there is a quote into address +FIX: Substitution of __PROJECT_XXX__ not done +FIX: TakePOS no invoice validation control and good payment translate +FIX: the access of the bank account of one user +FIX: top menu right padding +FIX: Update of leave request when CSRF with token is on +FIX: Var not enough sanitized +FIX: wrong test +FIX: XSS +FIX: Payment from POS ware not recorded. +FIX: Can validate invoice with amount including tax of zero for the case of having a final invoice with + VAT that includes a deposit without vat. ***** ChangeLog for 10.0.2 compared to 10.0.1 ***** - FIX: #10460 compatibility with MariaDB 10.4 FIX: #11401 Adherent unknown language key FIX: #11422 Can't edit his own events with standard rights @@ -44,17 +118,17 @@ FIX: #11752 FIX: #11789 FIX: #11790 FIX: #11804 list of tickets from a customer card display ALL tickets FIX: #11834 -FIX: Add char $ and ; in sanitizing of filenames. -FIX: Add comment before protected functions -FIX: Add log and type of content in dolWebsiteOutput and -FIX: Add repair.php option 'restore' to restore user picture after v10 +FIX: add char $ and ; in sanitizing of filenames +FIX: add comment before protected functions +FIX: add log and type of content in dolWebsiteOutput and +FIX: add repair.php option 'restore' to restore user picture after v10 FIX: amount opened on thirdparty card dont care of credit note not converted -FIX: Api of documents work with value 'thirdparty' +FIX: API of documents work with value 'thirdparty' FIX: author in message / ticket API -FIX: avoid sql error if fk_project is empty during update +FIX: avoid SQL error if fk_project is empty during update FIX: avoid Warning: A non-numeric value encountered -FIX: bad consistency in list of invoice for direct debit order. -FIX: Bad error management in zip compress and web site export +FIX: bad consistency in list of invoice for direct debit order +FIX: bad error management in zip compress and web site export FIX: bad substitution for extrafields type checkbox FIX: better help message with multicompany FIX: calculation of $products_dispatched @@ -63,11 +137,11 @@ FIX: Can't delete a draft leave even if it should FIX: Can't save setup of mailman module FIX: column jabberid missing FIX: Confirmation of deletion -FIX: Consistency in direct debit order lists. +FIX: Consistency in direct debit order lists FIX: Content send before header warning FIX: credit note can be split FIX: credit note used on list -FIX: Css was saved on wrong website. +FIX: CSS was saved on wrong website FIX: delivery extrafields FIX: Disabling a website does not put it offline FIX: display only stripe sources for customer @@ -84,13 +158,13 @@ FIX: Fatal situation if payment removed on expense report. Action FIX: filepath of generated documents doesn't handle products with special characters FIX: for MAIN_MAXTABS_IN_CARD = $i card FIX: gzip and bzip2 must use option -f -FIX: It was possible to create cashfence without entering data. +FIX: it was possible to create cashfence without entering data FIX: javascript error when using dol_use_jmobile=1 FIX: logout redirect to takepos.php FIX: Look and feel v10 FIX: Make protected all pfd models functions FIX: management of extrafields in modulebuilder -FIX: Missing div for buttons in tax, loan, various payment modules +FIX: missing div for buttons in tax, loan, various payment modules FIX: missing include (dol_convert_file not found) FIX: Missing some replacements in website module FIX: missing test on permission on button to delete ledger record @@ -114,13 +188,13 @@ FIX: Return code of pdf_einstein.modules.php and proformat FIX: round for application fee in stripe FIX: Sens of the balance (Debit - Credit in accountancy not contrary) FIX: Several pb in export of documents -FIX: SQL syntax error and CSRF check on vat reports +FIX: SQL syntax error and CSRF check on VAT reports FIX: takepos layout clear or focus search -FIX: too many record in sql request. Whena criteria is a filter, we must +FIX: too many record in sql request. When a criteria is a filter, we must FIX: Translation of month FIX: USEDOLIBARREDITOR not always set FIX: VAT number for Monaco (it uses FR) -FIX: vulenrability in uploading file found by 美创科技安全实验室 +FIX: vulnerability in uploading file found by 美创科技安全实验室 FIX: wrong display (and hidden input) for already dispatched quantity FIX: wrong parameters (same error in branch 9, 10, develop) FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index d5af14f9171..8a3096ef72a 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -164,7 +164,7 @@ foreach ($files as $filetmp) { if (filetype($file)=="file") { $md5=md5_file($file); $checksumconcat[]=$md5; - fputs($fp, ' '.$md5.''."\n"); + fputs($fp, ' '.$md5.''."\n"); } } fputs($fp, ' '."\n"); @@ -207,7 +207,7 @@ foreach ($files as $filetmp) { if (filetype($file)=="file") { $md5=md5_file($file); $checksumconcat[]=$md5; - fputs($fp, ' '.$md5.''."\n"); + fputs($fp, ' '.$md5.''."\n"); } } fputs($fp, ' '."\n"); diff --git a/build/gource/README.md b/build/gource/README.md new file mode 100644 index 00000000000..548d01ebccb --- /dev/null +++ b/build/gource/README.md @@ -0,0 +1,10 @@ +# Command to run gource on Dolibarr git project. + +cd ~/git/dolibarr +gource -a 0.5 -c 4 -i 0 --max-files 0 --dir-name-depth 2 --max-file-lag 0.1 --max-user-speed 150 --user-friction 1 --user-scale 3 --file-filter svgs --file-filter _source --file-filter tests --file-show-filter htdocs --date-format "%d %b %Y" -logo doc/images/appicon_64.png --highlight-users --highlight-colour FFFF88 -s 0.5 -1280x720 -r 25 -title 'Dolibarr ERP CRM Genesis' --stop-at-end --filename-time 2 --user-image-dir build/gource/avatars --hide filenames + + +# To build a mp4 video +# Change -crf 1 to -crf 50 for max compression (best is 5) +cd ~/git/dolibarr +gource -a 0.5 -c 4 -i 0 --max-files 0 --dir-name-depth 2 --max-file-lag 0.1 --max-user-speed 150 --user-friction 1 --user-scale 3 --file-filter svgs --file-filter _source --file-filter tests --file-show-filter htdocs --date-format "%d %b %Y" -logo doc/images/appicon_64.png --highlight-users --highlight-colour FFFF88 -s 0.4 -1280x720 -r 25 -title 'Dolibarr ERP CRM Genesis' --stop-at-end --filename-time 2 --user-image-dir build/gource/avatars --hide filenames -o - | ffmpeg -y -r 25 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset slow -pix_fmt yuv420p -crf 5 -threads 0 -bf 0 dolibarr_genesis.mp4 diff --git a/build/gource/avatars/.gitignore b/build/gource/avatars/.gitignore new file mode 100644 index 00000000000..b44ef384e2d --- /dev/null +++ b/build/gource/avatars/.gitignore @@ -0,0 +1 @@ +/*.png diff --git a/build/gource/avatars/README.md b/build/gource/avatars/README.md new file mode 100644 index 00000000000..c0b3c6d79af --- /dev/null +++ b/build/gource/avatars/README.md @@ -0,0 +1 @@ +Directory that will be filled with avatars images of developers for gource \ No newline at end of file diff --git a/build/gource/getavatars.pl b/build/gource/getavatars.pl new file mode 100755 index 00000000000..1f73da34e91 --- /dev/null +++ b/build/gource/getavatars.pl @@ -0,0 +1,49 @@ +#!/usr/bin/perl +#fetch Gravatars + +use strict; +use warnings; + +use LWP::Simple; +use Digest::MD5 qw(md5_hex); + +my $size = 90; +my $output_dir = './avatars'; + +die("no .git/ directory found in current path\n") unless -d './avatars'; + +mkdir($output_dir) unless -d $output_dir; + +open(GITLOG, q/git log --pretty=format:"%ae|%an" |/) or die("failed to read git-log: $!\n"); + +my %processed_authors; + +while() { + chomp; + my($email, $author) = split(/\|/, $_); + + next if $processed_authors{$author}++; + + my $author_image_file = $output_dir . '/' . $author . '.png'; + + #skip images we have + next if -e $author_image_file; + + #try and fetch image + + my $grav_url = "http://www.gravatar.com/avatar/".md5_hex(lc $email)."?d=404&size=".$size; + + warn "fetching image for '$author' $email ($grav_url)...\n"; + + my $rc = getstore($grav_url, $author_image_file); + + sleep(1); + + if($rc != 200) { + unlink($author_image_file); + next; + } +} + +close GITLOG; + diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index bfdda2896a1..0c754b1c874 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -152,7 +152,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) $fuser = new User($db); $fuser->fetch(mt_rand(1, 2)); $fuser->getRights(); - + $result=$object->create($fuser); if ($result >= 0) { diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index e9703fbfd6e..83951c57df7 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -61,8 +61,8 @@ $user->getrights(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } } $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 30c9471a281..ad8cf6025bb 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -176,7 +176,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) $fuser = new User($db); $fuser->fetch(mt_rand(1, 2)); $fuser->getRights(); - + $object->contactid = $contids[$socids[$socid]][0]; $object->socid = $socids[$socid]; $object->datep = $dates[mt_rand(1, count($dates)-1)]; @@ -200,7 +200,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) } $xnbp++; } - + $result=$object->valid($fuser); if ($result > 0) { diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index 54e17c7f8d7..9f740b5705d 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -64,22 +64,34 @@ $user->getrights(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { + $row = $db->fetch_row($resql); + $productsid[$i] = $row[0]; + $i++; + } } $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } + while ($i < $num) { + $row = $db->fetch_row($resql); + $societesid[$i] = $row[0]; + $i++; + } } else { print "err"; } $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } + while ($i < $num) { + $row = $db->fetch_row($resql); + $commandesid[$i] = $row[0]; + $i++; + } } else { print "err"; } @@ -116,7 +128,6 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) $contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)]; if ( $contact->create($user) ) { - } } diff --git a/dev/initdemo/documents_demo/adherent/1/photos/person5.jpeg b/dev/initdemo/documents_demo/adherent/1/photos/person5.jpeg new file mode 100644 index 00000000000..3d541f760b8 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/1/photos/person5.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/1/photos/thumbs/person5_mini.jpeg b/dev/initdemo/documents_demo/adherent/1/photos/thumbs/person5_mini.jpeg new file mode 100644 index 00000000000..9cc8db56f70 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/1/photos/thumbs/person5_mini.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/1/photos/thumbs/person5_small.jpeg b/dev/initdemo/documents_demo/adherent/1/photos/thumbs/person5_small.jpeg new file mode 100644 index 00000000000..fce9527b378 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/1/photos/thumbs/person5_small.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/2/photos/pierrecurie.jpg b/dev/initdemo/documents_demo/adherent/2/photos/pierrecurie.jpg new file mode 100644 index 00000000000..8ea6696ba45 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/2/photos/pierrecurie.jpg differ diff --git a/dev/initdemo/documents_demo/adherent/2/photos/thumbs/pierrecurie_mini.jpg b/dev/initdemo/documents_demo/adherent/2/photos/thumbs/pierrecurie_mini.jpg new file mode 100644 index 00000000000..fcb7cbb0f74 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/2/photos/thumbs/pierrecurie_mini.jpg differ diff --git a/dev/initdemo/documents_demo/adherent/2/photos/thumbs/pierrecurie_small.jpg b/dev/initdemo/documents_demo/adherent/2/photos/thumbs/pierrecurie_small.jpg new file mode 100644 index 00000000000..3595b041ca2 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/2/photos/thumbs/pierrecurie_small.jpg differ diff --git a/dev/initdemo/documents_demo/adherent/3/photos/person9.jpeg b/dev/initdemo/documents_demo/adherent/3/photos/person9.jpeg new file mode 100644 index 00000000000..7aff8dccefe Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/3/photos/person9.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/3/photos/thumbs/person9_mini.jpeg b/dev/initdemo/documents_demo/adherent/3/photos/thumbs/person9_mini.jpeg new file mode 100644 index 00000000000..21e769f345d Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/3/photos/thumbs/person9_mini.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/3/photos/thumbs/person9_small.jpeg b/dev/initdemo/documents_demo/adherent/3/photos/thumbs/person9_small.jpeg new file mode 100644 index 00000000000..a9e67763dec Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/3/photos/thumbs/person9_small.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/4/photos/person2.jpeg b/dev/initdemo/documents_demo/adherent/4/photos/person2.jpeg new file mode 100644 index 00000000000..285010bb7b3 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/4/photos/person2.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/4/photos/thumbs/person2_mini.jpeg b/dev/initdemo/documents_demo/adherent/4/photos/thumbs/person2_mini.jpeg new file mode 100644 index 00000000000..4a3277d3754 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/4/photos/thumbs/person2_mini.jpeg differ diff --git a/dev/initdemo/documents_demo/adherent/4/photos/thumbs/person2_small.jpeg b/dev/initdemo/documents_demo/adherent/4/photos/thumbs/person2_small.jpeg new file mode 100644 index 00000000000..1c0bbd6d2d7 Binary files /dev/null and b/dev/initdemo/documents_demo/adherent/4/photos/thumbs/person2_small.jpeg differ diff --git a/dev/initdemo/mysqldump_dolibarr_10.0.0.sql b/dev/initdemo/mysqldump_dolibarr_10.0.0.sql index b4198933b39..fccb966c1a5 100644 --- a/dev/initdemo/mysqldump_dolibarr_10.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_10.0.0.sql @@ -102,7 +102,7 @@ CREATE TABLE `llx_accounting_bookkeeping` ( `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_accounting_bookkeeping_fk_doc` (`fk_doc`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -111,7 +111,7 @@ CREATE TABLE `llx_accounting_bookkeeping` ( LOCK TABLES `llx_accounting_bookkeeping` WRITE; /*!40000 ALTER TABLE `llx_accounting_bookkeeping` DISABLE KEYS */; -INSERT INTO `llx_accounting_bookkeeping` VALUES (2,'2017-02-19','','',0,0,NULL,'1','ttt',NULL,5.00000000,0.00000000,5.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','1',NULL,NULL,NULL,NULL),(4,'2017-02-19','','',0,0,NULL,'10','',NULL,0.00000000,5.00000000,5.00000000,'C',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','10',NULL,NULL,NULL,NULL),(6,'2017-02-19','','',0,0,NULL,'NotDefined','',NULL,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,2,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','NotDefined',NULL,NULL,NULL,NULL),(9,'2017-02-19','','',0,0,NULL,'NotDefined','',NULL,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,3,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','NotDefined',NULL,NULL,NULL,NULL); +INSERT INTO `llx_accounting_bookkeeping` VALUES (2,'2017-02-19','','',0,0,NULL,'1','ttt',NULL,5.00000000,0.00000000,5.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','1',NULL,NULL,NULL,NULL),(4,'2017-02-19','','',0,0,NULL,'10','',NULL,0.00000000,5.00000000,5.00000000,'C',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','10',NULL,NULL,NULL,NULL),(6,'2017-02-19','','',0,0,NULL,'NotDefined','',NULL,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,2,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','NotDefined',NULL,NULL,NULL,NULL),(9,'2017-02-19','','',0,0,NULL,'NotDefined','',NULL,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,3,NULL,NULL,1,NULL,'2017-08-27 15:29:05','2018-11-23 11:56:09','NotDefined',NULL,NULL,NULL,NULL),(10,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','401','Fournisseurs','Indian SAS - FR70813 - Subledger account',0.00000000,991.48000000,991.48000000,'C',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,NULL,1,NULL,'2019-10-04 10:18:07','2019-10-04 08:18:07','6050','Indian SAS',NULL,NULL,NULL),(11,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','104','Primes liées au capital social','Indian SAS - FR70813 - Primes liées au capital social',415.00000000,0.00000000,415.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,NULL,1,NULL,'2019-10-04 10:18:07','2019-10-04 08:18:07','','',NULL,NULL,NULL),(12,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','101','Capital','Indian SAS - FR70813 - Capital',414.00000000,0.00000000,414.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,NULL,1,NULL,'2019-10-04 10:18:07','2019-10-04 08:18:07','','',NULL,NULL,NULL),(13,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','10','Capital','Indian SAS - FR70813 - Sales tax 19.6 %',162.48000000,0.00000000,162.48000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,NULL,1,NULL,'2019-10-04 10:18:07','2019-10-04 08:18:07','','',NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_accounting_bookkeeping` ENABLE KEYS */; UNLOCK TABLES; @@ -324,7 +324,7 @@ CREATE TABLE `llx_actioncomm` ( KEY `idx_actioncomm_datep2` (`datep2`), KEY `idx_actioncomm_recurid` (`recurid`), KEY `idx_actioncomm_ref_ext` (`ref_ext`) -) ENGINE=InnoDB AUTO_INCREMENT=331 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=392 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -333,7 +333,7 @@ CREATE TABLE `llx_actioncomm` ( LOCK TABLES `llx_actioncomm` WRITE; /*!40000 ALTER TABLE `llx_actioncomm` DISABLE KEYS */; -INSERT INTO `llx_actioncomm` VALUES (1,NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(2,NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(3,NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2016-12-21 12:50:33',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(4,NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(5,NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2016-12-21 12:50:33',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(6,NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2016-12-21 12:50:33',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(7,NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(8,NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2016-12-21 12:50:33',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(9,NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(10,NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(11,NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(12,NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(13,NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(14,NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2012-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(15,NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(16,NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2016-12-21 12:50:33',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(17,NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(18,NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2012-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(19,NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(20,NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(21,NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(22,NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(23,NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(24,NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2013-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(25,NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2016-12-21 12:50:33',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(26,NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2016-12-21 12:50:33',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(27,NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(28,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(29,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(30,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(31,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(38,NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(40,NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(41,NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(42,NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(43,NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(44,NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(45,NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(46,NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(47,NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(48,NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(49,NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(50,NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(51,NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(52,NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(53,NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(54,NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(55,NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(56,NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(121,NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2014-12-21 16:54:07',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(122,NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@destailleur.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(123,NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(124,NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(125,NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2016-12-21 12:50:33',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(127,NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(128,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(129,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(130,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(131,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(132,NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(133,NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2016-12-21 12:50:33',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(134,NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2015-01-23 16:35:21',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(135,NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2016-12-21 12:50:33',1,1,NULL,7,NULL,0,1,NULL,1,0,0,1,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(136,NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(137,NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(138,NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(139,NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(140,NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(141,NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(142,NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2016-12-21 12:50:33',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(143,NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(144,NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2015-02-27 18:20:53',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(145,NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2015-02-27 18:29:53',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(146,NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(147,NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(148,NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(149,NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(150,NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(151,NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2016-12-21 12:50:33',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(152,NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(203,NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(204,NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2016-12-21 12:50:33',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(205,NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(206,NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(207,NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(208,NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(209,NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(210,NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(211,NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(212,NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(213,NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2016-12-21 12:50:33',1,NULL,NULL,27,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(214,NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2016-12-21 12:50:33',1,NULL,NULL,28,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(215,NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2016-12-21 12:50:33',1,NULL,NULL,29,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(216,NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2016-12-21 12:50:33',1,NULL,NULL,30,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(217,NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2016-12-21 12:50:33',1,NULL,NULL,31,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(218,NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2016-12-21 12:50:33',1,NULL,NULL,32,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(219,NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2016-12-21 12:50:33',1,NULL,NULL,33,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(220,NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(221,NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(222,NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2016-03-02 18:55:29',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(223,NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2016-03-02 18:55:11',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(224,NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2016-03-02 18:55:56',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(225,NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(226,NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(227,NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(228,NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(229,NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(230,NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(231,NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(232,NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2018-01-22 17:54:39',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(233,NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2018-01-22 17:54:46',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(234,NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2018-07-31 14:19:48',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,1,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(235,NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2018-07-31 14:20:36',12,NULL,4,NULL,2,0,12,1,NULL,0,1,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(236,NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2018-07-31 14:21:04',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(237,NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2018-07-31 14:22:04',12,NULL,6,4,NULL,0,13,0,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(238,NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2018-07-31 21:15:50',12,NULL,8,10,10,0,12,1,NULL,0,0,1,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(239,NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2017-01-29 17:49:33',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(240,NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2017-01-31 16:52:25',12,12,6,NULL,NULL,0,12,1,NULL,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(242,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(243,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(245,NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2017-02-01 14:52:32',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(249,NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2017-02-01 14:54:01',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(250,NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2017-02-01 14:54:42',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(251,NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2017-02-01 15:02:21',12,NULL,5,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(252,NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2017-02-12 19:17:04',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(253,NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2017-02-12 19:18:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(254,NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2017-02-15 22:28:41',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(255,NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2017-02-15 22:28:56',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(256,NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2017-02-15 22:34:33',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(257,NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2017-02-15 22:35:03',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(263,NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2017-02-15 22:50:34',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(264,NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2017-02-15 22:51:23',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(265,NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2017-02-15 22:54:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(266,NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2017-02-15 22:55:52',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(267,NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2017-02-15 23:03:44',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(268,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(269,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(270,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(271,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(272,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(273,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(274,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(275,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(277,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(278,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(279,NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2017-02-15 23:05:36',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(281,NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2017-02-15 23:05:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(282,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(283,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(284,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(285,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(286,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(287,NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2017-02-15 23:05:56',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(288,NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2017-02-15 23:06:01',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(294,NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2017-02-15 23:53:04',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(295,NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2017-02-15 23:58:08',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(296,NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2017-02-16 00:12:29',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(297,NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2017-02-16 00:14:20',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(298,NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2017-02-16 00:44:58',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(299,NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2017-02-16 00:45:44',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(300,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(301,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(302,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(303,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(304,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(305,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(306,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(307,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(308,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(309,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(310,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(311,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(312,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(313,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(314,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(315,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(316,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(317,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(318,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(319,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(320,NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2017-02-16 00:46:31',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(321,NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2017-02-16 00:46:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(322,NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2017-02-16 00:46:42',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(323,NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2017-02-16 00:47:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(324,NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2017-02-16 00:47:25',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(325,NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2017-02-16 00:47:29',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(326,NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2017-02-17 12:07:18',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(327,NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2017-05-12 09:53:44',12,NULL,NULL,11,12,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(328,NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2017-08-29 18:39:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(329,NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2019-09-26 11:38:11',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(330,NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2019-09-26 11:49:21',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'); +INSERT INTO `llx_actioncomm` VALUES (1,NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(2,NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(3,NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2016-12-21 12:50:33',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(4,NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(5,NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2016-12-21 12:50:33',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(6,NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2016-12-21 12:50:33',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(7,NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(8,NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2016-12-21 12:50:33',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(9,NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(10,NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(11,NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(12,NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(13,NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(14,NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2012-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(15,NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(16,NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2016-12-21 12:50:33',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(17,NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(18,NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2012-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(19,NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(20,NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(21,NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(22,NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(23,NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(24,NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2013-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(25,NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2016-12-21 12:50:33',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(26,NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2016-12-21 12:50:33',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(27,NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(28,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(29,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(30,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(31,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(38,NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(40,NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(41,NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(42,NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(43,NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(44,NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(45,NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(46,NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(47,NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(48,NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(49,NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(50,NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(51,NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(52,NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(53,NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(54,NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(55,NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(56,NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(121,NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2014-12-21 16:54:07',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(122,NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@destailleur.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(123,NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(124,NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(125,NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2016-12-21 12:50:33',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(127,NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(128,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(129,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(130,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(131,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(132,NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(133,NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2016-12-21 12:50:33',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(134,NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2015-01-23 16:35:21',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(135,NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2016-12-21 12:50:33',1,1,NULL,7,NULL,0,1,NULL,1,0,0,1,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(136,NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(137,NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(138,NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(139,NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(140,NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(141,NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(142,NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2016-12-21 12:50:33',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(143,NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(144,NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2015-02-27 18:20:53',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(145,NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2015-02-27 18:29:53',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(146,NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(147,NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(148,NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(149,NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(150,NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(151,NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2016-12-21 12:50:33',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(152,NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(203,NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(204,NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2016-12-21 12:50:33',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(205,NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(206,NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(207,NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(208,NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(209,NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(210,NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(211,NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(212,NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(213,NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2016-12-21 12:50:33',1,NULL,NULL,27,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(214,NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2016-12-21 12:50:33',1,NULL,NULL,28,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(215,NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2016-12-21 12:50:33',1,NULL,NULL,29,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(216,NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2016-12-21 12:50:33',1,NULL,NULL,30,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(217,NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2016-12-21 12:50:33',1,NULL,NULL,31,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(218,NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2016-12-21 12:50:33',1,NULL,NULL,32,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(219,NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2016-12-21 12:50:33',1,NULL,NULL,33,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(220,NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(221,NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(222,NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2016-03-02 18:55:29',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(223,NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2016-03-02 18:55:11',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(224,NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2016-03-02 18:55:56',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(225,NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(226,NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(227,NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(228,NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(229,NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(230,NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(231,NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(232,NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2018-01-22 17:54:39',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(233,NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2018-01-22 17:54:46',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(234,NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2018-07-31 14:19:48',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,1,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(235,NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2018-07-31 14:20:36',12,NULL,4,NULL,2,0,12,1,NULL,0,1,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(236,NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2018-07-31 14:21:04',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(237,NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2018-07-31 14:22:04',12,NULL,6,4,NULL,0,13,0,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(238,NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2018-07-31 21:15:50',12,NULL,8,10,10,0,12,1,NULL,0,0,1,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(239,NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2017-01-29 17:49:33',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(240,NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2017-01-31 16:52:25',12,12,6,NULL,NULL,0,12,1,NULL,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(242,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(243,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(245,NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2017-02-01 14:52:32',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(249,NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2017-02-01 14:54:01',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(250,NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2017-02-01 14:54:42',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(251,NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2017-02-01 15:02:21',12,NULL,5,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(252,NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2017-02-12 19:17:04',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(253,NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2017-02-12 19:18:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(254,NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2017-02-15 22:28:41',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(255,NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2017-02-15 22:28:56',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(256,NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2017-02-15 22:34:33',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(257,NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2017-02-15 22:35:03',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(263,NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2017-02-15 22:50:34',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(264,NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2017-02-15 22:51:23',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(265,NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2017-02-15 22:54:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(266,NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2017-02-15 22:55:52',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(267,NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2017-02-15 23:03:44',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(268,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(269,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(270,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(271,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(272,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(273,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(274,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(275,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(277,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(278,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(279,NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2017-02-15 23:05:36',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(281,NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2017-02-15 23:05:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(282,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(283,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(284,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(285,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(286,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(287,NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2017-02-15 23:05:56',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(288,NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2017-02-15 23:06:01',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(294,NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2017-02-15 23:53:04',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(295,NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2017-02-15 23:58:08',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(296,NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2017-02-16 00:12:29',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(297,NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2017-02-16 00:14:20',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(298,NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2017-02-16 00:44:58',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(299,NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2017-02-16 00:45:44',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(300,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(301,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(302,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(303,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(304,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(305,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(306,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(307,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(308,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(309,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(310,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(311,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(312,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(313,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(314,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(315,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(316,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(317,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(318,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(319,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(320,NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2017-02-16 00:46:31',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(321,NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2017-02-16 00:46:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(322,NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2017-02-16 00:46:42',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(323,NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2017-02-16 00:47:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(324,NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2017-02-16 00:47:25',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(325,NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2017-02-16 00:47:29',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(326,NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2017-02-17 12:07:18',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(327,NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2017-05-12 09:53:44',12,NULL,NULL,11,12,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(328,NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2017-08-29 18:39:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(329,NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2019-09-26 11:38:11',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(330,NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2019-09-26 11:49:21',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(331,NULL,1,'2019-09-26 17:33:37','2019-09-26 17:33:37',40,'AC_BILL_VALIDATE','Invoice FA1909-0025 validated','2019-09-26 17:33:37','2019-09-26 15:33:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1909-0025 validated',218,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(333,NULL,1,'2019-09-27 16:54:30','2019-09-27 16:54:30',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0031 validated','2019-09-27 16:54:30','2019-09-27 14:54:30',12,NULL,4,7,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0031 validated',10,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(335,NULL,1,'2019-09-27 17:08:59','2019-09-27 17:08:59',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0032 validated','2019-09-27 17:08:59','2019-09-27 15:08:59',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0032 validated',33,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(337,NULL,1,'2019-09-27 17:13:13','2019-09-27 17:13:13',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0033 validated','2019-09-27 17:13:13','2019-09-27 15:13:13',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 validated',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(338,NULL,1,'2019-09-27 17:53:31','2019-09-27 17:53:31',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 17:53:31','2019-09-27 15:53:31',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(339,NULL,1,'2019-09-27 18:15:00','2019-09-27 18:15:00',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:15:00','2019-09-27 16:15:00',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(340,NULL,1,'2019-09-27 18:40:32','2019-09-27 18:40:32',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:40:32','2019-09-27 16:40:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(341,NULL,1,'2019-09-27 19:16:07','2019-09-27 19:16:07',40,'AC_PRODUCT_CREATE','Product ppp created','2019-09-27 19:16:07','2019-09-27 17:16:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ppp created',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(342,NULL,1,'2019-09-27 19:18:01','2019-09-27 19:18:01',40,'AC_PRODUCT_MODIFY','Product ppp modified','2019-09-27 19:18:01','2019-09-27 17:18:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ppp modified',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(343,NULL,1,'2019-09-27 19:31:45','2019-09-27 19:31:45',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:31:45','2019-09-27 17:31:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(344,NULL,1,'2019-09-27 19:32:12','2019-09-27 19:32:12',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:32:12','2019-09-27 17:32:12',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(345,NULL,1,'2019-09-27 19:38:30','2019-09-27 19:38:30',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:30','2019-09-27 17:38:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(346,NULL,1,'2019-09-27 19:38:37','2019-09-27 19:38:37',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:37','2019-09-27 17:38:37',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(347,NULL,1,'2019-09-30 15:49:52',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #15ff11cay39skiaa] New message','2019-09-30 15:49:52','2019-09-30 13:49:52',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'dfsdfds',2,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(348,NULL,1,'2019-10-01 13:48:36','2019-10-01 13:48:36',40,'AC_PROJECT_MODIFY','Project PJ1607-0001 modified','2019-10-01 13:48:36','2019-10-01 11:48:36',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1607-0001 modified\nTask: PJ1607-0001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(349,NULL,1,'2019-10-04 10:10:25','2019-10-04 10:10:25',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:10:25','2019-10-04 08:10:25',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(350,NULL,1,'2019-10-04 10:10:47','2019-10-04 10:10:47',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:10:47','2019-10-04 08:10:47',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(351,NULL,1,'2019-10-04 10:26:49','2019-10-04 10:26:49',40,'AC_BILL_UNVALIDATE','Invoice FA6801-0010 go back to draft status','2019-10-04 10:26:49','2019-10-04 08:26:49',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 go back to draft status',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(352,NULL,1,'2019-10-04 10:27:00','2019-10-04 10:27:00',40,'AC_BILL_VALIDATE','Invoice FA6801-0010 validated','2019-10-04 10:27:00','2019-10-04 08:27:00',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 validated',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(353,NULL,1,'2019-10-04 10:28:14','2019-10-04 10:28:14',40,'AC_BILL_PAYED','Invoice FA6801-0010 changed to paid','2019-10-04 10:28:14','2019-10-04 08:28:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 changed to paid',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(354,NULL,1,'2019-10-04 10:29:22','2019-10-04 10:29:22',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:29:22','2019-10-04 08:29:22',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(355,NULL,1,'2019-10-04 10:29:41','2019-10-04 10:29:41',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI1601-0002 go back to draft status','2019-10-04 10:29:41','2019-10-04 08:29:41',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 go back to draft status',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(356,NULL,1,'2019-10-04 10:31:30','2019-10-04 10:31:30',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:31:30','2019-10-04 08:31:30',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(357,NULL,1,'2019-10-04 16:56:21',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 16:56:21','2019-10-04 14:56:21',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(358,NULL,1,'2019-10-04 17:08:04',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:08:04','2019-10-04 15:08:04',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'ddddd',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(359,NULL,1,'2019-10-04 17:25:05',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:25:05','2019-10-04 15:25:05',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(360,NULL,1,'2019-10-04 17:26:14',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:26:14','2019-10-04 15:26:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(361,NULL,1,'2019-10-04 17:30:10',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:30:10','2019-10-04 15:30:10',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(362,NULL,1,'2019-10-04 17:51:43',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:51:43','2019-10-04 15:51:43',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(363,NULL,1,'2019-10-04 17:52:02',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:02','2019-10-04 15:52:02',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(364,NULL,1,'2019-10-04 17:52:17',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:17','2019-10-04 15:52:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(365,NULL,1,'2019-10-04 17:52:39',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:39','2019-10-04 15:52:39',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(366,NULL,1,'2019-10-04 17:52:53',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:53','2019-10-04 15:52:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(367,NULL,1,'2019-10-04 17:53:13',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:13','2019-10-04 15:53:13',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(368,NULL,1,'2019-10-04 17:53:26',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:26','2019-10-04 15:53:26',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(369,NULL,1,'2019-10-04 17:53:48',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:48','2019-10-04 15:53:48',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(370,NULL,1,'2019-10-04 17:54:09',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:09','2019-10-04 15:54:09',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(371,NULL,1,'2019-10-04 17:54:28',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:28','2019-10-04 15:54:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(372,NULL,1,'2019-10-04 17:55:43',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:55:43','2019-10-04 15:55:43',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(373,NULL,1,'2019-10-04 17:56:01',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:56:01','2019-10-04 15:56:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(374,NULL,1,'2019-10-04 18:00:32',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:32','2019-10-04 16:00:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(375,NULL,1,'2019-10-04 18:00:58',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:58','2019-10-04 16:00:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(376,NULL,1,'2019-10-04 18:11:30',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:11:30','2019-10-04 16:11:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(377,NULL,1,'2019-10-04 18:12:02',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:12:02','2019-10-04 16:12:02',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fffffff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(378,NULL,1,'2019-10-04 18:49:30',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:49:30','2019-10-04 16:49:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(379,NULL,1,'2019-10-04 19:00:22',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:00:22','2019-10-04 17:00:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(380,NULL,1,'2019-10-04 19:24:20','2019-10-04 19:24:20',40,'AC_PROPAL_SENTBYMAIL','Email sent by Alice Adminson To NLTechno','2019-10-04 19:24:20','2019-10-04 17:24:20',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nSender: Alice Adminson <aadminson@example.com>
\nReceiver(s): NLTechno <notanemail@nltechno.com>
\nEmail topic: Envoi de la proposition commerciale PR1909-0032
\nEmail body:
\nHello
\r\n
\r\nVeuillez trouver, ci-joint, la proposition commerciale PR1909-0032
\r\n
\r\n
\r\nSincerely
\r\n
\r\nAlice - 123
\n
\nAttached files and documents: PR1909-0032.pdf',33,'propal',NULL,'Envoi de la proposition commerciale PR1909-0032','Alice Adminson ',NULL,'NLTechno ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(381,NULL,1,'2019-10-04 19:30:13',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:30:13','2019-10-04 17:30:13',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(382,NULL,1,'2019-10-04 19:32:55',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:32:55','2019-10-04 17:32:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'uuuuuu\n\nAttached files and documents: Array',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(383,NULL,1,'2019-10-04 19:37:16',NULL,40,'TICKET_MSG','','2019-10-04 19:37:16','2019-10-04 17:37:16',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,100,'',NULL,NULL,'f\n\nFichiers et documents joints: dolihelp.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(384,NULL,1,'2019-10-04 19:39:07',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaafff\n\nAttached files and documents: dolibarr.gif;doliadmin.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(385,NULL,1,'2019-10-07 12:17:07','2019-10-07 12:17:07',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:07','2019-10-07 10:17:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',17,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(386,NULL,1,'2019-10-07 12:17:32','2019-10-07 12:17:32',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:32','2019-10-07 10:17:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',18,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(387,NULL,1,'2019-10-08 19:21:07','2019-10-08 19:21:07',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-10-08 19:21:07','2019-10-08 17:21:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(388,NULL,1,'2019-10-08 21:01:07','2019-10-08 21:01:07',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-10-08 21:01:07','2019-10-08 19:01:07',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(389,NULL,1,'2019-10-08 21:01:22','2019-10-08 21:01:22',40,'AC_MEMBER_MODIFY','Member doe john modified','2019-10-08 21:01:22','2019-10-08 19:01:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(390,NULL,1,'2019-10-08 21:01:45','2019-10-08 21:01:45',40,'AC_MEMBER_MODIFY','Member smith smith modified','2019-10-08 21:01:45','2019-10-08 19:01:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(391,NULL,1,'2019-10-08 21:02:18','2019-10-08 21:02:18',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2019-10-08 21:02:18','2019-10-08 19:02:18',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'); /*!40000 ALTER TABLE `llx_actioncomm` ENABLE KEYS */; UNLOCK TABLES; @@ -413,7 +413,7 @@ CREATE TABLE `llx_actioncomm_resources` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_actioncomm_resources` (`fk_actioncomm`,`element_type`,`fk_element`), KEY `idx_actioncomm_resources_fk_element` (`fk_element`) -) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=279 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -422,7 +422,7 @@ CREATE TABLE `llx_actioncomm_resources` ( LOCK TABLES `llx_actioncomm_resources` WRITE; /*!40000 ALTER TABLE `llx_actioncomm_resources` DISABLE KEYS */; -INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1),(110,232,'user',12,'0',0,0),(111,233,'user',12,'0',0,0),(112,234,'user',12,'0',0,1),(113,235,'user',12,'0',0,1),(114,236,'user',4,'0',0,0),(115,237,'user',13,'0',0,0),(116,237,'user',16,'0',0,0),(117,237,'user',18,'0',0,0),(118,238,'user',12,'0',0,1),(119,238,'user',3,'0',0,1),(120,238,'user',10,'0',0,1),(121,239,'user',12,'0',0,0),(123,240,'user',12,'0',0,1),(125,242,'user',12,'0',0,0),(126,243,'user',12,'0',0,0),(128,245,'user',12,'0',0,0),(132,249,'user',12,'0',0,0),(133,250,'user',12,'0',0,0),(134,251,'user',12,'0',0,0),(135,252,'user',12,'0',0,0),(136,253,'user',12,'0',0,0),(137,254,'user',12,'0',0,0),(138,255,'user',12,'0',0,0),(139,256,'user',12,'0',0,0),(140,257,'user',12,'0',0,0),(146,263,'user',12,'0',0,0),(147,264,'user',12,'0',0,0),(148,265,'user',12,'0',0,0),(149,266,'user',12,'0',0,0),(150,267,'user',12,'0',0,0),(151,268,'user',12,'0',0,0),(152,269,'user',12,'0',0,0),(153,270,'user',12,'0',0,0),(154,271,'user',12,'0',0,0),(155,272,'user',12,'0',0,0),(156,273,'user',12,'0',0,0),(157,274,'user',12,'0',0,0),(158,275,'user',12,'0',0,0),(160,277,'user',12,'0',0,0),(161,278,'user',12,'0',0,0),(162,279,'user',12,'0',0,0),(164,281,'user',12,'0',0,0),(165,282,'user',12,'0',0,0),(166,283,'user',12,'0',0,0),(167,284,'user',12,'0',0,0),(168,285,'user',12,'0',0,0),(169,286,'user',12,'0',0,0),(170,287,'user',12,'0',0,0),(171,288,'user',12,'0',0,0),(177,294,'user',12,'0',0,0),(178,295,'user',12,'0',0,0),(179,296,'user',12,'0',0,0),(180,297,'user',12,'0',0,0),(181,298,'user',1,'0',0,0),(182,299,'user',2,'0',0,0),(183,300,'user',1,'0',0,0),(184,301,'user',2,'0',0,0),(185,302,'user',2,'0',0,0),(186,303,'user',2,'0',0,0),(187,304,'user',1,'0',0,0),(188,305,'user',2,'0',0,0),(189,306,'user',2,'0',0,0),(190,307,'user',1,'0',0,0),(191,308,'user',1,'0',0,0),(192,309,'user',1,'0',0,0),(193,310,'user',2,'0',0,0),(194,311,'user',2,'0',0,0),(195,312,'user',1,'0',0,0),(196,313,'user',2,'0',0,0),(197,314,'user',1,'0',0,0),(198,315,'user',2,'0',0,0),(199,316,'user',2,'0',0,0),(200,317,'user',2,'0',0,0),(201,318,'user',1,'0',0,0),(202,319,'user',2,'0',0,0),(203,320,'user',12,'0',0,0),(204,321,'user',12,'0',0,0),(205,322,'user',12,'0',0,0),(206,323,'user',12,'0',0,0),(207,324,'user',12,'0',0,0),(208,325,'user',12,'0',0,0),(209,326,'user',12,'0',0,0),(210,327,'user',12,'0',0,0),(211,328,'user',12,'0',0,0),(212,24,'socpeople',2,NULL,NULL,1),(213,235,'socpeople',2,NULL,NULL,1),(214,238,'socpeople',10,NULL,NULL,1),(215,327,'socpeople',12,NULL,NULL,1),(216,329,'user',12,'0',0,0),(217,330,'user',12,'0',0,0); +INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1),(110,232,'user',12,'0',0,0),(111,233,'user',12,'0',0,0),(112,234,'user',12,'0',0,1),(113,235,'user',12,'0',0,1),(114,236,'user',4,'0',0,0),(115,237,'user',13,'0',0,0),(116,237,'user',16,'0',0,0),(117,237,'user',18,'0',0,0),(118,238,'user',12,'0',0,1),(119,238,'user',3,'0',0,1),(120,238,'user',10,'0',0,1),(121,239,'user',12,'0',0,0),(123,240,'user',12,'0',0,1),(125,242,'user',12,'0',0,0),(126,243,'user',12,'0',0,0),(128,245,'user',12,'0',0,0),(132,249,'user',12,'0',0,0),(133,250,'user',12,'0',0,0),(134,251,'user',12,'0',0,0),(135,252,'user',12,'0',0,0),(136,253,'user',12,'0',0,0),(137,254,'user',12,'0',0,0),(138,255,'user',12,'0',0,0),(139,256,'user',12,'0',0,0),(140,257,'user',12,'0',0,0),(146,263,'user',12,'0',0,0),(147,264,'user',12,'0',0,0),(148,265,'user',12,'0',0,0),(149,266,'user',12,'0',0,0),(150,267,'user',12,'0',0,0),(151,268,'user',12,'0',0,0),(152,269,'user',12,'0',0,0),(153,270,'user',12,'0',0,0),(154,271,'user',12,'0',0,0),(155,272,'user',12,'0',0,0),(156,273,'user',12,'0',0,0),(157,274,'user',12,'0',0,0),(158,275,'user',12,'0',0,0),(160,277,'user',12,'0',0,0),(161,278,'user',12,'0',0,0),(162,279,'user',12,'0',0,0),(164,281,'user',12,'0',0,0),(165,282,'user',12,'0',0,0),(166,283,'user',12,'0',0,0),(167,284,'user',12,'0',0,0),(168,285,'user',12,'0',0,0),(169,286,'user',12,'0',0,0),(170,287,'user',12,'0',0,0),(171,288,'user',12,'0',0,0),(177,294,'user',12,'0',0,0),(178,295,'user',12,'0',0,0),(179,296,'user',12,'0',0,0),(180,297,'user',12,'0',0,0),(181,298,'user',1,'0',0,0),(182,299,'user',2,'0',0,0),(183,300,'user',1,'0',0,0),(184,301,'user',2,'0',0,0),(185,302,'user',2,'0',0,0),(186,303,'user',2,'0',0,0),(187,304,'user',1,'0',0,0),(188,305,'user',2,'0',0,0),(189,306,'user',2,'0',0,0),(190,307,'user',1,'0',0,0),(191,308,'user',1,'0',0,0),(192,309,'user',1,'0',0,0),(193,310,'user',2,'0',0,0),(194,311,'user',2,'0',0,0),(195,312,'user',1,'0',0,0),(196,313,'user',2,'0',0,0),(197,314,'user',1,'0',0,0),(198,315,'user',2,'0',0,0),(199,316,'user',2,'0',0,0),(200,317,'user',2,'0',0,0),(201,318,'user',1,'0',0,0),(202,319,'user',2,'0',0,0),(203,320,'user',12,'0',0,0),(204,321,'user',12,'0',0,0),(205,322,'user',12,'0',0,0),(206,323,'user',12,'0',0,0),(207,324,'user',12,'0',0,0),(208,325,'user',12,'0',0,0),(209,326,'user',12,'0',0,0),(210,327,'user',12,'0',0,0),(211,328,'user',12,'0',0,0),(212,24,'socpeople',2,NULL,NULL,1),(213,235,'socpeople',2,NULL,NULL,1),(214,238,'socpeople',10,NULL,NULL,1),(215,327,'socpeople',12,NULL,NULL,1),(216,329,'user',12,'0',0,0),(217,330,'user',12,'0',0,0),(218,331,'user',12,'0',0,0),(220,333,'user',12,'0',0,0),(222,335,'user',12,'0',0,0),(224,337,'user',12,'0',0,0),(225,338,'user',12,'0',0,0),(226,339,'user',12,'0',0,0),(227,340,'user',12,'0',0,0),(228,341,'user',12,'0',0,0),(229,342,'user',12,'0',0,0),(230,343,'user',12,'0',0,0),(231,344,'user',12,'0',0,0),(232,345,'user',12,'0',0,0),(233,346,'user',12,'0',0,0),(234,347,'user',12,'0',0,0),(235,348,'user',12,'0',0,0),(236,349,'user',12,'0',0,0),(237,350,'user',12,'0',0,0),(238,351,'user',12,'0',0,0),(239,352,'user',12,'0',0,0),(240,353,'user',12,'0',0,0),(241,354,'user',12,'0',0,0),(242,355,'user',12,'0',0,0),(243,356,'user',12,'0',0,0),(244,357,'user',12,'0',0,0),(245,358,'user',12,'0',0,0),(246,359,'user',12,'0',0,0),(247,360,'user',12,'0',0,0),(248,361,'user',12,'0',0,0),(249,362,'user',12,'0',0,0),(250,363,'user',12,'0',0,0),(251,364,'user',12,'0',0,0),(252,365,'user',12,'0',0,0),(253,366,'user',12,'0',0,0),(254,367,'user',12,'0',0,0),(255,368,'user',12,'0',0,0),(256,369,'user',12,'0',0,0),(257,370,'user',12,'0',0,0),(258,371,'user',12,'0',0,0),(259,372,'user',12,'0',0,0),(260,373,'user',12,'0',0,0),(261,374,'user',12,'0',0,0),(262,375,'user',12,'0',0,0),(263,376,'user',12,'0',0,0),(264,377,'user',12,'0',0,0),(265,378,'user',12,'0',0,0),(266,379,'user',12,'0',0,0),(267,380,'user',12,'0',0,0),(268,381,'user',12,'0',0,0),(269,382,'user',12,'0',0,0),(270,383,'user',0,'0',0,0),(271,384,'user',12,'0',0,0),(272,385,'user',12,'0',0,0),(273,386,'user',12,'0',0,0),(274,387,'user',12,'0',0,0),(275,388,'user',12,'0',0,0),(276,389,'user',12,'0',0,0),(277,390,'user',12,'0',0,0),(278,391,'user',12,'0',0,0); /*!40000 ALTER TABLE `llx_actioncomm_resources` ENABLE KEYS */; UNLOCK TABLES; @@ -497,7 +497,7 @@ CREATE TABLE `llx_adherent` ( LOCK TABLES `llx_adherent` WRITE; /*!40000 ALTER TABLE `llx_adherent` DISABLE KEYS */; -INSERT INTO `llx_adherent` VALUES (1,1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',NULL,2,'phy',NULL,10,NULL,NULL,NULL,NULL,102,'vsmith@email.com',NULL,NULL,NULL,NULL,'1960-07-07',NULL,1,0,'2014-07-09 00:00:00',NULL,NULL,'2012-07-10 15:12:56','2012-07-08 23:50:00','2015-03-20 13:30:11',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,1,NULL,NULL,'Curie','Pierre','pcurie','pcuriedolibarr',NULL,2,'phy',NULL,12,NULL,NULL,NULL,NULL,NULL,'pcurie@example.com','',NULL,NULL,NULL,NULL,NULL,1,1,'2017-07-17 00:00:00',NULL,NULL,'2012-07-10 15:03:32','2012-07-10 15:03:09','2019-09-26 11:38:11',1,12,1,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',NULL),(3,1,NULL,NULL,'john','doe','john','8bs6gty5',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,1,'johndoe@email.com',NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,'2013-07-18 21:28:00','2013-07-18 21:10:09','2017-10-03 09:28:46',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,1,NULL,NULL,'smith','smith','Smith','s6hjp10f',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,11,'smith@email.com',NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,'2013-07-18 21:27:52','2013-07-18 21:27:44','2017-10-03 09:40:27',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_adherent` VALUES (1,1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',NULL,2,'phy',NULL,10,NULL,NULL,NULL,NULL,102,'vsmith@email.com','',NULL,NULL,NULL,'1960-07-07','person5.jpeg',1,0,'2014-07-09 00:00:00',NULL,NULL,'2012-07-10 15:12:56','2012-07-08 23:50:00','2019-10-08 19:02:18',1,12,1,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'','woman'),(2,1,NULL,NULL,'Curie','Pierre','pcurie','pcuriedolibarr',NULL,2,'phy',NULL,12,NULL,NULL,NULL,NULL,NULL,'pcurie@example.com','',NULL,NULL,NULL,NULL,'pierrecurie.jpg',1,1,'2017-07-17 00:00:00',NULL,NULL,'2012-07-10 15:03:32','2012-07-10 15:03:09','2019-10-08 19:01:07',1,12,1,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',NULL),(3,1,NULL,NULL,'john','doe','john','8bs6gty5',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,1,'johndoe@email.com','',NULL,NULL,NULL,NULL,'person9.jpeg',1,0,NULL,NULL,NULL,'2013-07-18 21:28:00','2013-07-18 21:10:09','2019-10-08 19:01:22',1,12,1,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',NULL),(4,1,NULL,NULL,'smith','smith','Smith','s6hjp10f',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,11,'smith@email.com','',NULL,NULL,NULL,NULL,'person2.jpeg',1,0,NULL,NULL,NULL,'2013-07-18 21:27:52','2013-07-18 21:27:44','2019-10-08 19:01:45',1,12,1,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',NULL); /*!40000 ALTER TABLE `llx_adherent` ENABLE KEYS */; UNLOCK TABLES; @@ -512,14 +512,14 @@ CREATE TABLE `llx_adherent_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, - `zzz` varchar(125) COLLATE utf8_unicode_ci DEFAULT NULL, `aaa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sssss` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extradatamember` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_options` (`fk_object`), KEY `idx_adherent_extrafields` (`fk_object`) -) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -528,7 +528,7 @@ CREATE TABLE `llx_adherent_extrafields` ( LOCK TABLES `llx_adherent_extrafields` WRITE; /*!40000 ALTER TABLE `llx_adherent_extrafields` DISABLE KEYS */; -INSERT INTO `llx_adherent_extrafields` VALUES (62,'2013-07-18 19:10:09',3,NULL,NULL,NULL,NULL),(63,'2013-07-18 19:27:44',4,NULL,NULL,NULL,NULL); +INSERT INTO `llx_adherent_extrafields` VALUES (64,'2019-10-08 19:01:07',2,NULL,NULL,NULL,NULL),(65,'2019-10-08 19:01:22',3,NULL,NULL,NULL,NULL),(66,'2019-10-08 19:01:45',4,NULL,NULL,NULL,NULL),(67,'2019-10-08 19:02:18',1,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_adherent_extrafields` ENABLE KEYS */; UNLOCK TABLES; @@ -577,6 +577,7 @@ CREATE TABLE `llx_adherent_type_extrafields` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `extradatamembertype` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_type_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -781,7 +782,7 @@ CREATE TABLE `llx_bank` ( KEY `idx_bank_fk_account` (`fk_account`), KEY `idx_bank_rappro` (`rappro`), KEY `idx_bank_num_releve` (`num_releve`) -) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -790,7 +791,7 @@ CREATE TABLE `llx_bank` ( LOCK TABLES `llx_bank` WRITE; /*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */; -INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2018-07-30 15:16:10','2018-07-08','2018-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:00:24','2018-07-30 15:16:10','2018-07-09','2018-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(3,'2012-07-10 13:33:42','2018-07-30 15:16:10','2018-07-10','2018-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(5,'2013-07-18 20:50:24','2018-07-30 15:16:10','2018-07-08','2018-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(6,'2013-07-18 20:50:47','2018-07-30 15:16:10','2018-07-08','2018-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,'2013-08-01 03:34:11','2018-07-30 15:21:31','2017-08-01','2017-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(12,'2013-08-05 23:11:37','2018-07-30 15:21:31','2017-08-05','2017-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(13,'2013-08-06 20:33:54','2018-07-30 15:21:31','2017-08-06','2017-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(14,'2013-08-08 02:53:40','2018-07-30 15:21:31','2017-08-08','2017-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(15,'2013-08-08 02:55:58','2018-07-30 15:21:31','2017-08-08','2017-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(16,'2014-12-09 15:28:44','2018-07-30 15:21:31','2017-12-09','2017-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(17,'2014-12-09 15:28:53','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(18,'2014-12-09 17:35:55','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(19,'2014-12-09 17:37:02','2018-07-30 15:21:31','2017-12-09','2017-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(20,'2014-12-09 18:35:07','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(21,'2014-12-12 18:54:33','2018-07-30 15:21:31','2017-12-12','2017-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(22,'2015-03-06 16:48:16','2018-07-30 15:16:10','2018-03-06','2018-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(23,'2015-03-20 14:30:11','2018-07-30 15:16:10','2018-03-20','2018-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(24,'2016-03-02 19:57:58','2018-07-30 15:16:10','2018-07-09','2018-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL),(26,'2016-03-02 20:01:39','2018-07-30 15:16:10','2018-03-19','2018-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(27,'2016-03-02 20:02:06','2018-07-30 15:16:10','2018-03-21','2018-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL),(28,'2016-03-03 19:22:32','2018-07-30 15:21:31','2017-10-03','2017-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(29,'2016-03-03 19:23:16','2018-07-30 15:16:10','2018-03-10','2018-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(30,'2018-01-22 18:56:34','2018-01-22 17:56:34','2018-01-22','2018-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(31,'2018-07-30 22:42:14','2018-07-30 14:42:14','2018-07-30','2018-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2017-02-01 15:02:44','2017-02-01','2017-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2017-02-06 04:12:05','2018-03-22','2018-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL),(34,'2017-02-06 08:10:50','2017-02-06 04:10:50','2018-03-25','2018-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(35,'2017-02-12 23:18:33','2017-02-12 19:18:33','2017-02-12','2017-02-12',50.00000000,'Patient payment',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'aaa',NULL,NULL),(36,'2017-02-16 02:22:09','2017-02-15 22:22:09','2017-02-16','2017-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21','2017-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2017-09-06 16:08:36','2017-09-06','2017-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(39,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16','2018-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,''); +INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2018-07-30 15:16:10','2018-07-08','2018-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:00:24','2018-07-30 15:16:10','2018-07-09','2018-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(3,'2012-07-10 13:33:42','2018-07-30 15:16:10','2018-07-10','2018-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(5,'2013-07-18 20:50:24','2018-07-30 15:16:10','2018-07-08','2018-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(6,'2013-07-18 20:50:47','2018-07-30 15:16:10','2018-07-08','2018-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,'2013-08-01 03:34:11','2018-07-30 15:21:31','2017-08-01','2017-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(12,'2013-08-05 23:11:37','2018-07-30 15:21:31','2017-08-05','2017-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(13,'2013-08-06 20:33:54','2018-07-30 15:21:31','2017-08-06','2017-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(14,'2013-08-08 02:53:40','2018-07-30 15:21:31','2017-08-08','2017-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(15,'2013-08-08 02:55:58','2018-07-30 15:21:31','2017-08-08','2017-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(16,'2014-12-09 15:28:44','2018-07-30 15:21:31','2017-12-09','2017-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(17,'2014-12-09 15:28:53','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(18,'2014-12-09 17:35:55','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(19,'2014-12-09 17:37:02','2018-07-30 15:21:31','2017-12-09','2017-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(20,'2014-12-09 18:35:07','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(21,'2014-12-12 18:54:33','2018-07-30 15:21:31','2017-12-12','2017-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(22,'2015-03-06 16:48:16','2018-07-30 15:16:10','2018-03-06','2018-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(23,'2015-03-20 14:30:11','2018-07-30 15:16:10','2018-03-20','2018-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(24,'2016-03-02 19:57:58','2018-07-30 15:16:10','2018-07-09','2018-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL),(26,'2016-03-02 20:01:39','2018-07-30 15:16:10','2018-03-19','2018-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(27,'2016-03-02 20:02:06','2018-07-30 15:16:10','2018-03-21','2018-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL),(28,'2016-03-03 19:22:32','2018-07-30 15:21:31','2017-10-03','2017-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(29,'2016-03-03 19:23:16','2018-07-30 15:16:10','2018-03-10','2018-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(30,'2018-01-22 18:56:34','2018-01-22 17:56:34','2018-01-22','2018-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(31,'2018-07-30 22:42:14','2018-07-30 14:42:14','2018-07-30','2018-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2017-02-01 15:02:44','2017-02-01','2017-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2017-02-06 04:12:05','2018-03-22','2018-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL),(34,'2017-02-06 08:10:50','2017-02-06 04:10:50','2018-03-25','2018-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(35,'2017-02-12 23:18:33','2017-02-12 19:18:33','2017-02-12','2017-02-12',50.00000000,'Patient payment',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'aaa',NULL,NULL),(36,'2017-02-16 02:22:09','2017-02-15 22:22:09','2017-02-16','2017-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21','2017-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2017-09-06 16:08:36','2017-09-06','2017-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(39,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16','2018-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,''),(41,'2019-10-04 10:28:14','2019-10-04 08:28:14','2018-01-19','2018-01-19',5.63000000,'(CustomerInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(42,'2019-10-08 13:18:50','2019-10-08 11:18:50','2019-10-08','2019-10-08',-1000.00000000,'Salary payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''); /*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */; UNLOCK TABLES; @@ -946,7 +947,7 @@ CREATE TABLE `llx_bank_url` ( `type` varchar(24) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bank_url` (`fk_bank`,`url_id`,`type`) -) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -955,7 +956,7 @@ CREATE TABLE `llx_bank_url` ( LOCK TABLES `llx_bank_url` WRITE; /*!40000 ALTER TABLE `llx_bank_url` DISABLE KEYS */; -INSERT INTO `llx_bank_url` VALUES (3,5,2,'/compta/paiement/card.php?id=','(paiement)','payment'),(4,5,2,'/comm/card.php?socid=','Belin SARL','company'),(5,6,3,'/compta/paiement/card.php?id=','(paiement)','payment'),(6,6,2,'/comm/card.php?socid=','Belin SARL','company'),(9,8,5,'/compta/paiement/card.php?id=','(paiement)','payment'),(10,8,7,'/comm/card.php?socid=','Generic customer','company'),(17,12,4,'/compta/payment_sc/card.php?id=','(paiement)','payment_sc'),(18,12,4,'/compta/charges.php?id=','Assurance Chomage (fff)','sc'),(19,13,6,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(20,13,7,'/dolibarrnew/comm/card.php?socid=','Generic customer','company'),(21,14,8,'/compta/paiement/card.php?id=','(paiement)','payment'),(22,14,2,'/comm/card.php?socid=','Belin SARL','company'),(23,15,9,'/compta/paiement/card.php?id=','(paiement)','payment'),(24,15,10,'/comm/card.php?socid=','Smith Vick','company'),(25,16,17,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(26,16,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(27,17,18,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(28,17,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(29,18,19,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(30,18,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(31,19,20,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(32,19,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(33,20,21,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(34,20,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(35,21,23,'/compta/paiement/card.php?id=','(paiement)','payment'),(36,21,1,'/comm/card.php?socid=','ABC and Co','company'),(37,22,24,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(38,22,12,'/dolibarrnew/comm/card.php?socid=','Dupont Alain','company'),(39,23,25,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(40,23,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(41,24,26,'/compta/paiement/card.php?id=','(paiement)','payment'),(42,24,1,'/comm/card.php?socid=','ABC and Co','company'),(45,26,29,'/compta/paiement/card.php?id=','(paiement)','payment'),(46,26,1,'/comm/card.php?socid=','ABC and Co','company'),(47,27,30,'/compta/paiement/card.php?id=','(paiement)','payment'),(48,27,1,'/comm/card.php?socid=','ABC and Co','company'),(49,28,32,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(50,28,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'),(51,29,33,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(52,29,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'),(53,30,1,'/dolibarr_3.8/htdocs/fourn/paiement/card.php?id=','(paiement)','payment_supplier'),(54,30,1,'/dolibarr_3.8/htdocs/fourn/card.php?socid=','Indian SAS','company'),(55,32,2,'/dolibarr_5.0/htdocs/fourn/paiement/card.php?id=','(paiement)','payment_supplier'),(56,32,13,'/dolibarr_5.0/htdocs/fourn/card.php?socid=','Company Corp 2','company'),(57,33,34,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(58,33,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(59,34,35,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(60,34,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(61,35,2,'/dolibarr_5.0/htdocs/dolimed_5.0/cabinetmed/consultations.php?action=edit&socid=26&id=','Consultation','consultation'),(62,35,26,'','aaa','company'),(63,36,2,'/dolibarr_5.0/htdocs/expensereport/payment/card.php?rowid=','(paiement)','payment_expensereport'),(64,36,12,'/dolibarr_5.0/htdocs/user/card.php?id=','','user'),(65,37,36,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(66,37,1,'/dolibarr_5.0/htdocs/compta/prelevement/card.php?id=','T170201','withdraw'),(67,38,1,'/dolibarr_6.0/htdocs/don/payment/card.php?rowid=','(paiement)','payment_donation'),(68,39,38,'/dolibarr_7.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(69,39,1,'/dolibarr_7.0/htdocs/comm/card.php?socid=','Indian SAS','company'); +INSERT INTO `llx_bank_url` VALUES (3,5,2,'/compta/paiement/card.php?id=','(paiement)','payment'),(4,5,2,'/comm/card.php?socid=','Belin SARL','company'),(5,6,3,'/compta/paiement/card.php?id=','(paiement)','payment'),(6,6,2,'/comm/card.php?socid=','Belin SARL','company'),(9,8,5,'/compta/paiement/card.php?id=','(paiement)','payment'),(10,8,7,'/comm/card.php?socid=','Generic customer','company'),(17,12,4,'/compta/payment_sc/card.php?id=','(paiement)','payment_sc'),(18,12,4,'/compta/charges.php?id=','Assurance Chomage (fff)','sc'),(19,13,6,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(20,13,7,'/dolibarrnew/comm/card.php?socid=','Generic customer','company'),(21,14,8,'/compta/paiement/card.php?id=','(paiement)','payment'),(22,14,2,'/comm/card.php?socid=','Belin SARL','company'),(23,15,9,'/compta/paiement/card.php?id=','(paiement)','payment'),(24,15,10,'/comm/card.php?socid=','Smith Vick','company'),(25,16,17,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(26,16,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(27,17,18,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(28,17,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(29,18,19,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(30,18,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(31,19,20,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(32,19,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(33,20,21,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(34,20,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(35,21,23,'/compta/paiement/card.php?id=','(paiement)','payment'),(36,21,1,'/comm/card.php?socid=','ABC and Co','company'),(37,22,24,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(38,22,12,'/dolibarrnew/comm/card.php?socid=','Dupont Alain','company'),(39,23,25,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(40,23,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(41,24,26,'/compta/paiement/card.php?id=','(paiement)','payment'),(42,24,1,'/comm/card.php?socid=','ABC and Co','company'),(45,26,29,'/compta/paiement/card.php?id=','(paiement)','payment'),(46,26,1,'/comm/card.php?socid=','ABC and Co','company'),(47,27,30,'/compta/paiement/card.php?id=','(paiement)','payment'),(48,27,1,'/comm/card.php?socid=','ABC and Co','company'),(49,28,32,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(50,28,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'),(51,29,33,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(52,29,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'),(53,30,1,'/dolibarr_3.8/htdocs/fourn/paiement/card.php?id=','(paiement)','payment_supplier'),(54,30,1,'/dolibarr_3.8/htdocs/fourn/card.php?socid=','Indian SAS','company'),(55,32,2,'/dolibarr_5.0/htdocs/fourn/paiement/card.php?id=','(paiement)','payment_supplier'),(56,32,13,'/dolibarr_5.0/htdocs/fourn/card.php?socid=','Company Corp 2','company'),(57,33,34,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(58,33,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(59,34,35,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(60,34,19,'/dolibarr_5.0/htdocs/comm/card.php?socid=','Magic Food Store','company'),(61,35,2,'/dolibarr_5.0/htdocs/dolimed_5.0/cabinetmed/consultations.php?action=edit&socid=26&id=','Consultation','consultation'),(62,35,26,'','aaa','company'),(63,36,2,'/dolibarr_5.0/htdocs/expensereport/payment/card.php?rowid=','(paiement)','payment_expensereport'),(64,36,12,'/dolibarr_5.0/htdocs/user/card.php?id=','','user'),(65,37,36,'/dolibarr_5.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(66,37,1,'/dolibarr_5.0/htdocs/compta/prelevement/card.php?id=','T170201','withdraw'),(67,38,1,'/dolibarr_6.0/htdocs/don/payment/card.php?rowid=','(paiement)','payment_donation'),(68,39,38,'/dolibarr_7.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(69,39,1,'/dolibarr_7.0/htdocs/comm/card.php?socid=','Indian SAS','company'),(72,41,39,'/dolibarr_10.0/htdocs/compta/paiement/card.php?id=','(paiement)','payment'),(73,41,1,'/dolibarr_10.0/htdocs/comm/card.php?socid=','Indian SAS','company'),(74,42,1,'/dolibarr_10.0/htdocs/compta/salaries/card.php?id=','(SalaryPayment)','payment_salary'),(75,42,19,'/dolibarr_10.0/htdocs/user/card.php?id=','Alex Boston','user'); /*!40000 ALTER TABLE `llx_bank_url` ENABLE KEYS */; UNLOCK TABLES; @@ -990,7 +991,7 @@ CREATE TABLE `llx_blockedlog` ( KEY `fk_user` (`fk_user`), KEY `entity_action` (`entity`,`action`), KEY `entity_action_certified` (`entity`,`action`,`certified`) -) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -999,7 +1000,7 @@ CREATE TABLE `llx_blockedlog` ( LOCK TABLES `llx_blockedlog` WRITE; /*!40000 ALTER TABLE `llx_blockedlog` DISABLE KEYS */; -INSERT INTO `llx_blockedlog` VALUES (20,'2018-03-16 09:57:22','MODULE_RESET',0.00000000,'d6dd5fe6c2eec2de6368f3b6da30188566f0a1a7be4b1589ccd8352d2c827ad5','fbc11d0396d9b76ea48f892bd5f0fe652e5bdf7d44873acb4bf1e1b70352bd30','module',1,'systemevent','2018-03-16 13:57:22','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194242;}',12,1,0,'2018-03-16 13:57:22','Alice Adminson'),(21,'2018-03-16 09:57:24','MODULE_SET',0.00000000,'d6b66df837d8d33bd8b9744e2afa46ab8c65ae8ca462246c406de19f8254e146','0a3aae975056417705f4eb7b4a4926384075cc2b6c899603715643c8f1d6ff9b','module',1,'systemevent','2018-03-16 13:57:24','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194244;}',12,1,0,'2018-03-16 13:57:24','Alice Adminson'),(22,'2018-03-16 09:59:31','PAYMENT_CUSTOMER_CREATE',10.00000000,'9beb9e3ba04582d441b49f176f995900c16572c789bcf48a1c9f285a74be76c8','86813eb2563252c0e270baaf1fffade82475fe51af5f88d14613005fd0e07783','payment',38,'PAY1803-0004','2018-03-16 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:3:\"ref\";s:12:\"PAY1803-0004\";s:4:\"date\";i:1521187200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"10\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:10:\"Indian SAS\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1453147200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"20.00000000\";s:9:\"total_tva\";s:10:\"1.80000000\";s:9:\"total_ttc\";s:11:\"23.60000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1601-0024\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:10;}',12,1,0,'2018-03-16 13:59:31','Alice Adminson'); +INSERT INTO `llx_blockedlog` VALUES (20,'2018-03-16 09:57:22','MODULE_RESET',0.00000000,'d6dd5fe6c2eec2de6368f3b6da30188566f0a1a7be4b1589ccd8352d2c827ad5','fbc11d0396d9b76ea48f892bd5f0fe652e5bdf7d44873acb4bf1e1b70352bd30','module',1,'systemevent','2018-03-16 13:57:22','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194242;}',12,1,0,'2018-03-16 13:57:22','Alice Adminson'),(21,'2018-03-16 09:57:24','MODULE_SET',0.00000000,'d6b66df837d8d33bd8b9744e2afa46ab8c65ae8ca462246c406de19f8254e146','0a3aae975056417705f4eb7b4a4926384075cc2b6c899603715643c8f1d6ff9b','module',1,'systemevent','2018-03-16 13:57:24','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194244;}',12,1,0,'2018-03-16 13:57:24','Alice Adminson'),(22,'2018-03-16 09:59:31','PAYMENT_CUSTOMER_CREATE',10.00000000,'9beb9e3ba04582d441b49f176f995900c16572c789bcf48a1c9f285a74be76c8','86813eb2563252c0e270baaf1fffade82475fe51af5f88d14613005fd0e07783','payment',38,'PAY1803-0004','2018-03-16 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:3:\"ref\";s:12:\"PAY1803-0004\";s:4:\"date\";i:1521187200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"10\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:10:\"Indian SAS\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1453147200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"20.00000000\";s:9:\"total_tva\";s:10:\"1.80000000\";s:9:\"total_ttc\";s:11:\"23.60000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1601-0024\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:10;}',12,1,0,'2018-03-16 13:59:31','Alice Adminson'),(23,'2019-09-26 15:33:37','BILL_VALIDATE',43.58000000,'6a1e049c00f51afa6eaca799e6281bd8abfdaa12bdf42ee2a002b0bec588a2a5','451b12ea66d25259c9c1df9993a902affe124c9f27c97093613cf7184fe388aa','facture',218,'FA1909-0025','2019-09-26 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1569448800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";d:42.5;s:9:\"total_tva\";d:1.08;s:9:\"total_ttc\";d:43.58;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:5:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLIDROID\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"5.50000000\";s:23:\"multicurrency_total_tva\";s:10:\"1.08000000\";s:23:\"multicurrency_total_ttc\";s:10:\"6.58000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"19.600\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"5.50000000\";s:9:\"total_tva\";s:10:\"1.08000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"6.58000000\";s:9:\"info_bits\";s:1:\"0\";}i:3;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:4;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:5;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"10.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"10.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"10.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"10.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1909-0025\";s:11:\"note_public\";N;}',12,1,0,'2019-09-26 17:33:37','Alice Adminson'),(24,'2019-10-04 08:27:00','BILL_VALIDATE',5.63000000,'aa16d46e6ea7376fe0f91a4aeb7b1d534ed351fae071ded64c393e61269c4c35','316e03ffb8327d837c8601e7dbafc91509581b0be9449a89827a14e6cfa2688a','facture',150,'FA6801-0010','2018-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1516316400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";d:5;s:9:\"total_tva\";d:0.63;s:9:\"total_ttc\";d:5.63;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";s:7:\"PEARPIE\";s:18:\"multicurrency_code\";N;s:22:\"multicurrency_total_ht\";s:10:\"5.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.63000000\";s:23:\"multicurrency_total_ttc\";s:10:\"5.63000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"12.500\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"5.00000000\";s:9:\"total_tva\";s:10:\"0.63000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"5.63000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA6801-0010\";s:11:\"note_public\";N;}',12,1,0,'2019-10-04 10:27:00','Alice Adminson'),(25,'2019-10-04 08:28:14','PAYMENT_CUSTOMER_CREATE',5.63000000,'fa5c9b4bb975af8401744390d47e62218a7ec47a2e96c60f5e58d7f6be38dc44','9bfe069dc130dd71c31f914ff0afa7835fd40932790ac88be0005638342ccb87','payment',39,'PAY1801-0005','2018-01-19 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY1801-0005\";s:4:\"date\";i:1516359600;s:9:\"type_code\";s:3:\"LIQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:4:\"5.63\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1516316400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:10:\"5.00000000\";s:9:\"total_tva\";s:10:\"0.63000000\";s:9:\"total_ttc\";s:10:\"5.63000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA6801-0010\";s:11:\"note_public\";N;}}}s:6:\"amount\";d:5.63;}',12,1,0,'2019-10-04 10:28:14','Alice Adminson'); /*!40000 ALTER TABLE `llx_blockedlog` ENABLE KEYS */; UNLOCK TABLES; @@ -2724,7 +2725,7 @@ CREATE TABLE `llx_c_tva` ( `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_tva_id` (`fk_pays`,`code`,`taux`,`recuperableonly`) -) ENGINE=InnoDB AUTO_INCREMENT=2477 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2478 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2733,7 +2734,7 @@ CREATE TABLE `llx_c_tva` ( LOCK TABLES `llx_c_tva` WRITE; /*!40000 ALTER TABLE `llx_c_tva` DISABLE KEYS */; -INSERT INTO `llx_c_tva` VALUES (11,1,'',20,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(12,1,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(13,1,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(14,1,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',1,NULL,NULL),(15,1,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(16,1,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(17,1,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(21,2,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(22,2,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(23,2,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(24,2,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(31,3,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(32,3,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(33,3,'',4,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(34,3,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(41,4,'',21,'5.2','3','-19:-15:-9','5',0,'VAT standard rate',1,NULL,NULL),(42,4,'',10,'1.4','3','-19:-15:-9','5',0,'VAT reduced rate',1,NULL,NULL),(43,4,'',4,'0.5','3','-19:-15:-9','5',0,'VAT super-reduced rate',1,NULL,NULL),(44,4,'',0,'0','3','-19:-15:-9','5',0,'VAT Rate 0',1,NULL,NULL),(51,5,'',19,NULL,'0',NULL,'0',0,'allgemeine Ust.',1,NULL,NULL),(52,5,'',7,NULL,'0',NULL,'0',0,'ermäßigte USt.',1,NULL,NULL),(53,5,'',0,NULL,'0',NULL,'0',0,'keine USt.',1,NULL,NULL),(54,5,'',5.5,NULL,'0',NULL,'0',0,'USt. Forst',0,NULL,NULL),(55,5,'',10.7,NULL,'0',NULL,'0',0,'USt. Landwirtschaft',0,NULL,NULL),(61,6,'',8,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(62,6,'',3.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(63,6,'',2.5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(64,6,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(71,7,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(72,7,'',17.5,NULL,'0',NULL,'0',0,'VAT standard rate before 2011',1,NULL,NULL),(73,7,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(74,7,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(81,8,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(82,8,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(83,8,'',13.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(84,8,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(85,8,'',4.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(91,9,'',17,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(92,9,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate 0',1,NULL,NULL),(93,9,'',3,NULL,'0',NULL,'0',0,'VAT super reduced rate 0',1,NULL,NULL),(94,9,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(101,10,'',6,'1','4','0','0',0,'VAT 6%',1,NULL,NULL),(102,10,'',12,'1','4','0','0',0,'VAT 12%',1,NULL,NULL),(103,10,'',18,'1','4','0','0',0,'VAT 18%',1,NULL,NULL),(104,10,'',7.5,'1','4','0','0',0,'VAT 6% Majoré à 25% (7.5%)',1,NULL,NULL),(105,10,'',15,'1','4','0','0',0,'VAT 12% Majoré à 25% (15%)',1,NULL,NULL),(106,10,'',22.5,'1','4','0','0',0,'VAT 18% Majoré à 25% (22.5%)',1,NULL,NULL),(107,10,'',0,'1','4','0','0',0,'VAT Rate 0',1,NULL,NULL),(111,11,'',0,NULL,'0',NULL,'0',0,'No Sales Tax',1,NULL,NULL),(112,11,'',4,NULL,'0',NULL,'0',0,'Sales Tax 4%',1,NULL,NULL),(113,11,'',6,NULL,'0',NULL,'0',0,'Sales Tax 6%',1,NULL,NULL),(121,12,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(122,12,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(123,12,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(124,12,'',7,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(125,12,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(141,14,'',7,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(142,14,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(143,14,'',5,'9.975','1',NULL,'0',0,'GST/TPS and PST/TVQ rate for Province',1,NULL,NULL),(171,17,'',19,NULL,'0',NULL,'0',0,'Algemeen BTW tarief',1,NULL,NULL),(172,17,'',6,NULL,'0',NULL,'0',0,'Verlaagd BTW tarief',1,NULL,NULL),(173,17,'',0,NULL,'0',NULL,'0',0,'0 BTW tarief',1,NULL,NULL),(174,17,'',21,NULL,'0',NULL,'0',0,'Algemeen BTW tarief (vanaf 1 oktober 2012)',0,NULL,NULL),(201,20,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(202,20,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(203,20,'',6,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(204,20,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(211,21,'',0,'0','0','0','0',0,'IVA Rate 0',1,NULL,NULL),(212,21,'',18,'7.5','2','0','0',0,'IVA standard rate',1,NULL,NULL),(221,22,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(222,22,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(223,22,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(231,23,'',21,NULL,'0',NULL,'0',0,'IVA standard rate',1,NULL,NULL),(232,23,'',10.5,NULL,'0',NULL,'0',0,'IVA reduced rate',1,NULL,NULL),(233,23,'',0,NULL,'0',NULL,'0',0,'IVA Rate 0',1,NULL,NULL),(241,24,'',19.25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(242,24,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(251,25,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(252,25,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(253,25,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(254,25,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(261,26,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(271,27,'',19.6,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(272,27,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(273,27,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(274,27,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',0,NULL,NULL),(275,27,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(276,27,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(277,27,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(281,28,'',10,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(282,28,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(411,41,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(412,41,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(413,41,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(461,46,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(462,46,'',15,NULL,'0',NULL,'0',0,'VAT 15%',1,NULL,NULL),(463,46,'',7.5,NULL,'0',NULL,'0',0,'VAT 7.5%',1,NULL,NULL),(561,56,'',0,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(591,59,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(592,59,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(593,59,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(671,67,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(672,67,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(801,80,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(802,80,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(861,86,'',13,NULL,'0',NULL,'0',0,'IVA 13',1,NULL,NULL),(862,86,'',0,NULL,'0',NULL,'0',0,'SIN IVA',1,NULL,NULL),(1141,114,'',0,NULL,'0',NULL,'0',0,'No ISV',1,NULL,NULL),(1142,114,'',12,NULL,'0',NULL,'0',0,'ISV 12%',1,NULL,NULL),(1161,116,'',25.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1162,116,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1163,116,'',0,NULL,'0',NULL,'0',0,'VAT rate 0',1,NULL,NULL),(1171,117,'',12.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1172,117,'',4,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1173,117,'',1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1174,117,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1176,117,'CGST+SGST',0,'9','1','9','1',0,'CGST+SGST - Same state sales',1,NULL,NULL),(1177,117,'IGST',18,'0','0','0','0',0,'IGST',1,NULL,NULL),(1231,123,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1232,123,'',5,NULL,'0',NULL,'0',0,'VAT Rate 5',1,NULL,NULL),(1401,140,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1402,140,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1403,140,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1404,140,'',3,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1405,140,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1481,148,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1482,148,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1483,148,'',5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1484,148,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1511,151,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1512,151,'',14,NULL,'0',NULL,'0',0,'VAT Rate 14',1,NULL,NULL),(1521,152,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1522,152,'',15,NULL,'0',NULL,'0',0,'VAT Rate 15',1,NULL,NULL),(1541,154,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(1542,154,'',16,NULL,'0',NULL,'0',0,'VAT 16%',1,NULL,NULL),(1543,154,'',10,NULL,'0',NULL,'0',0,'VAT Frontero',1,NULL,NULL),(1662,166,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1663,166,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1692,169,'',5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1693,169,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1731,173,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1732,173,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1733,173,'',8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1734,173,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1781,178,'',7,NULL,'0',NULL,'0',0,'ITBMS standard rate',1,NULL,NULL),(1782,178,'',0,NULL,'0',NULL,'0',0,'ITBMS Rate 0',1,NULL,NULL),(1811,181,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1812,181,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1841,184,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1842,184,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1843,184,'',3,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1844,184,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1881,188,'',24,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1882,188,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1883,188,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1884,188,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1931,193,'',0,NULL,'0',NULL,'0',0,'No VAT in SPM',1,NULL,NULL),(2011,201,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2012,201,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2013,201,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2021,202,'',22,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2022,202,'',9.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2023,202,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2051,205,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2052,205,'',14,NULL,'0',NULL,'0',0,'VAT 14%',1,NULL,NULL),(2131,213,'',5,NULL,'0',NULL,'0',0,'VAT 5%',1,NULL,NULL),(2261,226,'',20,NULL,'0',NULL,'0',0,'VAT standart rate',1,NULL,NULL),(2262,226,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2321,232,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2322,232,'',12,NULL,'0',NULL,'0',0,'VAT 12%',1,NULL,NULL),(2323,232,'',8,NULL,'0',NULL,'0',0,'VAT 8%',1,NULL,NULL),(2461,246,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2462,102,'',23,'0','0','0','0',0,'Κανονικός Φ.Π.Α.',1,NULL,NULL),(2463,102,'',0,'0','0','0','0',0,'Μηδενικό Φ.Π.Α.',1,NULL,NULL),(2464,102,'',13,'0','0','0','0',0,'Μειωμένος Φ.Π.Α.',1,NULL,NULL),(2465,102,'',6.5,'0','0','0','0',0,'Υπερμειωμένος Φ.Π.Α.',1,NULL,NULL),(2466,102,'',16,'0','0','0','0',0,'Νήσων κανονικός Φ.Π.Α.',1,NULL,NULL),(2467,102,'',9,'0','0','0','0',0,'Νήσων μειωμένος Φ.Π.Α.',1,NULL,NULL),(2468,102,'',5,'0','0','0','0',0,'Νήσων υπερμειωμένος Φ.Π.Α.',1,NULL,NULL),(2469,1,'85',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(2470,1,'85NPR',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(2471,1,'85NPROM',8.5,'2','3',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0,NULL,NULL),(2472,1,'85NPROMOMR',8.5,'2','3','2.5','3',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0,NULL,NULL); +INSERT INTO `llx_c_tva` VALUES (11,1,'',20,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(12,1,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(13,1,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(14,1,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',1,NULL,NULL),(15,1,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(16,1,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(17,1,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(21,2,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(22,2,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(23,2,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(24,2,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(31,3,'',21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(32,3,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(33,3,'',4,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(34,3,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(41,4,'',21,'5.2','3','-19:-15:-9','5',0,'VAT standard rate',1,NULL,NULL),(42,4,'',10,'1.4','3','-19:-15:-9','5',0,'VAT reduced rate',1,NULL,NULL),(43,4,'',4,'0.5','3','-19:-15:-9','5',0,'VAT super-reduced rate',1,NULL,NULL),(44,4,'',0,'0','3','-19:-15:-9','5',0,'VAT Rate 0',1,NULL,NULL),(51,5,'',19,NULL,'0',NULL,'0',0,'allgemeine Ust.',1,NULL,NULL),(52,5,'',7,NULL,'0',NULL,'0',0,'ermäßigte USt.',1,NULL,NULL),(53,5,'',0,NULL,'0',NULL,'0',0,'keine USt.',1,NULL,NULL),(54,5,'',5.5,NULL,'0',NULL,'0',0,'USt. Forst',0,NULL,NULL),(55,5,'',10.7,NULL,'0',NULL,'0',0,'USt. Landwirtschaft',0,NULL,NULL),(61,6,'',8,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(62,6,'',3.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(63,6,'',2.5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(64,6,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(71,7,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(72,7,'',17.5,NULL,'0',NULL,'0',0,'VAT standard rate before 2011',1,NULL,NULL),(73,7,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(74,7,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(81,8,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(82,8,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(83,8,'',13.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(84,8,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(85,8,'',4.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(91,9,'',17,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(92,9,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate 0',1,NULL,NULL),(93,9,'',3,NULL,'0',NULL,'0',0,'VAT super reduced rate 0',1,NULL,NULL),(94,9,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(101,10,'',6,'1','4','0','0',0,'VAT 6%',1,NULL,NULL),(102,10,'',12,'1','4','0','0',0,'VAT 12%',1,NULL,NULL),(103,10,'',18,'1','4','0','0',0,'VAT 18%',1,NULL,NULL),(104,10,'',7.5,'1','4','0','0',0,'VAT 6% Majoré à 25% (7.5%)',1,NULL,NULL),(105,10,'',15,'1','4','0','0',0,'VAT 12% Majoré à 25% (15%)',1,NULL,NULL),(106,10,'',22.5,'1','4','0','0',0,'VAT 18% Majoré à 25% (22.5%)',1,NULL,NULL),(107,10,'',0,'1','4','0','0',0,'VAT Rate 0',1,NULL,NULL),(111,11,'',0,NULL,'0',NULL,'0',0,'No Sales Tax',1,NULL,NULL),(112,11,'',4,NULL,'0',NULL,'0',0,'Sales Tax 4%',1,NULL,NULL),(113,11,'',6,NULL,'0',NULL,'0',0,'Sales Tax 6%',1,NULL,NULL),(121,12,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(122,12,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(123,12,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(124,12,'',7,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(125,12,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(141,14,'',7,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(142,14,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(143,14,'',5,'9.975','1',NULL,'0',0,'GST/TPS and PST/TVQ rate for Province',1,NULL,NULL),(171,17,'',19,NULL,'0',NULL,'0',0,'Algemeen BTW tarief',1,NULL,NULL),(172,17,'',6,NULL,'0',NULL,'0',0,'Verlaagd BTW tarief',1,NULL,NULL),(173,17,'',0,NULL,'0',NULL,'0',0,'0 BTW tarief',1,NULL,NULL),(174,17,'',21,NULL,'0',NULL,'0',0,'Algemeen BTW tarief (vanaf 1 oktober 2012)',0,NULL,NULL),(201,20,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(202,20,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(203,20,'',6,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(204,20,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(211,21,'',0,'0','0','0','0',0,'IVA Rate 0',1,NULL,NULL),(212,21,'',18,'7.5','2','0','0',0,'IVA standard rate',1,NULL,NULL),(221,22,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(222,22,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(223,22,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(231,23,'',21,NULL,'0',NULL,'0',0,'IVA standard rate',1,NULL,NULL),(232,23,'',10.5,NULL,'0',NULL,'0',0,'IVA reduced rate',1,NULL,NULL),(233,23,'',0,NULL,'0',NULL,'0',0,'IVA Rate 0',1,NULL,NULL),(241,24,'',19.25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(242,24,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(251,25,'',23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(252,25,'',13,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(253,25,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(254,25,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(261,26,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(271,27,'',19.6,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(272,27,'',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(273,27,'',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(274,27,'',5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',0,NULL,NULL),(275,27,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(276,27,'',2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(277,27,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(281,28,'',10,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(282,28,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(411,41,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(412,41,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(413,41,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(461,46,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(462,46,'',15,NULL,'0',NULL,'0',0,'VAT 15%',1,NULL,NULL),(463,46,'',7.5,NULL,'0',NULL,'0',0,'VAT 7.5%',1,NULL,NULL),(561,56,'',0,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(591,59,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(592,59,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(593,59,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(671,67,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(672,67,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(801,80,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(802,80,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(861,86,'',13,NULL,'0',NULL,'0',0,'IVA 13',1,NULL,NULL),(862,86,'',0,NULL,'0',NULL,'0',0,'SIN IVA',1,NULL,NULL),(1141,114,'',0,NULL,'0',NULL,'0',0,'No ISV',1,NULL,NULL),(1142,114,'',12,NULL,'0',NULL,'0',0,'ISV 12%',1,NULL,NULL),(1161,116,'',25.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1162,116,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1163,116,'',0,NULL,'0',NULL,'0',0,'VAT rate 0',1,NULL,NULL),(1171,117,'',12.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1172,117,'',4,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1173,117,'',1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1174,117,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1176,117,'CGST+SGST',0,'9','1','9','1',0,'CGST+SGST - Same state sales',1,NULL,NULL),(1177,117,'IGST',18,'0','0','0','0',0,'IGST',1,NULL,NULL),(1231,123,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1232,123,'',5,NULL,'0',NULL,'0',0,'VAT Rate 5',1,NULL,NULL),(1401,140,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1402,140,'',12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1403,140,'',6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1404,140,'',3,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1405,140,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1481,148,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1482,148,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1483,148,'',5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1484,148,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1511,151,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1512,151,'',14,NULL,'0',NULL,'0',0,'VAT Rate 14',1,NULL,NULL),(1521,152,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1522,152,'',15,NULL,'0',NULL,'0',0,'VAT Rate 15',1,NULL,NULL),(1541,154,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(1542,154,'',16,NULL,'0',NULL,'0',0,'VAT 16%',1,NULL,NULL),(1543,154,'',10,NULL,'0',NULL,'0',0,'VAT Frontero',1,NULL,NULL),(1662,166,'',15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1663,166,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1692,169,'',5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1693,169,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1731,173,'',25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1732,173,'',14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1733,173,'',8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1734,173,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1781,178,'',7,NULL,'0',NULL,'0',0,'ITBMS standard rate',1,NULL,NULL),(1782,178,'',0,NULL,'0',NULL,'0',0,'ITBMS Rate 0',1,NULL,NULL),(1811,181,'',18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1812,181,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1841,184,'',20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1842,184,'',7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1843,184,'',3,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1844,184,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1881,188,'',24,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1882,188,'',9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1883,188,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1884,188,'',5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1931,193,'',0,NULL,'0',NULL,'0',0,'No VAT in SPM',1,NULL,NULL),(2011,201,'',19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2012,201,'',10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2013,201,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2021,202,'',22,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2022,202,'',9.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2023,202,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2051,205,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2052,205,'',14,NULL,'0',NULL,'0',0,'VAT 14%',1,NULL,NULL),(2131,213,'',5,NULL,'0',NULL,'0',0,'VAT 5%',1,NULL,NULL),(2261,226,'',20,NULL,'0',NULL,'0',0,'VAT standart rate',1,NULL,NULL),(2262,226,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2321,232,'',0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2322,232,'',12,NULL,'0',NULL,'0',0,'VAT 12%',1,NULL,NULL),(2323,232,'',8,NULL,'0',NULL,'0',0,'VAT 8%',1,NULL,NULL),(2461,246,'',0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2462,102,'',23,'0','0','0','0',0,'Κανονικός Φ.Π.Α.',1,NULL,NULL),(2463,102,'',0,'0','0','0','0',0,'Μηδενικό Φ.Π.Α.',1,NULL,NULL),(2464,102,'',13,'0','0','0','0',0,'Μειωμένος Φ.Π.Α.',1,NULL,NULL),(2465,102,'',6.5,'0','0','0','0',0,'Υπερμειωμένος Φ.Π.Α.',1,NULL,NULL),(2466,102,'',16,'0','0','0','0',0,'Νήσων κανονικός Φ.Π.Α.',1,NULL,NULL),(2467,102,'',9,'0','0','0','0',0,'Νήσων μειωμένος Φ.Π.Α.',1,NULL,NULL),(2468,102,'',5,'0','0','0','0',0,'Νήσων υπερμειωμένος Φ.Π.Α.',1,NULL,NULL),(2469,1,'85',8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(2470,1,'85NPR',8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(2471,1,'85NPROM',8.5,'2','3',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0,NULL,NULL),(2472,1,'85NPROMOMR',8.5,'2','3','2.5','3',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0,NULL,NULL),(2477,117,'',19.6,'0','0','0','0',0,'aaa',1,'101','10'); /*!40000 ALTER TABLE `llx_c_tva` ENABLE KEYS */; UNLOCK TABLES; @@ -2911,7 +2912,7 @@ CREATE TABLE `llx_c_units` ( LOCK TABLES `llx_c_units` WRITE; /*!40000 ALTER TABLE `llx_c_units` DISABLE KEYS */; -INSERT INTO `llx_c_units` VALUES (1,'P','piece','p',1,NULL,NULL),(2,'SET','set','se',1,NULL,NULL),(3,'S','second','s',1,NULL,'time'),(4,'H','hour','h',1,NULL,'time'),(5,'D','day','d',1,NULL,'time'),(6,'KG','kilogram','kg',1,NULL,'weight'),(7,'G','gram','g',1,NULL,'weight'),(8,'M','SizeUnitm','m',1,NULL,'size'),(9,'LM','linear meter','lm',0,NULL,'size'),(10,'M2','SurfaceUnitm2','m2',1,NULL,'surface'),(11,'M3','VolumeUnitm3','m3',1,NULL,'volume'),(12,'L','liter','l',0,-3,'volume'),(13,'T','WeightUnitton','T',1,3,'weight'),(16,'MG','WeightUnitmg','mg',1,-6,'weight'),(17,'OZ','WeightUnitounce','Oz',1,98,'weight'),(18,'LB','WeightUnitpound','lb',1,99,'weight'),(20,'DM','SizeUnitdm','dm',1,-1,'size'),(21,'CM','SizeUnitcm','cm',1,-2,'size'),(22,'MM','SizeUnitmm','mm',1,-3,'size'),(23,'FT','SizeUnitfoot','ft',1,98,'size'),(24,'IN','SizeUnitinch','in',1,99,'size'),(26,'DM2','SurfaceUnitdm2','dm2',1,-2,'surface'),(27,'CM2','SurfaceUnitcm2','cm2',1,-4,'surface'),(28,'MM2','SurfaceUnitmm2','mm2',1,-6,'surface'),(29,'FT2','SurfaceUnitfoot2','ft2',1,98,'surface'),(30,'IN2','SurfaceUnitinch2','in2',1,99,'surface'),(32,'DM3','VolumeUnitdm3','dm3',1,-3,'volume'),(33,'CM3','VolumeUnitcm3','cm3',1,-6,'volume'),(34,'MM3','VolumeUnitmm3','mm3',1,-9,'volume'),(35,'FT3','VolumeUnitfoot3','ft3',1,88,'volume'),(36,'IN3','VolumeUnitinch3','in3',1,89,'volume'),(37,'OZ3','VolumeUnitounce','Oz',1,97,'volume'),(39,'GAL','VolumeUnitgallon','gal',1,99,'volume'),(43,'MI','minute','i',1,60,'time'),(46,'W','week','w',1,604800,'time'),(47,'MO','month','m',1,2629800,'time'),(48,'Y','year','y',1,31557600,'time'); +INSERT INTO `llx_c_units` VALUES (1,'P','piece','p',1,NULL,NULL),(2,'SET','set','se',1,NULL,NULL),(3,'S','second','s',1,NULL,'time'),(4,'H','hour','h',1,NULL,'time'),(5,'D','day','d',1,NULL,'time'),(6,'KG','kilogram','kg',1,0,'weight'),(7,'G','gram','g',1,-3,'weight'),(8,'M','SizeUnitm','m',1,0,'size'),(9,'LM','linear meter','lm',0,0,'size'),(10,'M2','SurfaceUnitm2','m2',1,0,'surface'),(11,'M3','VolumeUnitm3','m3',1,0,'volume'),(12,'L','liter','l',0,-3,'volume'),(13,'T','WeightUnitton','T',1,3,'weight'),(16,'MG','WeightUnitmg','mg',1,-6,'weight'),(17,'OZ','WeightUnitounce','Oz',1,98,'weight'),(18,'LB','WeightUnitpound','lb',1,99,'weight'),(20,'DM','SizeUnitdm','dm',1,-1,'size'),(21,'CM','SizeUnitcm','cm',1,-2,'size'),(22,'MM','SizeUnitmm','mm',1,-3,'size'),(23,'FT','SizeUnitfoot','ft',1,98,'size'),(24,'IN','SizeUnitinch','in',1,99,'size'),(26,'DM2','SurfaceUnitdm2','dm2',1,-2,'surface'),(27,'CM2','SurfaceUnitcm2','cm2',1,-4,'surface'),(28,'MM2','SurfaceUnitmm2','mm2',1,-6,'surface'),(29,'FT2','SurfaceUnitfoot2','ft2',1,98,'surface'),(30,'IN2','SurfaceUnitinch2','in2',1,99,'surface'),(32,'DM3','VolumeUnitdm3','dm3',1,-3,'volume'),(33,'CM3','VolumeUnitcm3','cm3',1,-6,'volume'),(34,'MM3','VolumeUnitmm3','mm3',1,-9,'volume'),(35,'FT3','VolumeUnitfoot3','ft3',1,88,'volume'),(36,'IN3','VolumeUnitinch3','in3',1,89,'volume'),(37,'OZ3','VolumeUnitounce','Oz',1,97,'volume'),(39,'GAL','VolumeUnitgallon','gal',1,99,'volume'),(43,'MI','minute','i',1,60,'time'),(46,'W','week','w',1,604800,'time'),(47,'MO','month','m',1,2629800,'time'),(48,'Y','year','y',1,31557600,'time'); /*!40000 ALTER TABLE `llx_c_units` ENABLE KEYS */; UNLOCK TABLES; @@ -3092,7 +3093,7 @@ CREATE TABLE `llx_categorie_fournisseur` ( LOCK TABLES `llx_categorie_fournisseur` WRITE; /*!40000 ALTER TABLE `llx_categorie_fournisseur` DISABLE KEYS */; -INSERT INTO `llx_categorie_fournisseur` VALUES (1,2,NULL),(1,10,NULL); +INSERT INTO `llx_categorie_fournisseur` VALUES (1,2,NULL),(1,10,NULL),(1,13,NULL),(2,10,'20191008191032'),(3,13,NULL),(4,10,'20191008191032'),(29,13,NULL); /*!40000 ALTER TABLE `llx_categorie_fournisseur` ENABLE KEYS */; UNLOCK TABLES; @@ -3234,7 +3235,7 @@ CREATE TABLE `llx_categorie_societe` ( LOCK TABLES `llx_categorie_societe` WRITE; /*!40000 ALTER TABLE `llx_categorie_societe` DISABLE KEYS */; -INSERT INTO `llx_categorie_societe` VALUES (12,10,NULL),(12,11,NULL),(14,11,NULL); +INSERT INTO `llx_categorie_societe` VALUES (12,10,NULL),(12,11,NULL),(14,11,NULL),(15,13,NULL); /*!40000 ALTER TABLE `llx_categorie_societe` ENABLE KEYS */; UNLOCK TABLES; @@ -3410,7 +3411,7 @@ CREATE TABLE `llx_commande` ( CONSTRAINT `fk_commande_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_commande_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_commande_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3419,7 +3420,7 @@ CREATE TABLE `llx_commande` ( LOCK TABLES `llx_commande` WRITE; /*!40000 ALTER TABLE `llx_commande` DISABLE KEYS */; -INSERT INTO `llx_commande` VALUES (1,'2018-07-30 15:13:20',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2018-08-08 13:59:09',NULL,'2018-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2018-07-30 15:13:20',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2018-02-12 17:06:51',NULL,'2018-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2018-07-30 15:13:20',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2018-02-17 18:27:56',NULL,'2018-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2018-07-30 15:12:32',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2017-08-08 03:04:21',NULL,'2017-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2018-07-30 15:13:20',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2018-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,11.76000000,0.00000000,0.00000000,60.00000000,71.76000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(17,'2017-02-15 22:50:34',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2017-02-15 23:50:34',NULL,'2018-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2017-02-15 23:08:58',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2017-02-15 23:51:23',NULL,'2017-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2017-02-15 23:09:04',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2017-02-15 23:55:52',NULL,'2018-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2017-02-15 23:08:42',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2017-02-16 00:03:44',NULL,'2017-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2017-02-15 23:08:47',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2017-02-16 00:05:01',NULL,'2017-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2017-02-15 23:08:50',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2017-02-16 00:05:01',NULL,'2017-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2017-02-15 23:08:53',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2017-02-16 00:05:11',NULL,'2017-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2017-02-15 23:05:11',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2017-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2017-02-15 23:09:10',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2018-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2017-02-15 23:09:07',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2018-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2017-02-15 23:05:26',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26',NULL,'2017-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2017-02-15 23:06:01',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26','2017-02-16 03:05:56','2018-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2017-02-15 23:09:13',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26',NULL,'2018-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2017-02-15 23:09:16',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2017-02-16 00:05:35',NULL,'2018-02-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2017-02-15 23:09:19',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2017-02-16 00:05:35',NULL,'2018-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2017-02-15 23:09:23',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2017-02-16 00:05:36',NULL,'2018-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2017-02-16 00:14:20',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2017-02-16 04:14:20',NULL,'2018-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2017-02-15 23:05:37',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2017-02-16 00:05:37',NULL,'2018-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2017-02-15 23:09:30',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2017-02-15 23:10:24',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2017-02-15 23:05:38',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2017-02-15 23:05:38',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2017-02-15 23:09:36',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2017-02-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,NULL,NULL),(90,'2017-02-16 00:46:31',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2017-02-16 00:46:37',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2017-02-16 00:47:25',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL); +INSERT INTO `llx_commande` VALUES (1,'2018-07-30 15:13:20',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2018-08-08 13:59:09',NULL,'2018-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2018-07-30 15:13:20',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2018-02-12 17:06:51',NULL,'2018-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2018-07-30 15:13:20',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2018-02-17 18:27:56',NULL,'2018-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2018-07-30 15:12:32',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2017-08-08 03:04:21',NULL,'2017-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2019-09-27 16:04:37',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2018-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV6)/(PROV6).pdf',NULL,NULL),(17,'2017-02-15 22:50:34',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2017-02-15 23:50:34',NULL,'2018-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2017-02-15 23:08:58',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2017-02-15 23:51:23',NULL,'2017-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2017-02-15 23:09:04',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2017-02-15 23:55:52',NULL,'2018-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2017-02-15 23:08:42',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2017-02-16 00:03:44',NULL,'2017-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2017-02-15 23:08:47',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2017-02-16 00:05:01',NULL,'2017-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2017-02-15 23:08:50',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2017-02-16 00:05:01',NULL,'2017-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2017-02-15 23:08:53',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2017-02-16 00:05:11',NULL,'2017-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2017-02-15 23:05:11',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2017-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2017-02-15 23:09:10',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2018-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2017-02-15 23:09:07',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2018-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2017-02-15 23:05:26',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26',NULL,'2017-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2017-02-15 23:06:01',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26','2017-02-16 03:05:56','2018-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2017-02-15 23:09:13',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26',NULL,'2018-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2017-02-15 23:09:16',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2017-02-16 00:05:35',NULL,'2018-02-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2017-02-15 23:09:19',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2017-02-16 00:05:35',NULL,'2018-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2017-02-15 23:09:23',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2017-02-16 00:05:36',NULL,'2018-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2017-02-16 00:14:20',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2017-02-16 04:14:20',NULL,'2018-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2017-02-15 23:05:37',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2017-02-16 00:05:37',NULL,'2018-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2017-02-15 23:09:30',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2017-02-15 23:10:24',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2017-02-15 23:05:38',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2017-02-15 23:05:38',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2017-02-15 23:09:36',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2017-02-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,NULL,NULL),(90,'2017-02-16 00:46:31',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2017-02-16 00:46:37',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2017-02-16 00:47:25',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(93,'2019-09-27 17:33:29',10,NULL,'(PROV93)',1,NULL,NULL,NULL,'2019-09-27 19:32:53',NULL,NULL,'2019-09-27',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV93)/(PROV93).pdf',NULL,NULL); /*!40000 ALTER TABLE `llx_commande` ENABLE KEYS */; UNLOCK TABLES; @@ -3689,7 +3690,7 @@ CREATE TABLE `llx_commande_fournisseurdet` ( PRIMARY KEY (`rowid`), KEY `fk_commande_fournisseurdet_fk_unit` (`fk_unit`), CONSTRAINT `fk_commande_fournisseurdet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3698,7 +3699,7 @@ CREATE TABLE `llx_commande_fournisseurdet` ( LOCK TABLES `llx_commande_fournisseurdet` WRITE; /*!40000 ALTER TABLE `llx_commande_fournisseurdet` DISABLE KEYS */; -INSERT INTO `llx_commande_fournisseurdet` VALUES (1,1,NULL,NULL,'','','Chips',19.600,'',0.000,'',0.000,'',10,0,0,20.00000000,200.00000000,39.20000000,0.00000000,0.00000000,239.20000000,0,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(2,2,NULL,4,'ABCD','Decapsuleur','',0.000,'',0.000,'',0.000,'',20,0,0,10.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(6,13,NULL,NULL,'','','dfgdf',0.000,'',0.000,'0',0.000,'0',1,0,0,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000); +INSERT INTO `llx_commande_fournisseurdet` VALUES (1,1,NULL,NULL,'','','Chips',19.600,'',0.000,'',0.000,'',10,0,0,20.00000000,200.00000000,39.20000000,0.00000000,0.00000000,239.20000000,0,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(2,2,NULL,4,'ABCD','Decapsuleur','',0.000,'',0.000,'',0.000,'',20,0,0,10.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(6,13,NULL,NULL,'','','dfgdf',0.000,'',0.000,'0',0.000,'0',1,0,0,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(7,4,NULL,11,'','','A nice rollup',0.000,'',0.000,'0',0.000,'0',1,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0,1,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000); /*!40000 ALTER TABLE `llx_commande_fournisseurdet` ENABLE KEYS */; UNLOCK TABLES; @@ -3782,7 +3783,7 @@ CREATE TABLE `llx_commandedet` ( KEY `fk_commandedet_fk_unit` (`fk_unit`), CONSTRAINT `fk_commandedet_fk_commande` FOREIGN KEY (`fk_commande`) REFERENCES `llx_commande` (`rowid`), CONSTRAINT `fk_commandedet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=292 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=296 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3791,7 +3792,7 @@ CREATE TABLE `llx_commandedet` ( LOCK TABLES `llx_commandedet` WRITE; /*!40000 ALTER TABLE `llx_commandedet` DISABLE KEYS */; -INSERT INTO `llx_commandedet` VALUES (1,1,NULL,NULL,NULL,'Product 1',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(2,1,NULL,2,NULL,'',0.000,'',0.000,'',0.000,'',1,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(3,1,NULL,5,NULL,'cccc',0.000,'',0.000,'',0.000,'',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,2,NULL,NULL,NULL,'hgf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(10,5,NULL,NULL,NULL,'gfdgdf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(11,6,NULL,NULL,NULL,'gdfg',19.600,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(12,6,NULL,NULL,NULL,'gfdgd',19.600,'',0.000,'',0.000,'',1,0,0,NULL,50,50.00000000,50.00000000,9.80000000,0.00000000,0.00000000,59.80000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(14,3,NULL,NULL,NULL,'gdfgdf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(15,3,NULL,NULL,NULL,'fghfgh',0.000,'',0.000,'',0.000,'',1,0,0,NULL,20,20.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(16,17,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(17,17,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(18,17,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9,9.00000000,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(19,18,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(20,18,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(21,18,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(24,20,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,5,5.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,20.00000000,0.00000000,20.00000000),(25,20,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(26,20,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(55,29,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(56,29,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(57,29,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(58,29,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,1,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(59,29,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,10,10.00000000,30.00000000,0.00000000,0.00000000,0.00000000,30.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',10.00000000,30.00000000,0.00000000,30.00000000),(75,34,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(76,34,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(77,34,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(78,34,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9,9.00000000,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,1,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(94,38,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(95,38,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(99,40,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(100,40,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(101,40,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(102,40,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(103,40,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(112,43,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(113,43,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(114,43,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(115,43,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(116,43,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(125,47,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(126,47,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(127,47,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(128,47,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(129,48,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(130,48,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(134,50,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(135,50,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(145,54,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(146,54,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(158,58,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(159,58,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(160,58,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,9,9.00000000,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',9.00000000,36.00000000,0.00000000,36.00000000),(174,62,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(175,62,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(176,62,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(198,68,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(199,68,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(209,72,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(210,72,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(211,72,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(212,72,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(213,72,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(227,75,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(235,78,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(236,78,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(237,78,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(238,78,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(246,81,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(247,81,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(248,81,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,5,5.00000000,25.00000000,0.00000000,0.00000000,0.00000000,25.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',5.00000000,25.00000000,0.00000000,25.00000000),(253,83,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,5,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,5.00000000,0.00000000,5.00000000),(254,83,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(255,83,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(256,83,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(257,84,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(258,84,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(259,84,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(260,85,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(261,85,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(262,85,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(271,88,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(272,88,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(276,75,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,90.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(278,75,NULL,13,NULL,'A powerfull computer XP4523 
\r\n(Code douane: USXP765 - Pays d'origine: Etats-Unis)',5.000,'',9.975,'1',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,25.00000000,49.88000000,0.00000000,574.88000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,25.00000000,574.88000000),(279,75,NULL,13,NULL,'A powerfull computer XP4523 
\n(Code douane: USXP765 - Pays d\'origine: Etats-Unis)',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(280,90,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(281,90,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,10,10.00000000,30.00000000,0.00000000,0.00000000,0.00000000,30.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',10.00000000,30.00000000,0.00000000,30.00000000),(282,90,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(283,90,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(284,91,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(285,91,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(286,91,NULL,13,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(287,92,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(288,92,NULL,13,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(289,92,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(290,92,NULL,13,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(291,92,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000); +INSERT INTO `llx_commandedet` VALUES (1,1,NULL,NULL,NULL,'Product 1',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(2,1,NULL,2,NULL,'',0.000,'',0.000,'',0.000,'',1,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(3,1,NULL,5,NULL,'cccc',0.000,'',0.000,'',0.000,'',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,2,NULL,NULL,NULL,'hgf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(10,5,NULL,NULL,NULL,'gfdgdf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(14,3,NULL,NULL,NULL,'gdfgdf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(15,3,NULL,NULL,NULL,'fghfgh',0.000,'',0.000,'',0.000,'',1,0,0,NULL,20,20.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(16,17,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(17,17,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(18,17,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9,9.00000000,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(19,18,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(20,18,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(21,18,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(24,20,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,5,5.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,20.00000000,0.00000000,20.00000000),(25,20,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(26,20,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(55,29,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(56,29,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(57,29,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(58,29,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,1,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(59,29,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,10,10.00000000,30.00000000,0.00000000,0.00000000,0.00000000,30.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',10.00000000,30.00000000,0.00000000,30.00000000),(75,34,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(76,34,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(77,34,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(78,34,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9,9.00000000,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,1,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(94,38,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(95,38,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(99,40,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(100,40,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(101,40,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(102,40,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(103,40,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(112,43,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(113,43,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(114,43,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(115,43,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(116,43,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(125,47,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(126,47,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(127,47,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(128,47,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(129,48,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(130,48,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(134,50,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(135,50,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(145,54,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(146,54,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(158,58,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(159,58,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(160,58,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,9,9.00000000,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',9.00000000,36.00000000,0.00000000,36.00000000),(174,62,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(175,62,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(176,62,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(198,68,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(199,68,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(209,72,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(210,72,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(211,72,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(212,72,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(213,72,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(227,75,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(235,78,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(236,78,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(237,78,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(238,78,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(246,81,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(247,81,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(248,81,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,5,5.00000000,25.00000000,0.00000000,0.00000000,0.00000000,25.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',5.00000000,25.00000000,0.00000000,25.00000000),(253,83,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,5,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,5.00000000,0.00000000,5.00000000),(254,83,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(255,83,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(256,83,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(257,84,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(258,84,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(259,84,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(260,85,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(261,85,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(262,85,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(271,88,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(272,88,NULL,3,NULL,'',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(276,75,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,90.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(278,75,NULL,13,NULL,'A powerfull computer XP4523 
\r\n(Code douane: USXP765 - Pays d'origine: Etats-Unis)',5.000,'',9.975,'1',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,25.00000000,49.88000000,0.00000000,574.88000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,25.00000000,574.88000000),(279,75,NULL,13,NULL,'A powerfull computer XP4523 
\n(Code douane: USXP765 - Pays d\'origine: Etats-Unis)',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(280,90,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(281,90,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,10,10.00000000,30.00000000,0.00000000,0.00000000,0.00000000,30.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',10.00000000,30.00000000,0.00000000,30.00000000),(282,90,NULL,2,NULL,'',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(283,90,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(284,91,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(285,91,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(286,91,NULL,13,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(287,92,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(288,92,NULL,13,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(289,92,NULL,10,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(290,92,NULL,13,NULL,'A powerfull computer XP4523 ',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(291,92,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(292,6,NULL,11,NULL,'A nice rollup',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,NULL,'',0.00000000,0.00000000,0.00000000,0.00000000),(295,93,NULL,11,NULL,'A nice rollup',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,1,'EUR',0.00000000,0.00000000,0.00000000,0.00000000); /*!40000 ALTER TABLE `llx_commandedet` ENABLE KEYS */; UNLOCK TABLES; @@ -3900,7 +3901,7 @@ CREATE TABLE `llx_const` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_const` (`name`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=6796 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=7038 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3909,7 +3910,7 @@ CREATE TABLE `llx_const` ( LOCK TABLES `llx_const` WRITE; /*!40000 ALTER TABLE `llx_const` DISABLE KEYS */; -INSERT INTO `llx_const` VALUES (8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2012-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2012-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2012-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2012-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2012-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2012-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2012-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2012-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2012-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','html',0,'Mail resiliation','2018-11-23 11:56:07'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','html',0,'Mail de validation','2018-11-23 11:56:07'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','html',0,'Mail de validation de cotisation','2018-11-23 11:56:07'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2012-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2012-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2012-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2012-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2012-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2012-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2012-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2012-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2012-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2012-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2012-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2012-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2012-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2012-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2012-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2012-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2012-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2012-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2012-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2012-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2012-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2012-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2012-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2012-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2012-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2012-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2012-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2012-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2012-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2012-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2012-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2012-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2012-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2012-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2012-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2012-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2012-07-08 11:26:27'),(239,'LIVRAISON_ADDON_NUMBER',1,'mod_livraison_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2015-03-20 13:17:36'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2012-07-08 11:28:53'),(249,'DON_FORM',1,'html_cerfafr','chaine',0,'Nom du gestionnaire de formulaire de dons','2017-09-06 16:12:22'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2012-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2012-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2012-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2012-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2012-07-08 11:29:33'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2012-07-08 22:58:07'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2012-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2012-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2012-07-08 23:14:55'),(385,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2012-07-08 23:22:19'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2012-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2012-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2012-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2012-07-08 23:27:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2012-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2012-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2012-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2012-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2012-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2012-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2012-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2012-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2012-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2012-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2012-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2012-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2012-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2012-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2012-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2012-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2012-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2012-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2013-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2013-07-18 18:02:24'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2013-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2013-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2013-07-29 20:50:02'),(1231,'MAIN_UPLOAD_DOC',1,'2048','chaine',0,'','2013-07-29 21:04:00'),(1234,'MAIN_UMASK',1,'0664','chaine',0,'','2013-07-29 21:04:11'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2013-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2013-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2013-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2014-12-08 13:11:02'),(1698,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_leopard','yesno',0,'Module to control product codes','2014-12-08 13:11:25'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2014-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2014-12-08 13:22:47'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:14'),(1743,'MAIN_MENU_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1744,'MAIN_MENUFRONT_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1745,'MAIN_MENU_SMARTPHONE',2,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:14'),(1746,'MAIN_MENUFRONT_SMARTPHONE',2,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2014-12-08 14:08:14'),(1748,'MAIN_DELAY_ACTIONS_TODO',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:14'),(1749,'MAIN_DELAY_ORDERS_TO_PROCESS',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:14'),(1750,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:14'),(1751,'MAIN_DELAY_PROPALS_TO_CLOSE',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:14'),(1752,'MAIN_DELAY_PROPALS_TO_BILL',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:14'),(1753,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:14'),(1754,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:14'),(1755,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:14'),(1756,'MAIN_DELAY_RUNNING_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:14'),(1757,'MAIN_DELAY_MEMBERS',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:14'),(1758,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',2,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2015-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2014-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2015-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2014-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2014-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:20'),(1766,'MAIN_MENU_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1767,'MAIN_MENUFRONT_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1768,'MAIN_MENU_SMARTPHONE',3,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:20'),(1769,'MAIN_MENUFRONT_SMARTPHONE',3,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2014-12-08 14:08:20'),(1771,'MAIN_DELAY_ACTIONS_TODO',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:20'),(1772,'MAIN_DELAY_ORDERS_TO_PROCESS',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:20'),(1773,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:20'),(1774,'MAIN_DELAY_PROPALS_TO_CLOSE',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:20'),(1775,'MAIN_DELAY_PROPALS_TO_BILL',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:20'),(1776,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:20'),(1777,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:20'),(1778,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:20'),(1779,'MAIN_DELAY_RUNNING_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:20'),(1780,'MAIN_DELAY_MEMBERS',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:20'),(1781,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',3,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2014-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2014-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2014-12-08 14:35:40'),(1806,'MAIN_MODULE_SKINCOLOREDITOR_TABS_0',3,'user:+tabskincoloreditors:ColorEditor:skincoloreditor@skincoloreditor:/skincoloreditor/usercolors.php?id=__ID__','chaine',0,NULL,'2014-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.nltechno.com','chaine',0,'','2014-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2014-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'AXqqdsWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2014-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2014-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2014-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2014-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2014-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2014-12-12 19:58:05'),(2251,'FCKEDITOR_TEST',1,'Test
\r\n\"\"fdfs','chaine',0,'','2014-12-19 19:12:24'),(2293,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2014-12-27 02:02:00'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2015-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2015-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2015-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2015-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2015-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2015-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2015-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2015-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2015-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2015-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2015-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2015-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2015-01-19 17:01:53'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2015-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2015-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2015-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2015-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2015-02-01 08:52:34'),(3191,'MAIN_MODULE_HOLIDAY_TABS_0',2,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->write:/holiday/index.php?mainmenu=holiday&id=__ID__','chaine',0,NULL,'2015-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2015-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2015-02-12 16:22:55'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2015-02-13 16:20:18'),(3241,'COMPANY_USE_SEARCH_TO_SELECT',1,'2','chaine',0,'','2015-02-17 14:33:39'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2015-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2015-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2015-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2015-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2015-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2015-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2015-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2015-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2015-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2015-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2015-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2015-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2015-03-10 15:57:21'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2015-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4596,'MAIN_MODULE_GOOGLE_TABS_0',2,'agenda:+gcal:MenuAgendaGoogle:google@google:$conf->google->enabled && $conf->global->GOOGLE_ENABLE_AGENDA:/google/index.php','chaine',0,NULL,'2015-03-13 15:29:47'),(4597,'MAIN_MODULE_GOOGLE_TABS_1',2,'user:+gsetup:GoogleUserConf:google@google:$conf->google->enabled && $conf->global->GOOGLE_DUPLICATE_INTO_GCAL:/google/admin/google_calsync_user.php?id=__ID__','chaine',0,NULL,'2015-03-13 15:29:47'),(4598,'MAIN_MODULE_GOOGLE_TRIGGERS',2,'1','chaine',0,NULL,'2015-03-13 15:29:47'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2015-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2015-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2015-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2015-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2015-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2015-03-13 15:36:29'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4727,'SOCIETE_FISCAL_MONTH_START',2,'','chaine',0,'Mettre le numero du mois du debut d\\\'annee fiscale, ex: 9 pour septembre','2015-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2015-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2015-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2015-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2015-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2015-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2015-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2015-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2015-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2015-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2015-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2015-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2015-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2015-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2015-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2015-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2015-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2015-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2015-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2015-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2015-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2015-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2015-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2015-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2015-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2015-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2015-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2015-03-13 22:03:40'),(4928,'COMMANDE_SUPPLIER_ADDON_NUMBER',1,'mod_commande_fournisseur_muguet','chaine',0,'Nom du gestionnaire de numerotation des commandes fournisseur','2015-03-22 09:24:29'),(4929,'INVOICE_SUPPLIER_ADDON_NUMBER',1,'mod_facture_fournisseur_cactus','chaine',0,'Nom du gestionnaire de numerotation des factures fournisseur','2015-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2015-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2015-03-23 18:06:24'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2015-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2015-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2015-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2015-09-08 23:06:14'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2016-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2016-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2016-12-21 12:51:28'),(5273,'DONATION_ART885',1,'','yesno',0,'Option Française - Eligibilité Art885-0 V bis du CGI','2016-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2016-12-21 12:51:28'),(5288,'DONATION_ACCOUNTINGACCOUNT',1,'7581','chaine',0,'Compte comptable de remise des versements ou dons','2017-07-19 13:41:21'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2017-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2017-11-04 15:27:46'),(5403,'MAIN_MODULE_FCKEDITOR',1,'1',NULL,0,NULL,'2017-11-04 15:41:40'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2017-11-04 15:41:43'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2017-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2017-11-15 22:38:28'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2017-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2017-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2017-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2017-11-15 22:39:00'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2017-11-15 22:39:05'),(5436,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,NULL,'2017-11-15 22:39:08'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2017-11-15 22:39:08'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','text',0,'Text to print on member address sheets','2018-11-23 11:56:07'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2017-11-15 22:39:33'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2017-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2017-11-15 22:39:56'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2017-11-15 22:41:02'),(5460,'MAIN_MODULE_MARGIN',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5461,'MAIN_MODULE_MARGIN_TABS_0',1,'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__','chaine',0,NULL,'2017-11-15 22:41:47'),(5462,'MAIN_MODULE_MARGIN_TABS_1',1,'thirdparty:+margin:Margins:margins:empty($user->societe_id) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__','chaine',0,NULL,'2017-11-15 22:41:47'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2018-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2018-01-16 15:49:46'),(5541,'MODULE_GOOGLE_DEBUG',1,'0','chaine',1,'','2018-01-22 13:34:57'),(5586,'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur les notes de frais impayées','2018-01-22 17:28:18'),(5587,'MAIN_FIX_FOR_BUGGED_MTA',1,'1','chaine',1,'Set constant to fix email ending from PHP with some linux ike system','2018-01-22 17:28:18'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2018-01-22 17:28:42'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2018-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2018-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2018-01-22 17:33:49'),(5612,'MAIN_ENABLE_LOG_TO_HTML',0,'0','chaine',1,'If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL','2018-03-13 10:54:45'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2018-03-13 10:54:46'),(5626,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1',NULL,0,NULL,'2018-07-30 11:13:20'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2018-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2018-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2018-07-30 11:13:20'),(5632,'MAIN_MODULE_RESOURCE',1,'1',NULL,0,NULL,'2018-07-30 11:13:32'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2018-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2018-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2018-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2018-07-30 11:15:04'),(5639,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2018-07-30 11:15:25'),(5640,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2018-07-30 11:15:25'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2018-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2018-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5712,'MAIN_MODULE_EXPEDITION',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2018-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2018-07-30 16:32:20'),(5810,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2018-07-30 18:36:15'),(5813,'USER_PASSWORD_PATTERN',1,'8;1;1;1;3;1','chaine',0,'','2018-07-31 16:04:58'),(5814,'MAIN_MODULE_EXPENSEREPORT',1,'1',NULL,0,NULL,'2018-07-31 21:14:32'),(5830,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,NULL,'2017-01-29 15:11:51'),(5831,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'6162','chaine',0,NULL,'2017-01-29 15:11:51'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',0,NULL,'2017-01-29 15:11:56'),(5834,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,NULL,'2017-01-29 15:11:56'),(5839,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,NULL,'2017-01-29 15:11:56'),(5840,'CHARTOFACCOUNTS',1,'2','chaine',0,NULL,'2017-01-29 15:11:56'),(5841,'ACCOUNTING_EXPORT_MODELCSV',1,'1','chaine',0,NULL,'2017-01-29 15:11:56'),(5842,'ACCOUNTING_LENGTH_GACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5843,'ACCOUNTING_LENGTH_AACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5844,'ACCOUNTING_LIST_SORT_VENTILATION_TODO',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5845,'ACCOUNTING_LIST_SORT_VENTILATION_DONE',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5846,'ACCOUNTING_EXPORT_DATE',1,'%d%m%Y','chaine',0,NULL,'2017-01-29 15:11:56'),(5848,'ACCOUNTING_EXPORT_FORMAT',1,'csv','chaine',0,NULL,'2017-01-29 15:11:56'),(5853,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2017-01-29 15:12:12'),(5854,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2017-01-29 15:12:35'),(5855,'MAIN_MODULE_OAUTH',1,'1',NULL,0,NULL,'2017-01-29 15:12:41'),(5883,'MAILING_LIMIT_SENDBYWEB',0,'15','chaine',1,'Number of targets to defined packet size when sending mass email','2017-01-29 17:36:33'),(5884,'MAIN_MAIL_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5885,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5887,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2017-02-01 12:23:56'),(5888,'PROJECT_HIDE_TASKS',1,'1','chaine',0,'','2017-02-01 12:23:56'),(5889,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5890,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5891,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5892,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5893,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5894,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5895,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5896,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5897,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5898,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5899,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5900,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5901,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5902,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5903,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5904,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5905,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5906,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5907,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5908,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5909,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5910,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5911,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5912,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5913,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5914,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5915,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5916,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5917,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5918,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5919,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5920,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5921,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5922,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5923,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5924,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5926,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5927,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5928,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5929,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5930,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5931,'DATABASE_PWD_ENCRYPTED',1,'1','chaine',0,'','2017-02-01 15:06:04'),(5932,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2017-02-01 15:09:09'),(5933,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2017-02-01 15:09:09'),(5934,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2017-02-01 15:09:09'),(5935,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2017-02-01 15:09:09'),(5936,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2017-02-01 15:09:09'),(5937,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2017-02-01 15:09:09'),(5938,'MAIN_MAIL_EMAIL_FROM',1,'robot@example.com','chaine',0,'','2017-02-01 15:09:09'),(5939,'MAIN_MAIL_DEFAULT_FROMTYPE',1,'user','chaine',0,'','2017-02-01 15:09:09'),(5940,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5941,'PRELEVEMENT_ICS',1,'ICS123456','chaine',0,'','2017-02-06 04:04:47'),(5942,'PRELEVEMENT_USER',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5943,'BANKADDON_PDF',1,'sepamandate','chaine',0,'','2017-02-06 04:13:52'),(5947,'CHEQUERECEIPTS_THYME_MASK',1,'CHK{yy}{mm}-{0000@1}','chaine',0,'','2017-02-06 04:16:27'),(5948,'MAIN_MODULE_LOAN',1,'1',NULL,0,NULL,'2017-02-06 19:19:05'),(5954,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2017-02-06 23:57:37'),(5963,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5996,'CABINETMED_RHEUMATOLOGY_ON',1,'0','text',0,'','2018-11-23 11:56:07'),(5999,'MAIN_SEARCHFORM_SOCIETE',1,'1','text',0,'','2018-11-23 11:56:07'),(6000,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','text',0,'','2018-11-23 11:56:07'),(6019,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2017-02-15 17:18:22'),(6020,'MAIN_INFO_SOCIETE_NOM',2,'MySecondCompany','chaine',0,'','2017-02-15 17:18:22'),(6021,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2017-02-15 17:18:22'),(6022,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2017-02-15 17:18:22'),(6023,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2017-02-15 17:18:22'),(6032,'MAIN_MODULE_MULTICURRENCY',1,'1',NULL,0,NULL,'2017-02-15 17:29:59'),(6048,'SYSLOG_FACILITY',0,'LOG_USER','chaine',0,'','2017-02-15 22:37:01'),(6049,'SYSLOG_FIREPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/firephp/firephp-core/lib/','chaine',0,'','2017-02-15 22:37:01'),(6050,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2017-02-15 22:37:01'),(6051,'SYSLOG_CHROMEPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/ccampbell/chromephp/','chaine',0,'','2017-02-15 22:37:01'),(6052,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'','2017-02-15 22:37:01'),(6054,'SYSLOG_LEVEL',0,'7','chaine',0,'','2017-02-15 22:37:21'),(6074,'CABINETMED_DELAY_TO_LOCK_RECORD',1,'','chaine',1,'Number of days before locking edit of consultation','2017-02-21 00:04:15'),(6092,'MAIN_SIZE_SHORTLIST_LIMIT',0,'3','chaine',0,'Max length for small lists (tabs)','2017-05-12 09:02:38'),(6099,'MAIN_MODULE_SKYPE',1,'1',NULL,0,NULL,'2017-05-12 09:03:51'),(6100,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2017-05-12 09:03:54'),(6102,'PRODUCT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/products','chaine',0,'','2017-08-27 13:29:07'),(6103,'CONTRACT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/contracts','chaine',0,'','2017-08-27 13:29:07'),(6104,'USERGROUP_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/usergroups','chaine',0,'','2017-08-27 13:29:07'),(6105,'USER_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/users','chaine',0,'','2017-08-27 13:29:07'),(6106,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'Enable overwrote of translation','2017-08-27 13:29:07'),(6108,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6109,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_BILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6110,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_UNBILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6111,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6112,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6113,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6114,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6115,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6116,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6117,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6118,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_PAYED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6119,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6120,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6121,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6137,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2017-08-28 10:19:58'),(6138,'MAIN_MULTILANGS',1,'1','chaine',0,'','2017-08-28 10:19:58'),(6139,'MAIN_THEME',1,'eldy','chaine',0,'','2017-08-28 10:19:58'),(6140,'THEME_ELDY_USE_HOVER',1,'edf4fb','chaine',0,'','2017-08-28 10:19:58'),(6141,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2017-08-28 10:19:59'),(6142,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2017-08-28 10:19:59'),(6143,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6144,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6145,'MAIN_START_WEEK',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6146,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2017-08-28 10:19:59'),(6147,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2017-08-28 10:19:59'),(6148,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6149,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6150,'MAIN_HELPCENTER_DISABLELINK',0,'1','chaine',0,'','2017-08-28 10:19:59'),(6151,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2017-08-28 10:19:59'),(6152,'MAIN_HELP_DISABLELINK',0,'0','chaine',0,'','2017-08-28 10:19:59'),(6153,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6353,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6354,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6355,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6356,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2017-08-30 15:14:44'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(6518,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2017-09-06 19:43:57'),(6519,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2017-09-06 19:43:57'),(6520,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2017-09-06 19:43:57'),(6521,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2017-09-06 19:43:57'),(6522,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2017-09-06 19:44:12'),(6523,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2017-09-06 19:44:12'),(6524,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6525,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6526,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6527,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6528,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2017-09-06 19:44:12'),(6529,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2017-09-06 19:44:12'),(6543,'MAIN_SMS_DEBUG',0,'1','chaine',1,'This is to enable OVH SMS debug','2017-09-06 19:44:34'),(6562,'BLOCKEDLOG_ENTITY_FINGERPRINT',1,'b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b','chaine',0,'Numeric Unique Fingerprint','2018-01-19 11:27:15'),(6564,'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY',1,'FR','chaine',0,'This is list of country code where the module may be mandatory','2018-01-19 11:27:15'),(6565,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:34'),(6566,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:56'),(6567,'ADHERENT_ADDON_PDF',1,'standard','chaine',0,'Name of PDF model of member','2018-01-19 11:27:56'),(6569,'MAIN_MODULE_STRIPE',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:17'),(6587,'MAIN_MODULE_BLOCKEDLOG',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2018-03-16 09:57:24'),(6632,'MAIN_MODULE_TICKET',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:15:29'),(6633,'MAIN_MODULE_TICKET_TABS_0',1,'thirdparty:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?socid=__ID__','chaine',0,NULL,'2019-06-05 09:15:29'),(6634,'MAIN_MODULE_TICKET_TABS_1',1,'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__','chaine',0,NULL,'2019-06-05 09:15:29'),(6635,'MAIN_MODULE_TICKET_TRIGGERS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6636,'MAIN_MODULE_TICKET_MODELS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6637,'TICKET_ENABLE_PUBLIC_INTERFACE',1,'0','chaine',0,'Enable ticket public interface','2019-06-05 09:15:29'),(6638,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:15:58'),(6639,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6640,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6641,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2019-06-05 09:15:58'),(6642,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6643,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6644,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6645,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6646,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6647,'MAIN_MODULE_SOCIALNETWORKS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:16:49'),(6648,'MAIN_MODULE_CASHDESK',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:17:21'),(6649,'MAIN_MODULE_ACCOUNTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6650,'MAIN_MODULE_AGENDA',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6651,'MAIN_MODULE_BARCODE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6652,'MAIN_MODULE_CRON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6653,'MAIN_MODULE_COMMANDE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6654,'MAIN_MODULE_DON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6655,'MAIN_MODULE_ECM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6656,'MAIN_MODULE_FACTURE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6657,'MAIN_MODULE_FOURNISSEUR',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6658,'MAIN_MODULE_HOLIDAY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6659,'MAIN_MODULE_OPENSURVEY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6660,'MAIN_MODULE_PRINTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6661,'MAIN_MODULE_SALARIES',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6662,'MAIN_MODULE_SYSLOG',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6663,'MAIN_MODULE_SOCIETE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6664,'MAIN_MODULE_SERVICE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:25'),(6665,'MAIN_MODULE_USER',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:25'),(6666,'MAIN_MODULE_VARIANTS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:25'),(6667,'MAIN_VERSION_LAST_UPGRADE',0,'10.0.2','chaine',0,'Dolibarr version for last upgrade','2019-09-26 11:33:26'),(6729,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2019-09-26 12:01:06'),(6730,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2019-09-26 12:01:06'),(6731,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street..ll..ee \"','chaine',0,'','2019-09-26 12:01:06'),(6732,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2019-09-26 12:01:06'),(6733,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2019-09-26 12:01:06'),(6734,'MAIN_INFO_SOCIETE_STATE',1,'290','chaine',0,'','2019-09-26 12:01:06'),(6735,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2019-09-26 12:01:06'),(6736,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2019-09-26 12:01:06'),(6737,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2019-09-26 12:01:06'),(6738,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2019-09-26 12:01:06'),(6739,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2019-09-26 12:01:06'),(6740,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2019-09-26 12:01:06'),(6741,'MAIN_INFO_SOCIETE_GENCOD',1,'1234567890','chaine',0,'','2019-09-26 12:01:06'),(6742,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2019-09-26 12:01:06'),(6743,'MAIN_INFO_GDPR',1,'Zack Zeceo','chaine',0,'','2019-09-26 12:01:06'),(6744,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2019-09-26 12:01:06'),(6745,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6746,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2019-09-26 12:01:06'),(6747,'MAIN_INFO_SIRET',1,'ABC-DEF','chaine',0,'','2019-09-26 12:01:06'),(6748,'MAIN_INFO_APE',1,'15E-45-8D','chaine',0,'','2019-09-26 12:01:06'),(6749,'MAIN_INFO_TVAINTRA',1,'FR12345678','chaine',0,'','2019-09-26 12:01:06'),(6750,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2019-09-26 12:01:06'),(6751,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2019-09-26 12:01:06'),(6752,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2019-09-26 12:01:06'),(6753,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2019-09-26 12:01:06'),(6754,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2019-09-26 12:01:06'),(6755,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6756,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6757,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6758,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6762,'MAIN_INFO_ACCOUNTANT_NAME',1,'Bob Bookeeper','chaine',0,'','2019-09-26 12:01:37'),(6763,'MAIN_INFO_ACCOUNTANT_TOWN',1,'Berlin','chaine',0,'','2019-09-26 12:01:37'),(6764,'MAIN_INFO_ACCOUNTANT_STATE',1,'0','chaine',0,'','2019-09-26 12:01:37'),(6765,'MAIN_INFO_ACCOUNTANT_COUNTRY',1,'5','chaine',0,'','2019-09-26 12:01:37'),(6795,'TICKET_ADDON',1,'mod_ticket_simple','chaine',0,'','2019-09-26 12:07:59'); +INSERT INTO `llx_const` VALUES (8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2012-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2012-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2012-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2012-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2012-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2012-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2012-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2012-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2012-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','html',0,'Mail resiliation','2018-11-23 11:56:07'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','html',0,'Mail de validation','2018-11-23 11:56:07'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','html',0,'Mail de validation de cotisation','2018-11-23 11:56:07'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2012-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2012-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2012-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2012-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2012-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2012-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2012-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2012-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2012-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2012-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2012-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2012-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2012-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2012-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2012-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2012-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2012-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2012-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2012-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2012-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2012-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2012-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2012-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2012-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2012-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2012-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2012-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2012-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2012-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2012-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2012-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2012-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2012-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2012-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2012-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2012-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2012-07-08 11:26:27'),(239,'LIVRAISON_ADDON_NUMBER',1,'mod_livraison_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2015-03-20 13:17:36'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2012-07-08 11:28:53'),(249,'DON_FORM',1,'html_cerfafr','chaine',0,'Nom du gestionnaire de formulaire de dons','2017-09-06 16:12:22'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2012-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2012-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2012-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2012-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2012-07-08 11:29:33'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2012-07-08 22:58:07'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2012-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2012-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2012-07-08 23:14:55'),(385,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2012-07-08 23:22:19'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2012-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2012-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2012-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2012-07-08 23:27:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2012-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2012-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2012-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2012-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2012-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2012-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2012-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2012-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2012-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2012-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2012-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2012-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2012-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2012-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2012-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2012-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2012-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2012-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2013-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2013-07-18 18:02:24'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2013-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2013-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2013-07-29 20:50:02'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2013-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2013-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2013-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2014-12-08 13:11:02'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2014-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2014-12-08 13:22:47'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:14'),(1743,'MAIN_MENU_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1744,'MAIN_MENUFRONT_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1745,'MAIN_MENU_SMARTPHONE',2,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:14'),(1746,'MAIN_MENUFRONT_SMARTPHONE',2,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2014-12-08 14:08:14'),(1748,'MAIN_DELAY_ACTIONS_TODO',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:14'),(1749,'MAIN_DELAY_ORDERS_TO_PROCESS',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:14'),(1750,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:14'),(1751,'MAIN_DELAY_PROPALS_TO_CLOSE',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:14'),(1752,'MAIN_DELAY_PROPALS_TO_BILL',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:14'),(1753,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:14'),(1754,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:14'),(1755,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:14'),(1756,'MAIN_DELAY_RUNNING_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:14'),(1757,'MAIN_DELAY_MEMBERS',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:14'),(1758,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',2,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2015-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2014-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2015-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2014-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2014-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:20'),(1766,'MAIN_MENU_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1767,'MAIN_MENUFRONT_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1768,'MAIN_MENU_SMARTPHONE',3,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:20'),(1769,'MAIN_MENUFRONT_SMARTPHONE',3,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2014-12-08 14:08:20'),(1771,'MAIN_DELAY_ACTIONS_TODO',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:20'),(1772,'MAIN_DELAY_ORDERS_TO_PROCESS',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:20'),(1773,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:20'),(1774,'MAIN_DELAY_PROPALS_TO_CLOSE',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:20'),(1775,'MAIN_DELAY_PROPALS_TO_BILL',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:20'),(1776,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:20'),(1777,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:20'),(1778,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:20'),(1779,'MAIN_DELAY_RUNNING_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:20'),(1780,'MAIN_DELAY_MEMBERS',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:20'),(1781,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',3,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2014-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2014-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2014-12-08 14:35:40'),(1806,'MAIN_MODULE_SKINCOLOREDITOR_TABS_0',3,'user:+tabskincoloreditors:ColorEditor:skincoloreditor@skincoloreditor:/skincoloreditor/usercolors.php?id=__ID__','chaine',0,NULL,'2014-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.nltechno.com','chaine',0,'','2014-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2014-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'AXqqdsWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2014-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2014-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2014-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2014-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2014-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2014-12-12 19:58:05'),(2251,'FCKEDITOR_TEST',1,'Test
\r\n\"\"fdfs','chaine',0,'','2014-12-19 19:12:24'),(2293,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2014-12-27 02:02:00'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2015-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2015-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2015-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2015-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2015-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2015-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2015-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2015-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2015-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2015-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2015-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2015-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2015-01-19 17:01:53'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2015-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2015-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2015-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2015-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2015-02-01 08:52:34'),(3191,'MAIN_MODULE_HOLIDAY_TABS_0',2,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->write:/holiday/index.php?mainmenu=holiday&id=__ID__','chaine',0,NULL,'2015-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2015-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2015-02-12 16:22:55'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2015-02-13 16:20:18'),(3241,'COMPANY_USE_SEARCH_TO_SELECT',1,'2','chaine',0,'','2015-02-17 14:33:39'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2015-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2015-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2015-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2015-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2015-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2015-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2015-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2015-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2015-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2015-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2015-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2015-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2015-03-10 15:57:21'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2015-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4596,'MAIN_MODULE_GOOGLE_TABS_0',2,'agenda:+gcal:MenuAgendaGoogle:google@google:$conf->google->enabled && $conf->global->GOOGLE_ENABLE_AGENDA:/google/index.php','chaine',0,NULL,'2015-03-13 15:29:47'),(4597,'MAIN_MODULE_GOOGLE_TABS_1',2,'user:+gsetup:GoogleUserConf:google@google:$conf->google->enabled && $conf->global->GOOGLE_DUPLICATE_INTO_GCAL:/google/admin/google_calsync_user.php?id=__ID__','chaine',0,NULL,'2015-03-13 15:29:47'),(4598,'MAIN_MODULE_GOOGLE_TRIGGERS',2,'1','chaine',0,NULL,'2015-03-13 15:29:47'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2015-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2015-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2015-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2015-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2015-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2015-03-13 15:36:29'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4727,'SOCIETE_FISCAL_MONTH_START',2,'','chaine',0,'Mettre le numero du mois du debut d\\\'annee fiscale, ex: 9 pour septembre','2015-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2015-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2015-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2015-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2015-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2015-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2015-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2015-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2015-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2015-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2015-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2015-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2015-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2015-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2015-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2015-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2015-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2015-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2015-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2015-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2015-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2015-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2015-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2015-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2015-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2015-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2015-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2015-03-13 22:03:40'),(4928,'COMMANDE_SUPPLIER_ADDON_NUMBER',1,'mod_commande_fournisseur_muguet','chaine',0,'Nom du gestionnaire de numerotation des commandes fournisseur','2015-03-22 09:24:29'),(4929,'INVOICE_SUPPLIER_ADDON_NUMBER',1,'mod_facture_fournisseur_cactus','chaine',0,'Nom du gestionnaire de numerotation des factures fournisseur','2015-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2015-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2015-03-23 18:06:24'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2015-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2015-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2015-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2015-09-08 23:06:14'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2016-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2016-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2016-12-21 12:51:28'),(5273,'DONATION_ART885',1,'','yesno',0,'Option Française - Eligibilité Art885-0 V bis du CGI','2016-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2016-12-21 12:51:28'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2017-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2017-11-04 15:27:46'),(5403,'MAIN_MODULE_FCKEDITOR',1,'1',NULL,0,NULL,'2017-11-04 15:41:40'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2017-11-04 15:41:43'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2017-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2017-11-15 22:38:28'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2017-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2017-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2017-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2017-11-15 22:39:00'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2017-11-15 22:39:05'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2017-11-15 22:39:08'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','text',0,'Text to print on member address sheets','2018-11-23 11:56:07'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2017-11-15 22:39:33'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2017-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2017-11-15 22:39:56'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2017-11-15 22:41:02'),(5460,'MAIN_MODULE_MARGIN',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5461,'MAIN_MODULE_MARGIN_TABS_0',1,'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__','chaine',0,NULL,'2017-11-15 22:41:47'),(5462,'MAIN_MODULE_MARGIN_TABS_1',1,'thirdparty:+margin:Margins:margins:empty($user->societe_id) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__','chaine',0,NULL,'2017-11-15 22:41:47'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2018-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2018-01-16 15:49:46'),(5586,'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur les notes de frais impayées','2018-01-22 17:28:18'),(5587,'MAIN_FIX_FOR_BUGGED_MTA',1,'1','chaine',1,'Set constant to fix email ending from PHP with some linux ike system','2018-01-22 17:28:18'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2018-01-22 17:28:42'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2018-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2018-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2018-01-22 17:33:49'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2018-03-13 10:54:46'),(5626,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1',NULL,0,NULL,'2018-07-30 11:13:20'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2018-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2018-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2018-07-30 11:13:20'),(5632,'MAIN_MODULE_RESOURCE',1,'1',NULL,0,NULL,'2018-07-30 11:13:32'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2018-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2018-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2018-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2018-07-30 11:15:04'),(5639,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2018-07-30 11:15:25'),(5640,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2018-07-30 11:15:25'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2018-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2018-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5712,'MAIN_MODULE_EXPEDITION',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2018-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2018-07-30 16:32:20'),(5814,'MAIN_MODULE_EXPENSEREPORT',1,'1',NULL,0,NULL,'2018-07-31 21:14:32'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',0,NULL,'2017-01-29 15:11:56'),(5840,'CHARTOFACCOUNTS',1,'2','chaine',0,NULL,'2017-01-29 15:11:56'),(5841,'ACCOUNTING_EXPORT_MODELCSV',1,'1','chaine',0,NULL,'2017-01-29 15:11:56'),(5842,'ACCOUNTING_LENGTH_GACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5843,'ACCOUNTING_LENGTH_AACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5844,'ACCOUNTING_LIST_SORT_VENTILATION_TODO',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5845,'ACCOUNTING_LIST_SORT_VENTILATION_DONE',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5846,'ACCOUNTING_EXPORT_DATE',1,'%d%m%Y','chaine',0,NULL,'2017-01-29 15:11:56'),(5848,'ACCOUNTING_EXPORT_FORMAT',1,'csv','chaine',0,NULL,'2017-01-29 15:11:56'),(5853,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2017-01-29 15:12:12'),(5854,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2017-01-29 15:12:35'),(5855,'MAIN_MODULE_OAUTH',1,'1',NULL,0,NULL,'2017-01-29 15:12:41'),(5883,'MAILING_LIMIT_SENDBYWEB',0,'15','chaine',1,'Number of targets to defined packet size when sending mass email','2017-01-29 17:36:33'),(5884,'MAIN_MAIL_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5885,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5889,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5890,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5891,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5892,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5893,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5894,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5895,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5896,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5897,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5898,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5899,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5900,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5901,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5902,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5903,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5904,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5905,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5906,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5907,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5908,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5909,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5910,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5911,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5912,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5913,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5914,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5915,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5916,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5917,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5918,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5919,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5920,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5921,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5922,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5923,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5924,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5926,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5927,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5928,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5929,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5930,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5931,'DATABASE_PWD_ENCRYPTED',1,'1','chaine',0,'','2017-02-01 15:06:04'),(5932,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2017-02-01 15:09:09'),(5933,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2017-02-01 15:09:09'),(5934,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2017-02-01 15:09:09'),(5935,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2017-02-01 15:09:09'),(5936,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2017-02-01 15:09:09'),(5937,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2017-02-01 15:09:09'),(5938,'MAIN_MAIL_EMAIL_FROM',1,'robot@example.com','chaine',0,'','2017-02-01 15:09:09'),(5939,'MAIN_MAIL_DEFAULT_FROMTYPE',1,'user','chaine',0,'','2017-02-01 15:09:09'),(5940,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5941,'PRELEVEMENT_ICS',1,'ICS123456','chaine',0,'','2017-02-06 04:04:47'),(5942,'PRELEVEMENT_USER',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5943,'BANKADDON_PDF',1,'sepamandate','chaine',0,'','2017-02-06 04:13:52'),(5947,'CHEQUERECEIPTS_THYME_MASK',1,'CHK{yy}{mm}-{0000@1}','chaine',0,'','2017-02-06 04:16:27'),(5948,'MAIN_MODULE_LOAN',1,'1',NULL,0,NULL,'2017-02-06 19:19:05'),(5954,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2017-02-06 23:57:37'),(5963,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5996,'CABINETMED_RHEUMATOLOGY_ON',1,'0','text',0,'','2018-11-23 11:56:07'),(5999,'MAIN_SEARCHFORM_SOCIETE',1,'1','text',0,'','2018-11-23 11:56:07'),(6000,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','text',0,'','2018-11-23 11:56:07'),(6019,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2017-02-15 17:18:22'),(6020,'MAIN_INFO_SOCIETE_NOM',2,'MySecondCompany','chaine',0,'','2017-02-15 17:18:22'),(6021,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2017-02-15 17:18:22'),(6022,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2017-02-15 17:18:22'),(6023,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2017-02-15 17:18:22'),(6032,'MAIN_MODULE_MULTICURRENCY',1,'1',NULL,0,NULL,'2017-02-15 17:29:59'),(6048,'SYSLOG_FACILITY',0,'LOG_USER','chaine',0,'','2017-02-15 22:37:01'),(6049,'SYSLOG_FIREPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/firephp/firephp-core/lib/','chaine',0,'','2017-02-15 22:37:01'),(6050,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2017-02-15 22:37:01'),(6051,'SYSLOG_CHROMEPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/ccampbell/chromephp/','chaine',0,'','2017-02-15 22:37:01'),(6052,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'','2017-02-15 22:37:01'),(6054,'SYSLOG_LEVEL',0,'7','chaine',0,'','2017-02-15 22:37:21'),(6092,'MAIN_SIZE_SHORTLIST_LIMIT',0,'3','chaine',0,'Max length for small lists (tabs)','2017-05-12 09:02:38'),(6099,'MAIN_MODULE_SKYPE',1,'1',NULL,0,NULL,'2017-05-12 09:03:51'),(6100,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2017-05-12 09:03:54'),(6102,'PRODUCT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/products','chaine',0,'','2017-08-27 13:29:07'),(6103,'CONTRACT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/contracts','chaine',0,'','2017-08-27 13:29:07'),(6104,'USERGROUP_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/usergroups','chaine',0,'','2017-08-27 13:29:07'),(6105,'USER_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/users','chaine',0,'','2017-08-27 13:29:07'),(6106,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'Enable overwrote of translation','2017-08-27 13:29:07'),(6108,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6109,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_BILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6110,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_CLASSIFY_UNBILLED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6111,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6112,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6113,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6114,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6115,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6116,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6117,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6118,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_PAYED',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6119,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6120,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6121,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,NULL,'2017-08-27 13:29:14'),(6137,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2017-08-28 10:19:58'),(6138,'MAIN_MULTILANGS',1,'1','chaine',0,'','2017-08-28 10:19:58'),(6140,'THEME_ELDY_USE_HOVER',1,'edf4fb','chaine',0,'','2017-08-28 10:19:58'),(6141,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2017-08-28 10:19:59'),(6142,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2017-08-28 10:19:59'),(6143,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6144,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6145,'MAIN_START_WEEK',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6146,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2017-08-28 10:19:59'),(6147,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2017-08-28 10:19:59'),(6148,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2017-08-28 10:19:59'),(6149,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6150,'MAIN_HELPCENTER_DISABLELINK',0,'1','chaine',0,'','2017-08-28 10:19:59'),(6151,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2017-08-28 10:19:59'),(6152,'MAIN_HELP_DISABLELINK',0,'0','chaine',0,'','2017-08-28 10:19:59'),(6153,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2017-08-28 10:19:59'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(6518,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2017-09-06 19:43:57'),(6519,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2017-09-06 19:43:57'),(6520,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2017-09-06 19:43:57'),(6521,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2017-09-06 19:43:57'),(6522,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2017-09-06 19:44:12'),(6523,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2017-09-06 19:44:12'),(6524,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6525,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6526,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6527,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6528,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2017-09-06 19:44:12'),(6529,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2017-09-06 19:44:12'),(6543,'MAIN_SMS_DEBUG',0,'1','chaine',1,'This is to enable OVH SMS debug','2017-09-06 19:44:34'),(6562,'BLOCKEDLOG_ENTITY_FINGERPRINT',1,'b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b','chaine',0,'Numeric Unique Fingerprint','2018-01-19 11:27:15'),(6564,'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY',1,'FR','chaine',0,'This is list of country code where the module may be mandatory','2018-01-19 11:27:15'),(6565,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:34'),(6566,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:56'),(6567,'ADHERENT_ADDON_PDF',1,'standard','chaine',0,'Name of PDF model of member','2018-01-19 11:27:56'),(6569,'MAIN_MODULE_STRIPE',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:17'),(6587,'MAIN_MODULE_BLOCKEDLOG',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2018-03-16 09:57:24'),(6632,'MAIN_MODULE_TICKET',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:15:29'),(6633,'MAIN_MODULE_TICKET_TABS_0',1,'thirdparty:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?socid=__ID__','chaine',0,NULL,'2019-06-05 09:15:29'),(6634,'MAIN_MODULE_TICKET_TABS_1',1,'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__','chaine',0,NULL,'2019-06-05 09:15:29'),(6635,'MAIN_MODULE_TICKET_TRIGGERS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6636,'MAIN_MODULE_TICKET_MODELS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6638,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:15:58'),(6639,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6640,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6641,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2019-06-05 09:15:58'),(6642,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6643,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6644,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6645,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6646,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6647,'MAIN_MODULE_SOCIALNETWORKS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:16:49'),(6648,'MAIN_MODULE_CASHDESK',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:17:21'),(6649,'MAIN_MODULE_ACCOUNTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6650,'MAIN_MODULE_AGENDA',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6651,'MAIN_MODULE_BARCODE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6652,'MAIN_MODULE_CRON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6653,'MAIN_MODULE_COMMANDE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6654,'MAIN_MODULE_DON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6655,'MAIN_MODULE_ECM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6656,'MAIN_MODULE_FACTURE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:23'),(6657,'MAIN_MODULE_FOURNISSEUR',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6658,'MAIN_MODULE_HOLIDAY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6659,'MAIN_MODULE_OPENSURVEY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6660,'MAIN_MODULE_PRINTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6661,'MAIN_MODULE_SALARIES',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6662,'MAIN_MODULE_SYSLOG',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6663,'MAIN_MODULE_SOCIETE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:24'),(6664,'MAIN_MODULE_SERVICE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:25'),(6665,'MAIN_MODULE_USER',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:25'),(6666,'MAIN_MODULE_VARIANTS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2019-09-26 11:33:25'),(6667,'MAIN_VERSION_LAST_UPGRADE',0,'10.0.2','chaine',0,'Dolibarr version for last upgrade','2019-09-26 11:33:26'),(6755,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6756,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6757,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6758,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2019-09-26 12:01:06'),(6762,'MAIN_INFO_ACCOUNTANT_NAME',1,'Bob Bookeeper','chaine',0,'','2019-09-26 12:01:37'),(6763,'MAIN_INFO_ACCOUNTANT_TOWN',1,'Berlin','chaine',0,'','2019-09-26 12:01:37'),(6764,'MAIN_INFO_ACCOUNTANT_STATE',1,'0','chaine',0,'','2019-09-26 12:01:37'),(6765,'MAIN_INFO_ACCOUNTANT_COUNTRY',1,'5','chaine',0,'','2019-09-26 12:01:37'),(6795,'TICKET_ADDON',1,'mod_ticket_simple','chaine',0,'','2019-09-26 12:07:59'),(6796,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_elephant','chaine',0,'','2019-09-26 12:59:00'),(6800,'CASHDESK_ID_THIRDPARTY1',1,'7','chaine',0,'','2019-09-26 15:30:09'),(6801,'CASHDESK_ID_BANKACCOUNT_CASH1',1,'3','chaine',0,'','2019-09-26 15:30:09'),(6802,'CASHDESK_ID_BANKACCOUNT_CHEQUE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6803,'CASHDESK_ID_BANKACCOUNT_CB1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6804,'CASHDESK_ID_BANKACCOUNT_PRE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6805,'CASHDESK_ID_BANKACCOUNT_VIR1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6806,'CASHDESK_NO_DECREASE_STOCK1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6807,'MAIN_MODULE_FORCEPROJECT',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-09-27 14:52:52'),(6808,'MAIN_MODULE_FORCEPROJECT_TRIGGERS',1,'1','chaine',0,NULL,'2019-09-27 14:52:52'),(6809,'MAIN_MODULE_FORCEPROJECT_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2019-09-27 14:52:52'),(6810,'MAIN_MODULE_FORCEPROJECT_MODELS',1,'1','chaine',0,NULL,'2019-09-27 14:52:52'),(6811,'FORCEPROJECT_ON_PROPOSAL',1,'1','chaine',0,'','2019-09-27 14:52:57'),(6812,'MAIN_MODULE_WEBSITE',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-09-30 15:49:22'),(6813,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2019-10-01 11:48:09'),(6814,'PACKTHEMEACTIVATEDTHEME',0,'modOwnTheme','chaine',0,'','2019-10-02 11:41:58'),(6815,'OWNTHEME_COL1',0,'#6a89cc','chaine',0,'','2019-10-02 11:41:58'),(6816,'OWNTHEME_COL2',0,'#60a3bc','chaine',0,'','2019-10-02 11:41:58'),(6817,'DOL_VERSION',0,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:41:58'),(6823,'OWNTHEME_COL_BODY_BCKGRD',0,'#E9E9E9','chaine',0,'','2019-10-02 11:41:58'),(6824,'OWNTHEME_COL_LOGO_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6825,'OWNTHEME_COL_TXT_MENU',0,'#b8c6e5','chaine',0,'','2019-10-02 11:41:58'),(6826,'OWNTHEME_COL_HEADER_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6827,'OWNTHEME_CUSTOM_CSS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6828,'OWNTHEME_CUSTOM_JS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6829,'OWNTHEME_FIXED_MENU',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6830,'OWNTHEME_D_HEADER_FONT_SIZE',0,'1.7rem','chaine',0,'','2019-10-02 11:41:58'),(6831,'OWNTHEME_S_HEADER_FONT_SIZE',0,'1.6rem','chaine',0,'','2019-10-02 11:41:58'),(6832,'OWNTHEME_D_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6833,'OWNTHEME_S_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6844,'MAIN_THEME',0,'eldy','chaine',0,'','2019-10-02 11:46:02'),(6845,'MAIN_MENU_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6846,'MAIN_MENUFRONT_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6847,'MAIN_MENU_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6848,'MAIN_MENUFRONT_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6849,'MAIN_UPLOAD_DOC',1,'20000','chaine',0,'','2019-10-02 11:46:54'),(6850,'MAIN_UMASK',1,'0664','chaine',0,'','2019-10-02 11:46:54'),(6851,'BECREATIVE_COL1',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6852,'BECREATIVE_COL2',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6853,'DOL_VERSION',1,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:47:10'),(6859,'BECREATIVE_COL_BODY_BCKGRD',1,'#e6eaef','chaine',0,'','2019-10-02 11:47:10'),(6860,'BECREATIVE_COL_LOGO_BCKGRD',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6861,'BECREATIVE_COL_TXT_MENU',1,'#b8c6e5','chaine',0,'','2019-10-02 11:47:10'),(6862,'BECREATIVE_COL_HEADER_BCKGRD',1,'#26a69a','chaine',0,'','2019-10-02 11:47:10'),(6863,'BECREATIVE_CUSTOM_CSS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6864,'BECREATIVE_CUSTOM_JS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6865,'BECREATIVE_FIXED_MENU',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6866,'BECREATIVE_D_HEADER_FONT_SIZE',1,'1.7rem','chaine',0,'','2019-10-02 11:47:10'),(6867,'BECREATIVE_S_HEADER_FONT_SIZE',1,'1.6rem','chaine',0,'','2019-10-02 11:47:10'),(6868,'BECREATIVE_D_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6869,'BECREATIVE_S_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6880,'MAIN_THEME',1,'eldy','chaine',0,'','2019-10-02 11:48:49'),(6881,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6882,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6883,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6884,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6885,'ACCOUNTING_ACCOUNT_CUSTOMER',1,'411','chaine',0,'','2019-10-04 08:15:44'),(6886,'ACCOUNTING_ACCOUNT_SUPPLIER',1,'401','chaine',0,'','2019-10-04 08:15:44'),(6887,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,'','2019-10-04 08:15:44'),(6888,'ACCOUNTING_PRODUCT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6889,'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6890,'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6891,'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6892,'ACCOUNTING_SERVICE_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6893,'ACCOUNTING_SERVICE_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6894,'ACCOUNTING_VAT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6895,'ACCOUNTING_VAT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6896,'ACCOUNTING_VAT_PAY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6897,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,'','2019-10-04 08:15:44'),(6898,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,'','2019-10-04 08:15:44'),(6899,'DONATION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6900,'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6901,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,'','2019-10-04 08:15:44'),(6902,'LOAN_ACCOUNTING_ACCOUNT_INTEREST',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6903,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6912,'TICKET_ENABLE_PUBLIC_INTERFACE',1,'1','chaine',0,'','2019-10-04 11:44:33'),(6934,'TICKET_NOTIFICATION_EMAIL_FROM',1,'fff','chaine',0,'','2019-10-04 12:03:51'),(6935,'TICKET_NOTIFICATION_EMAIL_TO',1,'ff','chaine',0,'','2019-10-04 12:03:51'),(6936,'TICKET_MESSAGE_MAIL_INTRO',1,'Hello,
\r\nA new response was sent on a ticket that you contact. Here is the message:\"\"','chaine',0,'','2019-10-04 12:03:51'),(6937,'TICKET_MESSAGE_MAIL_SIGNATURE',1,'

Sincerely,

\r\n\r\n

--\"\"

\r\n','chaine',0,'','2019-10-04 12:03:51'),(6943,'TICKET_PUBLIC_INTERFACE_TOPIC',1,'ddd','chaine',0,'','2019-10-04 14:57:20'),(6944,'TICKET_PUBLIC_TEXT_HOME',1,'You can create a support ticket or view existing from its identifier tracking ticket.','chaine',0,'','2019-10-04 14:57:20'),(6945,'TICKET_PUBLIC_TEXT_HELP_MESSAGE',1,'Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request.','chaine',0,'','2019-10-04 14:57:20'),(6946,'TICKET_MESSAGE_MAIL_NEW',1,'TicketMessageMailNewText','chaine',0,'','2019-10-04 14:57:20'),(6947,'TICKET_URL_PUBLIC_INTERFACE',1,'aa','chaine',0,'','2019-10-04 14:57:20'),(7000,'MAIN_INFO_SOCIETE_COUNTRY',1,'1:FR:France','chaine',0,'','2019-10-07 10:11:55'),(7001,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2019-10-07 10:11:55'),(7002,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street..ll..ee \"','chaine',0,'','2019-10-07 10:11:55'),(7003,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2019-10-07 10:11:55'),(7004,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2019-10-07 10:11:55'),(7005,'MAIN_INFO_SOCIETE_STATE',1,'0','chaine',0,'','2019-10-07 10:11:55'),(7006,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2019-10-07 10:11:55'),(7007,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2019-10-07 10:11:55'),(7008,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2019-10-07 10:11:55'),(7009,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2019-10-07 10:11:55'),(7010,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2019-10-07 10:11:55'),(7011,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2019-10-07 10:11:55'),(7012,'MAIN_INFO_SOCIETE_GENCOD',1,'1234567890','chaine',0,'','2019-10-07 10:11:55'),(7013,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2019-10-07 10:11:55'),(7014,'MAIN_INFO_GDPR',1,'Zack Zeceo','chaine',0,'','2019-10-07 10:11:55'),(7015,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2019-10-07 10:11:55'),(7016,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2019-10-07 10:11:55'),(7017,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2019-10-07 10:11:55'),(7018,'MAIN_INFO_SIRET',1,'ABC-DEF','chaine',0,'','2019-10-07 10:11:55'),(7019,'MAIN_INFO_APE',1,'15E-45-8D','chaine',0,'','2019-10-07 10:11:55'),(7020,'MAIN_INFO_TVAINTRA',1,'FR12345678','chaine',0,'','2019-10-07 10:11:55'),(7021,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2019-10-07 10:11:55'),(7022,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2019-10-07 10:11:55'),(7023,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2019-10-07 10:11:55'),(7027,'USER_PASSWORD_GENERATED',1,'Perso','chaine',0,'','2019-10-07 10:52:46'),(7028,'USER_PASSWORD_PATTERN',1,'8;1;0;1;0;1','chaine',0,'','2019-10-07 10:57:03'),(7030,'MAIN_FEATURES_LEVEL',0,'1','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2019-10-08 13:29:42'),(7031,'MAIN_USE_NEW_TITLE_BUTTON',1,'0','chaine',1,'','2019-10-08 18:45:05'),(7032,'MAIN_MODULE_BOM',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:49:41'),(7033,'BOM_ADDON_PDF',1,'avalue','chaine',0,'Name of PDF model of BOM','2019-10-08 18:49:41'),(7034,'BOM_ADDON',1,'mod_bom_standard','chaine',0,'Name of numbering rules of BOM','2019-10-08 18:49:41'),(7035,'BOM_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/boms','chaine',0,NULL,'2019-10-08 18:49:41'),(7036,'MAIN_MODULE_GEOIPMAXMIND',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:51:54'),(7037,'MAIN_MODULE_DAV',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:54:07'); /*!40000 ALTER TABLE `llx_const` ENABLE KEYS */; UNLOCK TABLES; @@ -4431,7 +4432,7 @@ CREATE TABLE `llx_ecm_files` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_files` (`filepath`,`filename`,`entity`), KEY `idx_ecm_files_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4440,7 +4441,7 @@ CREATE TABLE `llx_ecm_files` ( LOCK TABLES `llx_ecm_files` WRITE; /*!40000 ALTER TABLE `llx_ecm_files` DISABLE KEYS */; -INSERT INTO `llx_ecm_files` VALUES (1,NULL,'6ff09d1c53ef83fe622b02a320bcfa52',NULL,1,'FA1107-0019.pdf','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019.pdf','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,1,NULL,NULL,NULL),(2,NULL,'a6c8a0f04af73e4dfc059006d7a5f55a',NULL,1,'FA1107-0019_invoice.odt','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019_invoice.odt','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,2,NULL,NULL,NULL),(3,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1107-0019-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1107-0019','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 15:54:45','2017-08-30 11:54:45',18,NULL,NULL,3,NULL,NULL,NULL),(4,NULL,'91a42a4e2c77e826562c83fa84f6fccd',NULL,1,'CO7001-0027-acces-coopinfo.txt','commande/CO7001-0027','acces-coopinfo.txt','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:02:33','2017-08-30 12:02:33',18,NULL,NULL,1,NULL,NULL,NULL),(5,'5fe17a68b2f6a73e6326f77fa7b6586c','a60cad66c6da948eb08d5b939f3516ff',NULL,1,'FA1601-0024.pdf','facture/FA1601-0024','','',NULL,NULL,'generated',NULL,'2017-08-30 16:23:01','2018-03-16 09:59:31',12,12,NULL,1,NULL,NULL,NULL),(6,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1601-0024-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1601-0024','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:23:14','2017-08-30 12:23:14',12,NULL,NULL,2,NULL,NULL,NULL),(7,NULL,'d41d8cd98f00b204e9800998ecf8427e',NULL,1,'Exxxqqqw','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/Exxxqqqw','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,2,NULL,NULL,NULL),(8,NULL,'8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4523product.jpg','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/compxp4523product.jpg','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,1,NULL,NULL,NULL),(9,NULL,'d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:03:15',12,NULL,NULL,3,NULL,NULL,NULL),(10,'afef987559622d6334fdc4a9a134c435','ccd46bbf3ab6c78588a0ba775106258f',NULL,1,'rolluproduct.jpg','produit/ROLLUPABC','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/ROLLUPABC/rolluproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(11,'a8bbc6c6daea9a4dd58d6fb37a77a030','2f1f2ea4b1b4eb9f25ba440c7870ffcd',NULL,1,'dolicloud_logo.png','produit/DOLICLOUD','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLICLOUD/dolicloud_logo.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(12,'bd0951e23023b22ad1cd21fe33ee46bf','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/CAKECONTRIB','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/CAKECONTRIB/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(13,'e9e029e2d2bbd014162c0b385ab8739a','b7446fb7b54a3085ff7167e2c5b370fd',NULL,1,'pearpieproduct.jpg','produit/PEARPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PEARPIE/pearpieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(14,'14eea962fb99dc6dd8ca4474c519f837','973b1603b5eb01aac97eb2d911f4c341',NULL,1,'pinkdressproduct.jpg','produit/PINKDRESS','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PINKDRESS/pinkdressproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(15,'83616b4ec45e835526144ce114979f49','2adadd910fe97a07bd5be0f1f27f2d28',NULL,1,'dolidroid_114x114.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_114x114.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(16,'6b11123918f12440cac5fa3c3190d2d6','8a0bc12d0e579a5a56e299a1a128ba80',NULL,1,'dolidroid_512x512_en.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_512x512_en.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,2,NULL,NULL,NULL),(17,'5c0ceed2d113af84868710c940e1a921','246708ef260d601dcfa367a6b3258ecf',NULL,1,'dolidroid_screenshot_home_720x1280.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_screenshot_home_720x1280.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,3,NULL,NULL,NULL),(18,'1972b3da7908b3e08247e6e23bb7bdc3','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/APPLEPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/APPLEPIE/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(19,'ff9fad9b5ea886a0812953907e2b790a','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png','ticket/TS1909-0002','dolibarr_screenshot1_300x188.png','',NULL,NULL,'uploaded',NULL,'2019-09-26 14:12:04','2019-09-26 12:12:04',12,NULL,NULL,1,NULL,NULL,NULL); +INSERT INTO `llx_ecm_files` VALUES (1,NULL,'6ff09d1c53ef83fe622b02a320bcfa52',NULL,1,'FA1107-0019.pdf','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019.pdf','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,1,NULL,NULL,NULL),(2,NULL,'a6c8a0f04af73e4dfc059006d7a5f55a',NULL,1,'FA1107-0019_invoice.odt','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019_invoice.odt','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,2,NULL,NULL,NULL),(3,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1107-0019-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1107-0019','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 15:54:45','2017-08-30 11:54:45',18,NULL,NULL,3,NULL,NULL,NULL),(4,NULL,'91a42a4e2c77e826562c83fa84f6fccd',NULL,1,'CO7001-0027-acces-coopinfo.txt','commande/CO7001-0027','acces-coopinfo.txt','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:02:33','2017-08-30 12:02:33',18,NULL,NULL,1,NULL,NULL,NULL),(5,'5fe17a68b2f6a73e6326f77fa7b6586c','a60cad66c6da948eb08d5b939f3516ff',NULL,1,'FA1601-0024.pdf','facture/FA1601-0024','','',NULL,NULL,'generated',NULL,'2017-08-30 16:23:01','2018-03-16 09:59:31',12,12,NULL,1,NULL,NULL,NULL),(6,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1601-0024-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1601-0024','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:23:14','2017-08-30 12:23:14',12,NULL,NULL,2,NULL,NULL,NULL),(7,NULL,'d41d8cd98f00b204e9800998ecf8427e',NULL,1,'Exxxqqqw','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/Exxxqqqw','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,2,NULL,NULL,NULL),(8,NULL,'8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4523product.jpg','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/compxp4523product.jpg','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,1,NULL,NULL,NULL),(9,NULL,'d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:03:15',12,NULL,NULL,3,NULL,NULL,NULL),(10,'afef987559622d6334fdc4a9a134c435','ccd46bbf3ab6c78588a0ba775106258f',NULL,1,'rolluproduct.jpg','produit/ROLLUPABC','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/ROLLUPABC/rolluproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(11,'a8bbc6c6daea9a4dd58d6fb37a77a030','2f1f2ea4b1b4eb9f25ba440c7870ffcd',NULL,1,'dolicloud_logo.png','produit/DOLICLOUD','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLICLOUD/dolicloud_logo.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(12,'bd0951e23023b22ad1cd21fe33ee46bf','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/CAKECONTRIB','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/CAKECONTRIB/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(13,'e9e029e2d2bbd014162c0b385ab8739a','b7446fb7b54a3085ff7167e2c5b370fd',NULL,1,'pearpieproduct.jpg','produit/PEARPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PEARPIE/pearpieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(14,'14eea962fb99dc6dd8ca4474c519f837','973b1603b5eb01aac97eb2d911f4c341',NULL,1,'pinkdressproduct.jpg','produit/PINKDRESS','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PINKDRESS/pinkdressproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(15,'83616b4ec45e835526144ce114979f49','2adadd910fe97a07bd5be0f1f27f2d28',NULL,1,'dolidroid_114x114.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_114x114.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(16,'6b11123918f12440cac5fa3c3190d2d6','8a0bc12d0e579a5a56e299a1a128ba80',NULL,1,'dolidroid_512x512_en.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_512x512_en.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,2,NULL,NULL,NULL),(17,'5c0ceed2d113af84868710c940e1a921','246708ef260d601dcfa367a6b3258ecf',NULL,1,'dolidroid_screenshot_home_720x1280.png','produit/DOLIDROID','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLIDROID/dolidroid_screenshot_home_720x1280.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,3,NULL,NULL,NULL),(18,'1972b3da7908b3e08247e6e23bb7bdc3','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/APPLEPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/APPLEPIE/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(19,'ff9fad9b5ea886a0812953907e2b790a','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png','ticket/TS1909-0002','dolibarr_screenshot1_300x188.png','',NULL,NULL,'uploaded',NULL,'2019-09-26 14:12:04','2019-09-26 12:12:04',12,NULL,NULL,1,NULL,NULL,NULL),(20,'b6a2578c5483bffbead5b290f6ef5286','83c8e9b3b692ebae2f6f3e298dd9f5a2',NULL,1,'(PROV10)-dolibarr_120x90.png','propale/(PROV10)','dolibarr_120x90.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 16:53:51','2019-09-27 14:53:51',12,NULL,NULL,1,NULL,NULL,NULL),(21,'89809c5b1213137736ded43bdd982f71','5f1af043d9fc7a90e8500a6dc5c4f5ae',NULL,1,'(PROV10).pdf','propale/(PROV10)','','',NULL,NULL,'generated',NULL,'2019-09-27 16:54:09','2019-09-27 14:54:09',12,NULL,NULL,2,NULL,'propal',10),(22,'8eb026e33ae1c7892c59a2ac6dda31f4','8827be83628b2f5beb67cf95b4c4cff6',NULL,1,'PR1909-0031.pdf','propale/PR1909-0031','','',NULL,NULL,'generated',NULL,'2019-09-27 16:54:30','2019-09-27 14:54:30',12,NULL,NULL,1,NULL,'propal',10),(24,'0d4e663b5c128d288a39231433da966e','3d2bd3daecd0de5078774ad58546d1f4',NULL,1,'PR1909-0032-dolibarr_192x192.png','propale/PR1909-0032','dolibarr_192x192.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 17:08:42','2019-09-27 15:08:59',12,NULL,NULL,1,NULL,NULL,NULL),(25,'44867f8c62f8538da7724c148af2c227','5571096c364f33a599827ccd0910531f',NULL,1,'PR1909-0032.pdf','propale/PR1909-0032','','',NULL,NULL,'generated',NULL,'2019-09-27 17:08:59','2019-09-27 15:08:59',12,NULL,NULL,2,NULL,'propal',33),(26,'3983de91943fb14f8b137d1929bea5a9','fe67af649cafd23dfbdd10349f17c5bd',NULL,1,'PR1909-0033.pdf','propale/PR1909-0033','','',NULL,NULL,'generated',NULL,'2019-09-27 17:11:21','2019-09-27 15:13:13',12,12,NULL,1,NULL,'propal',34),(27,'399734120da8f3027508e0772c25e291','83c8e9b3b692ebae2f6f3e298dd9f5a2',NULL,1,'PR1909-0033-dolibarr_120x90.png','propale/PR1909-0033','dolibarr_120x90.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 17:13:07','2019-09-27 15:13:13',12,NULL,NULL,2,NULL,NULL,NULL),(28,'c81de886c76ccd2d46fbc5f816047a71','84cb09bae0ec080678df884d89079988','kr8LmXlZVAW9Sl0iZ0w8re6Jd23S3X1k',1,'(PROV35).pdf','propale/(PROV35)','','',NULL,NULL,'generated',NULL,'2019-09-27 17:53:44','2019-10-08 17:22:08',12,12,NULL,1,NULL,'propal',35),(29,'34fe1f2546e8d1562b904b7bbe79e01a','6e1acd02fdd344b18e38c0cba729f552',NULL,1,'(PROV6).pdf','commande/(PROV6)','','',NULL,NULL,'generated',NULL,'2019-09-27 18:04:35','2019-09-27 16:04:52',12,12,NULL,1,NULL,'commande',6),(30,'fd2ad5abe709d7870bcd57743d9a1176','b0ae7dd69244e0c0a9d4c5e6d08bffcb',NULL,1,'(PROV93).pdf','commande/(PROV93)','','',NULL,NULL,'generated',NULL,'2019-09-27 19:33:29','2019-09-27 17:40:49',12,12,NULL,1,NULL,'commande',93),(31,'988caa795b4080019180253aac14d729','a86ebe831e220a56a82228de0c9193a2',NULL,1,'(PROV4).pdf','fournisseur/commande/(PROV4)','','',NULL,NULL,'generated',NULL,'2019-09-27 19:46:07','2019-09-27 17:46:07',12,NULL,NULL,1,NULL,'commande_fournisseur',4),(32,'a046e42fcd8d114312eede243fd1850c','467e542bb565cb9379722c6fdcecc3aa',NULL,1,'PR1702-0020.pdf','propale/PR1702-0020','','',NULL,NULL,'generated',NULL,'2019-09-27 19:47:00','2019-09-27 17:47:00',12,NULL,NULL,1,NULL,'propal',22),(33,'dc99eacf03a78050da53a2601d0f4b49','88c047d94ab183b015526f936a5c8923',NULL,1,'SI1601-0002.pdf','fournisseur/facture/7/1/SI1601-0002','','',NULL,NULL,'generated',NULL,'2019-10-04 10:10:25','2019-10-04 08:31:30',12,12,NULL,1,NULL,'facture_fourn',17),(34,'4ab84fd3e4079aeea831d65dfc2f6891','681578085f18bacd6d40341ef236c0d6',NULL,1,'FA6801-0010.pdf','facture/FA6801-0010','','',NULL,NULL,'generated',NULL,'2019-10-04 10:26:49','2019-10-04 08:28:14',12,12,NULL,1,NULL,'facture',150),(38,'b18da4bbfaf907c1f6706b46ae3add3c','0792f280fd9a114fbd432d5442f7445b',NULL,1,'dolibarr_256x256.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_256x256.png','',NULL,NULL,'unknown',NULL,'2019-10-04 17:25:05','2019-10-04 15:25:05',12,NULL,NULL,1,NULL,NULL,NULL),(40,'7205fe0a03a5bd79c7d60a0d05f06e25','df4db8f9cc75b79765e7ca11013fa0bc',NULL,1,'dolibarr_512x512.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_512x512.png','',NULL,NULL,'unknown',NULL,'2019-10-04 17:53:13','2019-10-04 16:47:55',12,12,NULL,3,NULL,NULL,NULL),(44,'53f92236476224c177f23ab30e6553aa','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot1_300x188.png','',NULL,NULL,'unknown',NULL,'2019-10-04 18:49:30','2019-10-04 16:49:30',12,NULL,NULL,4,NULL,NULL,NULL),(45,'b33ed6e73b386cac4aab51eb62f3af50','1e71c3a5d4c8247935f89971dab4d9cd',NULL,1,'dolibarr_logo.jpg','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_logo.jpg','',NULL,NULL,'unknown',NULL,'2019-10-04 19:00:22','2019-10-04 17:00:22',12,NULL,NULL,5,NULL,NULL,NULL),(46,'4573b5a5d66e4598bc98075b33d2470f','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png.20191004190108','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot1_300x188.png','',NULL,NULL,'unknown',NULL,'2019-10-04 19:01:08','2019-10-04 17:01:08',12,NULL,NULL,6,NULL,NULL,NULL),(47,'a9be21b2a984fd57d2ff450bcfb59ef5','1e71c3a5d4c8247935f89971dab4d9cd',NULL,1,'dolibarr_logo.jpg.20191004193013','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_logo.jpg','',NULL,NULL,'unknown',NULL,'2019-10-04 19:30:13','2019-10-04 17:30:13',12,NULL,NULL,7,NULL,NULL,NULL),(48,'f598ad9040ed50087ae163d9bef3eb7c','fe0b95bda4dc7823739eadedfab7e823',NULL,1,'dolibarr_screenshot9_1680x1050.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot9_1680x1050.png','',NULL,NULL,'unknown',NULL,'2019-10-04 19:32:55','2019-10-04 17:32:55',12,NULL,NULL,8,NULL,NULL,NULL),(49,'95d0d57347686999f3609897cae8ec22','d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/0/temp/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2019-10-04 19:37:16','2019-10-04 17:37:16',0,NULL,NULL,9,NULL,NULL,NULL),(50,'1a30c5a296fa61f1d76b4f3c27a15701','8ea43be5bd1fb83a287a95cea7688cc4',NULL,1,'dolibarr.gif','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr.gif','',NULL,NULL,'unknown',NULL,'2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,10,NULL,NULL,NULL),(51,'3ad99f8446832892a610dbadcbd255f0','3dea7d1b511d19f8bd3252683423958a',NULL,1,'doliadmin.ico','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/doliadmin.ico','',NULL,NULL,'unknown',NULL,'2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,11,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_ecm_files` ENABLE KEYS */; UNLOCK TABLES; @@ -4910,7 +4911,7 @@ CREATE TABLE `llx_events` ( `fk_object` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_events_dateevent` (`dateevent`) -) ENGINE=InnoDB AUTO_INCREMENT=918 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=968 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4919,7 +4920,7 @@ CREATE TABLE `llx_events` ( LOCK TABLES `llx_events` WRITE; /*!40000 ALTER TABLE `llx_events` DISABLE KEYS */; -INSERT INTO `llx_events` VALUES (30,'2013-07-18 18:23:06','USER_LOGOUT',1,'2013-07-18 20:23:06',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(31,'2013-07-18 18:23:12','USER_LOGIN_FAILED',1,'2013-07-18 20:23:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(32,'2013-07-18 18:23:17','USER_LOGIN',1,'2013-07-18 20:23:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(33,'2013-07-18 20:10:51','USER_LOGIN_FAILED',1,'2013-07-18 22:10:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(34,'2013-07-18 20:10:55','USER_LOGIN',1,'2013-07-18 22:10:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(35,'2013-07-18 21:18:57','USER_LOGIN',1,'2013-07-18 23:18:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(36,'2013-07-20 10:34:10','USER_LOGIN',1,'2013-07-20 12:34:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(37,'2013-07-20 12:36:44','USER_LOGIN',1,'2013-07-20 14:36:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(38,'2013-07-20 13:20:51','USER_LOGIN_FAILED',1,'2013-07-20 15:20:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(39,'2013-07-20 13:20:54','USER_LOGIN',1,'2013-07-20 15:20:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(40,'2013-07-20 15:03:46','USER_LOGIN_FAILED',1,'2013-07-20 17:03:46',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(41,'2013-07-20 15:03:55','USER_LOGIN',1,'2013-07-20 17:03:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(42,'2013-07-20 18:05:05','USER_LOGIN_FAILED',1,'2013-07-20 20:05:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(43,'2013-07-20 18:05:08','USER_LOGIN',1,'2013-07-20 20:05:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(44,'2013-07-20 21:08:53','USER_LOGIN_FAILED',1,'2013-07-20 23:08:53',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(45,'2013-07-20 21:08:56','USER_LOGIN',1,'2013-07-20 23:08:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(46,'2013-07-21 01:26:12','USER_LOGIN',1,'2013-07-21 03:26:12',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(47,'2013-07-21 22:35:45','USER_LOGIN_FAILED',1,'2013-07-22 00:35:45',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(48,'2013-07-21 22:35:49','USER_LOGIN',1,'2013-07-22 00:35:49',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(49,'2013-07-26 23:09:47','USER_LOGIN_FAILED',1,'2013-07-27 01:09:47',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(50,'2013-07-26 23:09:50','USER_LOGIN',1,'2013-07-27 01:09:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(51,'2013-07-27 17:02:27','USER_LOGIN_FAILED',1,'2013-07-27 19:02:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(52,'2013-07-27 17:02:32','USER_LOGIN',1,'2013-07-27 19:02:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(53,'2013-07-27 23:33:37','USER_LOGIN_FAILED',1,'2013-07-28 01:33:37',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(54,'2013-07-27 23:33:41','USER_LOGIN',1,'2013-07-28 01:33:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(55,'2013-07-28 18:20:36','USER_LOGIN_FAILED',1,'2013-07-28 20:20:36',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(56,'2013-07-28 18:20:38','USER_LOGIN',1,'2013-07-28 20:20:38',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(57,'2013-07-28 20:13:30','USER_LOGIN_FAILED',1,'2013-07-28 22:13:30',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(58,'2013-07-28 20:13:34','USER_LOGIN',1,'2013-07-28 22:13:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(59,'2013-07-28 20:22:51','USER_LOGIN',1,'2013-07-28 22:22:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(60,'2013-07-28 23:05:06','USER_LOGIN',1,'2013-07-29 01:05:06',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(61,'2013-07-29 20:15:50','USER_LOGIN_FAILED',1,'2013-07-29 22:15:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(62,'2013-07-29 20:15:53','USER_LOGIN',1,'2013-07-29 22:15:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(68,'2013-07-29 20:51:01','USER_LOGOUT',1,'2013-07-29 22:51:01',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(69,'2013-07-29 20:51:05','USER_LOGIN',1,'2013-07-29 22:51:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(70,'2013-07-30 08:46:20','USER_LOGIN_FAILED',1,'2013-07-30 10:46:20',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(71,'2013-07-30 08:46:38','USER_LOGIN_FAILED',1,'2013-07-30 10:46:38',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(72,'2013-07-30 08:46:42','USER_LOGIN',1,'2013-07-30 10:46:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(73,'2013-07-30 10:05:12','USER_LOGIN_FAILED',1,'2013-07-30 12:05:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(74,'2013-07-30 10:05:15','USER_LOGIN',1,'2013-07-30 12:05:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(75,'2013-07-30 12:15:46','USER_LOGIN',1,'2013-07-30 14:15:46',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(76,'2013-07-31 22:19:30','USER_LOGIN',1,'2013-08-01 00:19:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(77,'2013-07-31 23:32:52','USER_LOGIN',1,'2013-08-01 01:32:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(78,'2013-08-01 01:24:50','USER_LOGIN_FAILED',1,'2013-08-01 03:24:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(79,'2013-08-01 01:24:54','USER_LOGIN',1,'2013-08-01 03:24:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(80,'2013-08-01 19:31:36','USER_LOGIN_FAILED',1,'2013-08-01 21:31:35',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(81,'2013-08-01 19:31:39','USER_LOGIN',1,'2013-08-01 21:31:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(82,'2013-08-01 20:01:36','USER_LOGIN',1,'2013-08-01 22:01:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(83,'2013-08-01 20:52:54','USER_LOGIN_FAILED',1,'2013-08-01 22:52:54',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(84,'2013-08-01 20:52:58','USER_LOGIN',1,'2013-08-01 22:52:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(85,'2013-08-01 21:17:28','USER_LOGIN_FAILED',1,'2013-08-01 23:17:28',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(86,'2013-08-01 21:17:31','USER_LOGIN',1,'2013-08-01 23:17:31',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(87,'2013-08-04 11:55:17','USER_LOGIN',1,'2013-08-04 13:55:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(88,'2013-08-04 20:19:03','USER_LOGIN_FAILED',1,'2013-08-04 22:19:03',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(89,'2013-08-04 20:19:07','USER_LOGIN',1,'2013-08-04 22:19:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(90,'2013-08-05 17:51:42','USER_LOGIN_FAILED',1,'2013-08-05 19:51:42',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(91,'2013-08-05 17:51:47','USER_LOGIN',1,'2013-08-05 19:51:47',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(92,'2013-08-05 17:56:03','USER_LOGIN',1,'2013-08-05 19:56:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(93,'2013-08-05 17:59:10','USER_LOGIN',1,'2013-08-05 19:59:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(94,'2013-08-05 18:01:58','USER_LOGIN',1,'2013-08-05 20:01:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(95,'2013-08-05 19:59:56','USER_LOGIN',1,'2013-08-05 21:59:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(96,'2013-08-06 18:33:22','USER_LOGIN',1,'2013-08-06 20:33:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(97,'2013-08-07 00:56:59','USER_LOGIN',1,'2013-08-07 02:56:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(98,'2013-08-07 22:49:14','USER_LOGIN',1,'2013-08-08 00:49:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(99,'2013-08-07 23:05:18','USER_LOGOUT',1,'2013-08-08 01:05:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(105,'2013-08-08 00:41:09','USER_LOGIN',1,'2013-08-08 02:41:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(106,'2013-08-08 11:58:55','USER_LOGIN',1,'2013-08-08 13:58:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(107,'2013-08-08 14:35:48','USER_LOGIN',1,'2013-08-08 16:35:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(108,'2013-08-08 14:36:31','USER_LOGOUT',1,'2013-08-08 16:36:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(109,'2013-08-08 14:38:28','USER_LOGIN',1,'2013-08-08 16:38:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(110,'2013-08-08 14:39:02','USER_LOGOUT',1,'2013-08-08 16:39:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(111,'2013-08-08 14:39:10','USER_LOGIN',1,'2013-08-08 16:39:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(112,'2013-08-08 14:39:28','USER_LOGOUT',1,'2013-08-08 16:39:28',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(113,'2013-08-08 14:39:37','USER_LOGIN',1,'2013-08-08 16:39:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(114,'2013-08-08 14:50:02','USER_LOGOUT',1,'2013-08-08 16:50:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(115,'2013-08-08 14:51:45','USER_LOGIN_FAILED',1,'2013-08-08 16:51:45',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(116,'2013-08-08 14:51:52','USER_LOGIN',1,'2013-08-08 16:51:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(117,'2013-08-08 15:09:54','USER_LOGOUT',1,'2013-08-08 17:09:54',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(118,'2013-08-08 15:10:19','USER_LOGIN_FAILED',1,'2013-08-08 17:10:19',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(119,'2013-08-08 15:10:28','USER_LOGIN',1,'2013-08-08 17:10:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(121,'2013-08-08 15:14:58','USER_LOGOUT',1,'2013-08-08 17:14:58',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(122,'2013-08-08 15:15:00','USER_LOGIN_FAILED',1,'2013-08-08 17:15:00',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(123,'2013-08-08 15:17:57','USER_LOGIN',1,'2013-08-08 17:17:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(124,'2013-08-08 15:35:56','USER_LOGOUT',1,'2013-08-08 17:35:56',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(125,'2013-08-08 15:36:05','USER_LOGIN',1,'2013-08-08 17:36:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(126,'2013-08-08 17:32:42','USER_LOGIN',1,'2013-08-08 19:32:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(127,'2014-12-08 13:49:37','USER_LOGOUT',1,'2014-12-08 14:49:37',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(128,'2014-12-08 13:49:42','USER_LOGIN',1,'2014-12-08 14:49:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(129,'2014-12-08 13:50:12','USER_LOGOUT',1,'2014-12-08 14:50:12',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(130,'2014-12-08 13:50:14','USER_LOGIN',1,'2014-12-08 14:50:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(131,'2014-12-08 13:50:17','USER_LOGOUT',1,'2014-12-08 14:50:17',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(132,'2014-12-08 13:52:47','USER_LOGIN',1,'2014-12-08 14:52:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(133,'2014-12-08 13:53:08','USER_MODIFY',1,'2014-12-08 14:53:08',1,'User admin modified','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(134,'2014-12-08 14:08:45','USER_LOGOUT',1,'2014-12-08 15:08:45',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(135,'2014-12-08 14:09:09','USER_LOGIN',1,'2014-12-08 15:09:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(136,'2014-12-08 14:11:43','USER_LOGOUT',1,'2014-12-08 15:11:43',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(137,'2014-12-08 14:11:45','USER_LOGIN',1,'2014-12-08 15:11:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(138,'2014-12-08 14:22:53','USER_LOGOUT',1,'2014-12-08 15:22:53',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(139,'2014-12-08 14:22:54','USER_LOGIN',1,'2014-12-08 15:22:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(140,'2014-12-08 14:23:10','USER_LOGOUT',1,'2014-12-08 15:23:10',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(141,'2014-12-08 14:23:11','USER_LOGIN',1,'2014-12-08 15:23:11',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(142,'2014-12-08 14:23:49','USER_LOGOUT',1,'2014-12-08 15:23:49',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(143,'2014-12-08 14:23:50','USER_LOGIN',1,'2014-12-08 15:23:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(144,'2014-12-08 14:28:08','USER_LOGOUT',1,'2014-12-08 15:28:08',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(145,'2014-12-08 14:35:15','USER_LOGIN',1,'2014-12-08 15:35:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(146,'2014-12-08 14:35:18','USER_LOGOUT',1,'2014-12-08 15:35:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(147,'2014-12-08 14:36:07','USER_LOGIN',1,'2014-12-08 15:36:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(148,'2014-12-08 14:36:09','USER_LOGOUT',1,'2014-12-08 15:36:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(149,'2014-12-08 14:36:41','USER_LOGIN',1,'2014-12-08 15:36:41',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(150,'2014-12-08 15:59:13','USER_LOGIN',1,'2014-12-08 16:59:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(151,'2014-12-09 11:49:52','USER_LOGIN',1,'2014-12-09 12:49:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(152,'2014-12-09 13:46:31','USER_LOGIN',1,'2014-12-09 14:46:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(153,'2014-12-09 19:03:14','USER_LOGIN',1,'2014-12-09 20:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(154,'2014-12-10 00:16:31','USER_LOGIN',1,'2014-12-10 01:16:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(170,'2014-12-11 22:03:31','USER_LOGIN',1,'2014-12-11 23:03:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(171,'2014-12-12 00:32:39','USER_LOGIN',1,'2014-12-12 01:32:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(172,'2014-12-12 10:49:59','USER_LOGIN',1,'2014-12-12 11:49:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(175,'2014-12-12 10:57:40','USER_MODIFY',1,'2014-12-12 11:57:40',1,'Modification utilisateur admin','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(176,'2014-12-12 13:29:15','USER_LOGIN',1,'2014-12-12 14:29:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(177,'2014-12-12 13:30:15','USER_LOGIN',1,'2014-12-12 14:30:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(178,'2014-12-12 13:40:08','USER_LOGOUT',1,'2014-12-12 14:40:08',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(179,'2014-12-12 13:40:10','USER_LOGIN',1,'2014-12-12 14:40:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(180,'2014-12-12 13:40:26','USER_MODIFY',1,'2014-12-12 14:40:26',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(181,'2014-12-12 13:40:34','USER_LOGOUT',1,'2014-12-12 14:40:34',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(182,'2014-12-12 13:42:23','USER_LOGIN',1,'2014-12-12 14:42:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(183,'2014-12-12 13:43:02','USER_NEW_PASSWORD',1,'2014-12-12 14:43:02',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(184,'2014-12-12 13:43:25','USER_LOGOUT',1,'2014-12-12 14:43:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(185,'2014-12-12 13:43:27','USER_LOGIN_FAILED',1,'2014-12-12 14:43:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(186,'2014-12-12 13:43:30','USER_LOGIN',1,'2014-12-12 14:43:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(187,'2014-12-12 14:52:11','USER_LOGIN',1,'2014-12-12 15:52:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(188,'2014-12-12 17:53:00','USER_LOGIN_FAILED',1,'2014-12-12 18:53:00',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(189,'2014-12-12 17:53:07','USER_LOGIN_FAILED',1,'2014-12-12 18:53:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(190,'2014-12-12 17:53:51','USER_NEW_PASSWORD',1,'2014-12-12 18:53:51',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(191,'2014-12-12 17:54:00','USER_LOGIN',1,'2014-12-12 18:54:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(192,'2014-12-12 17:54:10','USER_NEW_PASSWORD',1,'2014-12-12 18:54:10',1,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(193,'2014-12-12 17:54:10','USER_MODIFY',1,'2014-12-12 18:54:10',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(194,'2014-12-12 18:57:09','USER_LOGIN',1,'2014-12-12 19:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(195,'2014-12-12 23:04:08','USER_LOGIN',1,'2014-12-13 00:04:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(196,'2014-12-17 20:03:14','USER_LOGIN',1,'2014-12-17 21:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(197,'2014-12-17 21:18:45','USER_LOGIN',1,'2014-12-17 22:18:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(198,'2014-12-17 22:30:08','USER_LOGIN',1,'2014-12-17 23:30:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(199,'2014-12-18 23:32:03','USER_LOGIN',1,'2014-12-19 00:32:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(200,'2014-12-19 09:38:03','USER_LOGIN',1,'2014-12-19 10:38:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(201,'2014-12-19 11:23:35','USER_LOGIN',1,'2014-12-19 12:23:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(202,'2014-12-19 12:46:22','USER_LOGIN',1,'2014-12-19 13:46:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(214,'2014-12-19 19:11:31','USER_LOGIN',1,'2014-12-19 20:11:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(215,'2014-12-21 16:36:57','USER_LOGIN',1,'2014-12-21 17:36:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(216,'2014-12-21 16:38:43','USER_NEW_PASSWORD',1,'2014-12-21 17:38:43',1,'Changement mot de passe de adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(217,'2014-12-21 16:38:43','USER_MODIFY',1,'2014-12-21 17:38:43',1,'Modification utilisateur adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(218,'2014-12-21 16:38:51','USER_LOGOUT',1,'2014-12-21 17:38:51',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(219,'2014-12-21 16:38:55','USER_LOGIN',1,'2014-12-21 17:38:55',3,'(UserLogged,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(220,'2014-12-21 16:48:18','USER_LOGOUT',1,'2014-12-21 17:48:18',3,'(UserLogoff,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(221,'2014-12-21 16:48:20','USER_LOGIN',1,'2014-12-21 17:48:20',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(222,'2014-12-26 18:28:18','USER_LOGIN',1,'2014-12-26 19:28:18',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(223,'2014-12-26 20:00:24','USER_LOGIN',1,'2014-12-26 21:00:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(224,'2014-12-27 01:10:27','USER_LOGIN',1,'2014-12-27 02:10:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(225,'2014-12-28 19:12:08','USER_LOGIN',1,'2014-12-28 20:12:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(226,'2014-12-28 20:16:58','USER_LOGIN',1,'2014-12-28 21:16:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(227,'2014-12-29 14:35:46','USER_LOGIN',1,'2014-12-29 15:35:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(228,'2014-12-29 14:37:59','USER_LOGOUT',1,'2014-12-29 15:37:59',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(229,'2014-12-29 14:38:00','USER_LOGIN',1,'2014-12-29 15:38:00',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(230,'2014-12-29 17:16:48','USER_LOGIN',1,'2014-12-29 18:16:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(231,'2014-12-31 12:02:59','USER_LOGIN',1,'2014-12-31 13:02:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(232,'2015-01-02 20:32:51','USER_LOGIN',1,'2015-01-02 21:32:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0',NULL),(233,'2015-01-02 20:58:59','USER_LOGIN',1,'2015-01-02 21:58:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(234,'2015-01-03 09:25:07','USER_LOGIN',1,'2015-01-03 10:25:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(235,'2015-01-03 19:39:31','USER_LOGIN',1,'2015-01-03 20:39:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(236,'2015-01-04 22:40:19','USER_LOGIN',1,'2015-01-04 23:40:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(237,'2015-01-05 12:59:59','USER_LOGIN',1,'2015-01-05 13:59:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(238,'2015-01-05 15:28:52','USER_LOGIN',1,'2015-01-05 16:28:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(239,'2015-01-05 17:02:08','USER_LOGIN',1,'2015-01-05 18:02:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(240,'2015-01-06 12:13:33','USER_LOGIN',1,'2015-01-06 13:13:33',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(241,'2015-01-07 01:21:15','USER_LOGIN',1,'2015-01-07 02:21:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(242,'2015-01-07 01:46:31','USER_LOGOUT',1,'2015-01-07 02:46:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(243,'2015-01-07 19:54:50','USER_LOGIN',1,'2015-01-07 20:54:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(244,'2015-01-08 21:55:01','USER_LOGIN',1,'2015-01-08 22:55:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(245,'2015-01-09 11:13:28','USER_LOGIN',1,'2015-01-09 12:13:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(246,'2015-01-10 18:30:46','USER_LOGIN',1,'2015-01-10 19:30:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(247,'2015-01-11 18:03:26','USER_LOGIN',1,'2015-01-11 19:03:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(248,'2015-01-12 11:15:04','USER_LOGIN',1,'2015-01-12 12:15:04',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(249,'2015-01-12 14:42:44','USER_LOGIN',1,'2015-01-12 15:42:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(250,'2015-01-13 12:07:17','USER_LOGIN',1,'2015-01-13 13:07:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(251,'2015-01-13 17:37:58','USER_LOGIN',1,'2015-01-13 18:37:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(252,'2015-01-13 19:24:21','USER_LOGIN',1,'2015-01-13 20:24:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(253,'2015-01-13 19:29:19','USER_LOGOUT',1,'2015-01-13 20:29:19',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(254,'2015-01-13 21:39:39','USER_LOGIN',1,'2015-01-13 22:39:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(255,'2015-01-14 00:52:21','USER_LOGIN',1,'2015-01-14 01:52:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(256,'2015-01-16 11:34:31','USER_LOGIN',1,'2015-01-16 12:34:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(257,'2015-01-16 15:36:21','USER_LOGIN',1,'2015-01-16 16:36:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(258,'2015-01-16 19:17:36','USER_LOGIN',1,'2015-01-16 20:17:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(259,'2015-01-16 19:48:08','GROUP_CREATE',1,'2015-01-16 20:48:08',1,'Création groupe ggg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(260,'2015-01-16 21:48:53','USER_LOGIN',1,'2015-01-16 22:48:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(261,'2015-01-17 19:55:53','USER_LOGIN',1,'2015-01-17 20:55:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(262,'2015-01-18 09:48:01','USER_LOGIN',1,'2015-01-18 10:48:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(263,'2015-01-18 13:22:36','USER_LOGIN',1,'2015-01-18 14:22:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(264,'2015-01-18 16:10:23','USER_LOGIN',1,'2015-01-18 17:10:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(265,'2015-01-18 17:41:40','USER_LOGIN',1,'2015-01-18 18:41:40',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(266,'2015-01-19 14:33:48','USER_LOGIN',1,'2015-01-19 15:33:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(267,'2015-01-19 16:47:43','USER_LOGIN',1,'2015-01-19 17:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(268,'2015-01-19 16:59:43','USER_LOGIN',1,'2015-01-19 17:59:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(269,'2015-01-19 17:00:22','USER_LOGIN',1,'2015-01-19 18:00:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(270,'2015-01-19 17:04:16','USER_LOGOUT',1,'2015-01-19 18:04:16',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(271,'2015-01-19 17:04:18','USER_LOGIN',1,'2015-01-19 18:04:18',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(272,'2015-01-20 00:34:19','USER_LOGIN',1,'2015-01-20 01:34:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(273,'2015-01-21 11:54:17','USER_LOGIN',1,'2015-01-21 12:54:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(274,'2015-01-21 13:48:15','USER_LOGIN',1,'2015-01-21 14:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(275,'2015-01-21 14:30:22','USER_LOGIN',1,'2015-01-21 15:30:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(276,'2015-01-21 15:10:46','USER_LOGIN',1,'2015-01-21 16:10:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(277,'2015-01-21 17:27:43','USER_LOGIN',1,'2015-01-21 18:27:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(278,'2015-01-21 21:48:15','USER_LOGIN',1,'2015-01-21 22:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(279,'2015-01-21 21:50:42','USER_LOGIN',1,'2015-01-21 22:50:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(280,'2015-01-23 09:28:26','USER_LOGIN',1,'2015-01-23 10:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(281,'2015-01-23 13:21:57','USER_LOGIN',1,'2015-01-23 14:21:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(282,'2015-01-23 16:52:00','USER_LOGOUT',1,'2015-01-23 17:52:00',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(283,'2015-01-23 16:52:05','USER_LOGIN_FAILED',1,'2015-01-23 17:52:05',NULL,'Bad value for login or password - login=bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(284,'2015-01-23 16:52:09','USER_LOGIN',1,'2015-01-23 17:52:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(285,'2015-01-23 16:52:27','USER_CREATE',1,'2015-01-23 17:52:27',1,'Création utilisateur aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(286,'2015-01-23 16:52:27','USER_NEW_PASSWORD',1,'2015-01-23 17:52:27',1,'Changement mot de passe de aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(287,'2015-01-23 16:52:37','USER_CREATE',1,'2015-01-23 17:52:37',1,'Création utilisateur bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(288,'2015-01-23 16:52:37','USER_NEW_PASSWORD',1,'2015-01-23 17:52:37',1,'Changement mot de passe de bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(289,'2015-01-23 16:53:15','USER_LOGOUT',1,'2015-01-23 17:53:15',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(290,'2015-01-23 16:53:20','USER_LOGIN',1,'2015-01-23 17:53:20',4,'(UserLogged,aaa)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(291,'2015-01-23 19:16:58','USER_LOGIN',1,'2015-01-23 20:16:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(292,'2015-01-26 10:54:07','USER_LOGIN',1,'2015-01-26 11:54:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(293,'2015-01-29 10:15:36','USER_LOGIN',1,'2015-01-29 11:15:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(294,'2015-01-30 17:42:50','USER_LOGIN',1,'2015-01-30 18:42:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(295,'2015-02-01 08:49:55','USER_LOGIN',1,'2015-02-01 09:49:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(296,'2015-02-01 08:51:57','USER_LOGOUT',1,'2015-02-01 09:51:57',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(297,'2015-02-01 08:52:39','USER_LOGIN',1,'2015-02-01 09:52:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(298,'2015-02-01 21:03:01','USER_LOGIN',1,'2015-02-01 22:03:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(299,'2015-02-10 19:48:39','USER_LOGIN',1,'2015-02-10 20:48:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(300,'2015-02-10 20:46:48','USER_LOGIN',1,'2015-02-10 21:46:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(301,'2015-02-10 21:39:23','USER_LOGIN',1,'2015-02-10 22:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(302,'2015-02-11 19:00:13','USER_LOGIN',1,'2015-02-11 20:00:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(303,'2015-02-11 19:43:44','USER_LOGIN_FAILED',1,'2015-02-11 20:43:44',NULL,'Unknown column \'u.fk_user\' in \'field list\'','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(304,'2015-02-11 19:44:01','USER_LOGIN',1,'2015-02-11 20:44:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(305,'2015-02-12 00:27:35','USER_LOGIN',1,'2015-02-12 01:27:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(306,'2015-02-12 00:27:38','USER_LOGOUT',1,'2015-02-12 01:27:38',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(307,'2015-02-12 00:28:07','USER_LOGIN',1,'2015-02-12 01:28:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(308,'2015-02-12 00:28:09','USER_LOGOUT',1,'2015-02-12 01:28:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(309,'2015-02-12 00:28:26','USER_LOGIN',1,'2015-02-12 01:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(310,'2015-02-12 00:28:30','USER_LOGOUT',1,'2015-02-12 01:28:30',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(311,'2015-02-12 12:42:15','USER_LOGIN',1,'2015-02-12 13:42:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(312,'2015-02-12 13:46:16','USER_LOGIN',1,'2015-02-12 14:46:16',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(313,'2015-02-12 14:54:28','USER_LOGIN',1,'2015-02-12 15:54:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(314,'2015-02-12 16:04:46','USER_LOGIN',1,'2015-02-12 17:04:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(315,'2015-02-13 14:02:43','USER_LOGIN',1,'2015-02-13 15:02:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(316,'2015-02-13 14:48:30','USER_LOGIN',1,'2015-02-13 15:48:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(317,'2015-02-13 17:44:53','USER_LOGIN',1,'2015-02-13 18:44:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(318,'2015-02-15 08:44:36','USER_LOGIN',1,'2015-02-15 09:44:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(319,'2015-02-15 08:53:20','USER_LOGIN',1,'2015-02-15 09:53:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(320,'2015-02-16 19:10:28','USER_LOGIN',1,'2015-02-16 20:10:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(321,'2015-02-16 19:22:40','USER_CREATE',1,'2015-02-16 20:22:40',1,'Création utilisateur aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(322,'2015-02-16 19:22:40','USER_NEW_PASSWORD',1,'2015-02-16 20:22:40',1,'Changement mot de passe de aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(323,'2015-02-16 19:48:15','USER_CREATE',1,'2015-02-16 20:48:15',1,'Création utilisateur zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(324,'2015-02-16 19:48:15','USER_NEW_PASSWORD',1,'2015-02-16 20:48:15',1,'Changement mot de passe de zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(325,'2015-02-16 19:50:08','USER_CREATE',1,'2015-02-16 20:50:08',1,'Création utilisateur zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(326,'2015-02-16 19:50:08','USER_NEW_PASSWORD',1,'2015-02-16 20:50:08',1,'Changement mot de passe de zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(327,'2015-02-16 21:20:03','USER_LOGIN',1,'2015-02-16 22:20:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(328,'2015-02-17 14:30:51','USER_LOGIN',1,'2015-02-17 15:30:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(329,'2015-02-17 17:21:22','USER_LOGIN',1,'2015-02-17 18:21:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(330,'2015-02-17 17:48:43','USER_MODIFY',1,'2015-02-17 18:48:43',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(331,'2015-02-17 17:48:47','USER_MODIFY',1,'2015-02-17 18:48:47',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(332,'2015-02-17 17:48:51','USER_MODIFY',1,'2015-02-17 18:48:51',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(333,'2015-02-17 17:48:56','USER_MODIFY',1,'2015-02-17 18:48:56',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(334,'2015-02-18 22:00:01','USER_LOGIN',1,'2015-02-18 23:00:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(335,'2015-02-19 08:19:52','USER_LOGIN',1,'2015-02-19 09:19:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(336,'2015-02-19 22:00:52','USER_LOGIN',1,'2015-02-19 23:00:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(337,'2015-02-20 09:34:52','USER_LOGIN',1,'2015-02-20 10:34:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(338,'2015-02-20 13:12:28','USER_LOGIN',1,'2015-02-20 14:12:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(339,'2015-02-20 17:19:44','USER_LOGIN',1,'2015-02-20 18:19:44',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(340,'2015-02-20 19:07:21','USER_MODIFY',1,'2015-02-20 20:07:21',1,'Modification utilisateur adupont','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(341,'2015-02-20 19:47:17','USER_LOGIN',1,'2015-02-20 20:47:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(342,'2015-02-20 19:48:01','USER_MODIFY',1,'2015-02-20 20:48:01',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(343,'2015-02-21 08:27:07','USER_LOGIN',1,'2015-02-21 09:27:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(344,'2015-02-23 13:34:13','USER_LOGIN',1,'2015-02-23 14:34:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(345,'2015-02-24 01:06:41','USER_LOGIN_FAILED',1,'2015-02-24 02:06:41',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(346,'2015-02-24 01:06:45','USER_LOGIN_FAILED',1,'2015-02-24 02:06:45',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(347,'2015-02-24 01:06:55','USER_LOGIN_FAILED',1,'2015-02-24 02:06:55',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(348,'2015-02-24 01:07:03','USER_LOGIN_FAILED',1,'2015-02-24 02:07:03',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(349,'2015-02-24 01:07:21','USER_LOGIN_FAILED',1,'2015-02-24 02:07:21',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(350,'2015-02-24 01:08:12','USER_LOGIN_FAILED',1,'2015-02-24 02:08:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(351,'2015-02-24 01:08:42','USER_LOGIN_FAILED',1,'2015-02-24 02:08:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(352,'2015-02-24 01:08:50','USER_LOGIN_FAILED',1,'2015-02-24 02:08:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(353,'2015-02-24 01:09:08','USER_LOGIN_FAILED',1,'2015-02-24 02:09:08',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(354,'2015-02-24 01:09:42','USER_LOGIN_FAILED',1,'2015-02-24 02:09:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(355,'2015-02-24 01:09:50','USER_LOGIN_FAILED',1,'2015-02-24 02:09:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(356,'2015-02-24 01:10:05','USER_LOGIN_FAILED',1,'2015-02-24 02:10:05',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(357,'2015-02-24 01:10:22','USER_LOGIN_FAILED',1,'2015-02-24 02:10:22',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(358,'2015-02-24 01:10:30','USER_LOGIN_FAILED',1,'2015-02-24 02:10:30',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(359,'2015-02-24 01:10:56','USER_LOGIN_FAILED',1,'2015-02-24 02:10:56',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(360,'2015-02-24 01:11:26','USER_LOGIN_FAILED',1,'2015-02-24 02:11:26',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(361,'2015-02-24 01:12:06','USER_LOGIN_FAILED',1,'2015-02-24 02:12:06',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(362,'2015-02-24 01:21:14','USER_LOGIN_FAILED',1,'2015-02-24 02:21:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(363,'2015-02-24 01:21:25','USER_LOGIN_FAILED',1,'2015-02-24 02:21:25',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(364,'2015-02-24 01:21:54','USER_LOGIN_FAILED',1,'2015-02-24 02:21:54',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(365,'2015-02-24 01:22:14','USER_LOGIN_FAILED',1,'2015-02-24 02:22:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(366,'2015-02-24 01:22:37','USER_LOGIN_FAILED',1,'2015-02-24 02:22:37',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(367,'2015-02-24 01:23:01','USER_LOGIN_FAILED',1,'2015-02-24 02:23:01',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(368,'2015-02-24 01:23:39','USER_LOGIN_FAILED',1,'2015-02-24 02:23:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(369,'2015-02-24 01:24:04','USER_LOGIN_FAILED',1,'2015-02-24 02:24:04',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(370,'2015-02-24 01:24:39','USER_LOGIN_FAILED',1,'2015-02-24 02:24:39',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(371,'2015-02-24 01:25:01','USER_LOGIN_FAILED',1,'2015-02-24 02:25:01',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(372,'2015-02-24 01:25:12','USER_LOGIN_FAILED',1,'2015-02-24 02:25:12',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(373,'2015-02-24 01:27:30','USER_LOGIN_FAILED',1,'2015-02-24 02:27:30',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(374,'2015-02-24 01:28:00','USER_LOGIN_FAILED',1,'2015-02-24 02:28:00',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(375,'2015-02-24 01:28:35','USER_LOGIN_FAILED',1,'2015-02-24 02:28:35',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(376,'2015-02-24 01:29:03','USER_LOGIN_FAILED',1,'2015-02-24 02:29:03',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(377,'2015-02-24 01:29:55','USER_LOGIN_FAILED',1,'2015-02-24 02:29:55',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(378,'2015-02-24 01:32:40','USER_LOGIN_FAILED',1,'2015-02-24 02:32:40',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(379,'2015-02-24 01:39:33','USER_LOGIN_FAILED',1,'2015-02-24 02:39:33',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(380,'2015-02-24 01:39:38','USER_LOGIN_FAILED',1,'2015-02-24 02:39:38',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(381,'2015-02-24 01:39:47','USER_LOGIN_FAILED',1,'2015-02-24 02:39:47',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(382,'2015-02-24 01:40:54','USER_LOGIN_FAILED',1,'2015-02-24 02:40:54',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(383,'2015-02-24 01:47:57','USER_LOGIN_FAILED',1,'2015-02-24 02:47:57',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(384,'2015-02-24 01:48:05','USER_LOGIN_FAILED',1,'2015-02-24 02:48:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(385,'2015-02-24 01:48:07','USER_LOGIN_FAILED',1,'2015-02-24 02:48:07',NULL,'Unknown column \'u.lastname\' in \'field list\'','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(386,'2015-02-24 01:48:35','USER_LOGIN',1,'2015-02-24 02:48:35',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(387,'2015-02-24 01:56:32','USER_LOGIN',1,'2015-02-24 02:56:32',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(388,'2015-02-24 02:05:55','USER_LOGOUT',1,'2015-02-24 03:05:55',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(389,'2015-02-24 02:39:52','USER_LOGIN',1,'2015-02-24 03:39:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(390,'2015-02-24 02:51:10','USER_LOGOUT',1,'2015-02-24 03:51:10',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(391,'2015-02-24 12:46:41','USER_LOGIN',1,'2015-02-24 13:46:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(392,'2015-02-24 12:46:52','USER_LOGOUT',1,'2015-02-24 13:46:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(393,'2015-02-24 12:46:56','USER_LOGIN',1,'2015-02-24 13:46:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(394,'2015-02-24 12:47:56','USER_LOGOUT',1,'2015-02-24 13:47:56',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(395,'2015-02-24 12:48:00','USER_LOGIN',1,'2015-02-24 13:48:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(396,'2015-02-24 12:48:11','USER_LOGOUT',1,'2015-02-24 13:48:11',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(397,'2015-02-24 12:48:32','USER_LOGIN',1,'2015-02-24 13:48:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(398,'2015-02-24 12:52:22','USER_LOGOUT',1,'2015-02-24 13:52:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(399,'2015-02-24 12:52:27','USER_LOGIN',1,'2015-02-24 13:52:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(400,'2015-02-24 12:52:54','USER_LOGOUT',1,'2015-02-24 13:52:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(401,'2015-02-24 12:52:59','USER_LOGIN',1,'2015-02-24 13:52:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(402,'2015-02-24 12:55:39','USER_LOGOUT',1,'2015-02-24 13:55:39',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(403,'2015-02-24 12:55:59','USER_LOGIN',1,'2015-02-24 13:55:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(404,'2015-02-24 12:56:07','USER_LOGOUT',1,'2015-02-24 13:56:07',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(405,'2015-02-24 12:56:23','USER_LOGIN',1,'2015-02-24 13:56:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(406,'2015-02-24 12:56:46','USER_LOGOUT',1,'2015-02-24 13:56:46',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(407,'2015-02-24 12:58:30','USER_LOGIN',1,'2015-02-24 13:58:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(408,'2015-02-24 12:58:33','USER_LOGOUT',1,'2015-02-24 13:58:33',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(409,'2015-02-24 12:58:51','USER_LOGIN',1,'2015-02-24 13:58:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(410,'2015-02-24 12:58:58','USER_LOGOUT',1,'2015-02-24 13:58:58',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(411,'2015-02-24 13:18:53','USER_LOGIN',1,'2015-02-24 14:18:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(412,'2015-02-24 13:19:52','USER_LOGOUT',1,'2015-02-24 14:19:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(413,'2015-02-24 15:39:31','USER_LOGIN_FAILED',1,'2015-02-24 16:39:31',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1',NULL,NULL),(414,'2015-02-24 15:42:07','USER_LOGIN',1,'2015-02-24 16:42:07',1,'(UserLogged,admin)','127.0.0.1',NULL,NULL),(415,'2015-02-24 15:42:52','USER_LOGOUT',1,'2015-02-24 16:42:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(416,'2015-02-24 16:04:21','USER_LOGIN',1,'2015-02-24 17:04:21',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(417,'2015-02-24 16:11:28','USER_LOGIN_FAILED',1,'2015-02-24 17:11:28',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(418,'2015-02-24 16:11:37','USER_LOGIN',1,'2015-02-24 17:11:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(419,'2015-02-24 16:36:52','USER_LOGOUT',1,'2015-02-24 17:36:52',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(420,'2015-02-24 16:40:37','USER_LOGIN',1,'2015-02-24 17:40:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(421,'2015-02-24 16:57:16','USER_LOGIN',1,'2015-02-24 17:57:16',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(422,'2015-02-24 17:01:30','USER_LOGOUT',1,'2015-02-24 18:01:30',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(423,'2015-02-24 17:02:33','USER_LOGIN',1,'2015-02-24 18:02:33',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(424,'2015-02-24 17:14:22','USER_LOGOUT',1,'2015-02-24 18:14:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(425,'2015-02-24 17:15:07','USER_LOGIN_FAILED',1,'2015-02-24 18:15:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(426,'2015-02-24 17:15:20','USER_LOGIN',1,'2015-02-24 18:15:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(427,'2015-02-24 17:20:14','USER_LOGIN',1,'2015-02-24 18:20:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(428,'2015-02-24 17:20:51','USER_LOGIN',1,'2015-02-24 18:20:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(429,'2015-02-24 17:20:54','USER_LOGOUT',1,'2015-02-24 18:20:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(430,'2015-02-24 17:21:19','USER_LOGIN',1,'2015-02-24 18:21:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(431,'2015-02-24 17:32:35','USER_LOGIN',1,'2015-02-24 18:32:35',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(432,'2015-02-24 18:28:48','USER_LOGIN',1,'2015-02-24 19:28:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(433,'2015-02-24 18:29:27','USER_LOGOUT',1,'2015-02-24 19:29:27',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(434,'2015-02-24 18:29:32','USER_LOGIN',1,'2015-02-24 19:29:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(435,'2015-02-24 20:13:13','USER_LOGOUT',1,'2015-02-24 21:13:13',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(436,'2015-02-24 20:13:17','USER_LOGIN',1,'2015-02-24 21:13:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(437,'2015-02-25 08:57:16','USER_LOGIN',1,'2015-02-25 09:57:16',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(438,'2015-02-25 08:57:59','USER_LOGOUT',1,'2015-02-25 09:57:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(439,'2015-02-25 09:15:02','USER_LOGIN',1,'2015-02-25 10:15:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(440,'2015-02-25 09:15:50','USER_LOGOUT',1,'2015-02-25 10:15:50',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(441,'2015-02-25 09:15:57','USER_LOGIN',1,'2015-02-25 10:15:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(442,'2015-02-25 09:16:12','USER_LOGOUT',1,'2015-02-25 10:16:12',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(443,'2015-02-25 09:16:19','USER_LOGIN',1,'2015-02-25 10:16:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(444,'2015-02-25 09:16:25','USER_LOGOUT',1,'2015-02-25 10:16:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(445,'2015-02-25 09:16:39','USER_LOGIN_FAILED',1,'2015-02-25 10:16:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(446,'2015-02-25 09:16:42','USER_LOGIN_FAILED',1,'2015-02-25 10:16:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(447,'2015-02-25 09:16:54','USER_LOGIN_FAILED',1,'2015-02-25 10:16:54',NULL,'Identificadors d'usuari o contrasenya incorrectes - login=gfdg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(448,'2015-02-25 09:17:53','USER_LOGIN',1,'2015-02-25 10:17:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(449,'2015-02-25 09:18:37','USER_LOGOUT',1,'2015-02-25 10:18:37',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(450,'2015-02-25 09:18:41','USER_LOGIN',1,'2015-02-25 10:18:41',4,'(UserLogged,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(451,'2015-02-25 09:18:47','USER_LOGOUT',1,'2015-02-25 10:18:47',4,'(UserLogoff,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(452,'2015-02-25 10:05:34','USER_LOGIN',1,'2015-02-25 11:05:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(453,'2015-02-26 21:51:40','USER_LOGIN',1,'2015-02-26 22:51:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(454,'2015-02-26 23:30:06','USER_LOGIN',1,'2015-02-27 00:30:06',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(455,'2015-02-27 14:13:11','USER_LOGIN',1,'2015-02-27 15:13:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(456,'2015-02-27 18:12:06','USER_LOGIN_FAILED',1,'2015-02-27 19:12:06',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(457,'2015-02-27 18:12:10','USER_LOGIN',1,'2015-02-27 19:12:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(458,'2015-02-27 20:20:08','USER_LOGIN',1,'2015-02-27 21:20:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(459,'2015-03-01 22:12:03','USER_LOGIN',1,'2015-03-01 23:12:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(460,'2015-03-02 11:45:50','USER_LOGIN',1,'2015-03-02 12:45:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(461,'2015-03-02 15:53:51','USER_LOGIN_FAILED',1,'2015-03-02 16:53:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(462,'2015-03-02 15:53:53','USER_LOGIN',1,'2015-03-02 16:53:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(463,'2015-03-02 18:32:32','USER_LOGIN',1,'2015-03-02 19:32:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(464,'2015-03-02 22:59:36','USER_LOGIN',1,'2015-03-02 23:59:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(465,'2015-03-03 16:26:26','USER_LOGIN',1,'2015-03-03 17:26:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(466,'2015-03-03 22:50:27','USER_LOGIN',1,'2015-03-03 23:50:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(467,'2015-03-04 08:29:27','USER_LOGIN',1,'2015-03-04 09:29:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(468,'2015-03-04 18:27:28','USER_LOGIN',1,'2015-03-04 19:27:28',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; NP06)',NULL),(469,'2015-03-04 19:27:23','USER_LOGIN',1,'2015-03-04 20:27:23',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',NULL),(470,'2015-03-04 19:35:14','USER_LOGIN',1,'2015-03-04 20:35:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(471,'2015-03-04 19:55:49','USER_LOGIN',1,'2015-03-04 20:55:49',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',NULL),(472,'2015-03-04 21:16:13','USER_LOGIN',1,'2015-03-04 22:16:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(473,'2015-03-05 10:17:30','USER_LOGIN',1,'2015-03-05 11:17:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(474,'2015-03-05 11:02:43','USER_LOGIN',1,'2015-03-05 12:02:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(475,'2015-03-05 23:14:39','USER_LOGIN',1,'2015-03-06 00:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(476,'2015-03-06 08:58:57','USER_LOGIN',1,'2015-03-06 09:58:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(477,'2015-03-06 14:29:40','USER_LOGIN',1,'2015-03-06 15:29:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(478,'2015-03-06 21:53:02','USER_LOGIN',1,'2015-03-06 22:53:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(479,'2015-03-07 21:14:39','USER_LOGIN',1,'2015-03-07 22:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(480,'2015-03-08 00:06:05','USER_LOGIN',1,'2015-03-08 01:06:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(481,'2015-03-08 01:38:13','USER_LOGIN',1,'2015-03-08 02:38:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(482,'2015-03-08 08:59:50','USER_LOGIN',1,'2015-03-08 09:59:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(483,'2015-03-09 12:08:51','USER_LOGIN',1,'2015-03-09 13:08:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(484,'2015-03-09 15:19:53','USER_LOGIN',1,'2015-03-09 16:19:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(495,'2015-03-09 18:06:21','USER_LOGIN',1,'2015-03-09 19:06:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(496,'2015-03-09 20:01:24','USER_LOGIN',1,'2015-03-09 21:01:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(497,'2015-03-09 23:36:45','USER_LOGIN',1,'2015-03-10 00:36:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(498,'2015-03-10 14:37:13','USER_LOGIN',1,'2015-03-10 15:37:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(499,'2015-03-10 17:54:12','USER_LOGIN',1,'2015-03-10 18:54:12',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(500,'2015-03-11 08:57:09','USER_LOGIN',1,'2015-03-11 09:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(501,'2015-03-11 22:05:13','USER_LOGIN',1,'2015-03-11 23:05:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(502,'2015-03-12 08:34:27','USER_LOGIN',1,'2015-03-12 09:34:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(503,'2015-03-13 09:11:02','USER_LOGIN',1,'2015-03-13 10:11:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(504,'2015-03-13 10:02:11','USER_LOGIN',1,'2015-03-13 11:02:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(505,'2015-03-13 13:20:58','USER_LOGIN',1,'2015-03-13 14:20:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(506,'2015-03-13 16:19:28','USER_LOGIN',1,'2015-03-13 17:19:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(507,'2015-03-13 18:34:30','USER_LOGIN',1,'2015-03-13 19:34:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(508,'2015-03-14 08:25:02','USER_LOGIN',1,'2015-03-14 09:25:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(509,'2015-03-14 19:15:22','USER_LOGIN',1,'2015-03-14 20:15:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(510,'2015-03-14 21:58:53','USER_LOGIN',1,'2015-03-14 22:58:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(511,'2015-03-14 21:58:59','USER_LOGOUT',1,'2015-03-14 22:58:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(512,'2015-03-14 21:59:07','USER_LOGIN',1,'2015-03-14 22:59:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(513,'2015-03-14 22:58:22','USER_LOGOUT',1,'2015-03-14 23:58:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(514,'2015-03-14 23:00:25','USER_LOGIN',1,'2015-03-15 00:00:25',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(515,'2015-03-16 12:14:28','USER_LOGIN',1,'2015-03-16 13:14:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(516,'2015-03-16 16:09:01','USER_LOGIN',1,'2015-03-16 17:09:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(517,'2015-03-16 16:57:11','USER_LOGIN',1,'2015-03-16 17:57:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(518,'2015-03-16 19:31:31','USER_LOGIN',1,'2015-03-16 20:31:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(519,'2015-03-17 17:44:39','USER_LOGIN',1,'2015-03-17 18:44:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(520,'2015-03-17 20:40:57','USER_LOGIN',1,'2015-03-17 21:40:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(521,'2015-03-17 23:14:05','USER_LOGIN',1,'2015-03-18 00:14:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(522,'2015-03-17 23:28:47','USER_LOGOUT',1,'2015-03-18 00:28:47',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(523,'2015-03-17 23:28:54','USER_LOGIN',1,'2015-03-18 00:28:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(524,'2015-03-18 17:37:30','USER_LOGIN',1,'2015-03-18 18:37:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(525,'2015-03-18 18:11:37','USER_LOGIN',1,'2015-03-18 19:11:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(526,'2015-03-19 08:35:08','USER_LOGIN',1,'2015-03-19 09:35:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(527,'2015-03-19 09:20:23','USER_LOGIN',1,'2015-03-19 10:20:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(528,'2015-03-20 13:17:13','USER_LOGIN',1,'2015-03-20 14:17:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(529,'2015-03-20 14:44:31','USER_LOGIN',1,'2015-03-20 15:44:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(530,'2015-03-20 18:24:25','USER_LOGIN',1,'2015-03-20 19:24:25',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(531,'2015-03-20 19:15:54','USER_LOGIN',1,'2015-03-20 20:15:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(532,'2015-03-21 18:40:47','USER_LOGIN',1,'2015-03-21 19:40:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(533,'2015-03-21 21:42:24','USER_LOGIN',1,'2015-03-21 22:42:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(534,'2015-03-22 08:39:23','USER_LOGIN',1,'2015-03-22 09:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(535,'2015-03-23 13:04:55','USER_LOGIN',1,'2015-03-23 14:04:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(536,'2015-03-23 15:47:43','USER_LOGIN',1,'2015-03-23 16:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(537,'2015-03-23 22:56:36','USER_LOGIN',1,'2015-03-23 23:56:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(538,'2015-03-24 01:22:32','USER_LOGIN',1,'2015-03-24 02:22:32',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(539,'2015-03-24 14:40:42','USER_LOGIN',1,'2015-03-24 15:40:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(540,'2015-03-24 15:30:26','USER_LOGOUT',1,'2015-03-24 16:30:26',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(541,'2015-03-24 15:30:29','USER_LOGIN',1,'2015-03-24 16:30:29',2,'(UserLogged,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(542,'2015-03-24 15:49:40','USER_LOGOUT',1,'2015-03-24 16:49:40',2,'(UserLogoff,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(543,'2015-03-24 15:49:48','USER_LOGIN',1,'2015-03-24 16:49:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(544,'2015-03-24 15:52:35','USER_MODIFY',1,'2015-03-24 16:52:35',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(545,'2015-03-24 15:52:52','USER_MODIFY',1,'2015-03-24 16:52:52',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(546,'2015-03-24 15:53:09','USER_MODIFY',1,'2015-03-24 16:53:09',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(547,'2015-03-24 15:53:23','USER_MODIFY',1,'2015-03-24 16:53:23',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(548,'2015-03-24 16:00:04','USER_MODIFY',1,'2015-03-24 17:00:04',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(549,'2015-03-24 16:01:50','USER_MODIFY',1,'2015-03-24 17:01:50',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(550,'2015-03-24 16:10:14','USER_MODIFY',1,'2015-03-24 17:10:14',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(551,'2015-03-24 16:55:13','USER_LOGIN',1,'2015-03-24 17:55:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(552,'2015-03-24 17:44:29','USER_LOGIN',1,'2015-03-24 18:44:29',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(553,'2015-09-08 23:06:26','USER_LOGIN',1,'2015-09-09 01:06:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36',NULL),(554,'2015-10-21 22:32:28','USER_LOGIN',1,'2015-10-22 00:32:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(555,'2015-10-21 22:32:48','USER_LOGIN',1,'2015-10-22 00:32:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(556,'2015-11-07 00:01:51','USER_LOGIN',1,'2015-11-07 01:01:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',NULL),(557,'2016-03-02 15:21:07','USER_LOGIN',1,'2016-03-02 16:21:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(558,'2016-03-02 15:36:53','USER_LOGIN',1,'2016-03-02 16:36:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(559,'2016-03-02 18:54:23','USER_LOGIN',1,'2016-03-02 19:54:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(560,'2016-03-02 19:11:17','USER_LOGIN',1,'2016-03-02 20:11:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(561,'2016-03-03 18:19:24','USER_LOGIN',1,'2016-03-03 19:19:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(562,'2016-12-21 12:51:38','USER_LOGIN',1,'2016-12-21 13:51:38',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(563,'2016-12-21 19:52:09','USER_LOGIN',1,'2016-12-21 20:52:09',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(566,'2017-10-03 08:49:43','USER_NEW_PASSWORD',1,'2017-10-03 10:49:43',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(567,'2017-10-03 08:49:43','USER_MODIFY',1,'2017-10-03 10:49:43',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(568,'2017-10-03 09:03:12','USER_MODIFY',1,'2017-10-03 11:03:12',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(569,'2017-10-03 09:03:42','USER_MODIFY',1,'2017-10-03 11:03:42',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(570,'2017-10-03 09:07:36','USER_MODIFY',1,'2017-10-03 11:07:36',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(571,'2017-10-03 09:08:58','USER_NEW_PASSWORD',1,'2017-10-03 11:08:58',1,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(572,'2017-10-03 09:08:58','USER_MODIFY',1,'2017-10-03 11:08:58',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(573,'2017-10-03 09:09:23','USER_MODIFY',1,'2017-10-03 11:09:23',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(574,'2017-10-03 09:11:04','USER_NEW_PASSWORD',1,'2017-10-03 11:11:04',1,'Password change for athestudent','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(575,'2017-10-03 09:11:04','USER_MODIFY',1,'2017-10-03 11:11:04',1,'User athestudent modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(576,'2017-10-03 09:11:53','USER_MODIFY',1,'2017-10-03 11:11:53',1,'User abookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(577,'2017-10-03 09:42:12','USER_LOGIN_FAILED',1,'2017-10-03 11:42:11',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(578,'2017-10-03 09:42:19','USER_LOGIN_FAILED',1,'2017-10-03 11:42:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(579,'2017-10-03 09:42:42','USER_LOGIN_FAILED',1,'2017-10-03 11:42:42',NULL,'Bad value for login or password - login=aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(580,'2017-10-03 09:43:50','USER_LOGIN',1,'2017-10-03 11:43:50',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x788','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(581,'2017-10-03 09:44:44','GROUP_MODIFY',1,'2017-10-03 11:44:44',1,'Group Sale representatives modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(582,'2017-10-03 09:46:25','GROUP_CREATE',1,'2017-10-03 11:46:25',1,'Group Management created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(583,'2017-10-03 09:46:46','GROUP_CREATE',1,'2017-10-03 11:46:46',1,'Group Scientists created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(584,'2017-10-03 09:47:41','USER_CREATE',1,'2017-10-03 11:47:41',1,'User mcurie created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(585,'2017-10-03 09:47:41','USER_NEW_PASSWORD',1,'2017-10-03 11:47:41',1,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(586,'2017-10-03 09:47:53','USER_MODIFY',1,'2017-10-03 11:47:53',1,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(587,'2017-10-03 09:48:32','USER_DELETE',1,'2017-10-03 11:48:32',1,'User bbb removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(588,'2017-10-03 09:48:52','USER_MODIFY',1,'2017-10-03 11:48:52',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(589,'2017-10-03 10:01:28','USER_MODIFY',1,'2017-10-03 12:01:28',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(590,'2017-10-03 10:01:39','USER_MODIFY',1,'2017-10-03 12:01:39',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(591,'2017-10-05 06:32:38','USER_LOGIN_FAILED',1,'2017-10-05 08:32:38',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(592,'2017-10-05 06:32:44','USER_LOGIN',1,'2017-10-05 08:32:44',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(593,'2017-10-05 07:07:52','USER_CREATE',1,'2017-10-05 09:07:52',1,'User atheceo created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(594,'2017-10-05 07:07:52','USER_NEW_PASSWORD',1,'2017-10-05 09:07:52',1,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(595,'2017-10-05 07:09:08','USER_NEW_PASSWORD',1,'2017-10-05 09:09:08',1,'Password change for aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(596,'2017-10-05 07:09:08','USER_MODIFY',1,'2017-10-05 09:09:08',1,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(597,'2017-10-05 07:09:46','USER_CREATE',1,'2017-10-05 09:09:46',1,'User admin created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(598,'2017-10-05 07:09:46','USER_NEW_PASSWORD',1,'2017-10-05 09:09:46',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(599,'2017-10-05 07:10:20','USER_MODIFY',1,'2017-10-05 09:10:20',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(600,'2017-10-05 07:10:48','USER_MODIFY',1,'2017-10-05 09:10:48',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(601,'2017-10-05 07:11:22','USER_NEW_PASSWORD',1,'2017-10-05 09:11:22',1,'Password change for bbookkeeper','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(602,'2017-10-05 07:11:22','USER_MODIFY',1,'2017-10-05 09:11:22',1,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(603,'2017-10-05 07:12:37','USER_MODIFY',1,'2017-10-05 09:12:37',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(604,'2017-10-05 07:13:27','USER_MODIFY',1,'2017-10-05 09:13:27',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(605,'2017-10-05 07:13:52','USER_MODIFY',1,'2017-10-05 09:13:52',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(606,'2017-10-05 07:14:35','USER_LOGOUT',1,'2017-10-05 09:14:35',1,'(UserLogoff,aeinstein)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(607,'2017-10-05 07:14:40','USER_LOGIN_FAILED',1,'2017-10-05 09:14:40',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(608,'2017-10-05 07:14:44','USER_LOGIN_FAILED',1,'2017-10-05 09:14:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(609,'2017-10-05 07:14:49','USER_LOGIN',1,'2017-10-05 09:14:49',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(610,'2017-10-05 07:57:18','USER_MODIFY',1,'2017-10-05 09:57:18',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(611,'2017-10-05 08:06:54','USER_LOGOUT',1,'2017-10-05 10:06:54',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(612,'2017-10-05 08:07:03','USER_LOGIN',1,'2017-10-05 10:07:03',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(613,'2017-10-05 19:18:46','USER_LOGIN',1,'2017-10-05 21:18:46',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(614,'2017-10-05 19:29:35','USER_CREATE',1,'2017-10-05 21:29:35',11,'User ccommercy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(615,'2017-10-05 19:29:35','USER_NEW_PASSWORD',1,'2017-10-05 21:29:35',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(616,'2017-10-05 19:30:13','GROUP_CREATE',1,'2017-10-05 21:30:13',11,'Group Commercial created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(617,'2017-10-05 19:31:37','USER_NEW_PASSWORD',1,'2017-10-05 21:31:37',11,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(618,'2017-10-05 19:31:37','USER_MODIFY',1,'2017-10-05 21:31:37',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(619,'2017-10-05 19:32:00','USER_MODIFY',1,'2017-10-05 21:32:00',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(620,'2017-10-05 19:33:33','USER_CREATE',1,'2017-10-05 21:33:33',11,'User sscientol created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(621,'2017-10-05 19:33:33','USER_NEW_PASSWORD',1,'2017-10-05 21:33:33',11,'Password change for sscientol','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(622,'2017-10-05 19:33:47','USER_NEW_PASSWORD',1,'2017-10-05 21:33:47',11,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(623,'2017-10-05 19:33:47','USER_MODIFY',1,'2017-10-05 21:33:47',11,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(624,'2017-10-05 19:34:23','USER_NEW_PASSWORD',1,'2017-10-05 21:34:23',11,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(625,'2017-10-05 19:34:23','USER_MODIFY',1,'2017-10-05 21:34:23',11,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(626,'2017-10-05 19:34:42','USER_MODIFY',1,'2017-10-05 21:34:42',11,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(627,'2017-10-05 19:36:06','USER_NEW_PASSWORD',1,'2017-10-05 21:36:06',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(628,'2017-10-05 19:36:06','USER_MODIFY',1,'2017-10-05 21:36:06',11,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(629,'2017-10-05 19:36:57','USER_NEW_PASSWORD',1,'2017-10-05 21:36:57',11,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(630,'2017-10-05 19:36:57','USER_MODIFY',1,'2017-10-05 21:36:57',11,'User atheceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(631,'2017-10-05 19:37:27','USER_LOGOUT',1,'2017-10-05 21:37:27',11,'(UserLogoff,atheceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(632,'2017-10-05 19:37:35','USER_LOGIN_FAILED',1,'2017-10-05 21:37:35',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(633,'2017-10-05 19:37:39','USER_LOGIN_FAILED',1,'2017-10-05 21:37:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(634,'2017-10-05 19:37:44','USER_LOGIN_FAILED',1,'2017-10-05 21:37:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(635,'2017-10-05 19:37:49','USER_LOGIN_FAILED',1,'2017-10-05 21:37:49',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(636,'2017-10-05 19:38:12','USER_LOGIN_FAILED',1,'2017-10-05 21:38:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(637,'2017-10-05 19:40:48','USER_LOGIN_FAILED',1,'2017-10-05 21:40:48',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(638,'2017-10-05 19:40:55','USER_LOGIN',1,'2017-10-05 21:40:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(639,'2017-10-05 19:43:34','USER_MODIFY',1,'2017-10-05 21:43:34',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(640,'2017-10-05 19:45:43','USER_CREATE',1,'2017-10-05 21:45:43',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(641,'2017-10-05 19:45:43','USER_NEW_PASSWORD',1,'2017-10-05 21:45:43',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(642,'2017-10-05 19:46:18','USER_DELETE',1,'2017-10-05 21:46:18',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(643,'2017-10-05 19:47:09','USER_MODIFY',1,'2017-10-05 21:47:09',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(644,'2017-10-05 19:47:22','USER_MODIFY',1,'2017-10-05 21:47:22',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(645,'2017-10-05 19:52:05','USER_MODIFY',1,'2017-10-05 21:52:05',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(646,'2017-10-05 19:52:23','USER_MODIFY',1,'2017-10-05 21:52:23',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(647,'2017-10-05 19:54:54','USER_NEW_PASSWORD',1,'2017-10-05 21:54:54',12,'Password change for zzeceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(648,'2017-10-05 19:54:54','USER_MODIFY',1,'2017-10-05 21:54:54',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(649,'2017-10-05 19:57:02','USER_MODIFY',1,'2017-10-05 21:57:02',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(650,'2017-10-05 19:57:57','USER_NEW_PASSWORD',1,'2017-10-05 21:57:57',12,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(651,'2017-10-05 19:57:57','USER_MODIFY',1,'2017-10-05 21:57:57',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(652,'2017-10-05 19:59:42','USER_NEW_PASSWORD',1,'2017-10-05 21:59:42',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(653,'2017-10-05 19:59:42','USER_MODIFY',1,'2017-10-05 21:59:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(654,'2017-10-05 20:00:21','USER_MODIFY',1,'2017-10-05 22:00:21',12,'User adminx modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(655,'2017-10-05 20:05:36','USER_MODIFY',1,'2017-10-05 22:05:36',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(656,'2017-10-05 20:06:25','USER_MODIFY',1,'2017-10-05 22:06:25',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(657,'2017-10-05 20:07:18','USER_MODIFY',1,'2017-10-05 22:07:18',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(658,'2017-10-05 20:07:36','USER_MODIFY',1,'2017-10-05 22:07:36',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(659,'2017-10-05 20:08:34','USER_MODIFY',1,'2017-10-05 22:08:34',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(660,'2017-10-05 20:47:52','USER_CREATE',1,'2017-10-05 22:47:52',12,'User cc1 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(661,'2017-10-05 20:47:52','USER_NEW_PASSWORD',1,'2017-10-05 22:47:52',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(662,'2017-10-05 20:47:55','USER_LOGOUT',1,'2017-10-05 22:47:55',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(663,'2017-10-05 20:48:08','USER_LOGIN',1,'2017-10-05 22:48:08',11,'(UserLogged,zzeceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x434','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(664,'2017-10-05 20:48:39','USER_CREATE',1,'2017-10-05 22:48:39',11,'User cc2 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(665,'2017-10-05 20:48:39','USER_NEW_PASSWORD',1,'2017-10-05 22:48:39',11,'Password change for cc2','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(666,'2017-10-05 20:48:59','USER_NEW_PASSWORD',1,'2017-10-05 22:48:59',11,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(667,'2017-10-05 20:48:59','USER_MODIFY',1,'2017-10-05 22:48:59',11,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(668,'2017-10-05 21:06:36','USER_LOGOUT',1,'2017-10-05 23:06:35',11,'(UserLogoff,zzeceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(669,'2017-10-05 21:06:44','USER_LOGIN_FAILED',1,'2017-10-05 23:06:44',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(670,'2017-10-05 21:07:12','USER_LOGIN_FAILED',1,'2017-10-05 23:07:12',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(671,'2017-10-05 21:07:19','USER_LOGIN_FAILED',1,'2017-10-05 23:07:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(672,'2017-10-05 21:07:27','USER_LOGIN_FAILED',1,'2017-10-05 23:07:27',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(673,'2017-10-05 21:07:32','USER_LOGIN',1,'2017-10-05 23:07:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(674,'2017-10-05 21:12:28','USER_NEW_PASSWORD',1,'2017-10-05 23:12:28',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(675,'2017-10-05 21:12:28','USER_MODIFY',1,'2017-10-05 23:12:28',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(676,'2017-10-05 21:13:00','USER_CREATE',1,'2017-10-05 23:13:00',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(677,'2017-10-05 21:13:00','USER_NEW_PASSWORD',1,'2017-10-05 23:13:00',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(678,'2017-10-05 21:13:40','USER_DELETE',1,'2017-10-05 23:13:40',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(679,'2017-10-05 21:14:47','USER_LOGOUT',1,'2017-10-05 23:14:47',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(680,'2017-10-05 21:14:56','USER_LOGIN',1,'2017-10-05 23:14:56',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(681,'2017-10-05 21:15:56','USER_LOGOUT',1,'2017-10-05 23:15:56',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(682,'2017-10-05 21:16:06','USER_LOGIN',1,'2017-10-05 23:16:06',17,'(UserLogged,cc2) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(683,'2017-10-05 21:37:25','USER_LOGOUT',1,'2017-10-05 23:37:25',17,'(UserLogoff,cc2)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(684,'2017-10-05 21:37:31','USER_LOGIN',1,'2017-10-05 23:37:31',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(685,'2017-10-05 21:43:53','USER_LOGOUT',1,'2017-10-05 23:43:53',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(686,'2017-10-05 21:44:00','USER_LOGIN',1,'2017-10-05 23:44:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(687,'2017-10-05 21:46:17','USER_LOGOUT',1,'2017-10-05 23:46:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(688,'2017-10-05 21:46:24','USER_LOGIN',1,'2017-10-05 23:46:24',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(689,'2017-11-04 15:17:06','USER_LOGIN',1,'2017-11-04 16:17:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(690,'2017-11-15 22:04:04','USER_LOGIN',1,'2017-11-15 23:04:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(691,'2017-11-15 22:23:45','USER_MODIFY',1,'2017-11-15 23:23:45',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(692,'2017-11-15 22:24:22','USER_MODIFY',1,'2017-11-15 23:24:22',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(693,'2017-11-15 22:24:53','USER_MODIFY',1,'2017-11-15 23:24:53',12,'User cc2 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(694,'2017-11-15 22:25:17','USER_MODIFY',1,'2017-11-15 23:25:17',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(695,'2017-11-15 22:45:37','USER_LOGOUT',1,'2017-11-15 23:45:37',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(696,'2017-11-18 13:41:02','USER_LOGIN',1,'2017-11-18 14:41:02',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(697,'2017-11-18 14:23:35','USER_LOGIN',1,'2017-11-18 15:23:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(698,'2017-11-18 15:15:46','USER_LOGOUT',1,'2017-11-18 16:15:46',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(699,'2017-11-18 15:15:51','USER_LOGIN',1,'2017-11-18 16:15:51',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(700,'2017-11-30 17:52:08','USER_LOGIN',1,'2017-11-30 18:52:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(701,'2018-01-10 16:45:43','USER_LOGIN',1,'2018-01-10 17:45:43',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(702,'2018-01-10 16:45:52','USER_LOGOUT',1,'2018-01-10 17:45:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(703,'2018-01-10 16:46:06','USER_LOGIN',1,'2018-01-10 17:46:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(704,'2018-01-16 14:53:47','USER_LOGIN',1,'2018-01-16 15:53:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(705,'2018-01-16 15:04:29','USER_LOGOUT',1,'2018-01-16 16:04:29',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(706,'2018-01-16 15:04:40','USER_LOGIN',1,'2018-01-16 16:04:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(707,'2018-01-22 09:33:26','USER_LOGIN',1,'2018-01-22 10:33:26',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(708,'2018-01-22 09:35:19','USER_LOGOUT',1,'2018-01-22 10:35:19',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(709,'2018-01-22 09:35:29','USER_LOGIN',1,'2018-01-22 10:35:29',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(710,'2018-01-22 10:47:34','USER_CREATE',1,'2018-01-22 11:47:34',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(711,'2018-01-22 10:47:34','USER_NEW_PASSWORD',1,'2018-01-22 11:47:34',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(712,'2018-01-22 12:07:56','USER_LOGIN',1,'2018-01-22 13:07:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(713,'2018-01-22 12:36:25','USER_NEW_PASSWORD',1,'2018-01-22 13:36:25',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(714,'2018-01-22 12:36:25','USER_MODIFY',1,'2018-01-22 13:36:25',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(715,'2018-01-22 12:56:32','USER_MODIFY',1,'2018-01-22 13:56:32',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(716,'2018-01-22 12:58:05','USER_MODIFY',1,'2018-01-22 13:58:05',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(717,'2018-01-22 13:01:02','USER_MODIFY',1,'2018-01-22 14:01:02',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(718,'2018-01-22 13:01:18','USER_MODIFY',1,'2018-01-22 14:01:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(719,'2018-01-22 13:13:42','USER_MODIFY',1,'2018-01-22 14:13:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(720,'2018-01-22 13:15:20','USER_DELETE',1,'2018-01-22 14:15:20',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(721,'2018-01-22 13:19:21','USER_LOGOUT',1,'2018-01-22 14:19:21',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(722,'2018-01-22 13:19:32','USER_LOGIN',1,'2018-01-22 14:19:32',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(723,'2018-01-22 13:19:51','USER_LOGOUT',1,'2018-01-22 14:19:51',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(724,'2018-01-22 13:20:01','USER_LOGIN',1,'2018-01-22 14:20:01',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(725,'2018-01-22 13:28:22','USER_LOGOUT',1,'2018-01-22 14:28:22',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(726,'2018-01-22 13:28:35','USER_LOGIN',1,'2018-01-22 14:28:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(727,'2018-01-22 13:33:54','USER_LOGOUT',1,'2018-01-22 14:33:54',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(728,'2018-01-22 13:34:05','USER_LOGIN',1,'2018-01-22 14:34:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(729,'2018-01-22 13:51:46','USER_MODIFY',1,'2018-01-22 14:51:46',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(730,'2018-01-22 16:20:12','USER_LOGIN',1,'2018-01-22 17:20:12',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(731,'2018-01-22 16:20:22','USER_LOGOUT',1,'2018-01-22 17:20:22',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(732,'2018-01-22 16:20:36','USER_LOGIN',1,'2018-01-22 17:20:36',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(733,'2018-01-22 16:27:02','USER_CREATE',1,'2018-01-22 17:27:02',12,'User ldestailleur created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(734,'2018-01-22 16:27:02','USER_NEW_PASSWORD',1,'2018-01-22 17:27:02',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(735,'2018-01-22 16:28:34','USER_MODIFY',1,'2018-01-22 17:28:34',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(736,'2018-01-22 16:30:01','USER_ENABLEDISABLE',1,'2018-01-22 17:30:01',12,'User cc2 activated','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(737,'2018-01-22 17:11:06','USER_LOGIN',1,'2018-01-22 18:11:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(738,'2018-01-22 18:00:02','USER_DELETE',1,'2018-01-22 19:00:02',12,'User zzz removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(739,'2018-01-22 18:01:40','USER_DELETE',1,'2018-01-22 19:01:40',12,'User aaab removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(740,'2018-01-22 18:01:52','USER_DELETE',1,'2018-01-22 19:01:52',12,'User zzzg removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(741,'2018-03-13 10:54:59','USER_LOGIN',1,'2018-03-13 14:54:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x971','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',NULL),(742,'2018-07-30 11:13:10','USER_LOGIN',1,'2018-07-30 15:13:10',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(743,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(744,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(745,'2018-07-30 12:50:23','USER_NEW_PASSWORD',1,'2018-07-30 16:50:23',12,'Password change for eldy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(746,'2018-07-30 12:50:38','USER_MODIFY',1,'2018-07-30 16:50:38',12,'User eldy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(747,'2018-07-30 12:50:54','USER_DELETE',1,'2018-07-30 16:50:54',12,'User eldy removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(748,'2018-07-30 12:51:23','USER_NEW_PASSWORD',1,'2018-07-30 16:51:23',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(749,'2018-07-30 12:51:23','USER_MODIFY',1,'2018-07-30 16:51:23',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(750,'2018-07-30 18:26:58','USER_LOGIN',1,'2018-07-30 22:26:58',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(751,'2018-07-30 18:27:40','USER_LOGOUT',1,'2018-07-30 22:27:40',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(752,'2018-07-30 18:27:47','USER_LOGIN',1,'2018-07-30 22:27:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(753,'2018-07-30 19:00:00','USER_LOGOUT',1,'2018-07-30 23:00:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(754,'2018-07-30 19:00:04','USER_LOGIN',1,'2018-07-30 23:00:04',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(755,'2018-07-30 19:00:14','USER_LOGOUT',1,'2018-07-30 23:00:14',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(756,'2018-07-30 19:00:19','USER_LOGIN',1,'2018-07-30 23:00:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(757,'2018-07-30 19:00:43','USER_LOGOUT',1,'2018-07-30 23:00:43',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(758,'2018-07-30 19:00:48','USER_LOGIN',1,'2018-07-30 23:00:48',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(759,'2018-07-30 19:03:52','USER_LOGOUT',1,'2018-07-30 23:03:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(760,'2018-07-30 19:03:57','USER_LOGIN_FAILED',1,'2018-07-30 23:03:57',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(761,'2018-07-30 19:03:59','USER_LOGIN',1,'2018-07-30 23:03:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(762,'2018-07-30 19:04:13','USER_LOGOUT',1,'2018-07-30 23:04:13',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(763,'2018-07-30 19:04:17','USER_LOGIN',1,'2018-07-30 23:04:17',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(764,'2018-07-30 19:04:26','USER_LOGOUT',1,'2018-07-30 23:04:26',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(765,'2018-07-30 19:04:31','USER_LOGIN',1,'2018-07-30 23:04:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(766,'2018-07-30 19:10:50','USER_LOGOUT',1,'2018-07-30 23:10:50',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(767,'2018-07-30 19:10:54','USER_LOGIN',1,'2018-07-30 23:10:54',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(768,'2018-07-31 10:15:52','USER_LOGIN',1,'2018-07-31 14:15:52',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(769,'2018-07-31 10:16:27','USER_LOGIN',1,'2018-07-31 14:16:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(770,'2018-07-31 10:32:14','USER_LOGIN',1,'2018-07-31 14:32:14',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(771,'2018-07-31 10:36:28','USER_LOGIN',1,'2018-07-31 14:36:28',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(772,'2018-07-31 10:40:10','USER_LOGIN',1,'2018-07-31 14:40:10',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(773,'2018-07-31 10:54:16','USER_LOGIN',1,'2018-07-31 14:54:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(774,'2018-07-31 12:52:52','USER_LOGIN',1,'2018-07-31 16:52:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x592','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(775,'2018-07-31 13:25:33','USER_LOGOUT',1,'2018-07-31 17:25:33',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(776,'2018-07-31 13:26:32','USER_LOGIN',1,'2018-07-31 17:26:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1280x751','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(777,'2018-07-31 14:13:57','USER_LOGOUT',1,'2018-07-31 18:13:57',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(778,'2018-07-31 14:14:04','USER_LOGIN',1,'2018-07-31 18:14:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(779,'2018-07-31 16:04:35','USER_LOGIN',1,'2018-07-31 20:04:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(780,'2018-07-31 21:14:14','USER_LOGIN',1,'2018-08-01 01:14:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(781,'2017-01-29 15:14:05','USER_LOGOUT',1,'2017-01-29 19:14:05',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(782,'2017-01-29 15:34:43','USER_LOGIN',1,'2017-01-29 19:34:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(783,'2017-01-29 15:35:04','USER_LOGOUT',1,'2017-01-29 19:35:04',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(784,'2017-01-29 15:35:12','USER_LOGIN',1,'2017-01-29 19:35:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(785,'2017-01-29 15:36:43','USER_LOGOUT',1,'2017-01-29 19:36:43',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(786,'2017-01-29 15:41:21','USER_LOGIN',1,'2017-01-29 19:41:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(787,'2017-01-29 15:41:41','USER_LOGOUT',1,'2017-01-29 19:41:41',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(788,'2017-01-29 15:42:43','USER_LOGIN',1,'2017-01-29 19:42:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(789,'2017-01-29 15:43:18','USER_LOGOUT',1,'2017-01-29 19:43:18',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(790,'2017-01-29 15:46:31','USER_LOGIN',1,'2017-01-29 19:46:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(791,'2017-01-29 16:18:56','USER_LOGIN',1,'2017-01-29 20:18:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=360x526','192.168.0.254','Mozilla/5.0 (Linux; Android 6.0; LG-H818 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 - DoliDroid - Android client pour Dolibarr ERP-CRM',NULL),(792,'2017-01-29 17:20:59','USER_LOGIN',1,'2017-01-29 21:20:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(793,'2017-01-30 11:19:40','USER_LOGIN',1,'2017-01-30 15:19:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(794,'2017-01-31 16:49:39','USER_LOGIN',1,'2017-01-31 20:49:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(795,'2017-02-01 10:55:23','USER_LOGIN',1,'2017-02-01 14:55:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(796,'2017-02-01 13:34:31','USER_LOGIN',1,'2017-02-01 17:34:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(797,'2017-02-01 14:41:26','USER_LOGIN',1,'2017-02-01 18:41:26',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(798,'2017-02-01 23:51:48','USER_LOGIN_FAILED',1,'2017-02-02 03:51:48',NULL,'Bad value for login or password - login=autologin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(799,'2017-02-01 23:52:55','USER_LOGIN',1,'2017-02-02 03:52:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(800,'2017-02-01 23:55:45','USER_CREATE',1,'2017-02-02 03:55:45',12,'User aboston created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(801,'2017-02-01 23:55:45','USER_NEW_PASSWORD',1,'2017-02-02 03:55:45',12,'Password change for aboston','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(802,'2017-02-01 23:56:38','USER_MODIFY',1,'2017-02-02 03:56:38',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(803,'2017-02-01 23:56:50','USER_MODIFY',1,'2017-02-02 03:56:50',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(804,'2017-02-02 01:14:44','USER_LOGIN',1,'2017-02-02 05:14:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(805,'2017-02-03 10:27:18','USER_LOGIN',1,'2017-02-03 14:27:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(806,'2017-02-04 10:22:34','USER_LOGIN',1,'2017-02-04 14:22:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x489','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(807,'2017-02-06 04:01:31','USER_LOGIN',1,'2017-02-06 08:01:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(808,'2017-02-06 10:21:32','USER_LOGIN',1,'2017-02-06 14:21:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(809,'2017-02-06 19:09:27','USER_LOGIN',1,'2017-02-06 23:09:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(810,'2017-02-06 23:39:17','USER_LOGIN',1,'2017-02-07 03:39:17',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(811,'2017-02-07 11:36:34','USER_LOGIN',1,'2017-02-07 15:36:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x676','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(812,'2017-02-07 18:51:53','USER_LOGIN',1,'2017-02-07 22:51:53',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(813,'2017-02-07 23:13:40','USER_LOGIN',1,'2017-02-08 03:13:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(814,'2017-02-08 09:29:12','USER_LOGIN',1,'2017-02-08 13:29:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(815,'2017-02-08 17:33:12','USER_LOGIN',1,'2017-02-08 21:33:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(816,'2017-02-09 17:30:34','USER_LOGIN',1,'2017-02-09 21:30:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(817,'2017-02-10 09:30:02','USER_LOGIN',1,'2017-02-10 13:30:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(818,'2017-02-10 16:16:14','USER_LOGIN',1,'2017-02-10 20:16:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(819,'2017-02-10 17:28:15','USER_LOGIN',1,'2017-02-10 21:28:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(820,'2017-02-11 12:54:03','USER_LOGIN',1,'2017-02-11 16:54:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(821,'2017-02-11 17:23:52','USER_LOGIN',1,'2017-02-11 21:23:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(822,'2017-02-12 12:44:03','USER_LOGIN',1,'2017-02-12 16:44:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(823,'2017-02-12 16:42:13','USER_LOGIN',1,'2017-02-12 20:42:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(824,'2017-02-12 19:14:18','USER_LOGIN',1,'2017-02-12 23:14:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(825,'2017-02-15 17:17:00','USER_LOGIN',1,'2017-02-15 21:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(826,'2017-02-15 22:02:40','USER_LOGIN',1,'2017-02-16 02:02:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(827,'2017-02-16 22:13:27','USER_LOGIN',1,'2017-02-17 02:13:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x619','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(828,'2017-02-16 23:54:04','USER_LOGIN',1,'2017-02-17 03:54:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(829,'2017-02-17 09:14:27','USER_LOGIN',1,'2017-02-17 13:14:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(830,'2017-02-17 12:07:05','USER_LOGIN',1,'2017-02-17 16:07:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(831,'2017-02-19 21:22:20','USER_LOGIN',1,'2017-02-20 01:22:20',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(832,'2017-02-20 09:26:47','USER_LOGIN',1,'2017-02-20 13:26:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(833,'2017-02-20 16:39:55','USER_LOGIN',1,'2017-02-20 20:39:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(834,'2017-02-20 16:49:00','USER_MODIFY',1,'2017-02-20 20:49:00',12,'Modification utilisateur ccommerson','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(835,'2017-02-20 17:57:15','USER_LOGIN',1,'2017-02-20 21:57:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(836,'2017-02-20 19:43:48','USER_LOGIN',1,'2017-02-20 23:43:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(837,'2017-02-21 00:04:05','USER_LOGIN',1,'2017-02-21 04:04:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(838,'2017-02-21 10:23:13','USER_LOGIN',1,'2017-02-21 14:23:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(839,'2017-02-21 10:30:17','USER_LOGOUT',1,'2017-02-21 14:30:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(840,'2017-02-21 10:30:22','USER_LOGIN',1,'2017-02-21 14:30:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(841,'2017-02-21 11:44:05','USER_LOGIN',1,'2017-02-21 15:44:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(842,'2017-05-12 09:02:48','USER_LOGIN',1,'2017-05-12 13:02:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',NULL),(843,'2017-08-27 13:29:16','USER_LOGIN',1,'2017-08-27 17:29:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(844,'2017-08-28 09:11:07','USER_LOGIN',1,'2017-08-28 13:11:07',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(845,'2017-08-28 10:08:58','USER_LOGIN',1,'2017-08-28 14:08:58',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(846,'2017-08-28 10:12:46','USER_MODIFY',1,'2017-08-28 14:12:46',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(847,'2017-08-28 10:28:25','USER_LOGIN',1,'2017-08-28 14:28:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(848,'2017-08-28 10:28:36','USER_LOGOUT',1,'2017-08-28 14:28:36',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(849,'2017-08-28 10:34:50','USER_LOGIN',1,'2017-08-28 14:34:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(850,'2017-08-28 11:59:02','USER_LOGIN',1,'2017-08-28 15:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(851,'2017-08-29 09:57:34','USER_LOGIN',1,'2017-08-29 13:57:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(852,'2017-08-29 11:05:51','USER_LOGIN',1,'2017-08-29 15:05:51',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(853,'2017-08-29 14:15:58','USER_LOGIN',1,'2017-08-29 18:15:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(854,'2017-08-29 17:49:28','USER_LOGIN',1,'2017-08-29 21:49:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(855,'2017-08-30 11:53:25','USER_LOGIN',1,'2017-08-30 15:53:25',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(856,'2017-08-30 12:19:31','USER_MODIFY',1,'2017-08-30 16:19:31',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(857,'2017-08-30 12:19:32','USER_MODIFY',1,'2017-08-30 16:19:32',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(858,'2017-08-30 12:19:33','USER_MODIFY',1,'2017-08-30 16:19:33',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(859,'2017-08-30 12:21:42','USER_LOGOUT',1,'2017-08-30 16:21:42',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(860,'2017-08-30 12:21:48','USER_LOGIN',1,'2017-08-30 16:21:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(861,'2017-08-30 15:02:06','USER_LOGIN',1,'2017-08-30 19:02:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(862,'2017-08-31 09:25:42','USER_LOGIN',1,'2017-08-31 13:25:42',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(863,'2017-09-04 07:51:21','USER_LOGIN',1,'2017-09-04 11:51:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x577','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(864,'2017-09-04 09:17:09','USER_LOGIN',1,'2017-09-04 13:17:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(865,'2017-09-04 13:40:28','USER_LOGIN',1,'2017-09-04 17:40:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(866,'2017-09-06 07:55:30','USER_LOGIN',1,'2017-09-06 11:55:30',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(867,'2017-09-06 07:55:33','USER_LOGOUT',1,'2017-09-06 11:55:33',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(868,'2017-09-06 07:55:38','USER_LOGIN',1,'2017-09-06 11:55:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(869,'2017-09-06 16:03:38','USER_LOGIN',1,'2017-09-06 20:03:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(870,'2017-09-06 19:43:07','USER_LOGIN',1,'2017-09-06 23:43:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(871,'2018-01-19 11:18:08','USER_LOGOUT',1,'2018-01-19 11:18:08',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(872,'2018-01-19 11:18:47','USER_LOGIN',1,'2018-01-19 11:18:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x965','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(873,'2018-01-19 11:21:41','USER_LOGIN',1,'2018-01-19 11:21:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x926','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(874,'2018-01-19 11:24:18','USER_NEW_PASSWORD',1,'2018-01-19 11:24:18',12,'Password change for admin','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(875,'2018-01-19 11:24:18','USER_MODIFY',1,'2018-01-19 11:24:18',12,'User admin modified','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(876,'2018-01-19 11:28:45','USER_LOGOUT',1,'2018-01-19 11:28:45',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(877,'2018-03-16 09:54:15','USER_LOGIN_FAILED',1,'2018-03-16 13:54:15',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL),(878,'2018-03-16 09:54:23','USER_LOGIN',1,'2018-03-16 13:54:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x936','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL),(879,'2019-09-26 11:35:07','USER_MODIFY',1,'2019-09-26 13:35:07',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(880,'2019-09-26 11:35:33','USER_MODIFY',1,'2019-09-26 13:35:33',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(881,'2019-09-26 11:36:33','USER_MODIFY',1,'2019-09-26 13:36:33',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(882,'2019-09-26 11:36:56','USER_MODIFY',1,'2019-09-26 13:36:56',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(883,'2019-09-26 11:37:30','USER_MODIFY',1,'2019-09-26 13:37:30',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(884,'2019-09-26 11:37:56','USER_MODIFY',1,'2019-09-26 13:37:56',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(885,'2019-09-26 11:38:11','USER_MODIFY',1,'2019-09-26 13:38:11',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(886,'2019-09-26 11:38:27','USER_MODIFY',1,'2019-09-26 13:38:27',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(887,'2019-09-26 11:38:48','USER_MODIFY',1,'2019-09-26 13:38:48',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(888,'2019-09-26 11:39:35','USER_MODIFY',1,'2019-09-26 13:39:35',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(889,'2019-09-26 11:41:28','USER_MODIFY',1,'2019-09-26 13:41:28',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(890,'2019-09-26 11:43:27','USER_MODIFY',1,'2019-09-26 13:43:27',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(891,'2019-09-26 11:46:44','USER_MODIFY',1,'2019-09-26 13:46:44',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(892,'2019-09-26 11:46:54','USER_MODIFY',1,'2019-09-26 13:46:54',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(893,'2019-09-26 11:47:08','USER_MODIFY',1,'2019-09-26 13:47:08',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(894,'2019-09-26 11:48:04','USER_MODIFY',1,'2019-09-26 13:48:04',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(895,'2019-09-26 11:48:32','USER_MODIFY',1,'2019-09-26 13:48:32',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(896,'2019-09-26 11:48:49','USER_MODIFY',1,'2019-09-26 13:48:49',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(897,'2019-09-26 11:49:12','USER_MODIFY',1,'2019-09-26 13:49:12',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(898,'2019-09-26 11:49:21','USER_MODIFY',1,'2019-09-26 13:49:21',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(899,'2019-09-26 11:49:28','USER_MODIFY',1,'2019-09-26 13:49:28',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(900,'2019-09-26 11:49:37','USER_MODIFY',1,'2019-09-26 13:49:37',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(901,'2019-09-26 11:49:46','USER_MODIFY',1,'2019-09-26 13:49:46',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(902,'2019-09-26 11:49:57','USER_MODIFY',1,'2019-09-26 13:49:57',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(903,'2019-09-26 11:50:17','USER_MODIFY',1,'2019-09-26 13:50:17',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(904,'2019-09-26 11:50:43','USER_MODIFY',1,'2019-09-26 13:50:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(905,'2019-09-26 11:51:10','USER_MODIFY',1,'2019-09-26 13:51:10',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(906,'2019-09-26 11:51:36','USER_MODIFY',1,'2019-09-26 13:51:36',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(907,'2019-09-26 11:52:16','USER_MODIFY',1,'2019-09-26 13:52:16',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(908,'2019-09-26 11:52:35','USER_MODIFY',1,'2019-09-26 13:52:35',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(909,'2019-09-26 11:52:59','USER_MODIFY',1,'2019-09-26 13:52:59',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(910,'2019-09-26 11:53:28','USER_MODIFY',1,'2019-09-26 13:53:28',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(911,'2019-09-26 11:53:50','USER_MODIFY',1,'2019-09-26 13:53:50',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(912,'2019-09-26 11:54:18','USER_MODIFY',1,'2019-09-26 13:54:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(913,'2019-09-26 11:54:43','USER_MODIFY',1,'2019-09-26 13:54:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(914,'2019-09-26 11:55:09','USER_MODIFY',1,'2019-09-26 13:55:09',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(915,'2019-09-26 11:55:23','USER_MODIFY',1,'2019-09-26 13:55:23',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(916,'2019-09-26 11:55:35','USER_MODIFY',1,'2019-09-26 13:55:35',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(917,'2019-09-26 11:55:58','USER_MODIFY',1,'2019-09-26 13:55:58',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL); +INSERT INTO `llx_events` VALUES (30,'2013-07-18 18:23:06','USER_LOGOUT',1,'2013-07-18 20:23:06',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(31,'2013-07-18 18:23:12','USER_LOGIN_FAILED',1,'2013-07-18 20:23:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(32,'2013-07-18 18:23:17','USER_LOGIN',1,'2013-07-18 20:23:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(33,'2013-07-18 20:10:51','USER_LOGIN_FAILED',1,'2013-07-18 22:10:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(34,'2013-07-18 20:10:55','USER_LOGIN',1,'2013-07-18 22:10:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(35,'2013-07-18 21:18:57','USER_LOGIN',1,'2013-07-18 23:18:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(36,'2013-07-20 10:34:10','USER_LOGIN',1,'2013-07-20 12:34:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(37,'2013-07-20 12:36:44','USER_LOGIN',1,'2013-07-20 14:36:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(38,'2013-07-20 13:20:51','USER_LOGIN_FAILED',1,'2013-07-20 15:20:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(39,'2013-07-20 13:20:54','USER_LOGIN',1,'2013-07-20 15:20:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(40,'2013-07-20 15:03:46','USER_LOGIN_FAILED',1,'2013-07-20 17:03:46',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(41,'2013-07-20 15:03:55','USER_LOGIN',1,'2013-07-20 17:03:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(42,'2013-07-20 18:05:05','USER_LOGIN_FAILED',1,'2013-07-20 20:05:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(43,'2013-07-20 18:05:08','USER_LOGIN',1,'2013-07-20 20:05:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(44,'2013-07-20 21:08:53','USER_LOGIN_FAILED',1,'2013-07-20 23:08:53',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(45,'2013-07-20 21:08:56','USER_LOGIN',1,'2013-07-20 23:08:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(46,'2013-07-21 01:26:12','USER_LOGIN',1,'2013-07-21 03:26:12',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(47,'2013-07-21 22:35:45','USER_LOGIN_FAILED',1,'2013-07-22 00:35:45',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(48,'2013-07-21 22:35:49','USER_LOGIN',1,'2013-07-22 00:35:49',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(49,'2013-07-26 23:09:47','USER_LOGIN_FAILED',1,'2013-07-27 01:09:47',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(50,'2013-07-26 23:09:50','USER_LOGIN',1,'2013-07-27 01:09:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(51,'2013-07-27 17:02:27','USER_LOGIN_FAILED',1,'2013-07-27 19:02:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(52,'2013-07-27 17:02:32','USER_LOGIN',1,'2013-07-27 19:02:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(53,'2013-07-27 23:33:37','USER_LOGIN_FAILED',1,'2013-07-28 01:33:37',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(54,'2013-07-27 23:33:41','USER_LOGIN',1,'2013-07-28 01:33:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(55,'2013-07-28 18:20:36','USER_LOGIN_FAILED',1,'2013-07-28 20:20:36',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(56,'2013-07-28 18:20:38','USER_LOGIN',1,'2013-07-28 20:20:38',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(57,'2013-07-28 20:13:30','USER_LOGIN_FAILED',1,'2013-07-28 22:13:30',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(58,'2013-07-28 20:13:34','USER_LOGIN',1,'2013-07-28 22:13:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(59,'2013-07-28 20:22:51','USER_LOGIN',1,'2013-07-28 22:22:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(60,'2013-07-28 23:05:06','USER_LOGIN',1,'2013-07-29 01:05:06',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(61,'2013-07-29 20:15:50','USER_LOGIN_FAILED',1,'2013-07-29 22:15:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(62,'2013-07-29 20:15:53','USER_LOGIN',1,'2013-07-29 22:15:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(68,'2013-07-29 20:51:01','USER_LOGOUT',1,'2013-07-29 22:51:01',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(69,'2013-07-29 20:51:05','USER_LOGIN',1,'2013-07-29 22:51:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(70,'2013-07-30 08:46:20','USER_LOGIN_FAILED',1,'2013-07-30 10:46:20',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(71,'2013-07-30 08:46:38','USER_LOGIN_FAILED',1,'2013-07-30 10:46:38',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(72,'2013-07-30 08:46:42','USER_LOGIN',1,'2013-07-30 10:46:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(73,'2013-07-30 10:05:12','USER_LOGIN_FAILED',1,'2013-07-30 12:05:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(74,'2013-07-30 10:05:15','USER_LOGIN',1,'2013-07-30 12:05:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(75,'2013-07-30 12:15:46','USER_LOGIN',1,'2013-07-30 14:15:46',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(76,'2013-07-31 22:19:30','USER_LOGIN',1,'2013-08-01 00:19:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(77,'2013-07-31 23:32:52','USER_LOGIN',1,'2013-08-01 01:32:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(78,'2013-08-01 01:24:50','USER_LOGIN_FAILED',1,'2013-08-01 03:24:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(79,'2013-08-01 01:24:54','USER_LOGIN',1,'2013-08-01 03:24:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(80,'2013-08-01 19:31:36','USER_LOGIN_FAILED',1,'2013-08-01 21:31:35',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(81,'2013-08-01 19:31:39','USER_LOGIN',1,'2013-08-01 21:31:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(82,'2013-08-01 20:01:36','USER_LOGIN',1,'2013-08-01 22:01:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(83,'2013-08-01 20:52:54','USER_LOGIN_FAILED',1,'2013-08-01 22:52:54',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(84,'2013-08-01 20:52:58','USER_LOGIN',1,'2013-08-01 22:52:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(85,'2013-08-01 21:17:28','USER_LOGIN_FAILED',1,'2013-08-01 23:17:28',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(86,'2013-08-01 21:17:31','USER_LOGIN',1,'2013-08-01 23:17:31',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(87,'2013-08-04 11:55:17','USER_LOGIN',1,'2013-08-04 13:55:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(88,'2013-08-04 20:19:03','USER_LOGIN_FAILED',1,'2013-08-04 22:19:03',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(89,'2013-08-04 20:19:07','USER_LOGIN',1,'2013-08-04 22:19:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(90,'2013-08-05 17:51:42','USER_LOGIN_FAILED',1,'2013-08-05 19:51:42',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(91,'2013-08-05 17:51:47','USER_LOGIN',1,'2013-08-05 19:51:47',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(92,'2013-08-05 17:56:03','USER_LOGIN',1,'2013-08-05 19:56:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(93,'2013-08-05 17:59:10','USER_LOGIN',1,'2013-08-05 19:59:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(94,'2013-08-05 18:01:58','USER_LOGIN',1,'2013-08-05 20:01:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(95,'2013-08-05 19:59:56','USER_LOGIN',1,'2013-08-05 21:59:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(96,'2013-08-06 18:33:22','USER_LOGIN',1,'2013-08-06 20:33:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(97,'2013-08-07 00:56:59','USER_LOGIN',1,'2013-08-07 02:56:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(98,'2013-08-07 22:49:14','USER_LOGIN',1,'2013-08-08 00:49:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(99,'2013-08-07 23:05:18','USER_LOGOUT',1,'2013-08-08 01:05:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(105,'2013-08-08 00:41:09','USER_LOGIN',1,'2013-08-08 02:41:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(106,'2013-08-08 11:58:55','USER_LOGIN',1,'2013-08-08 13:58:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(107,'2013-08-08 14:35:48','USER_LOGIN',1,'2013-08-08 16:35:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(108,'2013-08-08 14:36:31','USER_LOGOUT',1,'2013-08-08 16:36:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(109,'2013-08-08 14:38:28','USER_LOGIN',1,'2013-08-08 16:38:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(110,'2013-08-08 14:39:02','USER_LOGOUT',1,'2013-08-08 16:39:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(111,'2013-08-08 14:39:10','USER_LOGIN',1,'2013-08-08 16:39:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(112,'2013-08-08 14:39:28','USER_LOGOUT',1,'2013-08-08 16:39:28',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(113,'2013-08-08 14:39:37','USER_LOGIN',1,'2013-08-08 16:39:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(114,'2013-08-08 14:50:02','USER_LOGOUT',1,'2013-08-08 16:50:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(115,'2013-08-08 14:51:45','USER_LOGIN_FAILED',1,'2013-08-08 16:51:45',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(116,'2013-08-08 14:51:52','USER_LOGIN',1,'2013-08-08 16:51:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(117,'2013-08-08 15:09:54','USER_LOGOUT',1,'2013-08-08 17:09:54',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(118,'2013-08-08 15:10:19','USER_LOGIN_FAILED',1,'2013-08-08 17:10:19',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(119,'2013-08-08 15:10:28','USER_LOGIN',1,'2013-08-08 17:10:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(121,'2013-08-08 15:14:58','USER_LOGOUT',1,'2013-08-08 17:14:58',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(122,'2013-08-08 15:15:00','USER_LOGIN_FAILED',1,'2013-08-08 17:15:00',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(123,'2013-08-08 15:17:57','USER_LOGIN',1,'2013-08-08 17:17:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(124,'2013-08-08 15:35:56','USER_LOGOUT',1,'2013-08-08 17:35:56',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(125,'2013-08-08 15:36:05','USER_LOGIN',1,'2013-08-08 17:36:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(126,'2013-08-08 17:32:42','USER_LOGIN',1,'2013-08-08 19:32:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(127,'2014-12-08 13:49:37','USER_LOGOUT',1,'2014-12-08 14:49:37',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(128,'2014-12-08 13:49:42','USER_LOGIN',1,'2014-12-08 14:49:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(129,'2014-12-08 13:50:12','USER_LOGOUT',1,'2014-12-08 14:50:12',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(130,'2014-12-08 13:50:14','USER_LOGIN',1,'2014-12-08 14:50:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(131,'2014-12-08 13:50:17','USER_LOGOUT',1,'2014-12-08 14:50:17',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(132,'2014-12-08 13:52:47','USER_LOGIN',1,'2014-12-08 14:52:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(133,'2014-12-08 13:53:08','USER_MODIFY',1,'2014-12-08 14:53:08',1,'User admin modified','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(134,'2014-12-08 14:08:45','USER_LOGOUT',1,'2014-12-08 15:08:45',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(135,'2014-12-08 14:09:09','USER_LOGIN',1,'2014-12-08 15:09:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(136,'2014-12-08 14:11:43','USER_LOGOUT',1,'2014-12-08 15:11:43',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(137,'2014-12-08 14:11:45','USER_LOGIN',1,'2014-12-08 15:11:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(138,'2014-12-08 14:22:53','USER_LOGOUT',1,'2014-12-08 15:22:53',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(139,'2014-12-08 14:22:54','USER_LOGIN',1,'2014-12-08 15:22:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(140,'2014-12-08 14:23:10','USER_LOGOUT',1,'2014-12-08 15:23:10',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(141,'2014-12-08 14:23:11','USER_LOGIN',1,'2014-12-08 15:23:11',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(142,'2014-12-08 14:23:49','USER_LOGOUT',1,'2014-12-08 15:23:49',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(143,'2014-12-08 14:23:50','USER_LOGIN',1,'2014-12-08 15:23:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(144,'2014-12-08 14:28:08','USER_LOGOUT',1,'2014-12-08 15:28:08',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(145,'2014-12-08 14:35:15','USER_LOGIN',1,'2014-12-08 15:35:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(146,'2014-12-08 14:35:18','USER_LOGOUT',1,'2014-12-08 15:35:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(147,'2014-12-08 14:36:07','USER_LOGIN',1,'2014-12-08 15:36:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(148,'2014-12-08 14:36:09','USER_LOGOUT',1,'2014-12-08 15:36:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(149,'2014-12-08 14:36:41','USER_LOGIN',1,'2014-12-08 15:36:41',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(150,'2014-12-08 15:59:13','USER_LOGIN',1,'2014-12-08 16:59:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(151,'2014-12-09 11:49:52','USER_LOGIN',1,'2014-12-09 12:49:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(152,'2014-12-09 13:46:31','USER_LOGIN',1,'2014-12-09 14:46:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(153,'2014-12-09 19:03:14','USER_LOGIN',1,'2014-12-09 20:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(154,'2014-12-10 00:16:31','USER_LOGIN',1,'2014-12-10 01:16:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(170,'2014-12-11 22:03:31','USER_LOGIN',1,'2014-12-11 23:03:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(171,'2014-12-12 00:32:39','USER_LOGIN',1,'2014-12-12 01:32:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(172,'2014-12-12 10:49:59','USER_LOGIN',1,'2014-12-12 11:49:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(175,'2014-12-12 10:57:40','USER_MODIFY',1,'2014-12-12 11:57:40',1,'Modification utilisateur admin','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(176,'2014-12-12 13:29:15','USER_LOGIN',1,'2014-12-12 14:29:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(177,'2014-12-12 13:30:15','USER_LOGIN',1,'2014-12-12 14:30:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(178,'2014-12-12 13:40:08','USER_LOGOUT',1,'2014-12-12 14:40:08',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(179,'2014-12-12 13:40:10','USER_LOGIN',1,'2014-12-12 14:40:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(180,'2014-12-12 13:40:26','USER_MODIFY',1,'2014-12-12 14:40:26',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(181,'2014-12-12 13:40:34','USER_LOGOUT',1,'2014-12-12 14:40:34',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(182,'2014-12-12 13:42:23','USER_LOGIN',1,'2014-12-12 14:42:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(183,'2014-12-12 13:43:02','USER_NEW_PASSWORD',1,'2014-12-12 14:43:02',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(184,'2014-12-12 13:43:25','USER_LOGOUT',1,'2014-12-12 14:43:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(185,'2014-12-12 13:43:27','USER_LOGIN_FAILED',1,'2014-12-12 14:43:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(186,'2014-12-12 13:43:30','USER_LOGIN',1,'2014-12-12 14:43:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(187,'2014-12-12 14:52:11','USER_LOGIN',1,'2014-12-12 15:52:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(188,'2014-12-12 17:53:00','USER_LOGIN_FAILED',1,'2014-12-12 18:53:00',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(189,'2014-12-12 17:53:07','USER_LOGIN_FAILED',1,'2014-12-12 18:53:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(190,'2014-12-12 17:53:51','USER_NEW_PASSWORD',1,'2014-12-12 18:53:51',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(191,'2014-12-12 17:54:00','USER_LOGIN',1,'2014-12-12 18:54:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(192,'2014-12-12 17:54:10','USER_NEW_PASSWORD',1,'2014-12-12 18:54:10',1,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(193,'2014-12-12 17:54:10','USER_MODIFY',1,'2014-12-12 18:54:10',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(194,'2014-12-12 18:57:09','USER_LOGIN',1,'2014-12-12 19:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(195,'2014-12-12 23:04:08','USER_LOGIN',1,'2014-12-13 00:04:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(196,'2014-12-17 20:03:14','USER_LOGIN',1,'2014-12-17 21:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(197,'2014-12-17 21:18:45','USER_LOGIN',1,'2014-12-17 22:18:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(198,'2014-12-17 22:30:08','USER_LOGIN',1,'2014-12-17 23:30:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(199,'2014-12-18 23:32:03','USER_LOGIN',1,'2014-12-19 00:32:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(200,'2014-12-19 09:38:03','USER_LOGIN',1,'2014-12-19 10:38:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(201,'2014-12-19 11:23:35','USER_LOGIN',1,'2014-12-19 12:23:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(202,'2014-12-19 12:46:22','USER_LOGIN',1,'2014-12-19 13:46:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(214,'2014-12-19 19:11:31','USER_LOGIN',1,'2014-12-19 20:11:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(215,'2014-12-21 16:36:57','USER_LOGIN',1,'2014-12-21 17:36:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(216,'2014-12-21 16:38:43','USER_NEW_PASSWORD',1,'2014-12-21 17:38:43',1,'Changement mot de passe de adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(217,'2014-12-21 16:38:43','USER_MODIFY',1,'2014-12-21 17:38:43',1,'Modification utilisateur adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(218,'2014-12-21 16:38:51','USER_LOGOUT',1,'2014-12-21 17:38:51',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(219,'2014-12-21 16:38:55','USER_LOGIN',1,'2014-12-21 17:38:55',3,'(UserLogged,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(220,'2014-12-21 16:48:18','USER_LOGOUT',1,'2014-12-21 17:48:18',3,'(UserLogoff,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(221,'2014-12-21 16:48:20','USER_LOGIN',1,'2014-12-21 17:48:20',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(222,'2014-12-26 18:28:18','USER_LOGIN',1,'2014-12-26 19:28:18',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(223,'2014-12-26 20:00:24','USER_LOGIN',1,'2014-12-26 21:00:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(224,'2014-12-27 01:10:27','USER_LOGIN',1,'2014-12-27 02:10:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(225,'2014-12-28 19:12:08','USER_LOGIN',1,'2014-12-28 20:12:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(226,'2014-12-28 20:16:58','USER_LOGIN',1,'2014-12-28 21:16:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(227,'2014-12-29 14:35:46','USER_LOGIN',1,'2014-12-29 15:35:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(228,'2014-12-29 14:37:59','USER_LOGOUT',1,'2014-12-29 15:37:59',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(229,'2014-12-29 14:38:00','USER_LOGIN',1,'2014-12-29 15:38:00',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(230,'2014-12-29 17:16:48','USER_LOGIN',1,'2014-12-29 18:16:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(231,'2014-12-31 12:02:59','USER_LOGIN',1,'2014-12-31 13:02:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(232,'2015-01-02 20:32:51','USER_LOGIN',1,'2015-01-02 21:32:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0',NULL),(233,'2015-01-02 20:58:59','USER_LOGIN',1,'2015-01-02 21:58:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(234,'2015-01-03 09:25:07','USER_LOGIN',1,'2015-01-03 10:25:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(235,'2015-01-03 19:39:31','USER_LOGIN',1,'2015-01-03 20:39:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(236,'2015-01-04 22:40:19','USER_LOGIN',1,'2015-01-04 23:40:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(237,'2015-01-05 12:59:59','USER_LOGIN',1,'2015-01-05 13:59:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(238,'2015-01-05 15:28:52','USER_LOGIN',1,'2015-01-05 16:28:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(239,'2015-01-05 17:02:08','USER_LOGIN',1,'2015-01-05 18:02:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(240,'2015-01-06 12:13:33','USER_LOGIN',1,'2015-01-06 13:13:33',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(241,'2015-01-07 01:21:15','USER_LOGIN',1,'2015-01-07 02:21:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(242,'2015-01-07 01:46:31','USER_LOGOUT',1,'2015-01-07 02:46:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(243,'2015-01-07 19:54:50','USER_LOGIN',1,'2015-01-07 20:54:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(244,'2015-01-08 21:55:01','USER_LOGIN',1,'2015-01-08 22:55:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(245,'2015-01-09 11:13:28','USER_LOGIN',1,'2015-01-09 12:13:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(246,'2015-01-10 18:30:46','USER_LOGIN',1,'2015-01-10 19:30:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(247,'2015-01-11 18:03:26','USER_LOGIN',1,'2015-01-11 19:03:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(248,'2015-01-12 11:15:04','USER_LOGIN',1,'2015-01-12 12:15:04',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(249,'2015-01-12 14:42:44','USER_LOGIN',1,'2015-01-12 15:42:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(250,'2015-01-13 12:07:17','USER_LOGIN',1,'2015-01-13 13:07:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(251,'2015-01-13 17:37:58','USER_LOGIN',1,'2015-01-13 18:37:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(252,'2015-01-13 19:24:21','USER_LOGIN',1,'2015-01-13 20:24:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(253,'2015-01-13 19:29:19','USER_LOGOUT',1,'2015-01-13 20:29:19',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(254,'2015-01-13 21:39:39','USER_LOGIN',1,'2015-01-13 22:39:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(255,'2015-01-14 00:52:21','USER_LOGIN',1,'2015-01-14 01:52:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(256,'2015-01-16 11:34:31','USER_LOGIN',1,'2015-01-16 12:34:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(257,'2015-01-16 15:36:21','USER_LOGIN',1,'2015-01-16 16:36:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(258,'2015-01-16 19:17:36','USER_LOGIN',1,'2015-01-16 20:17:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(259,'2015-01-16 19:48:08','GROUP_CREATE',1,'2015-01-16 20:48:08',1,'Création groupe ggg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(260,'2015-01-16 21:48:53','USER_LOGIN',1,'2015-01-16 22:48:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(261,'2015-01-17 19:55:53','USER_LOGIN',1,'2015-01-17 20:55:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(262,'2015-01-18 09:48:01','USER_LOGIN',1,'2015-01-18 10:48:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(263,'2015-01-18 13:22:36','USER_LOGIN',1,'2015-01-18 14:22:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(264,'2015-01-18 16:10:23','USER_LOGIN',1,'2015-01-18 17:10:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(265,'2015-01-18 17:41:40','USER_LOGIN',1,'2015-01-18 18:41:40',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(266,'2015-01-19 14:33:48','USER_LOGIN',1,'2015-01-19 15:33:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(267,'2015-01-19 16:47:43','USER_LOGIN',1,'2015-01-19 17:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(268,'2015-01-19 16:59:43','USER_LOGIN',1,'2015-01-19 17:59:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(269,'2015-01-19 17:00:22','USER_LOGIN',1,'2015-01-19 18:00:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(270,'2015-01-19 17:04:16','USER_LOGOUT',1,'2015-01-19 18:04:16',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(271,'2015-01-19 17:04:18','USER_LOGIN',1,'2015-01-19 18:04:18',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(272,'2015-01-20 00:34:19','USER_LOGIN',1,'2015-01-20 01:34:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(273,'2015-01-21 11:54:17','USER_LOGIN',1,'2015-01-21 12:54:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(274,'2015-01-21 13:48:15','USER_LOGIN',1,'2015-01-21 14:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(275,'2015-01-21 14:30:22','USER_LOGIN',1,'2015-01-21 15:30:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(276,'2015-01-21 15:10:46','USER_LOGIN',1,'2015-01-21 16:10:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(277,'2015-01-21 17:27:43','USER_LOGIN',1,'2015-01-21 18:27:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(278,'2015-01-21 21:48:15','USER_LOGIN',1,'2015-01-21 22:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(279,'2015-01-21 21:50:42','USER_LOGIN',1,'2015-01-21 22:50:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(280,'2015-01-23 09:28:26','USER_LOGIN',1,'2015-01-23 10:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(281,'2015-01-23 13:21:57','USER_LOGIN',1,'2015-01-23 14:21:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(282,'2015-01-23 16:52:00','USER_LOGOUT',1,'2015-01-23 17:52:00',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(283,'2015-01-23 16:52:05','USER_LOGIN_FAILED',1,'2015-01-23 17:52:05',NULL,'Bad value for login or password - login=bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(284,'2015-01-23 16:52:09','USER_LOGIN',1,'2015-01-23 17:52:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(285,'2015-01-23 16:52:27','USER_CREATE',1,'2015-01-23 17:52:27',1,'Création utilisateur aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(286,'2015-01-23 16:52:27','USER_NEW_PASSWORD',1,'2015-01-23 17:52:27',1,'Changement mot de passe de aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(287,'2015-01-23 16:52:37','USER_CREATE',1,'2015-01-23 17:52:37',1,'Création utilisateur bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(288,'2015-01-23 16:52:37','USER_NEW_PASSWORD',1,'2015-01-23 17:52:37',1,'Changement mot de passe de bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(289,'2015-01-23 16:53:15','USER_LOGOUT',1,'2015-01-23 17:53:15',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(290,'2015-01-23 16:53:20','USER_LOGIN',1,'2015-01-23 17:53:20',4,'(UserLogged,aaa)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(291,'2015-01-23 19:16:58','USER_LOGIN',1,'2015-01-23 20:16:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(292,'2015-01-26 10:54:07','USER_LOGIN',1,'2015-01-26 11:54:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(293,'2015-01-29 10:15:36','USER_LOGIN',1,'2015-01-29 11:15:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(294,'2015-01-30 17:42:50','USER_LOGIN',1,'2015-01-30 18:42:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(295,'2015-02-01 08:49:55','USER_LOGIN',1,'2015-02-01 09:49:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(296,'2015-02-01 08:51:57','USER_LOGOUT',1,'2015-02-01 09:51:57',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(297,'2015-02-01 08:52:39','USER_LOGIN',1,'2015-02-01 09:52:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(298,'2015-02-01 21:03:01','USER_LOGIN',1,'2015-02-01 22:03:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(299,'2015-02-10 19:48:39','USER_LOGIN',1,'2015-02-10 20:48:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(300,'2015-02-10 20:46:48','USER_LOGIN',1,'2015-02-10 21:46:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(301,'2015-02-10 21:39:23','USER_LOGIN',1,'2015-02-10 22:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(302,'2015-02-11 19:00:13','USER_LOGIN',1,'2015-02-11 20:00:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(303,'2015-02-11 19:43:44','USER_LOGIN_FAILED',1,'2015-02-11 20:43:44',NULL,'Unknown column \'u.fk_user\' in \'field list\'','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(304,'2015-02-11 19:44:01','USER_LOGIN',1,'2015-02-11 20:44:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(305,'2015-02-12 00:27:35','USER_LOGIN',1,'2015-02-12 01:27:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(306,'2015-02-12 00:27:38','USER_LOGOUT',1,'2015-02-12 01:27:38',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(307,'2015-02-12 00:28:07','USER_LOGIN',1,'2015-02-12 01:28:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(308,'2015-02-12 00:28:09','USER_LOGOUT',1,'2015-02-12 01:28:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(309,'2015-02-12 00:28:26','USER_LOGIN',1,'2015-02-12 01:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(310,'2015-02-12 00:28:30','USER_LOGOUT',1,'2015-02-12 01:28:30',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(311,'2015-02-12 12:42:15','USER_LOGIN',1,'2015-02-12 13:42:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(312,'2015-02-12 13:46:16','USER_LOGIN',1,'2015-02-12 14:46:16',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(313,'2015-02-12 14:54:28','USER_LOGIN',1,'2015-02-12 15:54:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(314,'2015-02-12 16:04:46','USER_LOGIN',1,'2015-02-12 17:04:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(315,'2015-02-13 14:02:43','USER_LOGIN',1,'2015-02-13 15:02:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(316,'2015-02-13 14:48:30','USER_LOGIN',1,'2015-02-13 15:48:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(317,'2015-02-13 17:44:53','USER_LOGIN',1,'2015-02-13 18:44:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(318,'2015-02-15 08:44:36','USER_LOGIN',1,'2015-02-15 09:44:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(319,'2015-02-15 08:53:20','USER_LOGIN',1,'2015-02-15 09:53:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(320,'2015-02-16 19:10:28','USER_LOGIN',1,'2015-02-16 20:10:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(321,'2015-02-16 19:22:40','USER_CREATE',1,'2015-02-16 20:22:40',1,'Création utilisateur aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(322,'2015-02-16 19:22:40','USER_NEW_PASSWORD',1,'2015-02-16 20:22:40',1,'Changement mot de passe de aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(323,'2015-02-16 19:48:15','USER_CREATE',1,'2015-02-16 20:48:15',1,'Création utilisateur zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(324,'2015-02-16 19:48:15','USER_NEW_PASSWORD',1,'2015-02-16 20:48:15',1,'Changement mot de passe de zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(325,'2015-02-16 19:50:08','USER_CREATE',1,'2015-02-16 20:50:08',1,'Création utilisateur zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(326,'2015-02-16 19:50:08','USER_NEW_PASSWORD',1,'2015-02-16 20:50:08',1,'Changement mot de passe de zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(327,'2015-02-16 21:20:03','USER_LOGIN',1,'2015-02-16 22:20:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(328,'2015-02-17 14:30:51','USER_LOGIN',1,'2015-02-17 15:30:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(329,'2015-02-17 17:21:22','USER_LOGIN',1,'2015-02-17 18:21:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(330,'2015-02-17 17:48:43','USER_MODIFY',1,'2015-02-17 18:48:43',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(331,'2015-02-17 17:48:47','USER_MODIFY',1,'2015-02-17 18:48:47',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(332,'2015-02-17 17:48:51','USER_MODIFY',1,'2015-02-17 18:48:51',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(333,'2015-02-17 17:48:56','USER_MODIFY',1,'2015-02-17 18:48:56',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(334,'2015-02-18 22:00:01','USER_LOGIN',1,'2015-02-18 23:00:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(335,'2015-02-19 08:19:52','USER_LOGIN',1,'2015-02-19 09:19:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(336,'2015-02-19 22:00:52','USER_LOGIN',1,'2015-02-19 23:00:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(337,'2015-02-20 09:34:52','USER_LOGIN',1,'2015-02-20 10:34:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(338,'2015-02-20 13:12:28','USER_LOGIN',1,'2015-02-20 14:12:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(339,'2015-02-20 17:19:44','USER_LOGIN',1,'2015-02-20 18:19:44',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(340,'2015-02-20 19:07:21','USER_MODIFY',1,'2015-02-20 20:07:21',1,'Modification utilisateur adupont','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(341,'2015-02-20 19:47:17','USER_LOGIN',1,'2015-02-20 20:47:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(342,'2015-02-20 19:48:01','USER_MODIFY',1,'2015-02-20 20:48:01',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(343,'2015-02-21 08:27:07','USER_LOGIN',1,'2015-02-21 09:27:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(344,'2015-02-23 13:34:13','USER_LOGIN',1,'2015-02-23 14:34:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(345,'2015-02-24 01:06:41','USER_LOGIN_FAILED',1,'2015-02-24 02:06:41',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(346,'2015-02-24 01:06:45','USER_LOGIN_FAILED',1,'2015-02-24 02:06:45',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(347,'2015-02-24 01:06:55','USER_LOGIN_FAILED',1,'2015-02-24 02:06:55',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(348,'2015-02-24 01:07:03','USER_LOGIN_FAILED',1,'2015-02-24 02:07:03',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(349,'2015-02-24 01:07:21','USER_LOGIN_FAILED',1,'2015-02-24 02:07:21',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(350,'2015-02-24 01:08:12','USER_LOGIN_FAILED',1,'2015-02-24 02:08:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(351,'2015-02-24 01:08:42','USER_LOGIN_FAILED',1,'2015-02-24 02:08:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(352,'2015-02-24 01:08:50','USER_LOGIN_FAILED',1,'2015-02-24 02:08:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(353,'2015-02-24 01:09:08','USER_LOGIN_FAILED',1,'2015-02-24 02:09:08',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(354,'2015-02-24 01:09:42','USER_LOGIN_FAILED',1,'2015-02-24 02:09:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(355,'2015-02-24 01:09:50','USER_LOGIN_FAILED',1,'2015-02-24 02:09:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(356,'2015-02-24 01:10:05','USER_LOGIN_FAILED',1,'2015-02-24 02:10:05',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(357,'2015-02-24 01:10:22','USER_LOGIN_FAILED',1,'2015-02-24 02:10:22',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(358,'2015-02-24 01:10:30','USER_LOGIN_FAILED',1,'2015-02-24 02:10:30',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(359,'2015-02-24 01:10:56','USER_LOGIN_FAILED',1,'2015-02-24 02:10:56',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(360,'2015-02-24 01:11:26','USER_LOGIN_FAILED',1,'2015-02-24 02:11:26',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(361,'2015-02-24 01:12:06','USER_LOGIN_FAILED',1,'2015-02-24 02:12:06',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(362,'2015-02-24 01:21:14','USER_LOGIN_FAILED',1,'2015-02-24 02:21:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(363,'2015-02-24 01:21:25','USER_LOGIN_FAILED',1,'2015-02-24 02:21:25',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(364,'2015-02-24 01:21:54','USER_LOGIN_FAILED',1,'2015-02-24 02:21:54',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(365,'2015-02-24 01:22:14','USER_LOGIN_FAILED',1,'2015-02-24 02:22:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(366,'2015-02-24 01:22:37','USER_LOGIN_FAILED',1,'2015-02-24 02:22:37',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(367,'2015-02-24 01:23:01','USER_LOGIN_FAILED',1,'2015-02-24 02:23:01',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(368,'2015-02-24 01:23:39','USER_LOGIN_FAILED',1,'2015-02-24 02:23:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(369,'2015-02-24 01:24:04','USER_LOGIN_FAILED',1,'2015-02-24 02:24:04',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(370,'2015-02-24 01:24:39','USER_LOGIN_FAILED',1,'2015-02-24 02:24:39',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(371,'2015-02-24 01:25:01','USER_LOGIN_FAILED',1,'2015-02-24 02:25:01',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(372,'2015-02-24 01:25:12','USER_LOGIN_FAILED',1,'2015-02-24 02:25:12',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(373,'2015-02-24 01:27:30','USER_LOGIN_FAILED',1,'2015-02-24 02:27:30',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(374,'2015-02-24 01:28:00','USER_LOGIN_FAILED',1,'2015-02-24 02:28:00',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(375,'2015-02-24 01:28:35','USER_LOGIN_FAILED',1,'2015-02-24 02:28:35',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(376,'2015-02-24 01:29:03','USER_LOGIN_FAILED',1,'2015-02-24 02:29:03',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(377,'2015-02-24 01:29:55','USER_LOGIN_FAILED',1,'2015-02-24 02:29:55',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(378,'2015-02-24 01:32:40','USER_LOGIN_FAILED',1,'2015-02-24 02:32:40',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(379,'2015-02-24 01:39:33','USER_LOGIN_FAILED',1,'2015-02-24 02:39:33',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(380,'2015-02-24 01:39:38','USER_LOGIN_FAILED',1,'2015-02-24 02:39:38',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(381,'2015-02-24 01:39:47','USER_LOGIN_FAILED',1,'2015-02-24 02:39:47',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(382,'2015-02-24 01:40:54','USER_LOGIN_FAILED',1,'2015-02-24 02:40:54',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(383,'2015-02-24 01:47:57','USER_LOGIN_FAILED',1,'2015-02-24 02:47:57',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(384,'2015-02-24 01:48:05','USER_LOGIN_FAILED',1,'2015-02-24 02:48:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(385,'2015-02-24 01:48:07','USER_LOGIN_FAILED',1,'2015-02-24 02:48:07',NULL,'Unknown column \'u.lastname\' in \'field list\'','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(386,'2015-02-24 01:48:35','USER_LOGIN',1,'2015-02-24 02:48:35',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(387,'2015-02-24 01:56:32','USER_LOGIN',1,'2015-02-24 02:56:32',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(388,'2015-02-24 02:05:55','USER_LOGOUT',1,'2015-02-24 03:05:55',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(389,'2015-02-24 02:39:52','USER_LOGIN',1,'2015-02-24 03:39:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(390,'2015-02-24 02:51:10','USER_LOGOUT',1,'2015-02-24 03:51:10',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(391,'2015-02-24 12:46:41','USER_LOGIN',1,'2015-02-24 13:46:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(392,'2015-02-24 12:46:52','USER_LOGOUT',1,'2015-02-24 13:46:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(393,'2015-02-24 12:46:56','USER_LOGIN',1,'2015-02-24 13:46:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(394,'2015-02-24 12:47:56','USER_LOGOUT',1,'2015-02-24 13:47:56',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(395,'2015-02-24 12:48:00','USER_LOGIN',1,'2015-02-24 13:48:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(396,'2015-02-24 12:48:11','USER_LOGOUT',1,'2015-02-24 13:48:11',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(397,'2015-02-24 12:48:32','USER_LOGIN',1,'2015-02-24 13:48:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(398,'2015-02-24 12:52:22','USER_LOGOUT',1,'2015-02-24 13:52:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(399,'2015-02-24 12:52:27','USER_LOGIN',1,'2015-02-24 13:52:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(400,'2015-02-24 12:52:54','USER_LOGOUT',1,'2015-02-24 13:52:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(401,'2015-02-24 12:52:59','USER_LOGIN',1,'2015-02-24 13:52:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(402,'2015-02-24 12:55:39','USER_LOGOUT',1,'2015-02-24 13:55:39',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(403,'2015-02-24 12:55:59','USER_LOGIN',1,'2015-02-24 13:55:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(404,'2015-02-24 12:56:07','USER_LOGOUT',1,'2015-02-24 13:56:07',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(405,'2015-02-24 12:56:23','USER_LOGIN',1,'2015-02-24 13:56:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(406,'2015-02-24 12:56:46','USER_LOGOUT',1,'2015-02-24 13:56:46',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(407,'2015-02-24 12:58:30','USER_LOGIN',1,'2015-02-24 13:58:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(408,'2015-02-24 12:58:33','USER_LOGOUT',1,'2015-02-24 13:58:33',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(409,'2015-02-24 12:58:51','USER_LOGIN',1,'2015-02-24 13:58:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(410,'2015-02-24 12:58:58','USER_LOGOUT',1,'2015-02-24 13:58:58',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(411,'2015-02-24 13:18:53','USER_LOGIN',1,'2015-02-24 14:18:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(412,'2015-02-24 13:19:52','USER_LOGOUT',1,'2015-02-24 14:19:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(413,'2015-02-24 15:39:31','USER_LOGIN_FAILED',1,'2015-02-24 16:39:31',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1',NULL,NULL),(414,'2015-02-24 15:42:07','USER_LOGIN',1,'2015-02-24 16:42:07',1,'(UserLogged,admin)','127.0.0.1',NULL,NULL),(415,'2015-02-24 15:42:52','USER_LOGOUT',1,'2015-02-24 16:42:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(416,'2015-02-24 16:04:21','USER_LOGIN',1,'2015-02-24 17:04:21',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(417,'2015-02-24 16:11:28','USER_LOGIN_FAILED',1,'2015-02-24 17:11:28',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(418,'2015-02-24 16:11:37','USER_LOGIN',1,'2015-02-24 17:11:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(419,'2015-02-24 16:36:52','USER_LOGOUT',1,'2015-02-24 17:36:52',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(420,'2015-02-24 16:40:37','USER_LOGIN',1,'2015-02-24 17:40:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(421,'2015-02-24 16:57:16','USER_LOGIN',1,'2015-02-24 17:57:16',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(422,'2015-02-24 17:01:30','USER_LOGOUT',1,'2015-02-24 18:01:30',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(423,'2015-02-24 17:02:33','USER_LOGIN',1,'2015-02-24 18:02:33',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(424,'2015-02-24 17:14:22','USER_LOGOUT',1,'2015-02-24 18:14:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(425,'2015-02-24 17:15:07','USER_LOGIN_FAILED',1,'2015-02-24 18:15:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(426,'2015-02-24 17:15:20','USER_LOGIN',1,'2015-02-24 18:15:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(427,'2015-02-24 17:20:14','USER_LOGIN',1,'2015-02-24 18:20:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(428,'2015-02-24 17:20:51','USER_LOGIN',1,'2015-02-24 18:20:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(429,'2015-02-24 17:20:54','USER_LOGOUT',1,'2015-02-24 18:20:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(430,'2015-02-24 17:21:19','USER_LOGIN',1,'2015-02-24 18:21:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(431,'2015-02-24 17:32:35','USER_LOGIN',1,'2015-02-24 18:32:35',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(432,'2015-02-24 18:28:48','USER_LOGIN',1,'2015-02-24 19:28:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(433,'2015-02-24 18:29:27','USER_LOGOUT',1,'2015-02-24 19:29:27',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(434,'2015-02-24 18:29:32','USER_LOGIN',1,'2015-02-24 19:29:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(435,'2015-02-24 20:13:13','USER_LOGOUT',1,'2015-02-24 21:13:13',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(436,'2015-02-24 20:13:17','USER_LOGIN',1,'2015-02-24 21:13:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(437,'2015-02-25 08:57:16','USER_LOGIN',1,'2015-02-25 09:57:16',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(438,'2015-02-25 08:57:59','USER_LOGOUT',1,'2015-02-25 09:57:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(439,'2015-02-25 09:15:02','USER_LOGIN',1,'2015-02-25 10:15:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(440,'2015-02-25 09:15:50','USER_LOGOUT',1,'2015-02-25 10:15:50',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(441,'2015-02-25 09:15:57','USER_LOGIN',1,'2015-02-25 10:15:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(442,'2015-02-25 09:16:12','USER_LOGOUT',1,'2015-02-25 10:16:12',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(443,'2015-02-25 09:16:19','USER_LOGIN',1,'2015-02-25 10:16:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(444,'2015-02-25 09:16:25','USER_LOGOUT',1,'2015-02-25 10:16:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(445,'2015-02-25 09:16:39','USER_LOGIN_FAILED',1,'2015-02-25 10:16:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(446,'2015-02-25 09:16:42','USER_LOGIN_FAILED',1,'2015-02-25 10:16:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(447,'2015-02-25 09:16:54','USER_LOGIN_FAILED',1,'2015-02-25 10:16:54',NULL,'Identificadors d'usuari o contrasenya incorrectes - login=gfdg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(448,'2015-02-25 09:17:53','USER_LOGIN',1,'2015-02-25 10:17:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(449,'2015-02-25 09:18:37','USER_LOGOUT',1,'2015-02-25 10:18:37',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(450,'2015-02-25 09:18:41','USER_LOGIN',1,'2015-02-25 10:18:41',4,'(UserLogged,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(451,'2015-02-25 09:18:47','USER_LOGOUT',1,'2015-02-25 10:18:47',4,'(UserLogoff,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(452,'2015-02-25 10:05:34','USER_LOGIN',1,'2015-02-25 11:05:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(453,'2015-02-26 21:51:40','USER_LOGIN',1,'2015-02-26 22:51:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(454,'2015-02-26 23:30:06','USER_LOGIN',1,'2015-02-27 00:30:06',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(455,'2015-02-27 14:13:11','USER_LOGIN',1,'2015-02-27 15:13:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(456,'2015-02-27 18:12:06','USER_LOGIN_FAILED',1,'2015-02-27 19:12:06',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(457,'2015-02-27 18:12:10','USER_LOGIN',1,'2015-02-27 19:12:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(458,'2015-02-27 20:20:08','USER_LOGIN',1,'2015-02-27 21:20:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(459,'2015-03-01 22:12:03','USER_LOGIN',1,'2015-03-01 23:12:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(460,'2015-03-02 11:45:50','USER_LOGIN',1,'2015-03-02 12:45:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(461,'2015-03-02 15:53:51','USER_LOGIN_FAILED',1,'2015-03-02 16:53:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(462,'2015-03-02 15:53:53','USER_LOGIN',1,'2015-03-02 16:53:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(463,'2015-03-02 18:32:32','USER_LOGIN',1,'2015-03-02 19:32:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(464,'2015-03-02 22:59:36','USER_LOGIN',1,'2015-03-02 23:59:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(465,'2015-03-03 16:26:26','USER_LOGIN',1,'2015-03-03 17:26:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(466,'2015-03-03 22:50:27','USER_LOGIN',1,'2015-03-03 23:50:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(467,'2015-03-04 08:29:27','USER_LOGIN',1,'2015-03-04 09:29:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(468,'2015-03-04 18:27:28','USER_LOGIN',1,'2015-03-04 19:27:28',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; NP06)',NULL),(469,'2015-03-04 19:27:23','USER_LOGIN',1,'2015-03-04 20:27:23',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',NULL),(470,'2015-03-04 19:35:14','USER_LOGIN',1,'2015-03-04 20:35:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(471,'2015-03-04 19:55:49','USER_LOGIN',1,'2015-03-04 20:55:49',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',NULL),(472,'2015-03-04 21:16:13','USER_LOGIN',1,'2015-03-04 22:16:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(473,'2015-03-05 10:17:30','USER_LOGIN',1,'2015-03-05 11:17:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(474,'2015-03-05 11:02:43','USER_LOGIN',1,'2015-03-05 12:02:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(475,'2015-03-05 23:14:39','USER_LOGIN',1,'2015-03-06 00:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(476,'2015-03-06 08:58:57','USER_LOGIN',1,'2015-03-06 09:58:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(477,'2015-03-06 14:29:40','USER_LOGIN',1,'2015-03-06 15:29:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(478,'2015-03-06 21:53:02','USER_LOGIN',1,'2015-03-06 22:53:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(479,'2015-03-07 21:14:39','USER_LOGIN',1,'2015-03-07 22:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(480,'2015-03-08 00:06:05','USER_LOGIN',1,'2015-03-08 01:06:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(481,'2015-03-08 01:38:13','USER_LOGIN',1,'2015-03-08 02:38:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(482,'2015-03-08 08:59:50','USER_LOGIN',1,'2015-03-08 09:59:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(483,'2015-03-09 12:08:51','USER_LOGIN',1,'2015-03-09 13:08:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(484,'2015-03-09 15:19:53','USER_LOGIN',1,'2015-03-09 16:19:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(495,'2015-03-09 18:06:21','USER_LOGIN',1,'2015-03-09 19:06:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(496,'2015-03-09 20:01:24','USER_LOGIN',1,'2015-03-09 21:01:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(497,'2015-03-09 23:36:45','USER_LOGIN',1,'2015-03-10 00:36:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(498,'2015-03-10 14:37:13','USER_LOGIN',1,'2015-03-10 15:37:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(499,'2015-03-10 17:54:12','USER_LOGIN',1,'2015-03-10 18:54:12',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(500,'2015-03-11 08:57:09','USER_LOGIN',1,'2015-03-11 09:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(501,'2015-03-11 22:05:13','USER_LOGIN',1,'2015-03-11 23:05:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(502,'2015-03-12 08:34:27','USER_LOGIN',1,'2015-03-12 09:34:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(503,'2015-03-13 09:11:02','USER_LOGIN',1,'2015-03-13 10:11:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(504,'2015-03-13 10:02:11','USER_LOGIN',1,'2015-03-13 11:02:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(505,'2015-03-13 13:20:58','USER_LOGIN',1,'2015-03-13 14:20:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(506,'2015-03-13 16:19:28','USER_LOGIN',1,'2015-03-13 17:19:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(507,'2015-03-13 18:34:30','USER_LOGIN',1,'2015-03-13 19:34:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(508,'2015-03-14 08:25:02','USER_LOGIN',1,'2015-03-14 09:25:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(509,'2015-03-14 19:15:22','USER_LOGIN',1,'2015-03-14 20:15:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(510,'2015-03-14 21:58:53','USER_LOGIN',1,'2015-03-14 22:58:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(511,'2015-03-14 21:58:59','USER_LOGOUT',1,'2015-03-14 22:58:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(512,'2015-03-14 21:59:07','USER_LOGIN',1,'2015-03-14 22:59:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(513,'2015-03-14 22:58:22','USER_LOGOUT',1,'2015-03-14 23:58:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(514,'2015-03-14 23:00:25','USER_LOGIN',1,'2015-03-15 00:00:25',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(515,'2015-03-16 12:14:28','USER_LOGIN',1,'2015-03-16 13:14:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(516,'2015-03-16 16:09:01','USER_LOGIN',1,'2015-03-16 17:09:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(517,'2015-03-16 16:57:11','USER_LOGIN',1,'2015-03-16 17:57:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(518,'2015-03-16 19:31:31','USER_LOGIN',1,'2015-03-16 20:31:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(519,'2015-03-17 17:44:39','USER_LOGIN',1,'2015-03-17 18:44:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(520,'2015-03-17 20:40:57','USER_LOGIN',1,'2015-03-17 21:40:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(521,'2015-03-17 23:14:05','USER_LOGIN',1,'2015-03-18 00:14:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(522,'2015-03-17 23:28:47','USER_LOGOUT',1,'2015-03-18 00:28:47',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(523,'2015-03-17 23:28:54','USER_LOGIN',1,'2015-03-18 00:28:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(524,'2015-03-18 17:37:30','USER_LOGIN',1,'2015-03-18 18:37:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(525,'2015-03-18 18:11:37','USER_LOGIN',1,'2015-03-18 19:11:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(526,'2015-03-19 08:35:08','USER_LOGIN',1,'2015-03-19 09:35:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(527,'2015-03-19 09:20:23','USER_LOGIN',1,'2015-03-19 10:20:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(528,'2015-03-20 13:17:13','USER_LOGIN',1,'2015-03-20 14:17:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(529,'2015-03-20 14:44:31','USER_LOGIN',1,'2015-03-20 15:44:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(530,'2015-03-20 18:24:25','USER_LOGIN',1,'2015-03-20 19:24:25',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(531,'2015-03-20 19:15:54','USER_LOGIN',1,'2015-03-20 20:15:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(532,'2015-03-21 18:40:47','USER_LOGIN',1,'2015-03-21 19:40:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(533,'2015-03-21 21:42:24','USER_LOGIN',1,'2015-03-21 22:42:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(534,'2015-03-22 08:39:23','USER_LOGIN',1,'2015-03-22 09:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(535,'2015-03-23 13:04:55','USER_LOGIN',1,'2015-03-23 14:04:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(536,'2015-03-23 15:47:43','USER_LOGIN',1,'2015-03-23 16:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(537,'2015-03-23 22:56:36','USER_LOGIN',1,'2015-03-23 23:56:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(538,'2015-03-24 01:22:32','USER_LOGIN',1,'2015-03-24 02:22:32',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(539,'2015-03-24 14:40:42','USER_LOGIN',1,'2015-03-24 15:40:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(540,'2015-03-24 15:30:26','USER_LOGOUT',1,'2015-03-24 16:30:26',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(541,'2015-03-24 15:30:29','USER_LOGIN',1,'2015-03-24 16:30:29',2,'(UserLogged,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(542,'2015-03-24 15:49:40','USER_LOGOUT',1,'2015-03-24 16:49:40',2,'(UserLogoff,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(543,'2015-03-24 15:49:48','USER_LOGIN',1,'2015-03-24 16:49:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(544,'2015-03-24 15:52:35','USER_MODIFY',1,'2015-03-24 16:52:35',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(545,'2015-03-24 15:52:52','USER_MODIFY',1,'2015-03-24 16:52:52',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(546,'2015-03-24 15:53:09','USER_MODIFY',1,'2015-03-24 16:53:09',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(547,'2015-03-24 15:53:23','USER_MODIFY',1,'2015-03-24 16:53:23',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(548,'2015-03-24 16:00:04','USER_MODIFY',1,'2015-03-24 17:00:04',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(549,'2015-03-24 16:01:50','USER_MODIFY',1,'2015-03-24 17:01:50',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(550,'2015-03-24 16:10:14','USER_MODIFY',1,'2015-03-24 17:10:14',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(551,'2015-03-24 16:55:13','USER_LOGIN',1,'2015-03-24 17:55:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(552,'2015-03-24 17:44:29','USER_LOGIN',1,'2015-03-24 18:44:29',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(553,'2015-09-08 23:06:26','USER_LOGIN',1,'2015-09-09 01:06:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36',NULL),(554,'2015-10-21 22:32:28','USER_LOGIN',1,'2015-10-22 00:32:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(555,'2015-10-21 22:32:48','USER_LOGIN',1,'2015-10-22 00:32:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(556,'2015-11-07 00:01:51','USER_LOGIN',1,'2015-11-07 01:01:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',NULL),(557,'2016-03-02 15:21:07','USER_LOGIN',1,'2016-03-02 16:21:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(558,'2016-03-02 15:36:53','USER_LOGIN',1,'2016-03-02 16:36:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(559,'2016-03-02 18:54:23','USER_LOGIN',1,'2016-03-02 19:54:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(560,'2016-03-02 19:11:17','USER_LOGIN',1,'2016-03-02 20:11:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(561,'2016-03-03 18:19:24','USER_LOGIN',1,'2016-03-03 19:19:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(562,'2016-12-21 12:51:38','USER_LOGIN',1,'2016-12-21 13:51:38',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(563,'2016-12-21 19:52:09','USER_LOGIN',1,'2016-12-21 20:52:09',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(566,'2017-10-03 08:49:43','USER_NEW_PASSWORD',1,'2017-10-03 10:49:43',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(567,'2017-10-03 08:49:43','USER_MODIFY',1,'2017-10-03 10:49:43',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(568,'2017-10-03 09:03:12','USER_MODIFY',1,'2017-10-03 11:03:12',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(569,'2017-10-03 09:03:42','USER_MODIFY',1,'2017-10-03 11:03:42',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(570,'2017-10-03 09:07:36','USER_MODIFY',1,'2017-10-03 11:07:36',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(571,'2017-10-03 09:08:58','USER_NEW_PASSWORD',1,'2017-10-03 11:08:58',1,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(572,'2017-10-03 09:08:58','USER_MODIFY',1,'2017-10-03 11:08:58',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(573,'2017-10-03 09:09:23','USER_MODIFY',1,'2017-10-03 11:09:23',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(574,'2017-10-03 09:11:04','USER_NEW_PASSWORD',1,'2017-10-03 11:11:04',1,'Password change for athestudent','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(575,'2017-10-03 09:11:04','USER_MODIFY',1,'2017-10-03 11:11:04',1,'User athestudent modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(576,'2017-10-03 09:11:53','USER_MODIFY',1,'2017-10-03 11:11:53',1,'User abookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(577,'2017-10-03 09:42:12','USER_LOGIN_FAILED',1,'2017-10-03 11:42:11',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(578,'2017-10-03 09:42:19','USER_LOGIN_FAILED',1,'2017-10-03 11:42:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(579,'2017-10-03 09:42:42','USER_LOGIN_FAILED',1,'2017-10-03 11:42:42',NULL,'Bad value for login or password - login=aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(580,'2017-10-03 09:43:50','USER_LOGIN',1,'2017-10-03 11:43:50',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x788','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(581,'2017-10-03 09:44:44','GROUP_MODIFY',1,'2017-10-03 11:44:44',1,'Group Sale representatives modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(582,'2017-10-03 09:46:25','GROUP_CREATE',1,'2017-10-03 11:46:25',1,'Group Management created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(583,'2017-10-03 09:46:46','GROUP_CREATE',1,'2017-10-03 11:46:46',1,'Group Scientists created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(584,'2017-10-03 09:47:41','USER_CREATE',1,'2017-10-03 11:47:41',1,'User mcurie created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(585,'2017-10-03 09:47:41','USER_NEW_PASSWORD',1,'2017-10-03 11:47:41',1,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(586,'2017-10-03 09:47:53','USER_MODIFY',1,'2017-10-03 11:47:53',1,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(587,'2017-10-03 09:48:32','USER_DELETE',1,'2017-10-03 11:48:32',1,'User bbb removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(588,'2017-10-03 09:48:52','USER_MODIFY',1,'2017-10-03 11:48:52',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(589,'2017-10-03 10:01:28','USER_MODIFY',1,'2017-10-03 12:01:28',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(590,'2017-10-03 10:01:39','USER_MODIFY',1,'2017-10-03 12:01:39',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(591,'2017-10-05 06:32:38','USER_LOGIN_FAILED',1,'2017-10-05 08:32:38',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(592,'2017-10-05 06:32:44','USER_LOGIN',1,'2017-10-05 08:32:44',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(593,'2017-10-05 07:07:52','USER_CREATE',1,'2017-10-05 09:07:52',1,'User atheceo created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(594,'2017-10-05 07:07:52','USER_NEW_PASSWORD',1,'2017-10-05 09:07:52',1,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(595,'2017-10-05 07:09:08','USER_NEW_PASSWORD',1,'2017-10-05 09:09:08',1,'Password change for aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(596,'2017-10-05 07:09:08','USER_MODIFY',1,'2017-10-05 09:09:08',1,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(597,'2017-10-05 07:09:46','USER_CREATE',1,'2017-10-05 09:09:46',1,'User admin created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(598,'2017-10-05 07:09:46','USER_NEW_PASSWORD',1,'2017-10-05 09:09:46',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(599,'2017-10-05 07:10:20','USER_MODIFY',1,'2017-10-05 09:10:20',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(600,'2017-10-05 07:10:48','USER_MODIFY',1,'2017-10-05 09:10:48',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(601,'2017-10-05 07:11:22','USER_NEW_PASSWORD',1,'2017-10-05 09:11:22',1,'Password change for bbookkeeper','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(602,'2017-10-05 07:11:22','USER_MODIFY',1,'2017-10-05 09:11:22',1,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(603,'2017-10-05 07:12:37','USER_MODIFY',1,'2017-10-05 09:12:37',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(604,'2017-10-05 07:13:27','USER_MODIFY',1,'2017-10-05 09:13:27',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(605,'2017-10-05 07:13:52','USER_MODIFY',1,'2017-10-05 09:13:52',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(606,'2017-10-05 07:14:35','USER_LOGOUT',1,'2017-10-05 09:14:35',1,'(UserLogoff,aeinstein)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(607,'2017-10-05 07:14:40','USER_LOGIN_FAILED',1,'2017-10-05 09:14:40',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(608,'2017-10-05 07:14:44','USER_LOGIN_FAILED',1,'2017-10-05 09:14:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(609,'2017-10-05 07:14:49','USER_LOGIN',1,'2017-10-05 09:14:49',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(610,'2017-10-05 07:57:18','USER_MODIFY',1,'2017-10-05 09:57:18',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(611,'2017-10-05 08:06:54','USER_LOGOUT',1,'2017-10-05 10:06:54',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(612,'2017-10-05 08:07:03','USER_LOGIN',1,'2017-10-05 10:07:03',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(613,'2017-10-05 19:18:46','USER_LOGIN',1,'2017-10-05 21:18:46',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(614,'2017-10-05 19:29:35','USER_CREATE',1,'2017-10-05 21:29:35',11,'User ccommercy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(615,'2017-10-05 19:29:35','USER_NEW_PASSWORD',1,'2017-10-05 21:29:35',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(616,'2017-10-05 19:30:13','GROUP_CREATE',1,'2017-10-05 21:30:13',11,'Group Commercial created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(617,'2017-10-05 19:31:37','USER_NEW_PASSWORD',1,'2017-10-05 21:31:37',11,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(618,'2017-10-05 19:31:37','USER_MODIFY',1,'2017-10-05 21:31:37',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(619,'2017-10-05 19:32:00','USER_MODIFY',1,'2017-10-05 21:32:00',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(620,'2017-10-05 19:33:33','USER_CREATE',1,'2017-10-05 21:33:33',11,'User sscientol created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(621,'2017-10-05 19:33:33','USER_NEW_PASSWORD',1,'2017-10-05 21:33:33',11,'Password change for sscientol','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(622,'2017-10-05 19:33:47','USER_NEW_PASSWORD',1,'2017-10-05 21:33:47',11,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(623,'2017-10-05 19:33:47','USER_MODIFY',1,'2017-10-05 21:33:47',11,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(624,'2017-10-05 19:34:23','USER_NEW_PASSWORD',1,'2017-10-05 21:34:23',11,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(625,'2017-10-05 19:34:23','USER_MODIFY',1,'2017-10-05 21:34:23',11,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(626,'2017-10-05 19:34:42','USER_MODIFY',1,'2017-10-05 21:34:42',11,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(627,'2017-10-05 19:36:06','USER_NEW_PASSWORD',1,'2017-10-05 21:36:06',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(628,'2017-10-05 19:36:06','USER_MODIFY',1,'2017-10-05 21:36:06',11,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(629,'2017-10-05 19:36:57','USER_NEW_PASSWORD',1,'2017-10-05 21:36:57',11,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(630,'2017-10-05 19:36:57','USER_MODIFY',1,'2017-10-05 21:36:57',11,'User atheceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(631,'2017-10-05 19:37:27','USER_LOGOUT',1,'2017-10-05 21:37:27',11,'(UserLogoff,atheceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(632,'2017-10-05 19:37:35','USER_LOGIN_FAILED',1,'2017-10-05 21:37:35',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(633,'2017-10-05 19:37:39','USER_LOGIN_FAILED',1,'2017-10-05 21:37:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(634,'2017-10-05 19:37:44','USER_LOGIN_FAILED',1,'2017-10-05 21:37:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(635,'2017-10-05 19:37:49','USER_LOGIN_FAILED',1,'2017-10-05 21:37:49',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(636,'2017-10-05 19:38:12','USER_LOGIN_FAILED',1,'2017-10-05 21:38:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(637,'2017-10-05 19:40:48','USER_LOGIN_FAILED',1,'2017-10-05 21:40:48',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(638,'2017-10-05 19:40:55','USER_LOGIN',1,'2017-10-05 21:40:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(639,'2017-10-05 19:43:34','USER_MODIFY',1,'2017-10-05 21:43:34',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(640,'2017-10-05 19:45:43','USER_CREATE',1,'2017-10-05 21:45:43',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(641,'2017-10-05 19:45:43','USER_NEW_PASSWORD',1,'2017-10-05 21:45:43',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(642,'2017-10-05 19:46:18','USER_DELETE',1,'2017-10-05 21:46:18',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(643,'2017-10-05 19:47:09','USER_MODIFY',1,'2017-10-05 21:47:09',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(644,'2017-10-05 19:47:22','USER_MODIFY',1,'2017-10-05 21:47:22',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(645,'2017-10-05 19:52:05','USER_MODIFY',1,'2017-10-05 21:52:05',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(646,'2017-10-05 19:52:23','USER_MODIFY',1,'2017-10-05 21:52:23',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(647,'2017-10-05 19:54:54','USER_NEW_PASSWORD',1,'2017-10-05 21:54:54',12,'Password change for zzeceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(648,'2017-10-05 19:54:54','USER_MODIFY',1,'2017-10-05 21:54:54',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(649,'2017-10-05 19:57:02','USER_MODIFY',1,'2017-10-05 21:57:02',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(650,'2017-10-05 19:57:57','USER_NEW_PASSWORD',1,'2017-10-05 21:57:57',12,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(651,'2017-10-05 19:57:57','USER_MODIFY',1,'2017-10-05 21:57:57',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(652,'2017-10-05 19:59:42','USER_NEW_PASSWORD',1,'2017-10-05 21:59:42',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(653,'2017-10-05 19:59:42','USER_MODIFY',1,'2017-10-05 21:59:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(654,'2017-10-05 20:00:21','USER_MODIFY',1,'2017-10-05 22:00:21',12,'User adminx modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(655,'2017-10-05 20:05:36','USER_MODIFY',1,'2017-10-05 22:05:36',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(656,'2017-10-05 20:06:25','USER_MODIFY',1,'2017-10-05 22:06:25',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(657,'2017-10-05 20:07:18','USER_MODIFY',1,'2017-10-05 22:07:18',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(658,'2017-10-05 20:07:36','USER_MODIFY',1,'2017-10-05 22:07:36',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(659,'2017-10-05 20:08:34','USER_MODIFY',1,'2017-10-05 22:08:34',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(660,'2017-10-05 20:47:52','USER_CREATE',1,'2017-10-05 22:47:52',12,'User cc1 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(661,'2017-10-05 20:47:52','USER_NEW_PASSWORD',1,'2017-10-05 22:47:52',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(662,'2017-10-05 20:47:55','USER_LOGOUT',1,'2017-10-05 22:47:55',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(663,'2017-10-05 20:48:08','USER_LOGIN',1,'2017-10-05 22:48:08',11,'(UserLogged,zzeceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x434','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(664,'2017-10-05 20:48:39','USER_CREATE',1,'2017-10-05 22:48:39',11,'User cc2 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(665,'2017-10-05 20:48:39','USER_NEW_PASSWORD',1,'2017-10-05 22:48:39',11,'Password change for cc2','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(666,'2017-10-05 20:48:59','USER_NEW_PASSWORD',1,'2017-10-05 22:48:59',11,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(667,'2017-10-05 20:48:59','USER_MODIFY',1,'2017-10-05 22:48:59',11,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(668,'2017-10-05 21:06:36','USER_LOGOUT',1,'2017-10-05 23:06:35',11,'(UserLogoff,zzeceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(669,'2017-10-05 21:06:44','USER_LOGIN_FAILED',1,'2017-10-05 23:06:44',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(670,'2017-10-05 21:07:12','USER_LOGIN_FAILED',1,'2017-10-05 23:07:12',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(671,'2017-10-05 21:07:19','USER_LOGIN_FAILED',1,'2017-10-05 23:07:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(672,'2017-10-05 21:07:27','USER_LOGIN_FAILED',1,'2017-10-05 23:07:27',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(673,'2017-10-05 21:07:32','USER_LOGIN',1,'2017-10-05 23:07:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(674,'2017-10-05 21:12:28','USER_NEW_PASSWORD',1,'2017-10-05 23:12:28',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(675,'2017-10-05 21:12:28','USER_MODIFY',1,'2017-10-05 23:12:28',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(676,'2017-10-05 21:13:00','USER_CREATE',1,'2017-10-05 23:13:00',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(677,'2017-10-05 21:13:00','USER_NEW_PASSWORD',1,'2017-10-05 23:13:00',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(678,'2017-10-05 21:13:40','USER_DELETE',1,'2017-10-05 23:13:40',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(679,'2017-10-05 21:14:47','USER_LOGOUT',1,'2017-10-05 23:14:47',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(680,'2017-10-05 21:14:56','USER_LOGIN',1,'2017-10-05 23:14:56',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(681,'2017-10-05 21:15:56','USER_LOGOUT',1,'2017-10-05 23:15:56',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(682,'2017-10-05 21:16:06','USER_LOGIN',1,'2017-10-05 23:16:06',17,'(UserLogged,cc2) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(683,'2017-10-05 21:37:25','USER_LOGOUT',1,'2017-10-05 23:37:25',17,'(UserLogoff,cc2)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(684,'2017-10-05 21:37:31','USER_LOGIN',1,'2017-10-05 23:37:31',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(685,'2017-10-05 21:43:53','USER_LOGOUT',1,'2017-10-05 23:43:53',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(686,'2017-10-05 21:44:00','USER_LOGIN',1,'2017-10-05 23:44:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(687,'2017-10-05 21:46:17','USER_LOGOUT',1,'2017-10-05 23:46:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(688,'2017-10-05 21:46:24','USER_LOGIN',1,'2017-10-05 23:46:24',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(689,'2017-11-04 15:17:06','USER_LOGIN',1,'2017-11-04 16:17:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(690,'2017-11-15 22:04:04','USER_LOGIN',1,'2017-11-15 23:04:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(691,'2017-11-15 22:23:45','USER_MODIFY',1,'2017-11-15 23:23:45',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(692,'2017-11-15 22:24:22','USER_MODIFY',1,'2017-11-15 23:24:22',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(693,'2017-11-15 22:24:53','USER_MODIFY',1,'2017-11-15 23:24:53',12,'User cc2 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(694,'2017-11-15 22:25:17','USER_MODIFY',1,'2017-11-15 23:25:17',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(695,'2017-11-15 22:45:37','USER_LOGOUT',1,'2017-11-15 23:45:37',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(696,'2017-11-18 13:41:02','USER_LOGIN',1,'2017-11-18 14:41:02',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(697,'2017-11-18 14:23:35','USER_LOGIN',1,'2017-11-18 15:23:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(698,'2017-11-18 15:15:46','USER_LOGOUT',1,'2017-11-18 16:15:46',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(699,'2017-11-18 15:15:51','USER_LOGIN',1,'2017-11-18 16:15:51',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(700,'2017-11-30 17:52:08','USER_LOGIN',1,'2017-11-30 18:52:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(701,'2018-01-10 16:45:43','USER_LOGIN',1,'2018-01-10 17:45:43',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(702,'2018-01-10 16:45:52','USER_LOGOUT',1,'2018-01-10 17:45:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(703,'2018-01-10 16:46:06','USER_LOGIN',1,'2018-01-10 17:46:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(704,'2018-01-16 14:53:47','USER_LOGIN',1,'2018-01-16 15:53:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(705,'2018-01-16 15:04:29','USER_LOGOUT',1,'2018-01-16 16:04:29',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(706,'2018-01-16 15:04:40','USER_LOGIN',1,'2018-01-16 16:04:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(707,'2018-01-22 09:33:26','USER_LOGIN',1,'2018-01-22 10:33:26',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(708,'2018-01-22 09:35:19','USER_LOGOUT',1,'2018-01-22 10:35:19',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(709,'2018-01-22 09:35:29','USER_LOGIN',1,'2018-01-22 10:35:29',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(710,'2018-01-22 10:47:34','USER_CREATE',1,'2018-01-22 11:47:34',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(711,'2018-01-22 10:47:34','USER_NEW_PASSWORD',1,'2018-01-22 11:47:34',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(712,'2018-01-22 12:07:56','USER_LOGIN',1,'2018-01-22 13:07:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(713,'2018-01-22 12:36:25','USER_NEW_PASSWORD',1,'2018-01-22 13:36:25',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(714,'2018-01-22 12:36:25','USER_MODIFY',1,'2018-01-22 13:36:25',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(715,'2018-01-22 12:56:32','USER_MODIFY',1,'2018-01-22 13:56:32',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(716,'2018-01-22 12:58:05','USER_MODIFY',1,'2018-01-22 13:58:05',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(717,'2018-01-22 13:01:02','USER_MODIFY',1,'2018-01-22 14:01:02',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(718,'2018-01-22 13:01:18','USER_MODIFY',1,'2018-01-22 14:01:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(719,'2018-01-22 13:13:42','USER_MODIFY',1,'2018-01-22 14:13:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(720,'2018-01-22 13:15:20','USER_DELETE',1,'2018-01-22 14:15:20',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(721,'2018-01-22 13:19:21','USER_LOGOUT',1,'2018-01-22 14:19:21',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(722,'2018-01-22 13:19:32','USER_LOGIN',1,'2018-01-22 14:19:32',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(723,'2018-01-22 13:19:51','USER_LOGOUT',1,'2018-01-22 14:19:51',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(724,'2018-01-22 13:20:01','USER_LOGIN',1,'2018-01-22 14:20:01',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(725,'2018-01-22 13:28:22','USER_LOGOUT',1,'2018-01-22 14:28:22',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(726,'2018-01-22 13:28:35','USER_LOGIN',1,'2018-01-22 14:28:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(727,'2018-01-22 13:33:54','USER_LOGOUT',1,'2018-01-22 14:33:54',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(728,'2018-01-22 13:34:05','USER_LOGIN',1,'2018-01-22 14:34:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(729,'2018-01-22 13:51:46','USER_MODIFY',1,'2018-01-22 14:51:46',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(730,'2018-01-22 16:20:12','USER_LOGIN',1,'2018-01-22 17:20:12',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(731,'2018-01-22 16:20:22','USER_LOGOUT',1,'2018-01-22 17:20:22',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(732,'2018-01-22 16:20:36','USER_LOGIN',1,'2018-01-22 17:20:36',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(733,'2018-01-22 16:27:02','USER_CREATE',1,'2018-01-22 17:27:02',12,'User ldestailleur created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(734,'2018-01-22 16:27:02','USER_NEW_PASSWORD',1,'2018-01-22 17:27:02',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(735,'2018-01-22 16:28:34','USER_MODIFY',1,'2018-01-22 17:28:34',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(736,'2018-01-22 16:30:01','USER_ENABLEDISABLE',1,'2018-01-22 17:30:01',12,'User cc2 activated','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(737,'2018-01-22 17:11:06','USER_LOGIN',1,'2018-01-22 18:11:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(738,'2018-01-22 18:00:02','USER_DELETE',1,'2018-01-22 19:00:02',12,'User zzz removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(739,'2018-01-22 18:01:40','USER_DELETE',1,'2018-01-22 19:01:40',12,'User aaab removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(740,'2018-01-22 18:01:52','USER_DELETE',1,'2018-01-22 19:01:52',12,'User zzzg removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(741,'2018-03-13 10:54:59','USER_LOGIN',1,'2018-03-13 14:54:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x971','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',NULL),(742,'2018-07-30 11:13:10','USER_LOGIN',1,'2018-07-30 15:13:10',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(743,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(744,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(745,'2018-07-30 12:50:23','USER_NEW_PASSWORD',1,'2018-07-30 16:50:23',12,'Password change for eldy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(746,'2018-07-30 12:50:38','USER_MODIFY',1,'2018-07-30 16:50:38',12,'User eldy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(747,'2018-07-30 12:50:54','USER_DELETE',1,'2018-07-30 16:50:54',12,'User eldy removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(748,'2018-07-30 12:51:23','USER_NEW_PASSWORD',1,'2018-07-30 16:51:23',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(749,'2018-07-30 12:51:23','USER_MODIFY',1,'2018-07-30 16:51:23',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(750,'2018-07-30 18:26:58','USER_LOGIN',1,'2018-07-30 22:26:58',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(751,'2018-07-30 18:27:40','USER_LOGOUT',1,'2018-07-30 22:27:40',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(752,'2018-07-30 18:27:47','USER_LOGIN',1,'2018-07-30 22:27:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(753,'2018-07-30 19:00:00','USER_LOGOUT',1,'2018-07-30 23:00:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(754,'2018-07-30 19:00:04','USER_LOGIN',1,'2018-07-30 23:00:04',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(755,'2018-07-30 19:00:14','USER_LOGOUT',1,'2018-07-30 23:00:14',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(756,'2018-07-30 19:00:19','USER_LOGIN',1,'2018-07-30 23:00:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(757,'2018-07-30 19:00:43','USER_LOGOUT',1,'2018-07-30 23:00:43',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(758,'2018-07-30 19:00:48','USER_LOGIN',1,'2018-07-30 23:00:48',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(759,'2018-07-30 19:03:52','USER_LOGOUT',1,'2018-07-30 23:03:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(760,'2018-07-30 19:03:57','USER_LOGIN_FAILED',1,'2018-07-30 23:03:57',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(761,'2018-07-30 19:03:59','USER_LOGIN',1,'2018-07-30 23:03:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(762,'2018-07-30 19:04:13','USER_LOGOUT',1,'2018-07-30 23:04:13',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(763,'2018-07-30 19:04:17','USER_LOGIN',1,'2018-07-30 23:04:17',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(764,'2018-07-30 19:04:26','USER_LOGOUT',1,'2018-07-30 23:04:26',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(765,'2018-07-30 19:04:31','USER_LOGIN',1,'2018-07-30 23:04:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(766,'2018-07-30 19:10:50','USER_LOGOUT',1,'2018-07-30 23:10:50',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(767,'2018-07-30 19:10:54','USER_LOGIN',1,'2018-07-30 23:10:54',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(768,'2018-07-31 10:15:52','USER_LOGIN',1,'2018-07-31 14:15:52',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(769,'2018-07-31 10:16:27','USER_LOGIN',1,'2018-07-31 14:16:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(770,'2018-07-31 10:32:14','USER_LOGIN',1,'2018-07-31 14:32:14',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(771,'2018-07-31 10:36:28','USER_LOGIN',1,'2018-07-31 14:36:28',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(772,'2018-07-31 10:40:10','USER_LOGIN',1,'2018-07-31 14:40:10',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL),(773,'2018-07-31 10:54:16','USER_LOGIN',1,'2018-07-31 14:54:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL),(774,'2018-07-31 12:52:52','USER_LOGIN',1,'2018-07-31 16:52:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x592','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(775,'2018-07-31 13:25:33','USER_LOGOUT',1,'2018-07-31 17:25:33',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(776,'2018-07-31 13:26:32','USER_LOGIN',1,'2018-07-31 17:26:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1280x751','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(777,'2018-07-31 14:13:57','USER_LOGOUT',1,'2018-07-31 18:13:57',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(778,'2018-07-31 14:14:04','USER_LOGIN',1,'2018-07-31 18:14:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(779,'2018-07-31 16:04:35','USER_LOGIN',1,'2018-07-31 20:04:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(780,'2018-07-31 21:14:14','USER_LOGIN',1,'2018-08-01 01:14:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL),(781,'2017-01-29 15:14:05','USER_LOGOUT',1,'2017-01-29 19:14:05',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(782,'2017-01-29 15:34:43','USER_LOGIN',1,'2017-01-29 19:34:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(783,'2017-01-29 15:35:04','USER_LOGOUT',1,'2017-01-29 19:35:04',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(784,'2017-01-29 15:35:12','USER_LOGIN',1,'2017-01-29 19:35:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(785,'2017-01-29 15:36:43','USER_LOGOUT',1,'2017-01-29 19:36:43',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(786,'2017-01-29 15:41:21','USER_LOGIN',1,'2017-01-29 19:41:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(787,'2017-01-29 15:41:41','USER_LOGOUT',1,'2017-01-29 19:41:41',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(788,'2017-01-29 15:42:43','USER_LOGIN',1,'2017-01-29 19:42:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(789,'2017-01-29 15:43:18','USER_LOGOUT',1,'2017-01-29 19:43:18',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(790,'2017-01-29 15:46:31','USER_LOGIN',1,'2017-01-29 19:46:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(791,'2017-01-29 16:18:56','USER_LOGIN',1,'2017-01-29 20:18:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=360x526','192.168.0.254','Mozilla/5.0 (Linux; Android 6.0; LG-H818 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 - DoliDroid - Android client pour Dolibarr ERP-CRM',NULL),(792,'2017-01-29 17:20:59','USER_LOGIN',1,'2017-01-29 21:20:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(793,'2017-01-30 11:19:40','USER_LOGIN',1,'2017-01-30 15:19:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(794,'2017-01-31 16:49:39','USER_LOGIN',1,'2017-01-31 20:49:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(795,'2017-02-01 10:55:23','USER_LOGIN',1,'2017-02-01 14:55:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(796,'2017-02-01 13:34:31','USER_LOGIN',1,'2017-02-01 17:34:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(797,'2017-02-01 14:41:26','USER_LOGIN',1,'2017-02-01 18:41:26',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(798,'2017-02-01 23:51:48','USER_LOGIN_FAILED',1,'2017-02-02 03:51:48',NULL,'Bad value for login or password - login=autologin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(799,'2017-02-01 23:52:55','USER_LOGIN',1,'2017-02-02 03:52:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(800,'2017-02-01 23:55:45','USER_CREATE',1,'2017-02-02 03:55:45',12,'User aboston created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(801,'2017-02-01 23:55:45','USER_NEW_PASSWORD',1,'2017-02-02 03:55:45',12,'Password change for aboston','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(802,'2017-02-01 23:56:38','USER_MODIFY',1,'2017-02-02 03:56:38',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(803,'2017-02-01 23:56:50','USER_MODIFY',1,'2017-02-02 03:56:50',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(804,'2017-02-02 01:14:44','USER_LOGIN',1,'2017-02-02 05:14:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL),(805,'2017-02-03 10:27:18','USER_LOGIN',1,'2017-02-03 14:27:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(806,'2017-02-04 10:22:34','USER_LOGIN',1,'2017-02-04 14:22:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x489','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(807,'2017-02-06 04:01:31','USER_LOGIN',1,'2017-02-06 08:01:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(808,'2017-02-06 10:21:32','USER_LOGIN',1,'2017-02-06 14:21:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(809,'2017-02-06 19:09:27','USER_LOGIN',1,'2017-02-06 23:09:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(810,'2017-02-06 23:39:17','USER_LOGIN',1,'2017-02-07 03:39:17',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(811,'2017-02-07 11:36:34','USER_LOGIN',1,'2017-02-07 15:36:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x676','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(812,'2017-02-07 18:51:53','USER_LOGIN',1,'2017-02-07 22:51:53',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(813,'2017-02-07 23:13:40','USER_LOGIN',1,'2017-02-08 03:13:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(814,'2017-02-08 09:29:12','USER_LOGIN',1,'2017-02-08 13:29:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(815,'2017-02-08 17:33:12','USER_LOGIN',1,'2017-02-08 21:33:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(816,'2017-02-09 17:30:34','USER_LOGIN',1,'2017-02-09 21:30:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(817,'2017-02-10 09:30:02','USER_LOGIN',1,'2017-02-10 13:30:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(818,'2017-02-10 16:16:14','USER_LOGIN',1,'2017-02-10 20:16:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(819,'2017-02-10 17:28:15','USER_LOGIN',1,'2017-02-10 21:28:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(820,'2017-02-11 12:54:03','USER_LOGIN',1,'2017-02-11 16:54:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(821,'2017-02-11 17:23:52','USER_LOGIN',1,'2017-02-11 21:23:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(822,'2017-02-12 12:44:03','USER_LOGIN',1,'2017-02-12 16:44:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(823,'2017-02-12 16:42:13','USER_LOGIN',1,'2017-02-12 20:42:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(824,'2017-02-12 19:14:18','USER_LOGIN',1,'2017-02-12 23:14:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(825,'2017-02-15 17:17:00','USER_LOGIN',1,'2017-02-15 21:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(826,'2017-02-15 22:02:40','USER_LOGIN',1,'2017-02-16 02:02:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(827,'2017-02-16 22:13:27','USER_LOGIN',1,'2017-02-17 02:13:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x619','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(828,'2017-02-16 23:54:04','USER_LOGIN',1,'2017-02-17 03:54:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(829,'2017-02-17 09:14:27','USER_LOGIN',1,'2017-02-17 13:14:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(830,'2017-02-17 12:07:05','USER_LOGIN',1,'2017-02-17 16:07:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(831,'2017-02-19 21:22:20','USER_LOGIN',1,'2017-02-20 01:22:20',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(832,'2017-02-20 09:26:47','USER_LOGIN',1,'2017-02-20 13:26:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(833,'2017-02-20 16:39:55','USER_LOGIN',1,'2017-02-20 20:39:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(834,'2017-02-20 16:49:00','USER_MODIFY',1,'2017-02-20 20:49:00',12,'Modification utilisateur ccommerson','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(835,'2017-02-20 17:57:15','USER_LOGIN',1,'2017-02-20 21:57:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(836,'2017-02-20 19:43:48','USER_LOGIN',1,'2017-02-20 23:43:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(837,'2017-02-21 00:04:05','USER_LOGIN',1,'2017-02-21 04:04:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(838,'2017-02-21 10:23:13','USER_LOGIN',1,'2017-02-21 14:23:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(839,'2017-02-21 10:30:17','USER_LOGOUT',1,'2017-02-21 14:30:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(840,'2017-02-21 10:30:22','USER_LOGIN',1,'2017-02-21 14:30:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(841,'2017-02-21 11:44:05','USER_LOGIN',1,'2017-02-21 15:44:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL),(842,'2017-05-12 09:02:48','USER_LOGIN',1,'2017-05-12 13:02:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',NULL),(843,'2017-08-27 13:29:16','USER_LOGIN',1,'2017-08-27 17:29:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(844,'2017-08-28 09:11:07','USER_LOGIN',1,'2017-08-28 13:11:07',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(845,'2017-08-28 10:08:58','USER_LOGIN',1,'2017-08-28 14:08:58',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(846,'2017-08-28 10:12:46','USER_MODIFY',1,'2017-08-28 14:12:46',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(847,'2017-08-28 10:28:25','USER_LOGIN',1,'2017-08-28 14:28:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(848,'2017-08-28 10:28:36','USER_LOGOUT',1,'2017-08-28 14:28:36',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(849,'2017-08-28 10:34:50','USER_LOGIN',1,'2017-08-28 14:34:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(850,'2017-08-28 11:59:02','USER_LOGIN',1,'2017-08-28 15:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL),(851,'2017-08-29 09:57:34','USER_LOGIN',1,'2017-08-29 13:57:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(852,'2017-08-29 11:05:51','USER_LOGIN',1,'2017-08-29 15:05:51',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(853,'2017-08-29 14:15:58','USER_LOGIN',1,'2017-08-29 18:15:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(854,'2017-08-29 17:49:28','USER_LOGIN',1,'2017-08-29 21:49:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(855,'2017-08-30 11:53:25','USER_LOGIN',1,'2017-08-30 15:53:25',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(856,'2017-08-30 12:19:31','USER_MODIFY',1,'2017-08-30 16:19:31',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(857,'2017-08-30 12:19:32','USER_MODIFY',1,'2017-08-30 16:19:32',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(858,'2017-08-30 12:19:33','USER_MODIFY',1,'2017-08-30 16:19:33',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(859,'2017-08-30 12:21:42','USER_LOGOUT',1,'2017-08-30 16:21:42',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(860,'2017-08-30 12:21:48','USER_LOGIN',1,'2017-08-30 16:21:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(861,'2017-08-30 15:02:06','USER_LOGIN',1,'2017-08-30 19:02:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(862,'2017-08-31 09:25:42','USER_LOGIN',1,'2017-08-31 13:25:42',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(863,'2017-09-04 07:51:21','USER_LOGIN',1,'2017-09-04 11:51:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x577','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(864,'2017-09-04 09:17:09','USER_LOGIN',1,'2017-09-04 13:17:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(865,'2017-09-04 13:40:28','USER_LOGIN',1,'2017-09-04 17:40:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(866,'2017-09-06 07:55:30','USER_LOGIN',1,'2017-09-06 11:55:30',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(867,'2017-09-06 07:55:33','USER_LOGOUT',1,'2017-09-06 11:55:33',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(868,'2017-09-06 07:55:38','USER_LOGIN',1,'2017-09-06 11:55:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(869,'2017-09-06 16:03:38','USER_LOGIN',1,'2017-09-06 20:03:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(870,'2017-09-06 19:43:07','USER_LOGIN',1,'2017-09-06 23:43:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL),(871,'2018-01-19 11:18:08','USER_LOGOUT',1,'2018-01-19 11:18:08',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(872,'2018-01-19 11:18:47','USER_LOGIN',1,'2018-01-19 11:18:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x965','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL),(873,'2018-01-19 11:21:41','USER_LOGIN',1,'2018-01-19 11:21:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x926','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(874,'2018-01-19 11:24:18','USER_NEW_PASSWORD',1,'2018-01-19 11:24:18',12,'Password change for admin','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(875,'2018-01-19 11:24:18','USER_MODIFY',1,'2018-01-19 11:24:18',12,'User admin modified','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(876,'2018-01-19 11:28:45','USER_LOGOUT',1,'2018-01-19 11:28:45',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL),(877,'2018-03-16 09:54:15','USER_LOGIN_FAILED',1,'2018-03-16 13:54:15',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL),(878,'2018-03-16 09:54:23','USER_LOGIN',1,'2018-03-16 13:54:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x936','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL),(879,'2019-09-26 11:35:07','USER_MODIFY',1,'2019-09-26 13:35:07',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(880,'2019-09-26 11:35:33','USER_MODIFY',1,'2019-09-26 13:35:33',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(881,'2019-09-26 11:36:33','USER_MODIFY',1,'2019-09-26 13:36:33',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(882,'2019-09-26 11:36:56','USER_MODIFY',1,'2019-09-26 13:36:56',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(883,'2019-09-26 11:37:30','USER_MODIFY',1,'2019-09-26 13:37:30',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(884,'2019-09-26 11:37:56','USER_MODIFY',1,'2019-09-26 13:37:56',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(885,'2019-09-26 11:38:11','USER_MODIFY',1,'2019-09-26 13:38:11',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(886,'2019-09-26 11:38:27','USER_MODIFY',1,'2019-09-26 13:38:27',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(887,'2019-09-26 11:38:48','USER_MODIFY',1,'2019-09-26 13:38:48',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(888,'2019-09-26 11:39:35','USER_MODIFY',1,'2019-09-26 13:39:35',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(889,'2019-09-26 11:41:28','USER_MODIFY',1,'2019-09-26 13:41:28',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(890,'2019-09-26 11:43:27','USER_MODIFY',1,'2019-09-26 13:43:27',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(891,'2019-09-26 11:46:44','USER_MODIFY',1,'2019-09-26 13:46:44',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(892,'2019-09-26 11:46:54','USER_MODIFY',1,'2019-09-26 13:46:54',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(893,'2019-09-26 11:47:08','USER_MODIFY',1,'2019-09-26 13:47:08',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(894,'2019-09-26 11:48:04','USER_MODIFY',1,'2019-09-26 13:48:04',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(895,'2019-09-26 11:48:32','USER_MODIFY',1,'2019-09-26 13:48:32',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(896,'2019-09-26 11:48:49','USER_MODIFY',1,'2019-09-26 13:48:49',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(897,'2019-09-26 11:49:12','USER_MODIFY',1,'2019-09-26 13:49:12',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(898,'2019-09-26 11:49:21','USER_MODIFY',1,'2019-09-26 13:49:21',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(899,'2019-09-26 11:49:28','USER_MODIFY',1,'2019-09-26 13:49:28',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(900,'2019-09-26 11:49:37','USER_MODIFY',1,'2019-09-26 13:49:37',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(901,'2019-09-26 11:49:46','USER_MODIFY',1,'2019-09-26 13:49:46',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(902,'2019-09-26 11:49:57','USER_MODIFY',1,'2019-09-26 13:49:57',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(903,'2019-09-26 11:50:17','USER_MODIFY',1,'2019-09-26 13:50:17',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(904,'2019-09-26 11:50:43','USER_MODIFY',1,'2019-09-26 13:50:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(905,'2019-09-26 11:51:10','USER_MODIFY',1,'2019-09-26 13:51:10',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(906,'2019-09-26 11:51:36','USER_MODIFY',1,'2019-09-26 13:51:36',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(907,'2019-09-26 11:52:16','USER_MODIFY',1,'2019-09-26 13:52:16',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(908,'2019-09-26 11:52:35','USER_MODIFY',1,'2019-09-26 13:52:35',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(909,'2019-09-26 11:52:59','USER_MODIFY',1,'2019-09-26 13:52:59',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(910,'2019-09-26 11:53:28','USER_MODIFY',1,'2019-09-26 13:53:28',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(911,'2019-09-26 11:53:50','USER_MODIFY',1,'2019-09-26 13:53:50',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(912,'2019-09-26 11:54:18','USER_MODIFY',1,'2019-09-26 13:54:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(913,'2019-09-26 11:54:43','USER_MODIFY',1,'2019-09-26 13:54:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(914,'2019-09-26 11:55:09','USER_MODIFY',1,'2019-09-26 13:55:09',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(915,'2019-09-26 11:55:23','USER_MODIFY',1,'2019-09-26 13:55:23',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(916,'2019-09-26 11:55:35','USER_MODIFY',1,'2019-09-26 13:55:35',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(917,'2019-09-26 11:55:58','USER_MODIFY',1,'2019-09-26 13:55:58',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(918,'2019-09-26 15:28:46','USER_LOGIN_FAILED',1,'2019-09-26 17:28:46',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(919,'2019-09-26 15:28:51','USER_LOGIN_FAILED',1,'2019-09-26 17:28:51',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(920,'2019-09-26 15:28:55','USER_LOGIN',1,'2019-09-26 17:28:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(921,'2019-09-27 14:51:19','USER_LOGIN_FAILED',1,'2019-09-27 16:51:19',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(922,'2019-09-27 14:51:49','USER_LOGIN_FAILED',1,'2019-09-27 16:51:49',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(923,'2019-09-27 14:51:55','USER_LOGIN_FAILED',1,'2019-09-27 16:51:55',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(924,'2019-09-27 14:52:22','USER_LOGIN_FAILED',1,'2019-09-27 16:52:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(925,'2019-09-27 14:52:41','USER_LOGIN',1,'2019-09-27 16:52:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(926,'2019-09-27 15:47:07','USER_LOGIN_FAILED',1,'2019-09-27 17:47:07',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(927,'2019-09-27 15:47:09','USER_LOGIN_FAILED',1,'2019-09-27 17:47:09',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(928,'2019-09-27 15:47:12','USER_LOGIN',1,'2019-09-27 17:47:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(929,'2019-09-27 16:39:57','USER_LOGIN',1,'2019-09-27 18:39:57',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(930,'2019-09-30 13:49:22','USER_LOGIN_FAILED',1,'2019-09-30 15:49:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(931,'2019-09-30 13:49:27','USER_LOGIN_FAILED',1,'2019-09-30 15:49:27',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(932,'2019-09-30 13:49:30','USER_LOGIN',1,'2019-09-30 15:49:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(933,'2019-09-30 15:49:05','USER_LOGIN_FAILED',1,'2019-09-30 17:49:05',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(934,'2019-09-30 15:49:08','USER_LOGIN',1,'2019-09-30 17:49:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(935,'2019-10-01 11:47:44','USER_LOGIN',1,'2019-10-01 13:47:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(936,'2019-10-01 13:24:03','USER_LOGIN',1,'2019-10-01 15:24:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(937,'2019-10-02 11:41:30','USER_LOGIN_FAILED',1,'2019-10-02 13:41:30',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(938,'2019-10-02 11:41:35','USER_LOGIN',1,'2019-10-02 13:41:35',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(939,'2019-10-02 17:01:42','USER_LOGIN_FAILED',1,'2019-10-02 19:01:42',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(940,'2019-10-02 17:01:44','USER_LOGIN',1,'2019-10-02 19:01:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(941,'2019-10-04 08:06:36','USER_LOGIN_FAILED',1,'2019-10-04 10:06:36',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(942,'2019-10-04 08:06:40','USER_LOGIN',1,'2019-10-04 10:06:40',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(943,'2019-10-04 08:06:46','USER_LOGOUT',1,'2019-10-04 10:06:46',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(944,'2019-10-04 08:06:50','USER_LOGIN',1,'2019-10-04 10:06:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(945,'2019-10-04 10:28:53','USER_LOGIN_FAILED',1,'2019-10-04 12:28:53',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(946,'2019-10-04 10:31:06','USER_LOGIN',1,'2019-10-04 12:31:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(947,'2019-10-04 14:55:58','USER_LOGIN',1,'2019-10-04 16:55:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(948,'2019-10-04 16:45:36','USER_LOGIN_FAILED',1,'2019-10-04 18:45:36',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(949,'2019-10-04 16:45:40','USER_LOGIN',1,'2019-10-04 18:45:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(950,'2019-10-05 09:10:32','USER_LOGIN',1,'2019-10-05 11:10:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(951,'2019-10-06 09:02:10','USER_LOGIN_FAILED',1,'2019-10-06 11:02:10',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(952,'2019-10-06 09:02:12','USER_LOGIN',1,'2019-10-06 11:02:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x513','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(953,'2019-10-07 09:00:29','USER_LOGIN_FAILED',1,'2019-10-07 11:00:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(954,'2019-10-07 09:00:33','USER_LOGIN',1,'2019-10-07 11:00:33',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(955,'2019-10-07 15:05:26','USER_LOGIN_FAILED',1,'2019-10-07 17:05:26',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(956,'2019-10-07 15:05:29','USER_LOGIN_FAILED',1,'2019-10-07 17:05:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(957,'2019-10-08 09:57:04','USER_LOGIN_FAILED',1,'2019-10-08 11:57:04',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(958,'2019-10-08 09:57:07','USER_LOGIN',1,'2019-10-08 11:57:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x637','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(959,'2019-10-08 11:18:14','USER_LOGIN_FAILED',1,'2019-10-08 13:18:14',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(960,'2019-10-08 11:18:18','USER_LOGIN',1,'2019-10-08 13:18:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(961,'2019-10-08 13:29:24','USER_LOGIN',1,'2019-10-08 15:29:24',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(962,'2019-10-08 17:04:42','USER_LOGIN_FAILED',1,'2019-10-08 19:04:42',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(963,'2019-10-08 17:04:46','USER_LOGIN',1,'2019-10-08 19:04:46',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(964,'2019-10-08 18:37:06','USER_LOGIN_FAILED',1,'2019-10-08 20:37:06',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(965,'2019-10-08 18:38:29','USER_LOGIN_FAILED',1,'2019-10-08 20:38:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(966,'2019-10-08 18:38:32','USER_LOGIN',1,'2019-10-08 20:38:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL),(967,'2019-10-08 19:01:07','USER_MODIFY',1,'2019-10-08 21:01:07',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL); /*!40000 ALTER TABLE `llx_events` ENABLE KEYS */; UNLOCK TABLES; @@ -5442,7 +5443,7 @@ CREATE TABLE `llx_extrafields` ( `help` text COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_extrafields_name` (`name`,`entity`,`elementtype`) -) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5451,7 +5452,7 @@ CREATE TABLE `llx_extrafields` ( LOCK TABLES `llx_extrafields` WRITE; /*!40000 ALTER TABLE `llx_extrafields` DISABLE KEYS */; -INSERT INTO `llx_extrafields` VALUES (2,'adherent','zzz',1,'2018-01-19 11:17:49','zzz','varchar','255',0,0,NULL,0,0,NULL,'1',0,0,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL),(27,'projet','priority',1,'2018-01-19 11:17:49','Priority','select','',0,1,'a:1:{s:7:\"options\";a:5:{i:1;s:1:\"1\";i:2;s:1:\"2\";i:3;s:1:\"3\";i:4;s:1:\"4\";i:5;s:1:\"5\";}}',0,0,NULL,'1',0,0,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL); +INSERT INTO `llx_extrafields` VALUES (27,'projet','priority',1,'2018-01-19 11:17:49','Priority','select','',0,1,'a:1:{s:7:\"options\";a:5:{i:1;s:1:\"1\";i:2;s:1:\"2\";i:3;s:1:\"3\";i:4;s:1:\"4\";i:5;s:1:\"5\";}}',0,0,NULL,'1',0,0,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL),(33,'adherent','extradatamember',1,'2019-10-08 18:47:11','Extra personalized data','varchar','10',100,1,'a:1:{s:7:\"options\";a:1:{s:0:\"\";N;}}',0,0,NULL,'1',0,0,NULL,NULL,NULL,12,12,'2019-10-08 20:47:11','1',NULL),(34,'adherent_type','extradatamembertype',1,'2019-10-08 18:47:43','Extra personalized data','varchar','32',100,1,'a:1:{s:7:\"options\";a:1:{s:0:\"\";N;}}',0,0,NULL,'1',0,0,NULL,NULL,NULL,12,12,'2019-10-08 20:47:43','1',NULL); /*!40000 ALTER TABLE `llx_extrafields` ENABLE KEYS */; UNLOCK TABLES; @@ -5536,7 +5537,7 @@ CREATE TABLE `llx_facture` ( CONSTRAINT `fk_facture_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_facture_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_facture_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=219 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5545,7 +5546,7 @@ CREATE TABLE `llx_facture` ( LOCK TABLES `llx_facture` WRITE; /*!40000 ALTER TABLE `llx_facture` DISABLE KEYS */; -INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2012-07-10 18:20:13','2018-07-10',NULL,'2018-07-30 15:13:20',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2018-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2018-07-18',NULL,'2018-07-30 15:13:20',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,1,NULL,NULL,1,0,'2018-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2017-08-01',NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,6,'2017-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2017-08-06',NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,4,'2017-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2017-08-08',NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2017-08-08',NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2017-12-08','2017-12-08','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,3,NULL,NULL,NULL,0,0,'2017-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2017-12-08','2017-12-08','2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,3,NULL,NULL,NULL,0,0,'2017-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2017-12-09','2018-02-12','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2017-12-11','2018-03-24','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2017-12-11','2017-03-03','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2017-12-11','2017-12-12','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2018-01-19','2018-01-19','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2018-01-19','2017-08-29','2018-03-16 09:59:31',0,0.00000000,NULL,NULL,0,NULL,NULL,1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,1,1,NULL,12,NULL,NULL,NULL,NULL,0,0,'2018-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,'facture/FA1601-0024/FA1601-0024.pdf',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2018-01-19','2018-01-19','2018-07-30 15:13:20',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2018-01-19','2018-01-19','2018-07-30 15:13:20',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2018-07-18','2016-03-06','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2018-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2018-07-10','2018-03-20','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2018-07-10',NULL,NULL,'generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2018-03-22','2017-03-02','2017-02-06 04:11:17',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,3,'2018-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2018-03-03','2017-03-03','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,32,NULL,NULL,NULL,0,0,'2018-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2017-02-12',NULL,'2017-02-12 19:21:27',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2017-08-31',NULL,'2017-08-31 09:26:17',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL); +INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2012-07-10 18:20:13','2018-07-10',NULL,'2018-07-30 15:13:20',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2018-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2018-07-18',NULL,'2018-07-30 15:13:20',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,1,NULL,NULL,1,0,'2018-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2017-08-01',NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,6,'2017-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2017-08-06',NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,4,'2017-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2017-08-08',NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2017-08-08',NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2017-12-08','2017-12-08','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,3,NULL,NULL,NULL,0,0,'2017-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2017-12-08','2017-12-08','2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,3,NULL,NULL,NULL,0,0,'2017-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2017-12-09','2018-02-12','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2017-12-11','2018-03-24','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2017-12-11','2017-03-03','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2017-12-11','2017-12-12','2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2018-01-19','2018-01-19','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2018-01-19','2017-08-29','2018-03-16 09:59:31',0,0.00000000,NULL,NULL,0,NULL,NULL,1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,1,1,NULL,12,NULL,NULL,NULL,NULL,0,0,'2018-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,'facture/FA1601-0024/FA1601-0024.pdf',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2018-01-19','2019-10-04','2019-10-04 08:28:23',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,12,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,5.00000000,0.63000000,5.63000000,NULL,'facture/FA6801-0010/FA6801-0010.pdf',NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2018-01-19','2018-01-19','2018-07-30 15:13:20',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2018-07-18','2016-03-06','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2018-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2018-07-10','2018-03-20','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2018-07-10',NULL,NULL,'generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2018-03-22','2017-03-02','2017-02-06 04:11:17',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,3,'2018-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2018-03-03','2017-03-03','2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,32,NULL,NULL,NULL,0,0,'2018-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2017-02-12',NULL,'2017-02-12 19:21:27',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2017-08-31',NULL,'2017-08-31 09:26:17',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,'',NULL,1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL),(218,'FA1909-0025',1,NULL,NULL,0,NULL,NULL,12,'2019-09-26 17:30:14','2019-09-26','2019-09-26','2019-09-26 15:33:37',0,0.00000000,NULL,NULL,0,NULL,NULL,1.08000000,0.00000000,0.00000000,0.00000000,42.50000000,43.58000000,1,12,NULL,12,NULL,NULL,NULL,NULL,0,0,'2019-09-26',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,'',NULL,0,'EUR',1.00000000,42.50000000,1.08000000,43.58000000,NULL,NULL,'takepos','1'); /*!40000 ALTER TABLE `llx_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -5653,7 +5654,7 @@ CREATE TABLE `llx_facture_fourn` ( LOCK TABLES `llx_facture_fourn` WRITE; /*!40000 ALTER TABLE `llx_facture_fourn` DISABLE KEYS */; -INSERT INTO `llx_facture_fourn` VALUES (16,'SI1601-0001','FR70813',1,NULL,0,1,'2014-12-19 15:24:11','2003-04-11','2017-02-06 04:08:22','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,12,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(17,'SI1601-0002','FR81385',1,NULL,0,1,'2015-02-13 17:19:35','2003-06-04','2017-02-06 04:08:31','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','','canelle',NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(18,'SI1601-0003','FR81385',1,NULL,0,2,'2015-02-13 17:20:25','2003-06-04','2017-02-06 04:08:35','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(19,'SI1601-0004','FR813852',1,NULL,0,2,'2015-03-16 17:59:02','2015-03-16','2017-02-06 04:08:38','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(20,'SI1702-0001','INV-AE56ER08',1,NULL,0,13,'2017-02-01 19:00:31','2017-02-01','2017-02-01 15:05:28','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,200.00000000,39.20000000,239.20000000,1,12,NULL,12,NULL,5,NULL,1,0,'2017-02-01','The customer has called us the 24th april. He agree us to not pay the remain of invoice due to default.
\r\nLet\'s see with our book keeper, if we must cancel invoice or ask the supplier a credit note...',NULL,'canelle',NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,NULL,NULL); +INSERT INTO `llx_facture_fourn` VALUES (16,'SI1601-0001','FR70813',1,NULL,0,1,'2014-12-19 15:24:11','2003-04-11','2017-02-06 04:08:22','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,12,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(17,'SI1601-0002','FR81385',1,NULL,0,1,'2015-02-13 17:19:35','2003-06-04','2019-10-04 08:31:30','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,1,1,NULL,12,NULL,NULL,NULL,1,NULL,'2003-06-04','','','canelle',NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2019-10-04'),(18,'SI1601-0003','FR81385',1,NULL,0,2,'2015-02-13 17:20:25','2003-06-04','2017-02-06 04:08:35','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(19,'SI1601-0004','FR813852',1,NULL,0,2,'2015-03-16 17:59:02','2015-03-16','2017-02-06 04:08:38','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(20,'SI1702-0001','INV-AE56ER08',1,NULL,0,13,'2017-02-01 19:00:31','2017-02-01','2017-02-01 15:05:28','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,200.00000000,39.20000000,239.20000000,1,12,NULL,12,NULL,5,NULL,1,0,'2017-02-01','The customer has called us the 24th april. He agree us to not pay the remain of invoice due to default.
\r\nLet\'s see with our book keeper, if we must cancel invoice or ask the supplier a credit note...',NULL,'canelle',NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_facture_fourn` ENABLE KEYS */; UNLOCK TABLES; @@ -5718,7 +5719,7 @@ CREATE TABLE `llx_facture_fourn_det` ( LOCK TABLES `llx_facture_fourn_det` WRITE; /*!40000 ALTER TABLE `llx_facture_fourn_det` DISABLE KEYS */; -INSERT INTO `llx_facture_fourn_det` VALUES (44,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/04/2003 à 11/10/2003',414.00000000,495.14400000,1,0,19.600,'',0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(45,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/10/2003 à 11/04/2004',414.00000000,495.14400000,1,0,19.600,'',0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(46,16,NULL,NULL,NULL,NULL,'ref :sd.installation.annuel
Frais de mise en service d\'un serveur dédié pour un paiement annuel
',1.00000000,1.19600000,1,0,19.600,'',0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(47,17,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,'',0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(48,17,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,'',0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(49,18,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,'',0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(50,18,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,'',0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(51,19,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,'',0.000,'0',0.000,'0',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(52,19,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,'',0.000,'0',0.000,'0',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(53,20,NULL,NULL,NULL,NULL,'Chips',20.00000000,23.92000000,10,0,19.600,'',0.000,'0',0.000,'0',200.00000000,39.20000000,0.00000000,0.00000000,239.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,0,'EUR',20.00000000,200.00000000,39.20000000,239.20000000); +INSERT INTO `llx_facture_fourn_det` VALUES (44,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/04/2003 à 11/10/2003',414.00000000,495.14400000,1,0,19.600,'',0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,105,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(45,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/10/2003 à 11/04/2004',414.00000000,495.14400000,1,0,19.600,'',0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,104,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(46,16,NULL,NULL,NULL,NULL,'ref :sd.installation.annuel
Frais de mise en service d\'un serveur dédié pour un paiement annuel
',1.00000000,1.19600000,1,0,19.600,'',0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,105,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(47,17,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,'',0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,106,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(48,17,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,'',0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,103,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(49,18,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,'',0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(50,18,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,'',0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(51,19,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,'',0.000,'0',0.000,'0',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(52,19,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,'',0.000,'0',0.000,'0',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(53,20,NULL,NULL,NULL,NULL,'Chips',20.00000000,23.92000000,10,0,19.600,'',0.000,'0',0.000,'0',200.00000000,39.20000000,0.00000000,0.00000000,239.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL,0,'EUR',20.00000000,200.00000000,39.20000000,239.20000000); /*!40000 ALTER TABLE `llx_facture_fourn_det` ENABLE KEYS */; UNLOCK TABLES; @@ -5934,7 +5935,7 @@ CREATE TABLE `llx_facturedet` ( KEY `idx_facturedet_fk_code_ventilation` (`fk_code_ventilation`), CONSTRAINT `fk_facturedet_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`), CONSTRAINT `fk_facturedet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=1031 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1041 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5943,7 +5944,7 @@ CREATE TABLE `llx_facturedet` ( LOCK TABLES `llx_facturedet` WRITE; /*!40000 ALTER TABLE `llx_facturedet` DISABLE KEYS */; -INSERT INTO `llx_facturedet` VALUES (3,2,NULL,3,NULL,'Service S1',0.000,'',0.000,'',0.000,'',1,10,4,NULL,40.00000000,36.00000000,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,'2012-07-10 00:00:00',NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,2,NULL,NULL,NULL,'Abonnement annuel assurance',1.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,0,'2012-07-10 00:00:00','2013-07-10 00:00:00',0,NULL,0.00000000,0,0,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(11,3,NULL,4,NULL,'afsdfsdfsdfsdf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(12,3,NULL,NULL,NULL,'dfdfd',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(13,5,NULL,4,NULL,'Decapsuleur',12.500,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(14,6,NULL,4,NULL,'Decapsuleur',19.600,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.98000000,0.00000000,0.00000000,5.98000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(21,8,NULL,NULL,NULL,'dddd',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(22,9,NULL,NULL,NULL,'ggg',19.600,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(23,10,NULL,4,NULL,'',12.500,'',0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,-0.63000000,0.00000000,0.00000000,-5.63000000,0,NULL,NULL,0,NULL,12.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(24,10,NULL,1,NULL,'A beatifull pink dress\r\nlkm',0.000,'',0.000,'',0.000,'',1,0,0,NULL,-6.00000000,NULL,-6.00000000,0.00000000,0.00000000,0.00000000,-6.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(26,12,NULL,1,NULL,'A beatifull pink dress\r\nhfghf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,0,NULL,NULL,0,0,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(27,13,NULL,NULL,NULL,'gdfgdf',19.600,'',0.000,'',0.000,'',1.4,0,0,NULL,10.00000000,NULL,14.00000000,2.74000000,0.00000000,0.00000000,16.74000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(137,33,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(138,33,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(256,55,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(257,55,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(753,13,NULL,2,NULL,'(Pays d\'origine: Albanie)',0.000,'',0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(754,148,NULL,11,NULL,'hfghf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(755,148,NULL,4,NULL,'Decapsuleur',12.500,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,NULL,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(757,150,NULL,2,NULL,'Product P1',12.500,'',0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(758,151,NULL,2,NULL,'Product P1',12.500,'',0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(768,32,NULL,NULL,NULL,'mlml',18.000,'',0.000,'',0.000,'',1,0,0,NULL,100.00000000,NULL,100.00000000,18.00000000,0.00000000,0.00000000,118.00000000,0,NULL,NULL,0,NULL,46.00000000,0,0,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(769,32,NULL,NULL,NULL,'mlkml',18.000,'',0.000,'',0.000,'',1,0,0,NULL,400.00000000,NULL,400.00000000,72.00000000,0.00000000,0.00000000,472.00000000,0,NULL,NULL,0,NULL,300.00000000,0,0,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(772,160,NULL,NULL,NULL,'Adhésion/cotisation 2015',12.500,'',0.000,'',0.000,'',1,0,0,NULL,8.88889000,NULL,8.89000000,1.11000000,0.00000000,0.00000000,10.00000000,1,'2017-07-18 00:00:00','2018-07-17 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(776,32,NULL,NULL,NULL,'fsdfsdfds',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(777,32,NULL,NULL,NULL,'fsdfsdfds',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(779,32,NULL,NULL,NULL,'fsdfds',0.000,'',0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(780,32,NULL,NULL,NULL,'ffsdf',0.000,'',0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,NULL,0.00000000,0,1790,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1022,210,NULL,NULL,NULL,'Adhésion/cotisation 2011',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,'2013-07-10 00:00:00','2014-07-09 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1023,211,NULL,NULL,NULL,'Samsung Android x4',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,250.00000000,NULL,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,0,NULL,NULL,0,NULL,200.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1024,211,NULL,1,NULL,'A beatifull pink dress\r\nSize XXL',19.600,'',0.000,'0',0.000,'0',1,10,0,NULL,100.00000000,NULL,90.00000000,17.64000000,0.00000000,0.00000000,107.64000000,0,NULL,NULL,0,NULL,90.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1026,213,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',10,0,0,NULL,-100.00000000,NULL,-1000.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1028,149,NULL,NULL,NULL,'opoo',0.000,'CGST+SGST',9.000,'1',9.000,'1',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.90000000,0.90000000,11.80000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,100,NULL,NULL,12,12,0,'',10.00000000,10.00000000,0.00000000,11.80000000),(1029,149,NULL,NULL,NULL,'gdgd',18.000,'IGST',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,1.80000000,0.00000000,0.00000000,11.80000000,0,NULL,NULL,0,NULL,0.00000000,0,0,3,NULL,NULL,100,NULL,NULL,12,12,0,'',10.00000000,10.00000000,1.80000000,11.80000000),(1030,217,NULL,NULL,NULL,'gfdgdf',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,100,NULL,NULL,12,12,1,'EUR',10.00000000,10.00000000,0.00000000,10.00000000); +INSERT INTO `llx_facturedet` VALUES (3,2,NULL,3,NULL,'Service S1',0.000,'',0.000,'',0.000,'',1,10,4,NULL,40.00000000,36.00000000,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,'2012-07-10 00:00:00',NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,2,NULL,NULL,NULL,'Abonnement annuel assurance',1.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,0,'2012-07-10 00:00:00','2013-07-10 00:00:00',0,NULL,0.00000000,0,0,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(11,3,NULL,4,NULL,'afsdfsdfsdfsdf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(12,3,NULL,NULL,NULL,'dfdfd',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(13,5,NULL,4,NULL,'Decapsuleur',12.500,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(14,6,NULL,4,NULL,'Decapsuleur',19.600,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.98000000,0.00000000,0.00000000,5.98000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(21,8,NULL,NULL,NULL,'dddd',0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(22,9,NULL,NULL,NULL,'ggg',19.600,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(23,10,NULL,4,NULL,'',12.500,'',0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,-0.63000000,0.00000000,0.00000000,-5.63000000,0,NULL,NULL,0,NULL,12.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(24,10,NULL,1,NULL,'A beatifull pink dress\r\nlkm',0.000,'',0.000,'',0.000,'',1,0,0,NULL,-6.00000000,NULL,-6.00000000,0.00000000,0.00000000,0.00000000,-6.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(26,12,NULL,1,NULL,'A beatifull pink dress\r\nhfghf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,0,NULL,NULL,0,0,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(27,13,NULL,NULL,NULL,'gdfgdf',19.600,'',0.000,'',0.000,'',1.4,0,0,NULL,10.00000000,NULL,14.00000000,2.74000000,0.00000000,0.00000000,16.74000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(137,33,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(138,33,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(256,55,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(257,55,NULL,NULL,NULL,'Desc',10.000,'',0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(753,13,NULL,2,NULL,'(Pays d\'origine: Albanie)',0.000,'',0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(754,148,NULL,11,NULL,'hfghf',0.000,'',0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(755,148,NULL,4,NULL,'Decapsuleur',12.500,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,NULL,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(757,150,NULL,2,NULL,'Product P1',12.500,'',0.000,'0',0.000,'0',1,0,0,NULL,5.00000000,NULL,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,100,NULL,NULL,12,NULL,NULL,NULL,5.00000000,5.00000000,0.63000000,5.63000000),(758,151,NULL,2,NULL,'Product P1',12.500,'',0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(768,32,NULL,NULL,NULL,'mlml',18.000,'',0.000,'',0.000,'',1,0,0,NULL,100.00000000,NULL,100.00000000,18.00000000,0.00000000,0.00000000,118.00000000,0,NULL,NULL,0,NULL,46.00000000,0,0,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(769,32,NULL,NULL,NULL,'mlkml',18.000,'',0.000,'',0.000,'',1,0,0,NULL,400.00000000,NULL,400.00000000,72.00000000,0.00000000,0.00000000,472.00000000,0,NULL,NULL,0,NULL,300.00000000,0,0,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(772,160,NULL,NULL,NULL,'Adhésion/cotisation 2015',12.500,'',0.000,'',0.000,'',1,0,0,NULL,8.88889000,NULL,8.89000000,1.11000000,0.00000000,0.00000000,10.00000000,1,'2017-07-18 00:00:00','2018-07-17 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(776,32,NULL,NULL,NULL,'fsdfsdfds',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(777,32,NULL,NULL,NULL,'fsdfsdfds',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(779,32,NULL,NULL,NULL,'fsdfds',0.000,'',0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(780,32,NULL,NULL,NULL,'ffsdf',0.000,'',0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,NULL,0.00000000,0,1790,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1022,210,NULL,NULL,NULL,'Adhésion/cotisation 2011',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,'2013-07-10 00:00:00','2014-07-09 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1023,211,NULL,NULL,NULL,'Samsung Android x4',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,250.00000000,NULL,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,0,NULL,NULL,0,NULL,200.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1024,211,NULL,1,NULL,'A beatifull pink dress\r\nSize XXL',19.600,'',0.000,'0',0.000,'0',1,10,0,NULL,100.00000000,NULL,90.00000000,17.64000000,0.00000000,0.00000000,107.64000000,0,NULL,NULL,0,NULL,90.00000000,0,0,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1026,213,NULL,1,NULL,'A beatifull pink dress',0.000,'',0.000,'0',0.000,'0',10,0,0,NULL,-100.00000000,NULL,-1000.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(1028,149,NULL,NULL,NULL,'opoo',0.000,'CGST+SGST',9.000,'1',9.000,'1',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.90000000,0.90000000,11.80000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,100,NULL,NULL,12,12,0,'',10.00000000,10.00000000,0.00000000,11.80000000),(1029,149,NULL,NULL,NULL,'gdgd',18.000,'IGST',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,1.80000000,0.00000000,0.00000000,11.80000000,0,NULL,NULL,0,NULL,0.00000000,0,0,3,NULL,NULL,100,NULL,NULL,12,12,0,'',10.00000000,10.00000000,1.80000000,11.80000000),(1030,217,NULL,NULL,NULL,'gfdgdf',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,100,NULL,NULL,12,12,1,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(1035,218,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9.00000000,NULL,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,1,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,100,NULL,NULL,12,12,0,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(1036,218,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',19.600,'',0.000,'0',0.000,'0',1,45,0,NULL,10.00000000,NULL,5.50000000,1.08000000,0.00000000,0.00000000,6.58000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,100,NULL,NULL,12,12,0,'EUR',10.00000000,5.50000000,1.08000000,6.58000000),(1037,218,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9.00000000,NULL,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,1,NULL,NULL,0,NULL,0.00000000,0,0,3,NULL,NULL,100,NULL,NULL,12,12,0,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(1039,218,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9.00000000,NULL,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,1,NULL,NULL,0,NULL,0.00000000,0,0,4,NULL,NULL,100,NULL,NULL,12,12,0,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(1040,218,NULL,NULL,NULL,'aaa',0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,5,NULL,NULL,100,NULL,NULL,12,12,0,'EUR',10.00000000,10.00000000,0.00000000,10.00000000); /*!40000 ALTER TABLE `llx_facturedet` ENABLE KEYS */; UNLOCK TABLES; @@ -6590,7 +6591,7 @@ CREATE TABLE `llx_links` ( `objectid` int(11) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_links` (`objectid`,`label`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6999,7 +7000,7 @@ CREATE TABLE `llx_menu` ( PRIMARY KEY (`rowid`), UNIQUE KEY `idx_menu_uk_menu` (`menu_handler`,`fk_menu`,`position`,`url`,`entity`), KEY `idx_menu_menuhandler_type` (`menu_handler`,`type`) -) ENGINE=InnoDB AUTO_INCREMENT=166589 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=166590 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7008,7 +7009,7 @@ CREATE TABLE `llx_menu` ( LOCK TABLES `llx_menu` WRITE; /*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */; -INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(124210,'all',1,'margins','left','accountancy',-1,NULL,'accountancy',100,'/margin/index.php','','Margins','margins',NULL,'margins','$user->rights->margins->liretous','$conf->margin->enabled',2,'2017-11-15 22:41:47'),(145086,'all',1,'supplier_proposal','left','commercial',-1,NULL,'commercial',300,'/supplier_proposal/index.php','','SupplierProposalsShort','supplier_proposal',NULL,'supplier_proposalsubmenu','$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145087,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',301,'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals','','SupplierProposalNew','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->creer','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145088,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',302,'/supplier_proposal/list.php?leftmenu=supplier_proposals','','List','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145089,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',303,'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier','','Statistics','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145090,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2018-07-30 11:13:32'),(145091,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/add.php','','MenuResourceAdd','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2018-07-30 11:13:32'),(145092,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2018-07-30 11:13:32'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166492,'all',1,'blockedlog','left','tools',-1,NULL,'tools',200,'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser','','BrowseBlockedLog','blockedlog',NULL,'blockedlogbrowser','$user->rights->blockedlog->read','$conf->blockedlog->enabled',2,'2018-03-16 09:57:24'),(166541,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166542,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166543,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166544,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166545,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166546,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166547,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/takepos.php','takepos','PointOfSaleShort','cashdesk',NULL,NULL,'1','$conf->takepos->enabled',2,'2019-06-05 09:15:58'),(166548,'all',1,'cashdesk','top','cashdesk',0,NULL,NULL,900,'/cashdesk/index.php?user=__LOGIN__','pointofsale','PointOfSaleShort','cashdesk',NULL,NULL,'$user->rights->cashdesk->use','$conf->cashdesk->enabled',0,'2019-06-05 09:17:21'),(166549,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166550,'all',1,'agenda','left','agenda',166549,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166551,'all',1,'agenda','left','agenda',166550,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166552,'all',1,'agenda','left','agenda',166550,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166553,'all',1,'agenda','left','agenda',166552,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166554,'all',1,'agenda','left','agenda',166552,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166555,'all',1,'agenda','left','agenda',166552,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166556,'all',1,'agenda','left','agenda',166552,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166557,'all',1,'agenda','left','agenda',166550,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166558,'all',1,'agenda','left','agenda',166557,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166559,'all',1,'agenda','left','agenda',166557,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166560,'all',1,'agenda','left','agenda',166557,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166561,'all',1,'agenda','left','agenda',166557,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166562,'all',1,'agenda','left','agenda',166550,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166563,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2019-09-26 11:33:23'),(166564,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2019-09-26 11:33:23'),(166565,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2019-09-26 11:33:23'),(166566,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2019-09-26 11:33:23'),(166567,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2019-09-26 11:33:23'),(166568,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2019-09-26 11:33:23'),(166569,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2019-09-26 11:33:23'),(166570,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2019-09-26 11:33:24'),(166571,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2019-09-26 11:33:24'),(166572,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2019-09-26 11:33:24'); +INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(124210,'all',1,'margins','left','accountancy',-1,NULL,'accountancy',100,'/margin/index.php','','Margins','margins',NULL,'margins','$user->rights->margins->liretous','$conf->margin->enabled',2,'2017-11-15 22:41:47'),(145086,'all',1,'supplier_proposal','left','commercial',-1,NULL,'commercial',300,'/supplier_proposal/index.php','','SupplierProposalsShort','supplier_proposal',NULL,'supplier_proposalsubmenu','$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145087,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',301,'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals','','SupplierProposalNew','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->creer','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145088,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',302,'/supplier_proposal/list.php?leftmenu=supplier_proposals','','List','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145089,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',303,'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier','','Statistics','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2018-07-30 11:13:20'),(145090,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2018-07-30 11:13:32'),(145091,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/add.php','','MenuResourceAdd','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2018-07-30 11:13:32'),(145092,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,NULL,'$user->rights->resource->read','1',0,'2018-07-30 11:13:32'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166492,'all',1,'blockedlog','left','tools',-1,NULL,'tools',200,'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser','','BrowseBlockedLog','blockedlog',NULL,'blockedlogbrowser','$user->rights->blockedlog->read','$conf->blockedlog->enabled',2,'2018-03-16 09:57:24'),(166541,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166542,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166543,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166544,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166545,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166546,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166547,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/takepos.php','takepos','PointOfSaleShort','cashdesk',NULL,NULL,'1','$conf->takepos->enabled',2,'2019-06-05 09:15:58'),(166548,'all',1,'cashdesk','top','cashdesk',0,NULL,NULL,900,'/cashdesk/index.php?user=__LOGIN__','pointofsale','PointOfSaleShort','cashdesk',NULL,NULL,'$user->rights->cashdesk->use','$conf->cashdesk->enabled',0,'2019-06-05 09:17:21'),(166549,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166550,'all',1,'agenda','left','agenda',166549,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166551,'all',1,'agenda','left','agenda',166550,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166552,'all',1,'agenda','left','agenda',166550,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166553,'all',1,'agenda','left','agenda',166552,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166554,'all',1,'agenda','left','agenda',166552,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166555,'all',1,'agenda','left','agenda',166552,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166556,'all',1,'agenda','left','agenda',166552,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166557,'all',1,'agenda','left','agenda',166550,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166558,'all',1,'agenda','left','agenda',166557,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166559,'all',1,'agenda','left','agenda',166557,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166560,'all',1,'agenda','left','agenda',166557,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166561,'all',1,'agenda','left','agenda',166557,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2019-09-26 11:33:23'),(166562,'all',1,'agenda','left','agenda',166550,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2019-09-26 11:33:23'),(166563,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2019-09-26 11:33:23'),(166564,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2019-09-26 11:33:23'),(166565,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2019-09-26 11:33:23'),(166566,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2019-09-26 11:33:23'),(166567,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2019-09-26 11:33:23'),(166568,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2019-09-26 11:33:23'),(166569,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2019-09-26 11:33:23'),(166570,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2019-09-26 11:33:24'),(166571,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2019-09-26 11:33:24'),(166572,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2019-09-26 11:33:24'),(166589,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2019-09-30 15:49:22'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; @@ -7943,7 +7944,7 @@ CREATE TABLE `llx_paiement` ( `ext_payment_id` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `ext_payment_site` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7952,7 +7953,7 @@ CREATE TABLE `llx_paiement` ( LOCK TABLES `llx_paiement` WRITE; /*!40000 ALTER TABLE `llx_paiement` DISABLE KEYS */; -INSERT INTO `llx_paiement` VALUES (2,'',1,'2013-07-18 20:50:24','2018-07-30 15:13:20','2018-07-08 12:00:00',20.00000000,6,'','',5,1,NULL,0,0,0.00000000,NULL,NULL),(3,'',1,'2013-07-18 20:50:47','2018-07-30 15:13:20','2018-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,NULL,NULL),(5,'',1,'2013-08-01 03:34:11','2018-07-30 15:12:32','2017-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,NULL,NULL),(6,'',1,'2013-08-06 20:33:54','2018-07-30 15:12:32','2017-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,NULL,NULL),(8,'',1,'2013-08-08 02:53:40','2018-07-30 15:12:32','2017-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,NULL,NULL),(9,'',1,'2013-08-08 02:55:58','2018-07-30 15:12:32','2017-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,NULL,NULL),(17,'',1,'2014-12-09 15:28:44','2018-07-30 15:12:32','2017-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,NULL,NULL),(18,'',1,'2014-12-09 15:28:53','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,NULL,NULL),(19,'',1,'2014-12-09 17:35:55','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,NULL,NULL),(20,'',1,'2014-12-09 17:37:02','2018-07-30 15:12:32','2017-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,NULL,NULL),(21,'',1,'2014-12-09 18:35:07','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,NULL,NULL),(23,'',1,'2014-12-12 18:54:33','2018-07-30 15:12:32','2017-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,NULL,NULL),(24,'',1,'2015-03-06 16:48:16','2018-07-30 15:13:20','2018-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,NULL,NULL),(25,'',1,'2015-03-20 14:30:11','2018-07-30 15:13:20','2018-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,NULL,NULL),(26,'',1,'2016-03-02 19:57:58','2018-07-30 15:13:20','2018-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,NULL,NULL),(29,'',1,'2016-03-02 20:01:39','2018-07-30 15:13:20','2018-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,NULL,NULL),(30,'',1,'2016-03-02 20:02:06','2018-07-30 15:13:20','2018-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,NULL,NULL),(32,'',1,'2016-03-03 19:22:32','2018-07-30 15:12:32','2017-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,NULL,NULL),(33,'',1,'2016-03-03 19:23:16','2018-07-30 15:13:20','2018-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,NULL,NULL),(34,'PAY1603-0001',1,'2017-02-06 08:10:24','2017-02-06 04:10:24','2018-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,150.00000000,NULL,NULL),(35,'PAY1603-0002',1,'2017-02-06 08:10:50','2017-02-06 04:10:50','2018-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,140.00000000,NULL,NULL),(36,'PAY1702-0003',1,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,50.00000000,NULL,NULL),(38,'PAY1803-0004',1,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,10.00000000,NULL,NULL); +INSERT INTO `llx_paiement` VALUES (2,'',1,'2013-07-18 20:50:24','2018-07-30 15:13:20','2018-07-08 12:00:00',20.00000000,6,'','',5,1,NULL,0,0,0.00000000,NULL,NULL),(3,'',1,'2013-07-18 20:50:47','2018-07-30 15:13:20','2018-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,NULL,NULL),(5,'',1,'2013-08-01 03:34:11','2018-07-30 15:12:32','2017-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,NULL,NULL),(6,'',1,'2013-08-06 20:33:54','2018-07-30 15:12:32','2017-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,NULL,NULL),(8,'',1,'2013-08-08 02:53:40','2018-07-30 15:12:32','2017-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,NULL,NULL),(9,'',1,'2013-08-08 02:55:58','2018-07-30 15:12:32','2017-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,NULL,NULL),(17,'',1,'2014-12-09 15:28:44','2018-07-30 15:12:32','2017-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,NULL,NULL),(18,'',1,'2014-12-09 15:28:53','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,NULL,NULL),(19,'',1,'2014-12-09 17:35:55','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,NULL,NULL),(20,'',1,'2014-12-09 17:37:02','2018-07-30 15:12:32','2017-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,NULL,NULL),(21,'',1,'2014-12-09 18:35:07','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,NULL,NULL),(23,'',1,'2014-12-12 18:54:33','2018-07-30 15:12:32','2017-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,NULL,NULL),(24,'',1,'2015-03-06 16:48:16','2018-07-30 15:13:20','2018-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,NULL,NULL),(25,'',1,'2015-03-20 14:30:11','2018-07-30 15:13:20','2018-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,NULL,NULL),(26,'',1,'2016-03-02 19:57:58','2018-07-30 15:13:20','2018-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,NULL,NULL),(29,'',1,'2016-03-02 20:01:39','2018-07-30 15:13:20','2018-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,NULL,NULL),(30,'',1,'2016-03-02 20:02:06','2018-07-30 15:13:20','2018-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,NULL,NULL),(32,'',1,'2016-03-03 19:22:32','2018-07-30 15:12:32','2017-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,NULL,NULL),(33,'',1,'2016-03-03 19:23:16','2018-07-30 15:13:20','2018-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,NULL,NULL),(34,'PAY1603-0001',1,'2017-02-06 08:10:24','2017-02-06 04:10:24','2018-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,150.00000000,NULL,NULL),(35,'PAY1603-0002',1,'2017-02-06 08:10:50','2017-02-06 04:10:50','2018-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,140.00000000,NULL,NULL),(36,'PAY1702-0003',1,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,50.00000000,NULL,NULL),(38,'PAY1803-0004',1,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,10.00000000,NULL,NULL),(39,'PAY1801-0005',1,'2019-10-04 10:28:14','2019-10-04 08:28:14','2018-01-19 12:00:00',5.63000000,4,'','',41,12,NULL,0,0,5.63000000,NULL,NULL); /*!40000 ALTER TABLE `llx_paiement` ENABLE KEYS */; UNLOCK TABLES; @@ -7975,7 +7976,7 @@ CREATE TABLE `llx_paiement_facture` ( KEY `idx_paiement_facture_fk_paiement` (`fk_paiement`), CONSTRAINT `fk_paiement_facture_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`), CONSTRAINT `fk_paiement_facture_fk_paiement` FOREIGN KEY (`fk_paiement`) REFERENCES `llx_paiement` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7984,7 +7985,7 @@ CREATE TABLE `llx_paiement_facture` ( LOCK TABLES `llx_paiement_facture` WRITE; /*!40000 ALTER TABLE `llx_paiement_facture` DISABLE KEYS */; -INSERT INTO `llx_paiement_facture` VALUES (2,2,2,20.00000000,0.00000000),(3,3,2,10.00000000,0.00000000),(5,5,5,5.63000000,0.00000000),(6,6,6,5.98000000,0.00000000),(9,8,2,16.10000000,0.00000000),(10,8,8,10.00000000,0.00000000),(11,9,3,15.00000000,0.00000000),(12,9,9,11.96000000,0.00000000),(24,20,9,1.00000000,0.00000000),(31,26,32,600.00000000,0.00000000),(36,29,32,500.00000000,0.00000000),(37,30,32,400.00000000,0.00000000),(38,34,211,150.00000000,150.00000000),(39,35,211,140.00000000,140.00000000),(40,36,211,50.00000000,50.00000000),(42,38,149,10.00000000,10.00000000); +INSERT INTO `llx_paiement_facture` VALUES (2,2,2,20.00000000,0.00000000),(3,3,2,10.00000000,0.00000000),(5,5,5,5.63000000,0.00000000),(6,6,6,5.98000000,0.00000000),(9,8,2,16.10000000,0.00000000),(10,8,8,10.00000000,0.00000000),(11,9,3,15.00000000,0.00000000),(12,9,9,11.96000000,0.00000000),(24,20,9,1.00000000,0.00000000),(31,26,32,600.00000000,0.00000000),(36,29,32,500.00000000,0.00000000),(37,30,32,400.00000000,0.00000000),(38,34,211,150.00000000,150.00000000),(39,35,211,140.00000000,140.00000000),(40,36,211,50.00000000,50.00000000),(42,38,149,10.00000000,10.00000000),(43,39,150,5.63000000,5.63000000); /*!40000 ALTER TABLE `llx_paiement_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -8047,7 +8048,7 @@ CREATE TABLE `llx_paiementfourn` ( `multicurrency_amount` double(24,8) DEFAULT '0.00000000', `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8077,7 +8078,7 @@ CREATE TABLE `llx_paiementfourn_facturefourn` ( UNIQUE KEY `uk_paiementfourn_facturefourn` (`fk_paiementfourn`,`fk_facturefourn`), KEY `idx_paiementfourn_facturefourn_fk_facture` (`fk_facturefourn`), KEY `idx_paiementfourn_facturefourn_fk_paiement` (`fk_paiementfourn`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8229,7 +8230,7 @@ CREATE TABLE `llx_payment_salary` ( KEY `idx_payment_salary_datesp` (`datesp`), KEY `idx_payment_salary_dateep` (`dateep`), CONSTRAINT `fk_payment_salary_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8238,6 +8239,7 @@ CREATE TABLE `llx_payment_salary` ( LOCK TABLES `llx_payment_salary` WRITE; /*!40000 ALTER TABLE `llx_payment_salary` DISABLE KEYS */; +INSERT INTO `llx_payment_salary` VALUES (1,NULL,'2019-10-08 11:18:50','2019-10-08 13:18:50',19,'2019-10-08','2019-10-08',2700.00000000,1000.00000000,0,2,'','Salary payment','2019-09-01','2019-09-30',1,NULL,42,12,NULL); /*!40000 ALTER TABLE `llx_payment_salary` ENABLE KEYS */; UNLOCK TABLES; @@ -8703,7 +8705,7 @@ CREATE TABLE `llx_product` ( CONSTRAINT `fk_product_default_warehouse` FOREIGN KEY (`fk_default_warehouse`) REFERENCES `llx_entrepot` (`rowid`), CONSTRAINT `fk_product_fk_country` FOREIGN KEY (`fk_country`) REFERENCES `llx_c_country` (`rowid`), CONSTRAINT `fk_product_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8712,7 +8714,7 @@ CREATE TABLE `llx_product` ( LOCK TABLES `llx_product` WRITE; /*!40000 ALTER TABLE `llx_product` DISABLE KEYS */; -INSERT INTO `llx_product` VALUES (1,'2012-07-08 14:33:17','2018-01-16 16:30:35',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,NULL,'123456789066',2,'701PINKDRESS',NULL,NULL,'601PINKDRESS',NULL,670,-3,NULL,0,NULL,0,NULL,0,2,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:30:01','2018-01-16 16:37:14',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,NULL,'123456789077',2,'',NULL,NULL,'',NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-09 00:30:25','2018-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM',NULL,NULL,'601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(4,'2012-07-10 14:44:06','2018-01-16 15:58:20',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,NULL,'123456789034',2,'701',NULL,NULL,'601',NULL,500,-3,NULL,0,NULL,0,NULL,0,1001,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-20 23:11:38','2018-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701',NULL,NULL,'601',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(10,'2011-12-31 00:00:00','2017-02-16 00:12:09',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',NULL,12,1,1,0,1,0,'',150,NULL,'123456789055',2,'701OLDC',NULL,NULL,'601OLDC',NULL,1.7,0,NULL,0,NULL,0,NULL,0,110,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(11,'2015-01-13 20:24:42','2018-07-30 13:42:31',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,'0',0.000,'0',1,12,0,0,0,0,0,'',NULL,NULL,'123456789044',2,'',NULL,NULL,'',NULL,2.5,0,NULL,0,2.34,0,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(12,'2018-07-30 17:31:29','2018-07-30 13:35:02',0,0,'DOLICLOUD',1,NULL,'SaaS service of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','','',NULL,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,1,'',NULL,'http://www.dolicloud.com','123456789013',2,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,8.50000000,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-02-16 03:49:00','2017-02-15 23:49:27',0,0,'COMP-XP4548',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,12,1,1,0,1,0,'',150,NULL,NULL,2,'',NULL,NULL,'',NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_product` VALUES (1,'2012-07-08 14:33:17','2018-01-16 16:30:35',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,NULL,'123456789066',2,'701PINKDRESS',NULL,NULL,'601PINKDRESS',NULL,670,-3,NULL,0,NULL,0,NULL,0,2,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:30:01','2018-01-16 16:37:14',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,NULL,'123456789077',2,'',NULL,NULL,'',NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-09 00:30:25','2018-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM',NULL,NULL,'601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(4,'2012-07-10 14:44:06','2018-01-16 15:58:20',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,NULL,'123456789034',2,'701',NULL,NULL,'601',NULL,500,-3,NULL,0,NULL,0,NULL,0,1001,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-20 23:11:38','2018-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701',NULL,NULL,'601',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(10,'2011-12-31 00:00:00','2017-02-16 00:12:09',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',NULL,12,1,1,0,1,0,'',150,NULL,'123456789055',2,'701OLDC',NULL,NULL,'601OLDC',NULL,1.7,0,NULL,0,NULL,0,NULL,0,110,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(11,'2015-01-13 20:24:42','2019-10-08 17:21:07',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789044',2,'','','','',NULL,95,-3,NULL,0,2.34,-4,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,12.00000000,NULL,0,NULL,'',NULL,8,NULL,8,NULL,NULL),(12,'2018-07-30 17:31:29','2018-07-30 13:35:02',0,0,'DOLICLOUD',1,NULL,'SaaS service of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','','',NULL,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,1,'',NULL,'http://www.dolicloud.com','123456789013',2,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,8.50000000,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-02-16 03:49:00','2017-02-15 23:49:27',0,0,'COMP-XP4548',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,12,1,1,0,1,0,'',150,NULL,NULL,2,'',NULL,NULL,'',NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL),(14,'2019-09-27 19:16:07','2019-09-27 17:16:07',0,0,'ppp',1,NULL,'ppp aaa','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',18.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,6,0,1,-2,4,-4,5,-6,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,'IGST',0,NULL,'',2,-2,3,-2,NULL,NULL),(23,'2019-10-07 00:00:00','2019-10-07 10:22:24',0,0,'PREF123456',1,NULL,'Product name in default language','Product description in default language','a private note (free text)','customs code',1,100.00000000,110.00000000,100.00000000,110.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,NULL,0,1,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-3,1,-1,4,-4,5,-3,NULL,0.00000000,NULL,NULL,'default@product',0,0,'20191007122224',NULL,NULL,NULL,NULL,NULL,0,'a public note (free text)','',2,-1,3,-1,NULL,NULL); /*!40000 ALTER TABLE `llx_product` ENABLE KEYS */; UNLOCK TABLES; @@ -9091,7 +9093,7 @@ CREATE TABLE `llx_product_fournisseur_price` ( CONSTRAINT `fk_product_fournisseur_price_barcode_type` FOREIGN KEY (`fk_barcode_type`) REFERENCES `llx_c_barcode_type` (`rowid`), CONSTRAINT `fk_product_fournisseur_price_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), CONSTRAINT `fk_product_fournisseur_price_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9100,7 +9102,7 @@ CREATE TABLE `llx_product_fournisseur_price` ( LOCK TABLES `llx_product_fournisseur_price` WRITE; /*!40000 ALTER TABLE `llx_product_fournisseur_price` DISABLE KEYS */; -INSERT INTO `llx_product_fournisseur_price` VALUES (1,'2012-07-11 18:45:42','2014-12-08 13:11:08',4,1,'ABCD',NULL,NULL,10.00000000,1,0,0,10.00000000,0.00000000,0.000,NULL,0,1,NULL,1,NULL,NULL,NULL,NULL,1.00000000,NULL,NULL,NULL,NULL,0.000,'0',0.000,'0',NULL,NULL),(2,'2018-07-30 17:34:38','2018-07-30 13:34:38',12,10,'BASIC',NULL,0,9.00000000,1,0,0,9.00000000,0.00000000,0.000,NULL,0,12,NULL,1,NULL,NULL,NULL,'FAVORITE',1.00000000,NULL,NULL,NULL,NULL,0.000,'0',0.000,'0',NULL,NULL),(3,'2017-02-02 05:17:08','2017-02-02 01:17:08',1,10,'aaa',NULL,0,100.00000000,1,10,0,100.00000000,0.00000000,12.500,NULL,0,12,NULL,1,NULL,NULL,NULL,NULL,1.00000000,NULL,NULL,NULL,NULL,0.000,'0',0.000,'0',NULL,NULL); +INSERT INTO `llx_product_fournisseur_price` VALUES (1,'2012-07-11 18:45:42','2014-12-08 13:11:08',4,1,'ABCD',NULL,NULL,10.00000000,1,0,0,10.00000000,0.00000000,0.000,NULL,0,1,NULL,1,NULL,NULL,NULL,NULL,1.00000000,NULL,NULL,NULL,NULL,0.000,'0',0.000,'0',NULL,NULL),(2,'2018-07-30 17:34:38','2018-07-30 13:34:38',12,10,'BASIC',NULL,0,9.00000000,1,0,0,9.00000000,0.00000000,0.000,NULL,0,12,NULL,1,NULL,NULL,NULL,'FAVORITE',1.00000000,NULL,NULL,NULL,NULL,0.000,'0',0.000,'0',NULL,NULL),(3,'2017-02-02 05:17:08','2017-02-02 01:17:08',1,10,'aaa',NULL,0,100.00000000,1,10,0,100.00000000,0.00000000,12.500,NULL,0,12,NULL,1,NULL,NULL,NULL,NULL,1.00000000,NULL,NULL,NULL,NULL,0.000,'0',0.000,'0',NULL,NULL),(4,'2019-10-08 19:21:34','2019-10-08 17:21:34',11,10,'ggg','',0,0.00000000,10,0,0,0.00000000,0.00000000,0.000,NULL,0,12,NULL,1,NULL,NULL,NULL,NULL,1.00000000,0.00000000,1,'EUR',0.00000000,0.000,'0',0.000,'0',NULL,2); /*!40000 ALTER TABLE `llx_product_fournisseur_price` ENABLE KEYS */; UNLOCK TABLES; @@ -9124,7 +9126,7 @@ CREATE TABLE `llx_product_fournisseur_price_log` ( `multicurrency_price` double(24,8) DEFAULT NULL, `multicurrency_unitprice` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9133,7 +9135,7 @@ CREATE TABLE `llx_product_fournisseur_price_log` ( LOCK TABLES `llx_product_fournisseur_price_log` WRITE; /*!40000 ALTER TABLE `llx_product_fournisseur_price_log` DISABLE KEYS */; -INSERT INTO `llx_product_fournisseur_price_log` VALUES (1,'2012-07-11 18:45:42',1,10.00000000,1,1,NULL,NULL,1.00000000,NULL,NULL); +INSERT INTO `llx_product_fournisseur_price_log` VALUES (1,'2012-07-11 18:45:42',1,10.00000000,1,1,NULL,NULL,1.00000000,NULL,NULL),(2,'2019-10-08 19:21:34',4,0.00000000,10,12,1,'EUR',1.00000000,0.00000000,0.00000000); /*!40000 ALTER TABLE `llx_product_fournisseur_price_log` ENABLE KEYS */; UNLOCK TABLES; @@ -9155,7 +9157,7 @@ CREATE TABLE `llx_product_lang` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_lang` (`fk_product`,`lang`), CONSTRAINT `fk_product_lang_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9164,7 +9166,7 @@ CREATE TABLE `llx_product_lang` ( LOCK TABLES `llx_product_lang` WRITE; /*!40000 ALTER TABLE `llx_product_lang` DISABLE KEYS */; -INSERT INTO `llx_product_lang` VALUES (1,1,'en_US','Pink dress','A beatifull pink dress','',NULL),(2,2,'en_US','Pear Pie','','',NULL),(3,3,'en_US','Cake making contribution','','',NULL),(4,4,'fr_FR','Decapsuleur','','',NULL),(5,5,'en_US','DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','',NULL),(9,11,'fr_FR','hfghf','','',NULL),(10,2,'fr_FR','Product P1','','',NULL),(11,4,'en_US','Apple Pie','Nice Bio Apple Pie.
\r\n ','',NULL),(12,11,'en_US','Rollup Dolibarr','A nice rollup','',NULL),(13,10,'en_US','Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.',NULL),(14,12,'en_US','SaaS hosting of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','',NULL),(15,12,'fr_FR','Service SaaS Hébergement Dolibarr ERP CRM','Service SaaS d'hébergement de la solution Dolibarr ERP CRM','',NULL),(16,13,'en_US','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL),(17,13,'fr_FR','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL); +INSERT INTO `llx_product_lang` VALUES (1,1,'en_US','Pink dress','A beatifull pink dress','',NULL),(2,2,'en_US','Pear Pie','','',NULL),(3,3,'en_US','Cake making contribution','','',NULL),(4,4,'fr_FR','Decapsuleur','','',NULL),(5,5,'en_US','DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','',NULL),(9,11,'fr_FR','hfghf','','',NULL),(10,2,'fr_FR','Product P1','','',NULL),(11,4,'en_US','Apple Pie','Nice Bio Apple Pie.
\r\n ','',NULL),(12,11,'en_US','Rollup Dolibarr','A nice rollup','',NULL),(13,10,'en_US','Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.',NULL),(14,12,'en_US','SaaS hosting of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','',NULL),(15,12,'fr_FR','Service SaaS Hébergement Dolibarr ERP CRM','Service SaaS d'hébergement de la solution Dolibarr ERP CRM','',NULL),(16,13,'en_US','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL),(17,13,'fr_FR','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL),(18,14,'en_US','ppp aaa','',NULL,NULL); /*!40000 ALTER TABLE `llx_product_lang` ENABLE KEYS */; UNLOCK TABLES; @@ -9269,7 +9271,7 @@ CREATE TABLE `llx_product_price` ( KEY `idx_product_price_fk_product` (`fk_product`), CONSTRAINT `fk_product_price_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), CONSTRAINT `fk_product_price_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9278,7 +9280,7 @@ CREATE TABLE `llx_product_price` ( LOCK TABLES `llx_product_price` WRITE; /*!40000 ALTER TABLE `llx_product_price` DISABLE KEYS */; -INSERT INTO `llx_product_price` VALUES (1,1,'2012-07-08 12:33:17',1,'2012-07-08 14:33:17',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(2,1,'2012-07-08 22:30:01',2,'2012-07-09 00:30:01',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(3,1,'2012-07-08 22:30:25',3,'2012-07-09 00:30:25',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(4,1,'2012-07-10 12:44:06',4,'2012-07-10 14:44:06',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(5,1,'2013-07-20 21:11:38',5,'2013-07-20 23:11:38',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(6,1,'2013-07-27 17:02:59',5,'2013-07-27 19:02:59',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(10,1,'2013-07-31 22:34:27',4,'2013-08-01 00:34:27',1,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(12,1,'2015-01-13 19:24:59',11,'2015-01-13 20:24:59',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(13,1,'2015-03-12 09:30:24',1,'2015-03-12 10:30:24',1,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(14,1,'2018-07-30 13:31:29',12,'2018-07-30 17:31:29',1,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(15,1,'2017-02-15 23:49:00',13,'2017-02-16 03:49:00',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,0,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(16,1,'2017-08-30 15:04:04',10,'2017-08-30 19:04:04',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL); +INSERT INTO `llx_product_price` VALUES (1,1,'2012-07-08 12:33:17',1,'2012-07-08 14:33:17',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(2,1,'2012-07-08 22:30:01',2,'2012-07-09 00:30:01',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(3,1,'2012-07-08 22:30:25',3,'2012-07-09 00:30:25',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(4,1,'2012-07-10 12:44:06',4,'2012-07-10 14:44:06',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(5,1,'2013-07-20 21:11:38',5,'2013-07-20 23:11:38',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(6,1,'2013-07-27 17:02:59',5,'2013-07-27 19:02:59',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(10,1,'2013-07-31 22:34:27',4,'2013-08-01 00:34:27',1,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(12,1,'2015-01-13 19:24:59',11,'2015-01-13 20:24:59',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(13,1,'2015-03-12 09:30:24',1,'2015-03-12 10:30:24',1,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(14,1,'2018-07-30 13:31:29',12,'2018-07-30 17:31:29',1,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(15,1,'2017-02-15 23:49:00',13,'2017-02-16 03:49:00',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,0,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(16,1,'2017-08-30 15:04:04',10,'2017-08-30 19:04:04',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(17,1,'2019-09-27 17:16:07',14,'2019-09-27 19:16:07',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',18.000,'IGST',0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL); /*!40000 ALTER TABLE `llx_product_price` ENABLE KEYS */; UNLOCK TABLES; @@ -9482,7 +9484,7 @@ CREATE TABLE `llx_projet` ( LOCK TABLES `llx_projet` WRITE; /*!40000 ALTER TABLE `llx_projet` DISABLE KEYS */; -INSERT INTO `llx_projet` VALUES (1,11,'2012-07-09 00:00:00','2017-10-05 20:51:28','2012-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL,NULL,NULL,0),(2,13,'2012-07-09 00:00:00','2017-10-05 20:51:51','2012-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(3,1,'2012-07-09 00:00:00','2017-02-01 11:55:08','2012-07-09',NULL,'PROJINDIAN',1,'Project for Indian company move','',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(4,NULL,'2012-07-09 00:00:00','2012-07-08 22:50:49','2012-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(5,NULL,'2012-07-11 00:00:00','2017-02-01 15:01:51','2012-07-11','2013-07-14','RMLL',1,'Project management RMLL','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(6,10,'2018-07-30 00:00:00','2018-07-30 15:53:07','2018-07-30',NULL,'PJ1607-0001',1,'PROJALICE1','The Alice project number 1',12,0,1,2,20.00,NULL,NULL,NULL,5000.00000000,NULL,NULL,8000.00000000,NULL,NULL,0),(7,10,'2018-07-30 00:00:00','2017-02-01 12:24:37','2018-07-30',NULL,'PJ1607-0002',1,'PROJALICE2','The Alice project number 2',12,0,1,6,100.00,NULL,NULL,NULL,NULL,'2017-02-01 16:24:31',12,7000.00000000,NULL,NULL,0),(8,10,'2018-07-30 00:00:00','2018-07-30 15:53:23','2018-07-30',NULL,'PJ1607-0003',1,'PROJALICE2','The Alice project number 3',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,NULL,3550.00000000,NULL,NULL,0),(9,4,'2018-07-31 00:00:00','2018-07-31 14:27:26','2018-07-31',NULL,'PJ1607-0004',1,'Project Top X','',12,0,1,2,27.00,NULL,NULL,NULL,NULL,NULL,NULL,4000.00000000,NULL,NULL,0); +INSERT INTO `llx_projet` VALUES (1,11,'2012-07-09 00:00:00','2017-10-05 20:51:28','2012-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL,NULL,NULL,0),(2,13,'2012-07-09 00:00:00','2017-10-05 20:51:51','2012-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(3,1,'2012-07-09 00:00:00','2017-02-01 11:55:08','2012-07-09',NULL,'PROJINDIAN',1,'Project for Indian company move','',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(4,NULL,'2012-07-09 00:00:00','2012-07-08 22:50:49','2012-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(5,NULL,'2012-07-11 00:00:00','2017-02-01 15:01:51','2012-07-11','2013-07-14','RMLL',1,'Project management RMLL','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(6,10,'2018-07-30 00:00:00','2019-10-01 11:48:36','2018-07-30',NULL,'PJ1607-0001',1,'PROJALICE1','The Alice project number 1',12,0,1,2,20.00,NULL,NULL,NULL,5000.00000000,NULL,NULL,8000.00000000,NULL,12,1),(7,10,'2018-07-30 00:00:00','2017-02-01 12:24:37','2018-07-30',NULL,'PJ1607-0002',1,'PROJALICE2','The Alice project number 2',12,0,1,6,100.00,NULL,NULL,NULL,NULL,'2017-02-01 16:24:31',12,7000.00000000,NULL,NULL,0),(8,10,'2018-07-30 00:00:00','2018-07-30 15:53:23','2018-07-30',NULL,'PJ1607-0003',1,'PROJALICE2','The Alice project number 3',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,NULL,3550.00000000,NULL,NULL,0),(9,4,'2018-07-31 00:00:00','2018-07-31 14:27:26','2018-07-31',NULL,'PJ1607-0004',1,'Project Top X','',12,0,1,2,27.00,NULL,NULL,NULL,NULL,NULL,NULL,4000.00000000,NULL,NULL,0); /*!40000 ALTER TABLE `llx_projet` ENABLE KEYS */; UNLOCK TABLES; @@ -9501,7 +9503,7 @@ CREATE TABLE `llx_projet_extrafields` ( `priority` mediumtext COLLATE utf8_unicode_ci, PRIMARY KEY (`rowid`), KEY `idx_projet_extrafields` (`fk_object`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9510,7 +9512,7 @@ CREATE TABLE `llx_projet_extrafields` ( LOCK TABLES `llx_projet_extrafields` WRITE; /*!40000 ALTER TABLE `llx_projet_extrafields` DISABLE KEYS */; -INSERT INTO `llx_projet_extrafields` VALUES (5,'2018-07-30 15:53:07',6,NULL,'3'),(7,'2018-07-30 15:53:23',8,NULL,'5'),(9,'2018-07-31 14:27:24',9,NULL,'0'),(13,'2017-02-01 11:55:08',3,NULL,'0'),(15,'2017-02-01 12:24:31',7,NULL,'1'),(16,'2017-02-01 15:01:51',5,NULL,'0'); +INSERT INTO `llx_projet_extrafields` VALUES (7,'2018-07-30 15:53:23',8,NULL,'5'),(9,'2018-07-31 14:27:24',9,NULL,'0'),(13,'2017-02-01 11:55:08',3,NULL,'0'),(15,'2017-02-01 12:24:31',7,NULL,'1'),(16,'2017-02-01 15:01:51',5,NULL,'0'),(17,'2019-10-01 11:48:36',6,NULL,'3'); /*!40000 ALTER TABLE `llx_projet_extrafields` ENABLE KEYS */; UNLOCK TABLES; @@ -9764,7 +9766,7 @@ CREATE TABLE `llx_propal` ( CONSTRAINT `fk_propal_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_propal_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_propal_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9773,7 +9775,7 @@ CREATE TABLE `llx_propal` ( LOCK TABLES `llx_propal` WRITE; /*!40000 ALTER TABLE `llx_propal` DISABLE KEYS */; -INSERT INTO `llx_propal` VALUES (1,2,NULL,'2018-07-30 15:56:45','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2018-07-09','2018-07-24 12:00:00','2017-08-08 14:24:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,1,NULL,'2018-07-30 15:56:54','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2018-07-10','2018-07-25 12:00:00','2018-07-10 02:12:55','2017-07-20 15:23:12',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,4,NULL,'2018-07-30 15:56:54','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2018-07-18','2018-08-02 12:00:00','2018-07-18 11:36:18','2017-07-20 15:21:15',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(5,19,NULL,'2018-07-30 15:56:54','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2018-02-17','2018-03-04 12:00:00','2018-11-15 23:27:10',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(6,19,NULL,'2018-07-30 15:56:54','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2018-02-17','2018-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(7,19,NULL,'2017-01-29 17:49:33','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2018-02-17','2018-03-04 12:00:00','2017-01-29 21:49:33',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL),(8,19,NULL,'2018-07-30 15:56:39','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2018-02-17','2018-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(10,7,NULL,'2018-07-30 15:57:25','(PROV10)',1,NULL,NULL,'','2017-11-15 23:37:08','2017-11-15','2018-11-30 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,3,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(11,1,NULL,'2017-02-16 00:44:58','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2017-05-13','2017-05-28 12:00:00','2017-02-16 01:44:58',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL),(12,7,NULL,'2017-02-16 00:45:44','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2017-06-24','2017-07-09 12:00:00','2017-02-16 01:45:44',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL),(13,26,NULL,'2017-02-16 00:46:15','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2017-04-03','2017-04-18 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL),(14,3,NULL,'2017-02-16 00:46:15','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2018-06-19','2018-07-04 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL),(15,26,NULL,'2017-02-16 00:46:15','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2018-05-01','2018-05-16 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL),(16,1,NULL,'2017-02-16 00:46:15','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2017-05-13','2017-05-28 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL),(17,1,NULL,'2017-02-16 00:46:15','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2018-07-23','2018-08-07 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL),(18,26,NULL,'2017-02-16 00:46:15','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2017-02-13','2017-02-28 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL),(19,12,NULL,'2017-02-16 00:46:15','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2017-03-30','2017-04-14 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL),(20,26,NULL,'2017-02-16 00:46:15','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL),(21,1,NULL,'2017-02-16 00:47:09','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2017-09-23','2018-10-08 12:00:00','2017-02-16 04:47:09',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL),(22,26,NULL,'2017-02-16 00:47:13','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,NULL),(23,12,NULL,'2017-02-17 12:07:18','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2018-04-03','2018-04-18 12:00:00','2017-02-17 16:07:18',NULL,2,NULL,12,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL),(24,7,NULL,'2017-02-16 00:46:17','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:17',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL),(25,3,NULL,'2017-02-16 00:47:29','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2018-07-09','2018-07-24 12:00:00','2017-02-16 01:46:17','2017-02-16 04:47:29',1,NULL,1,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL),(26,1,NULL,'2017-02-16 00:46:18','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2018-04-03','2018-04-18 12:00:00','2017-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL),(27,6,NULL,'2017-02-16 00:46:18','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2018-11-12','2018-11-27 12:00:00','2017-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL),(28,19,NULL,'2017-02-16 00:46:31','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2017-07-30','2017-08-14 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:31',2,NULL,2,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL),(29,1,NULL,'2017-02-16 00:46:37','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2017-07-23','2017-08-07 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:37',2,NULL,2,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL),(30,1,NULL,'2017-02-16 00:46:42','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2018-05-01','2018-05-16 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:42',2,NULL,2,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL),(31,11,NULL,'2017-02-16 00:46:18','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2018-06-24','2018-07-09 12:00:00','2017-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL),(32,19,NULL,'2017-02-16 00:46:18','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2018-11-12','2018-11-27 12:00:00','2017-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL); +INSERT INTO `llx_propal` VALUES (1,2,NULL,'2018-07-30 15:56:45','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2018-07-09','2018-07-24 12:00:00','2017-08-08 14:24:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,1,NULL,'2018-07-30 15:56:54','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2018-07-10','2018-07-25 12:00:00','2018-07-10 02:12:55','2017-07-20 15:23:12',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,4,NULL,'2018-07-30 15:56:54','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2018-07-18','2018-08-02 12:00:00','2018-07-18 11:36:18','2017-07-20 15:21:15',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(5,19,NULL,'2018-07-30 15:56:54','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2018-02-17','2018-03-04 12:00:00','2018-11-15 23:27:10',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(6,19,NULL,'2018-07-30 15:56:54','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2018-02-17','2018-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(7,19,NULL,'2017-01-29 17:49:33','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2018-02-17','2018-03-04 12:00:00','2017-01-29 21:49:33',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL),(8,19,NULL,'2018-07-30 15:56:39','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2018-02-17','2018-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(10,7,4,'2019-09-27 14:54:30','PR1909-0031',1,NULL,NULL,'','2017-11-15 23:37:08','2017-11-15','2018-11-30 12:00:00','2019-09-27 16:54:30',NULL,12,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,3,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0031/PR1909-0031.pdf'),(11,1,NULL,'2017-02-16 00:44:58','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2017-05-13','2017-05-28 12:00:00','2017-02-16 01:44:58',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL),(12,7,NULL,'2017-02-16 00:45:44','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2017-06-24','2017-07-09 12:00:00','2017-02-16 01:45:44',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL),(13,26,NULL,'2017-02-16 00:46:15','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2017-04-03','2017-04-18 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL),(14,3,NULL,'2017-02-16 00:46:15','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2018-06-19','2018-07-04 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL),(15,26,NULL,'2017-02-16 00:46:15','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2018-05-01','2018-05-16 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL),(16,1,NULL,'2017-02-16 00:46:15','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2017-05-13','2017-05-28 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL),(17,1,NULL,'2017-02-16 00:46:15','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2018-07-23','2018-08-07 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL),(18,26,NULL,'2017-02-16 00:46:15','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2017-02-13','2017-02-28 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL),(19,12,NULL,'2017-02-16 00:46:15','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2017-03-30','2017-04-14 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL),(20,26,NULL,'2017-02-16 00:46:15','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL),(21,1,NULL,'2017-02-16 00:47:09','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2017-09-23','2018-10-08 12:00:00','2017-02-16 04:47:09',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL),(22,26,NULL,'2019-09-27 17:47:00','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,'propale/PR1702-0020/PR1702-0020.pdf'),(23,12,NULL,'2017-02-17 12:07:18','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2018-04-03','2018-04-18 12:00:00','2017-02-17 16:07:18',NULL,2,NULL,12,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL),(24,7,NULL,'2017-02-16 00:46:17','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:17',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL),(25,3,NULL,'2017-02-16 00:47:29','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2018-07-09','2018-07-24 12:00:00','2017-02-16 01:46:17','2017-02-16 04:47:29',1,NULL,1,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL),(26,1,NULL,'2017-02-16 00:46:18','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2018-04-03','2018-04-18 12:00:00','2017-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL),(27,6,NULL,'2017-02-16 00:46:18','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2018-11-12','2018-11-27 12:00:00','2017-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL),(28,19,NULL,'2017-02-16 00:46:31','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2017-07-30','2017-08-14 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:31',2,NULL,2,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL),(29,1,NULL,'2017-02-16 00:46:37','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2017-07-23','2017-08-07 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:37',2,NULL,2,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL),(30,1,NULL,'2017-02-16 00:46:42','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2018-05-01','2018-05-16 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:42',2,NULL,2,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL),(31,11,NULL,'2017-02-16 00:46:18','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2018-06-24','2018-07-09 12:00:00','2017-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL),(32,19,NULL,'2017-02-16 00:46:18','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2018-11-12','2018-11-27 12:00:00','2017-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL),(33,10,6,'2019-09-27 15:08:59','PR1909-0032',1,NULL,NULL,'','2019-09-27 17:07:40','2019-09-27','2019-10-12 12:00:00','2019-09-27 17:08:59',NULL,12,NULL,12,NULL,1,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/PR1909-0032/PR1909-0032.pdf'),(34,10,6,'2019-09-27 15:13:13','PR1909-0033',1,NULL,NULL,'','2019-09-27 17:11:21','2019-09-27','2019-10-12 12:00:00','2019-09-27 17:13:13',NULL,12,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0033/PR1909-0033.pdf'),(35,10,NULL,'2019-09-27 15:53:44','(PROV35)',1,NULL,NULL,'','2019-09-27 17:53:44','2019-09-27','2019-10-12 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/(PROV35)/(PROV35).pdf'); /*!40000 ALTER TABLE `llx_propal` ENABLE KEYS */; UNLOCK TABLES; @@ -9885,7 +9887,7 @@ CREATE TABLE `llx_propaldet` ( KEY `fk_propaldet_fk_unit` (`fk_unit`), CONSTRAINT `fk_propaldet_fk_propal` FOREIGN KEY (`fk_propal`) REFERENCES `llx_propal` (`rowid`), CONSTRAINT `fk_propaldet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9894,7 +9896,7 @@ CREATE TABLE `llx_propaldet` ( LOCK TABLES `llx_propaldet` WRITE; /*!40000 ALTER TABLE `llx_propaldet` DISABLE KEYS */; -INSERT INTO `llx_propaldet` VALUES (1,1,NULL,NULL,NULL,'Une machine à café',NULL,12.500,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.25000000,0.00000000,0.00000000,11.25000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(2,2,NULL,NULL,NULL,'Product 1',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(3,2,NULL,2,NULL,'',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,3,NULL,NULL,NULL,'A new marvelous product',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(5,1,NULL,5,NULL,'cccc',NULL,19.600,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(11,1,NULL,4,NULL,'',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(12,1,NULL,4,NULL,'',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(13,1,NULL,4,NULL,'',NULL,12.500,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(24,5,NULL,NULL,NULL,'On demand Apple pie',NULL,20.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(25,7,NULL,NULL,NULL,'Help to setup Magic Food computer',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,400.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'',400.00000000,400.00000000,0.00000000,400.00000000),(26,11,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(27,11,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(28,12,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,5.00000000,0.00000000,5.00000000),(29,12,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(30,12,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(31,12,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(32,12,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(33,13,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(34,13,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(35,13,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(36,13,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(37,14,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(38,14,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(39,15,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(40,15,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(41,15,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(42,15,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(43,16,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(44,16,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(45,16,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(46,17,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(47,17,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(48,17,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(49,17,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(50,17,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(51,18,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(52,18,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(53,18,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(54,19,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(55,19,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(56,19,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(57,19,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(58,19,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(59,20,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(60,20,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(61,20,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(62,20,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(63,21,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(64,21,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9.00000000,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(65,21,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(66,21,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(67,22,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(68,22,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(69,23,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(70,23,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(71,23,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(72,23,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(73,24,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,5.00000000,0.00000000,5.00000000),(74,24,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(75,24,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(76,24,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(77,25,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(78,25,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(79,25,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(80,25,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(81,25,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(82,26,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(83,26,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(84,26,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(85,26,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(86,26,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(87,27,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(88,27,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(89,28,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(90,28,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,10.00000000,30.00000000,0.00000000,0.00000000,0.00000000,30.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,30.00000000,0.00000000,30.00000000),(91,28,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(92,28,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(93,29,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(94,29,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(95,29,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(96,30,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(97,30,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(98,30,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(99,30,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(100,31,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,5.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,20.00000000,0.00000000,20.00000000),(101,31,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(102,31,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(103,31,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(104,32,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(105,32,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(106,32,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(107,32,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(108,32,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',9.00000000,18.00000000,0.00000000,18.00000000); +INSERT INTO `llx_propaldet` VALUES (1,1,NULL,NULL,NULL,'Une machine à café',NULL,12.500,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.25000000,0.00000000,0.00000000,11.25000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(2,2,NULL,NULL,NULL,'Product 1',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(3,2,NULL,2,NULL,'',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(4,3,NULL,NULL,NULL,'A new marvelous product',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(5,1,NULL,5,NULL,'cccc',NULL,19.600,'',0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(11,1,NULL,4,NULL,'',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(12,1,NULL,4,NULL,'',NULL,0.000,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(13,1,NULL,4,NULL,'',NULL,12.500,'',0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(24,5,NULL,NULL,NULL,'On demand Apple pie',NULL,20.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000),(25,7,NULL,NULL,NULL,'Help to setup Magic Food computer',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,400.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'',400.00000000,400.00000000,0.00000000,400.00000000),(26,11,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(27,11,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(28,12,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,5.00000000,0.00000000,5.00000000),(29,12,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(30,12,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(31,12,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(32,12,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(33,13,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(34,13,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(35,13,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,9.00000000,27.00000000,0.00000000,0.00000000,0.00000000,27.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',9.00000000,27.00000000,0.00000000,27.00000000),(36,13,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(37,14,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(38,14,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(39,15,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(40,15,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(41,15,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(42,15,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(43,16,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(44,16,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,10.00000000,40.00000000,0.00000000,0.00000000,0.00000000,40.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,40.00000000,0.00000000,40.00000000),(45,16,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(46,17,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(47,17,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(48,17,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(49,17,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(50,17,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(51,18,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(52,18,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(53,18,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(54,19,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(55,19,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(56,19,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(57,19,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(58,19,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(59,20,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(60,20,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(61,20,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(62,20,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(63,21,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(64,21,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,9.00000000,9.00000000,0.00000000,0.00000000,0.00000000,9.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,9.00000000,0.00000000,9.00000000),(65,21,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(66,21,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(67,22,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,10.00000000,50.00000000,0.00000000,0.00000000,0.00000000,50.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',10.00000000,50.00000000,0.00000000,50.00000000),(68,22,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,10.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,20.00000000,0.00000000,20.00000000),(69,23,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(70,23,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,5.00000000,15.00000000,0.00000000,0.00000000,0.00000000,15.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',5.00000000,15.00000000,0.00000000,15.00000000),(71,23,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(72,23,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(73,24,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,5.00000000,0.00000000,5.00000000),(74,24,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(75,24,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(76,24,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(77,25,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(78,25,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(79,25,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(80,25,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(81,25,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(82,26,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(83,26,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(84,26,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(85,26,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(86,26,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(87,27,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(88,27,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(89,28,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,5.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,10.00000000,0.00000000,10.00000000),(90,28,NULL,5,NULL,'DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,10.00000000,30.00000000,0.00000000,0.00000000,0.00000000,30.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',10.00000000,30.00000000,0.00000000,30.00000000),(91,28,NULL,2,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(92,28,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(93,29,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(94,29,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,100.00000000,500.00000000,0.00000000,0.00000000,0.00000000,500.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,500.00000000,0.00000000,500.00000000),(95,29,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(96,30,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(97,30,NULL,1,NULL,'A beatifull pink dress',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(98,30,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,100.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,200.00000000,0.00000000,200.00000000),(99,30,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(100,31,NULL,4,NULL,'Nice Bio Apple Pie.
\r\n ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,5.00000000,20.00000000,0.00000000,0.00000000,0.00000000,20.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',5.00000000,20.00000000,0.00000000,20.00000000),(101,31,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(102,31,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',3,0,0,NULL,100.00000000,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',100.00000000,300.00000000,0.00000000,300.00000000),(103,31,NULL,3,NULL,'',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(104,32,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(105,32,NULL,10,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,100.00000000,100.00000000,0.00000000,0.00000000,0.00000000,100.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL,NULL,'EUR',100.00000000,100.00000000,0.00000000,100.00000000),(106,32,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',5,0,0,NULL,9.00000000,45.00000000,0.00000000,0.00000000,0.00000000,45.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',9.00000000,45.00000000,0.00000000,45.00000000),(107,32,NULL,13,NULL,'A powerfull computer XP4523 ',NULL,0.000,'',0.000,'0',0.000,'0',4,0,0,NULL,100.00000000,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL,NULL,'EUR',100.00000000,400.00000000,0.00000000,400.00000000),(108,32,NULL,12,NULL,'Cloud hosting of Dolibarr ERP and CRM software',NULL,0.000,'',0.000,'0',0.000,'0',2,0,0,NULL,9.00000000,18.00000000,0.00000000,0.00000000,0.00000000,18.00000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL,NULL,'EUR',9.00000000,18.00000000,0.00000000,18.00000000),(109,10,NULL,NULL,NULL,'fdfd',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,NULL,'',10.00000000,10.00000000,0.00000000,10.00000000),(110,33,NULL,3,NULL,'aaa',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1,NULL,NULL,0,NULL,0.00000000,0,1,NULL,1,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(111,34,NULL,NULL,NULL,'fd',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL,1,'EUR',10.00000000,10.00000000,0.00000000,10.00000000),(114,22,NULL,11,NULL,'A nice rollup',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL,NULL,'EUR',0.00000000,0.00000000,0.00000000,0.00000000),(115,35,NULL,11,NULL,'A nice rollup',NULL,0.000,'',0.000,'0',0.000,'0',1,0,0,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,12.00000000,0,1,NULL,1,'EUR',0.00000000,0.00000000,0.00000000,0.00000000); /*!40000 ALTER TABLE `llx_propaldet` ENABLE KEYS */; UNLOCK TABLES; @@ -10109,7 +10111,7 @@ CREATE TABLE `llx_rights_def` ( LOCK TABLES `llx_rights_def` WRITE; /*!40000 ALTER TABLE `llx_rights_def` DISABLE KEYS */; -INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0),(26,'Cloturer les propositions commerciales','propale',1,'cloturer',NULL,'d',0),(26,'Cloturer les propositions commerciales','propale',2,'cloturer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1),(31,'Lire les produits','produit',2,'lire',NULL,'r',1),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0),(41,'Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)','projet',1,'lire',NULL,'r',1),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0),(45,'Export projects','projet',1,'export',NULL,'d',0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0),(76,'Export members','adherent',1,'export',NULL,'r',0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',0),(82,'Creer/modifier les commandes clients','commande',1,'creer',NULL,'w',0),(84,'Valider les commandes clients','commande',1,'order_advance','validate','d',0),(86,'Envoyer les commandes clients','commande',1,'order_advance','send','d',0),(87,'Cloturer les commandes clients','commande',1,'cloturer',NULL,'d',0),(88,'Annuler les commandes clients','commande',1,'order_advance','annuler','d',0),(89,'Supprimer les commandes clients','commande',1,'supprimer',NULL,'d',0),(91,'Lire les charges','tax',1,'charges','lire','r',0),(91,'Lire les charges','tax',2,'charges','lire','r',1),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0),(94,'Exporter les charges','tax',1,'charges','export','r',0),(94,'Exporter les charges','tax',2,'charges','export','r',0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',1),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',0),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0),(121,'Read third parties','societe',1,'lire',NULL,'r',0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0),(126,'Export third parties','societe',1,'export',NULL,'r',0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0),(167,'Export contracts','contrat',1,'export',NULL,'r',0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0),(262,'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1),(281,'Read contacts','societe',1,'contact','lire','r',0),(281,'Lire les contacts','societe',2,'contact','lire','r',1),(282,'Create and update contact','societe',1,'contact','creer','w',0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0),(286,'Export contacts','societe',1,'contact','export','d',0),(286,'Exporter les contacts','societe',2,'contact','export','d',0),(300,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1),(301,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0),(351,'Consulter les groupes','user',1,'group_advance','read','r',0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0),(511,'Read payments of employee salaries','salaries',1,'read',NULL,'r',0),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0),(517,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0),(520,'Read loans','loan',1,'read',NULL,'r',0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0),(524,'Delete loans','loan',1,'delete',NULL,'d',0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0),(527,'Export loans','loan',1,'export',NULL,'r',0),(531,'Read services','service',1,'lire',NULL,'r',0),(532,'Create/modify services','service',1,'creer',NULL,'w',0),(534,'Delete les services','service',1,'supprimer',NULL,'d',0),(538,'Export services','service',1,'export',NULL,'r',0),(701,'Lire les dons','don',1,'lire',NULL,'r',1),(701,'Lire les dons','don',2,'lire',NULL,'r',1),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',1),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0),(774,'Read all expense reports','expensereport',1,'readall',NULL,'r',1),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',1),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0),(1101,'Lire les bons de livraison','expedition',1,'livraison','lire','r',1),(1102,'Creer modifier les bons de livraison','expedition',1,'livraison','creer','w',0),(1104,'Valider les bons de livraison','expedition',1,'livraison_advance','validate','d',0),(1109,'Supprimer les bons de livraison','expedition',1,'livraison','supprimer','d',0),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',1),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0),(1421,'Exporter les commandes clients et attributs','commande',1,'commande','export','r',0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0),(2501,'Consulter/Télécharger les documents','ecm',1,'read',NULL,'r',0),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',0),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',0),(3200,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0),(20001,'Read your own leave requests','holiday',1,'read',NULL,'w',0),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1),(20002,'Create/modify your own leave requests','holiday',1,'write',NULL,'w',0),(20002,'Lire / Modifier toutes les demandes de congés payés','holiday',2,'lire_tous',NULL,'w',0),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0),(20004,'Read leave requests for everybody','holiday',1,'read_all',NULL,'w',0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0),(20005,'Create/modify leave requests for everybody','holiday',1,'write_all',NULL,'w',0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0),(50101,'Use point of sale','cashdesk',1,'use',NULL,'a',0),(50151,'Use point of sale','takepos',1,'use',NULL,'a',0),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear',NULL,'r',0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0),(56001,'Read ticket','ticket',1,'read',NULL,'r',0),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0),(56005,'See all tickets, even if not assigned to (not effective for external users, always restricted to the thirdpardy they depends on)','ticket',1,'view','all','r',0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',1),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0),(59003,'Read every user margin','margins',1,'read','all','r',0),(63001,'Read resources','resource',1,'read',NULL,'w',1),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0),(63004,'Link resources','resource',1,'link',NULL,'w',0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0); +INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0),(26,'Cloturer les propositions commerciales','propale',1,'cloturer',NULL,'d',0),(26,'Cloturer les propositions commerciales','propale',2,'cloturer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1),(31,'Lire les produits','produit',2,'lire',NULL,'r',1),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0),(41,'Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)','projet',1,'lire',NULL,'r',1),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0),(45,'Export projects','projet',1,'export',NULL,'d',0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0),(76,'Export members','adherent',1,'export',NULL,'r',0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',0),(82,'Creer/modifier les commandes clients','commande',1,'creer',NULL,'w',0),(84,'Valider les commandes clients','commande',1,'order_advance','validate','d',0),(86,'Envoyer les commandes clients','commande',1,'order_advance','send','d',0),(87,'Cloturer les commandes clients','commande',1,'cloturer',NULL,'d',0),(88,'Annuler les commandes clients','commande',1,'order_advance','annuler','d',0),(89,'Supprimer les commandes clients','commande',1,'supprimer',NULL,'d',0),(91,'Lire les charges','tax',1,'charges','lire','r',0),(91,'Lire les charges','tax',2,'charges','lire','r',1),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0),(94,'Exporter les charges','tax',1,'charges','export','r',0),(94,'Exporter les charges','tax',2,'charges','export','r',0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',1),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',0),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0),(121,'Read third parties','societe',1,'lire',NULL,'r',0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0),(126,'Export third parties','societe',1,'export',NULL,'r',0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0),(167,'Export contracts','contrat',1,'export',NULL,'r',0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0),(262,'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1),(281,'Read contacts','societe',1,'contact','lire','r',0),(281,'Lire les contacts','societe',2,'contact','lire','r',1),(282,'Create and update contact','societe',1,'contact','creer','w',0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0),(286,'Export contacts','societe',1,'contact','export','d',0),(286,'Exporter les contacts','societe',2,'contact','export','d',0),(300,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1),(301,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0),(351,'Consulter les groupes','user',1,'group_advance','read','r',0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0),(511,'Read payments of employee salaries','salaries',1,'read',NULL,'r',0),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0),(517,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0),(520,'Read loans','loan',1,'read',NULL,'r',0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0),(524,'Delete loans','loan',1,'delete',NULL,'d',0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0),(527,'Export loans','loan',1,'export',NULL,'r',0),(531,'Read services','service',1,'lire',NULL,'r',0),(532,'Create/modify services','service',1,'creer',NULL,'w',0),(534,'Delete les services','service',1,'supprimer',NULL,'d',0),(538,'Export services','service',1,'export',NULL,'r',0),(650,'Read bom of Bom','bom',1,'read',NULL,'w',0),(651,'Create/Update bom of Bom','bom',1,'write',NULL,'w',0),(652,'Delete bom of Bom','bom',1,'delete',NULL,'w',0),(701,'Lire les dons','don',1,'lire',NULL,'r',1),(701,'Lire les dons','don',2,'lire',NULL,'r',1),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',1),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0),(774,'Read all expense reports','expensereport',1,'readall',NULL,'r',1),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',1),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0),(1101,'Lire les bons de livraison','expedition',1,'livraison','lire','r',1),(1102,'Creer modifier les bons de livraison','expedition',1,'livraison','creer','w',0),(1104,'Valider les bons de livraison','expedition',1,'livraison_advance','validate','d',0),(1109,'Supprimer les bons de livraison','expedition',1,'livraison','supprimer','d',0),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',1),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0),(1421,'Exporter les commandes clients et attributs','commande',1,'commande','export','r',0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0),(2501,'Consulter/Télécharger les documents','ecm',1,'read',NULL,'r',0),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',0),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',0),(3200,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0),(10001,'Read website content','website',1,'read',NULL,'w',0),(10002,'Create/modify website content (html and javascript content)','website',1,'write',NULL,'w',0),(10003,'Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.','website',1,'writephp',NULL,'w',0),(10005,'Delete website content','website',1,'delete',NULL,'w',0),(20001,'Read your own leave requests','holiday',1,'read',NULL,'w',0),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1),(20002,'Create/modify your own leave requests','holiday',1,'write',NULL,'w',0),(20002,'Lire / Modifier toutes les demandes de congés payés','holiday',2,'lire_tous',NULL,'w',0),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0),(20004,'Read leave requests for everybody','holiday',1,'read_all',NULL,'w',0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0),(20005,'Create/modify leave requests for everybody','holiday',1,'write_all',NULL,'w',0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0),(50101,'Use point of sale','cashdesk',1,'use',NULL,'a',0),(50151,'Use point of sale','takepos',1,'use',NULL,'a',0),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear',NULL,'r',0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0),(56001,'Read ticket','ticket',1,'read',NULL,'r',0),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0),(56005,'See all tickets, even if not assigned to (not effective for external users, always restricted to the thirdpardy they depends on)','ticket',1,'view','all','r',0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',1),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0),(59003,'Read every user margin','margins',1,'read','all','r',0),(63001,'Read resources','resource',1,'read',NULL,'w',1),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0),(63004,'Link resources','resource',1,'link',NULL,'w',0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0); /*!40000 ALTER TABLE `llx_rights_def` ENABLE KEYS */; UNLOCK TABLES; @@ -10290,7 +10292,7 @@ CREATE TABLE `llx_societe` ( LOCK TABLES `llx_societe` WRITE; /*!40000 ALTER TABLE `llx_societe` DISABLE KEYS */; -INSERT INTO `llx_societe` VALUES (1,0,NULL,'2018-01-16 15:21:09','2012-07-08 14:21:44','Indian SAS',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,117,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000.00000000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'en_IN',NULL,NULL,1,'indiancompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(2,0,NULL,'2018-07-30 11:45:49','2012-07-08 14:23:48','Teclib',1,NULL,NULL,'CU1108-0001','SU1108-0001','411CU11080001','401SU11080001','',NULL,'Paris',0,1,NULL,NULL,'www.teclib.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,3,57,'0','123456789','','ACE14','','',400000.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'fr_FR',NULL,NULL,1,'teclibcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0),(3,0,NULL,'2017-02-16 00:47:25','2012-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP','SU1601-0009',NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'es_AR',NULL,NULL,1,'spanishcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(4,0,NULL,'2018-01-22 17:24:53','2012-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'valeencompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(5,0,NULL,'2017-02-21 11:01:17','2012-07-08 23:22:57','NoCountry GmBh',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'nocountrycomp.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0),(6,0,NULL,'2018-01-16 15:35:56','2012-07-09 00:15:09','Swiss Touch',1,NULL,NULL,'CU1601-0018','SU1601-0010',NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'swisstouch@example.ch',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,2,601,'0','','','','','',56000.00000000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'swisstouch.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(7,0,NULL,'2018-01-16 15:38:32','2012-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,8,NULL,'0','','','','','',0.00000000,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'genericcustomer.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(10,0,NULL,'2018-01-16 15:44:20','2012-07-10 15:13:08','NLTechno',1,NULL,NULL,'CU1212-0005','SU1601-0011',NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,'notanemail@nltechno.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,4,54,'0','493861496','49386149600039','6209Z','22-01-2007','FR123456789',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,'123456789012',NULL,'fr_FR',NULL,NULL,1,'logo_nltechno_94x100.png','','',0,NULL,NULL,'The OpenSource company',0,NULL,NULL,NULL,NULL,NULL,0),(11,0,NULL,'2017-05-12 09:06:31','2012-07-10 18:35:57','Company Corp 1',1,NULL,NULL,'CU1510-0017',NULL,'7051',NULL,'21 Green Hill street','75500','Los Angeles',0,11,'444123456',NULL,'companycorp1.com','companycorp1@example.com','corp1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,'0','AB1234567','','','','USABS123',10000.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'comapnycorp1company.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0),(12,0,NULL,'2019-09-26 11:38:11','2012-07-11 16:18:08','Dupont Alain',1,NULL,NULL,'CU1601-0019',NULL,'411CU16010019',NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,'pcurie@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'pierrecurie.jpg','','',0,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0),(13,0,NULL,'2018-01-22 17:13:16','2012-07-11 17:13:20','Company Corp 2',1,NULL,NULL,NULL,'SU1510-0008',NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'companycorp2company.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(17,0,NULL,'2017-02-15 22:55:34','2013-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,'401SU11080004','The French Company',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0),(19,0,NULL,'2019-09-26 12:03:13','2015-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','10/10/2010','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'magicfoodstore.png','','',0,NULL,NULL,'',0,NULL,'sepamandate',NULL,NULL,NULL,0),(25,0,NULL,'2018-01-22 17:21:17','2015-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(26,0,NULL,'2019-09-26 12:06:05','2017-02-12 23:17:04','Calculation Power',1,NULL,NULL,'CU1702-0020',NULL,'411CU17020020',NULL,'',NULL,'Calgary',0,14,NULL,NULL,NULL,'calculationpower@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0.000,0,0.000,NULL,NULL,'en_US',NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0); +INSERT INTO `llx_societe` VALUES (1,0,NULL,'2018-01-16 15:21:09','2012-07-08 14:21:44','Indian SAS',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,117,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000.00000000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'en_IN',NULL,NULL,1,'indiancompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(2,0,NULL,'2018-07-30 11:45:49','2012-07-08 14:23:48','Teclib',1,NULL,NULL,'CU1108-0001','SU1108-0001','411CU11080001','401SU11080001','',NULL,'Paris',0,1,NULL,NULL,'www.teclib.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,3,57,'0','123456789','','ACE14','','',400000.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'fr_FR',NULL,NULL,1,'teclibcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0),(3,0,NULL,'2017-02-16 00:47:25','2012-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP','SU1601-0009',NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'es_AR',NULL,NULL,1,'spanishcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(4,0,NULL,'2018-01-22 17:24:53','2012-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'valeencompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(5,0,NULL,'2017-02-21 11:01:17','2012-07-08 23:22:57','NoCountry GmBh',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'nocountrycomp.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0),(6,0,NULL,'2018-01-16 15:35:56','2012-07-09 00:15:09','Swiss Touch',1,NULL,NULL,'CU1601-0018','SU1601-0010',NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'swisstouch@example.ch',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,2,601,'0','','','','','',56000.00000000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'swisstouch.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(7,0,NULL,'2018-01-16 15:38:32','2012-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,8,NULL,'0','','','','','',0.00000000,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'genericcustomer.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(10,0,NULL,'2019-10-08 19:02:18','2012-07-10 15:13:08','NLTechno',1,NULL,NULL,'CU1212-0005','SU1601-0011','411CU12120005','401SU16010011','',NULL,NULL,0,102,NULL,NULL,NULL,'vsmith@email.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,4,54,'0','493861496','49386149600039','6209Z','22-01-2007','FR123456789',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,'123456789012',NULL,'fr_FR',NULL,NULL,1,'logo_nltechno_94x100.png','','',0,NULL,NULL,'The OpenSource company',0,NULL,NULL,0,'',NULL,0),(11,0,NULL,'2017-05-12 09:06:31','2012-07-10 18:35:57','Company Corp 1',1,NULL,NULL,'CU1510-0017',NULL,'7051',NULL,'21 Green Hill street','75500','Los Angeles',0,11,'444123456',NULL,'companycorp1.com','companycorp1@example.com','corp1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,'0','AB1234567','','','','USABS123',10000.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'comapnycorp1company.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0),(12,0,NULL,'2019-09-26 11:38:11','2012-07-11 16:18:08','Dupont Alain',1,NULL,NULL,'CU1601-0019',NULL,'411CU16010019',NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,'pcurie@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'pierrecurie.jpg','','',0,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0),(13,0,NULL,'2019-10-08 09:57:51','2012-07-11 17:13:20','Company Corp 2',1,NULL,NULL,'CU1910-00021','SU1510-0008','411CU191000021','401SU15100008','',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'companycorp2company.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0),(17,0,NULL,'2017-02-15 22:55:34','2013-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,'401SU11080004','The French Company',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0),(19,0,NULL,'2019-09-26 12:03:13','2015-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','10/10/2010','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'magicfoodstore.png','','',0,NULL,NULL,'',0,NULL,'sepamandate',NULL,NULL,NULL,0),(25,0,NULL,'2018-01-22 17:21:17','2015-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0),(26,0,NULL,'2019-09-26 12:06:05','2017-02-12 23:17:04','Calculation Power',1,NULL,NULL,'CU1702-0020',NULL,'411CU17020020',NULL,'',NULL,'Calgary',0,14,NULL,NULL,NULL,'calculationpower@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0.000,0,0.000,NULL,NULL,'en_US',NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0); /*!40000 ALTER TABLE `llx_societe` ENABLE KEYS */; UNLOCK TABLES; @@ -11216,7 +11218,7 @@ CREATE TABLE `llx_ticket` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ticket_track_id` (`track_id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11225,7 +11227,7 @@ CREATE TABLE `llx_ticket` ( LOCK TABLES `llx_ticket` WRITE; /*!40000 ALTER TABLE `llx_ticket` DISABLE KEYS */; -INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,'0',NULL,'REQUEST','OTHER','NORMAL','2019-09-26 14:08:46',NULL,NULL,0,'2019-09-26 12:12:21'),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',2,NULL,'0',NULL,'ISSUE','OTHER','NORMAL','2019-09-26 14:10:31',NULL,NULL,0,'2019-09-26 12:10:57'); +INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,'0',NULL,'REQUEST','OTHER','NORMAL','2019-09-26 14:08:46',NULL,NULL,0,'2019-09-26 12:12:21'),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',8,NULL,'100',NULL,'ISSUE','OTHER','NORMAL','2019-09-26 14:10:31',NULL,'2019-10-04 13:05:55',0,'2019-10-04 11:05:55'),(4,1,'TS1910-0003','fdv9wrzcte7b3c8b',NULL,NULL,NULL,12,NULL,'test','test',2,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-10-04 12:58:04',NULL,NULL,0,'2019-10-04 10:58:07'),(5,1,'TS1910-0004','9d85cko5qmmo7qxs',NULL,NULL,'contact@destailleur.fr',NULL,NULL,'aaa','aaaa',3,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-10-04 14:02:38',NULL,NULL,1,'2019-10-04 14:56:21'); /*!40000 ALTER TABLE `llx_ticket` ENABLE KEYS */; UNLOCK TABLES; @@ -11396,7 +11398,7 @@ CREATE TABLE `llx_user` ( LOCK TABLES `llx_user` WRITE; /*!40000 ALTER TABLE `llx_user` DISABLE KEYS */; -INSERT INTO `llx_user` VALUES (1,'2012-07-08 13:20:11','2019-09-26 11:49:46',NULL,NULL,'aeinstein',0,NULL,NULL,NULL,1,0,NULL,'11c9c772d6471aa24c27274bdd8a223b',NULL,NULL,'Einstein','Albert','','','123456789','','','','aeinstein@example.com','','',0,'',1,1,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(2,'2012-07-08 13:54:48','2019-09-26 11:52:16',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'fe01ce2a7fbac8fafaed7c982a04e229',NULL,NULL,'Doe','David','Trainee','','09123123','','','','daviddoe@example.com','','',0,'',1,1,NULL,NULL,NULL,'','2018-07-30 23:10:54','2018-07-30 23:04:17',NULL,'',1,'person9.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,35.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(3,'2012-07-11 16:18:59','2019-09-26 11:49:21',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'ab335b4eb4c3c99334f656e5db9584c9',NULL,NULL,'Curie','Pierre','','','','','','','pcurie@example.com','','',0,'',1,1,NULL,NULL,2,'','2014-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(4,'2015-01-23 17:52:27','2019-09-26 11:52:59',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'a7d30b58d647fcf59b7163f9592b1dbb',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','skypebbookkeeper','','','','','bbookkeeper@example.com','','',0,'',1,1,17,6,NULL,'','2015-02-25 10:18:41','2015-01-23 17:53:20',NULL,'',1,'person8.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,16.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(10,'2017-10-03 11:47:41','2019-09-26 11:53:28',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'52cda011808bb282d1d3625ab607a145',NULL,'t3mnkbhs','Curie','Marie','','','','','','','mcurie@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(11,'2017-10-05 09:07:52','2019-09-26 11:53:50',NULL,NULL,'zzeceo',1,NULL,NULL,NULL,1,0,NULL,'92af989c4c3a5140fb5d73eb77a52454',NULL,'cq78nf9m','Zeceo','Zack','President - CEO','','','','','','zzeceo@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 22:48:08','2017-10-05 21:18:46',NULL,'',1,'person4.jpeg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,'2019-06-10 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(12,'2017-10-05 09:09:46','2019-09-26 11:54:18',NULL,NULL,'admin',0,NULL,NULL,NULL,1,0,NULL,'f6fdffe48c908deb0f4c3bd36c032e72',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','','aadminson@example.com','','Alice - 123',1,NULL,1,1,NULL,NULL,NULL,'','2018-03-16 13:54:23','2018-01-19 11:21:41',NULL,'',1,'person6.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2700.00000000,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,'1985-09-15',NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(13,'2017-10-05 21:29:35','2019-09-26 11:55:58',NULL,NULL,'ccommercy',1,NULL,NULL,NULL,1,0,NULL,'179858e041af35e8f4c81d68c55fe9da',NULL,'y451ksdv','Commercy','Coraly','Commercial leader','','','','','','ccommercy@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person7.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,1890.00000000,NULL,NULL,25.00000000,'woman',NULL,'2018-09-11 00:00:00',NULL,NULL,'1998-12-08',NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(14,'2017-10-05 21:33:33','2019-09-26 11:55:09',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'39bee07ac42f31c98e79cdcd5e5fe4c5',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','','sscientol@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person3.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,3500.00000000,NULL,NULL,39.00000000,NULL,NULL,'2018-07-03 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(16,'2017-10-05 22:47:52','2019-09-26 11:55:23',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'d68005ccf362b82d084551b6291792a3',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','','ccommerson@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:46:24','2017-10-05 23:37:31',NULL,'',1,'person1.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2900.00000000,NULL,NULL,39.00000000,NULL,NULL,'2019-09-01 00:00:00',NULL,NULL,'1976-02-05',NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(17,'2017-10-05 22:48:39','2019-09-26 11:55:35',NULL,NULL,'aleerfok',1,NULL,NULL,NULL,1,0,NULL,'a964065211872fb76f876c6c3e952ea3',NULL,'gw8cb7xj','Leerfok','Amanda','Sale representative','','','','','','aleerfok@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:16:06',NULL,NULL,'',0,'person5.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(18,'2018-01-22 17:27:02','2019-09-26 11:37:30',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'1bb7805145a7a5066df9e6d585b8b645',NULL,'87g06wbx','Destailleur','Laurent','Project leader of Dolibarr ERP CRM','','','','','','ldestailleur@example.com','','
Laurent DESTAILLEUR
\r\n\r\n
\r\n
Project Director
\r\nldestailleur@example.com
\r\n\r\n
 
\r\n\r\n\r\n
',0,NULL,1,1,10,10,NULL,'More information on http://www.destailleur.fr','2017-09-06 11:55:30','2017-08-30 15:53:25',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(19,'2017-02-02 03:55:44','2019-09-26 11:51:36',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'a7a77a5aff2d5fc2f75f2f61507c88d4',NULL,NULL,'Boston','Alex','','','','','','','aboston@example.com','','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person2.jpeg',NULL,NULL,12,NULL,NULL,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,2700.00000000,NULL,NULL,32.00000000,NULL,NULL,'2016-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1); +INSERT INTO `llx_user` VALUES (1,'2012-07-08 13:20:11','2019-09-26 11:49:46',NULL,NULL,'aeinstein',0,NULL,NULL,NULL,1,0,NULL,'11c9c772d6471aa24c27274bdd8a223b',NULL,NULL,'Einstein','Albert','','','123456789','','','','aeinstein@example.com','','',0,'',1,1,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(2,'2012-07-08 13:54:48','2019-09-26 11:52:16',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'fe01ce2a7fbac8fafaed7c982a04e229',NULL,NULL,'Doe','David','Trainee','','09123123','','','','daviddoe@example.com','','',0,'',1,1,NULL,NULL,NULL,'','2018-07-30 23:10:54','2018-07-30 23:04:17',NULL,'',1,'person9.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,35.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(3,'2012-07-11 16:18:59','2019-10-08 19:01:07',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'ab335b4eb4c3c99334f656e5db9584c9',NULL,NULL,'Curie','Pierre','','','','','','','pcurie@example.com','','',0,'',1,1,NULL,NULL,2,'','2014-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(4,'2015-01-23 17:52:27','2019-09-26 11:52:59',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'a7d30b58d647fcf59b7163f9592b1dbb',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','skypebbookkeeper','','','','','bbookkeeper@example.com','','',0,'',1,1,17,6,NULL,'','2015-02-25 10:18:41','2015-01-23 17:53:20',NULL,'',1,'person8.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,16.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(10,'2017-10-03 11:47:41','2019-09-26 11:53:28',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'52cda011808bb282d1d3625ab607a145',NULL,'t3mnkbhs','Curie','Marie','','','','','','','mcurie@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(11,'2017-10-05 09:07:52','2019-09-26 11:53:50',NULL,NULL,'zzeceo',1,NULL,NULL,NULL,1,0,NULL,'92af989c4c3a5140fb5d73eb77a52454',NULL,'cq78nf9m','Zeceo','Zack','President - CEO','','','','','','zzeceo@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 22:48:08','2017-10-05 21:18:46',NULL,'',1,'person4.jpeg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,'2019-06-10 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(12,'2017-10-05 09:09:46','2019-09-26 11:54:18',NULL,NULL,'admin',0,NULL,NULL,NULL,1,0,NULL,'f6fdffe48c908deb0f4c3bd36c032e72',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','','aadminson@example.com','','Alice - 123',1,NULL,1,1,NULL,NULL,NULL,'','2019-10-08 20:38:32','2019-10-08 19:04:46',NULL,'',1,'person6.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2700.00000000,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,'1985-09-15',NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(13,'2017-10-05 21:29:35','2019-09-26 11:55:58',NULL,NULL,'ccommercy',1,NULL,NULL,NULL,1,0,NULL,'179858e041af35e8f4c81d68c55fe9da',NULL,'y451ksdv','Commercy','Coraly','Commercial leader','','','','','','ccommercy@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person7.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,1890.00000000,NULL,NULL,25.00000000,'woman',NULL,'2018-09-11 00:00:00',NULL,NULL,'1998-12-08',NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(14,'2017-10-05 21:33:33','2019-09-26 11:55:09',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'39bee07ac42f31c98e79cdcd5e5fe4c5',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','','sscientol@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person3.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,3500.00000000,NULL,NULL,39.00000000,NULL,NULL,'2018-07-03 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(16,'2017-10-05 22:47:52','2019-09-26 11:55:23',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'d68005ccf362b82d084551b6291792a3',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','','ccommerson@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:46:24','2017-10-05 23:37:31',NULL,'',1,'person1.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2900.00000000,NULL,NULL,39.00000000,NULL,NULL,'2019-09-01 00:00:00',NULL,NULL,'1976-02-05',NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(17,'2017-10-05 22:48:39','2019-09-26 11:55:35',NULL,NULL,'aleerfok',1,NULL,NULL,NULL,1,0,NULL,'a964065211872fb76f876c6c3e952ea3',NULL,'gw8cb7xj','Leerfok','Amanda','Sale representative','','','','','','aleerfok@example.com','','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:16:06',NULL,NULL,'',0,'person5.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(18,'2018-01-22 17:27:02','2019-09-26 11:37:30',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'1bb7805145a7a5066df9e6d585b8b645',NULL,'87g06wbx','Destailleur','Laurent','Project leader of Dolibarr ERP CRM','','','','','','ldestailleur@example.com','','
Laurent DESTAILLEUR
\r\n\r\n
\r\n
Project Director
\r\nldestailleur@example.com
\r\n\r\n
 
\r\n\r\n\r\n
',0,NULL,1,1,10,10,NULL,'More information on http://www.destailleur.fr','2019-10-04 10:06:40','2017-09-06 11:55:30',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1),(19,'2017-02-02 03:55:44','2019-09-26 11:51:36',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'a7a77a5aff2d5fc2f75f2f61507c88d4',NULL,NULL,'Boston','Alex','','','','','','','aboston@example.com','','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person2.jpeg',NULL,NULL,12,NULL,NULL,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,2700.00000000,NULL,NULL,32.00000000,NULL,NULL,'2016-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,'',-1); /*!40000 ALTER TABLE `llx_user` ENABLE KEYS */; UNLOCK TABLES; @@ -11540,7 +11542,7 @@ CREATE TABLE `llx_user_param` ( LOCK TABLES `llx_user_param` WRITE; /*!40000 ALTER TABLE `llx_user_param` DISABLE KEYS */; -INSERT INTO `llx_user_param` VALUES (1,1,'MAIN_BOXES_0','1'),(1,1,'MAIN_THEME','eldy'),(1,3,'THEME_ELDY_ENABLE_PERSONALIZED','1'),(1,1,'THEME_ELDY_RGB','ded0ed'),(1,3,'THEME_ELDY_RGB','d0ddc3'),(2,1,'MAIN_BOXES_0','1'),(11,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_LANG_DEFAULT','en_US'),(12,1,'MAIN_SELECTEDFIELDS_/dolibarr_4.0/htdocs/adherents/list.php','d.zip,d.ref,d.lastname,d.firstname,d.company,d.login,d.morphy,t.libelle,d.email,d.datefin,d.statut,'),(12,1,'MAIN_SELECTEDFIELDS_invoicelist','f.tms,f.facnumber,f.ref_client,f.date,f.date_lim_reglement,s.nom,s.town,s.zip,f.fk_mode_reglement,f.total_ht,rtp,f.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_projectlist','p.budget_amount,p.ref,p.title,s.nom,commercial,p.dateo,p.datee,p.public,p.opp_amount,p.fk_opp_status,p.opp_percent,p.fk_statut,ef.priority,'),(12,1,'MAIN_SELECTEDFIELDS_proposallist','p.datec,p.ref,p.ref_client,s.nom,s.town,s.zip,p.date,p.fin_validite,p.total_ht,u.login,p.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_servicelist','p.ref,p.label,p.duration,p.sellprice,p.minbuyprice,p.tosell,p.tobuy,'); +INSERT INTO `llx_user_param` VALUES (1,1,'MAIN_BOXES_0','1'),(1,1,'MAIN_THEME','eldy'),(1,3,'THEME_ELDY_ENABLE_PERSONALIZED','1'),(1,1,'THEME_ELDY_RGB','ded0ed'),(1,3,'THEME_ELDY_RGB','d0ddc3'),(2,1,'MAIN_BOXES_0','1'),(11,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_LANG_DEFAULT','en_US'),(12,1,'MAIN_SELECTEDFIELDS_/dolibarr_4.0/htdocs/adherents/list.php','d.zip,d.ref,d.lastname,d.firstname,d.company,d.login,d.morphy,t.libelle,d.email,d.datefin,d.statut,'),(12,1,'MAIN_SELECTEDFIELDS_invoicelist','f.tms,f.facnumber,f.ref_client,f.date,f.date_lim_reglement,s.nom,s.town,s.zip,f.fk_mode_reglement,f.total_ht,rtp,f.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_poslist','f.ref,f.ref_client,f.date,f.date_lim_reglement,p.ref,s.nom,s.town,s.zip,f.total_ht,f.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_projectlist','p.budget_amount,p.ref,p.title,s.nom,commercial,p.dateo,p.datee,p.public,p.opp_amount,p.fk_opp_status,p.opp_percent,p.fk_statut,ef.priority,'),(12,1,'MAIN_SELECTEDFIELDS_proposallist','p.datec,p.ref,p.ref_client,s.nom,s.town,s.zip,p.date,p.fin_validite,p.total_ht,u.login,p.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_servicelist','p.ref,p.label,p.duration,p.sellprice,p.minbuyprice,p.tosell,p.tobuy,'); /*!40000 ALTER TABLE `llx_user_param` ENABLE KEYS */; UNLOCK TABLES; @@ -11597,7 +11599,7 @@ CREATE TABLE `llx_user_rights` ( UNIQUE KEY `uk_user_rights` (`entity`,`fk_user`,`fk_id`), KEY `fk_user_rights_fk_user_user` (`fk_user`), CONSTRAINT `fk_user_rights_fk_user_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=16922 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=16934 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11606,7 +11608,7 @@ CREATE TABLE `llx_user_rights` ( LOCK TABLES `llx_user_rights` WRITE; /*!40000 ALTER TABLE `llx_user_rights` DISABLE KEYS */; -INSERT INTO `llx_user_rights` VALUES (12402,1,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12468,1,1,20002),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10364,1,2,20002),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12661,1,10,20002),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12717,1,11,20002),(12718,1,11,23001),(12719,1,11,50101),(16814,1,12,11),(16806,1,12,12),(16807,1,12,13),(16808,1,12,14),(16809,1,12,15),(16812,1,12,16),(16815,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(16786,1,12,81),(16780,1,12,82),(16781,1,12,84),(16782,1,12,86),(16784,1,12,87),(16785,1,12,88),(16787,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(14939,1,12,101),(14935,1,12,102),(14936,1,12,104),(14937,1,12,105),(14938,1,12,106),(14940,1,12,109),(15390,1,12,111),(15377,1,12,112),(15380,1,12,113),(15383,1,12,114),(15386,1,12,115),(15389,1,12,116),(15392,1,12,117),(16876,1,12,121),(16871,1,12,122),(16874,1,12,125),(16877,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(16917,1,12,251),(16898,1,12,252),(16900,1,12,253),(16901,1,12,254),(16903,1,12,255),(16905,1,12,256),(16878,1,12,262),(16888,1,12,281),(16883,1,12,282),(16886,1,12,283),(16889,1,12,286),(16769,1,12,300),(16770,1,12,301),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(16906,1,12,341),(16907,1,12,342),(16908,1,12,343),(16909,1,12,344),(16915,1,12,351),(16912,1,12,352),(16914,1,12,353),(16916,1,12,354),(16918,1,12,358),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(16865,1,12,511),(16862,1,12,512),(16864,1,12,514),(16866,1,12,517),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(16895,1,12,531),(16892,1,12,532),(16894,1,12,534),(16896,1,12,538),(13358,1,12,700),(16795,1,12,701),(16793,1,12,702),(16796,1,12,703),(15090,1,12,771),(15081,1,12,772),(15083,1,12,773),(15085,1,12,774),(15087,1,12,775),(15089,1,12,776),(15091,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(14945,1,12,1101),(14943,1,12,1102),(14944,1,12,1104),(14946,1,12,1109),(14762,1,12,1121),(14755,1,12,1122),(14757,1,12,1123),(14759,1,12,1124),(14761,1,12,1125),(14763,1,12,1126),(16818,1,12,1181),(16832,1,12,1182),(16821,1,12,1183),(16822,1,12,1184),(16824,1,12,1185),(16826,1,12,1186),(16828,1,12,1187),(16831,1,12,1188),(16829,1,12,1189),(16833,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(16841,1,12,1231),(16836,1,12,1232),(16837,1,12,1233),(16839,1,12,1234),(16840,1,12,1235),(16842,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(16816,1,12,1321),(16817,1,12,1322),(16788,1,12,1421),(16758,1,12,2401),(16756,1,12,2402),(16759,1,12,2403),(16766,1,12,2411),(16764,1,12,2412),(16767,1,12,2413),(16768,1,12,2414),(16800,1,12,2501),(16799,1,12,2503),(16801,1,12,2515),(16386,1,12,3200),(15435,1,12,5001),(15436,1,12,5002),(16854,1,12,20001),(16845,1,12,20002),(16847,1,12,20003),(16851,1,12,20004),(16853,1,12,20005),(16855,1,12,20006),(16849,1,12,20007),(16776,1,12,23001),(16773,1,12,23002),(16775,1,12,23003),(16777,1,12,23004),(16744,1,12,50101),(16743,1,12,50151),(16746,1,12,50401),(16748,1,12,50411),(16749,1,12,50412),(16750,1,12,50420),(16751,1,12,50430),(16745,1,12,50440),(16857,1,12,55001),(16858,1,12,55002),(16740,1,12,56001),(16737,1,12,56002),(16739,1,12,56003),(16741,1,12,56004),(16742,1,12,56005),(14128,1,12,59001),(14129,1,12,59002),(14130,1,12,59003),(14818,1,12,63001),(14815,1,12,63002),(14817,1,12,63003),(14819,1,12,63004),(16859,1,12,64001),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(16920,1,12,101701),(16921,1,12,101702),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12829,1,13,20002),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12885,1,14,20002),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12997,1,16,20002),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13053,1,17,20002),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14547,1,18,20002),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15280,1,19,20002),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); +INSERT INTO `llx_user_rights` VALUES (12402,1,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12468,1,1,20002),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10364,1,2,20002),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12661,1,10,20002),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12717,1,11,20002),(12718,1,11,23001),(12719,1,11,50101),(16814,1,12,11),(16806,1,12,12),(16807,1,12,13),(16808,1,12,14),(16809,1,12,15),(16812,1,12,16),(16815,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(16786,1,12,81),(16780,1,12,82),(16781,1,12,84),(16782,1,12,86),(16784,1,12,87),(16785,1,12,88),(16787,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(14939,1,12,101),(14935,1,12,102),(14936,1,12,104),(14937,1,12,105),(14938,1,12,106),(14940,1,12,109),(15390,1,12,111),(15377,1,12,112),(15380,1,12,113),(15383,1,12,114),(15386,1,12,115),(15389,1,12,116),(15392,1,12,117),(16876,1,12,121),(16871,1,12,122),(16874,1,12,125),(16877,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(16917,1,12,251),(16898,1,12,252),(16900,1,12,253),(16901,1,12,254),(16903,1,12,255),(16905,1,12,256),(16878,1,12,262),(16888,1,12,281),(16883,1,12,282),(16886,1,12,283),(16889,1,12,286),(16769,1,12,300),(16770,1,12,301),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(16906,1,12,341),(16907,1,12,342),(16908,1,12,343),(16909,1,12,344),(16915,1,12,351),(16912,1,12,352),(16914,1,12,353),(16916,1,12,354),(16918,1,12,358),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(16865,1,12,511),(16862,1,12,512),(16864,1,12,514),(16866,1,12,517),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(16895,1,12,531),(16892,1,12,532),(16894,1,12,534),(16896,1,12,538),(16932,1,12,650),(16931,1,12,651),(16933,1,12,652),(13358,1,12,700),(16795,1,12,701),(16793,1,12,702),(16796,1,12,703),(15090,1,12,771),(15081,1,12,772),(15083,1,12,773),(15085,1,12,774),(15087,1,12,775),(15089,1,12,776),(15091,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(14945,1,12,1101),(14943,1,12,1102),(14944,1,12,1104),(14946,1,12,1109),(14762,1,12,1121),(14755,1,12,1122),(14757,1,12,1123),(14759,1,12,1124),(14761,1,12,1125),(14763,1,12,1126),(16818,1,12,1181),(16832,1,12,1182),(16821,1,12,1183),(16822,1,12,1184),(16824,1,12,1185),(16826,1,12,1186),(16828,1,12,1187),(16831,1,12,1188),(16829,1,12,1189),(16833,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(16841,1,12,1231),(16836,1,12,1232),(16837,1,12,1233),(16839,1,12,1234),(16840,1,12,1235),(16842,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(16816,1,12,1321),(16817,1,12,1322),(16788,1,12,1421),(16758,1,12,2401),(16756,1,12,2402),(16759,1,12,2403),(16766,1,12,2411),(16764,1,12,2412),(16767,1,12,2413),(16768,1,12,2414),(16800,1,12,2501),(16799,1,12,2503),(16801,1,12,2515),(16386,1,12,3200),(15435,1,12,5001),(15436,1,12,5002),(16927,1,12,10001),(16924,1,12,10002),(16926,1,12,10003),(16928,1,12,10005),(16854,1,12,20001),(16845,1,12,20002),(16847,1,12,20003),(16851,1,12,20004),(16853,1,12,20005),(16855,1,12,20006),(16849,1,12,20007),(16776,1,12,23001),(16773,1,12,23002),(16775,1,12,23003),(16777,1,12,23004),(16744,1,12,50101),(16743,1,12,50151),(16746,1,12,50401),(16748,1,12,50411),(16749,1,12,50412),(16750,1,12,50420),(16751,1,12,50430),(16745,1,12,50440),(16857,1,12,55001),(16858,1,12,55002),(16740,1,12,56001),(16737,1,12,56002),(16739,1,12,56003),(16741,1,12,56004),(16742,1,12,56005),(14128,1,12,59001),(14129,1,12,59002),(14130,1,12,59003),(14818,1,12,63001),(14815,1,12,63002),(14817,1,12,63003),(14819,1,12,63004),(16859,1,12,64001),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(16920,1,12,101701),(16921,1,12,101702),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12829,1,13,20002),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12885,1,14,20002),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12997,1,16,20002),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13053,1,17,20002),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14547,1,18,20002),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15280,1,19,20002),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); /*!40000 ALTER TABLE `llx_user_rights` ENABLE KEYS */; UNLOCK TABLES; @@ -11928,7 +11930,7 @@ CREATE TABLE `llx_website` ( `maincolorbis` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_website_ref` (`ref`,`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11937,6 +11939,7 @@ CREATE TABLE `llx_website` ( LOCK TABLES `llx_website` WRITE; /*!40000 ALTER TABLE `llx_website` DISABLE KEYS */; +INSERT INTO `llx_website` VALUES (2,1,'mywebsite','My web site',1,11,'','2019-10-08 20:55:48',NULL,'2019-10-08 18:57:30',12,NULL,NULL,NULL,NULL),(3,1,'mypersonalsite','My personal web site',1,23,'','2019-10-08 20:57:59',NULL,'2019-10-08 18:58:14',12,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_website` ENABLE KEYS */; UNLOCK TABLES; @@ -11998,7 +12001,7 @@ CREATE TABLE `llx_website_page` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_website_page_url` (`fk_website`,`pageurl`), CONSTRAINT `fk_website_page_website` FOREIGN KEY (`fk_website`) REFERENCES `llx_website` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12007,6 +12010,7 @@ CREATE TABLE `llx_website_page` ( LOCK TABLES `llx_website_page` WRITE; /*!40000 ALTER TABLE `llx_website_page` DISABLE KEYS */; +INSERT INTO `llx_website_page` VALUES (1,2,'blog','','Blog','Blog','blog','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
The latest news...\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n

\n
\n\n

\n\n \n\n
\n \n\n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:18:11',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(2,2,'blog-our-company-is-now-on-dolibarr','','Our company is now on Dolibarr ERP CRM','Our company has moved on Dolibarr ERP CRM. This is an important step in improving all of our services.','','\n\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
title; ?>\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n


\n Like several thousands of companies, our company (name ?>) has moved all its information system to Dolibarr ERP CRM. More than 20 applications have been replaced by only one, easier to use and fully integrated.\n This is an important step in improving all of our services.\n \n


\n \n
\n \n

\n
Screenshot of our new Open Source solution
\n
\n \n \n \n





\n
\n\n\n\n\n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:23:06',NULL,NULL,'blogpost','en_US',NULL,'','',NULL,'image/template/background_dolibarr.jpg'),(3,2,'blog-our-new-web-site-has-been-launched','','Our new web site has been launched','Our new website, based on Dolibarr CMS, has been launched. Modern and directly integrated with the internal management tools of the company, many new online services for our customers will be able to see the day...','','\n\n
\n
\n
\n
\n
\n
\n
\n
\n
title; ?>\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n





\n\n\n Our new website, based on Dolibarr CMS, has been launched.
\n Now it is modern and directly integrated with the internal management tools of the company. Many new online services will be available for our customers...\n\n \n\n





\n
\n\n\n\n\n\n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:23:16',NULL,NULL,'blogpost','en_US',NULL,'','',NULL,'image/template/background_rough-horn.jpg'),(4,2,'careers','','Careers','Our job opportunities','career','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Job opportunities\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nThere is no job opportunities for the moment...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:24:41',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(5,2,'carriere','','Carrière','Nos opportunités professionnelles','career','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Offres d\'emploi\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nNous n\'avons pas d\'offres d\'emploi ouvertes en ce moment...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:24:57',NULL,NULL,'page','fr_FR',NULL,'','',NULL,''),(6,2,'clients-testimonials','','Clients Testimonials','Client Testimonials','testimonials, use cases, success story','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Testimonials\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n

\n

What they say about us

\n



\n Send us your testimonial (by email to email; ?>\">email; ?>)\n



\n

\n
\n\n

\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:25:18',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(7,2,'contact','','Contact','Privacy Policies','Contact','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Contact\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n

Contact us:



\n email ?>
\n getFullAddress() ?>
\n
\n
\n\n\n \n
\n
\n \n
\n\n


\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:25:38',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(8,2,'faq','','FAQ','Frequently Asked Questions','faq','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
FAQs\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n


Frequently Asked Questions

\n
\n
\n
\n

How can I contact you ?


\nYou can contact us by using this page.\n
\n
\n
\n

What is your privacy policy ?


\nYou may find information about our privacy policy on this page.\n\n\n



\n\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:25:51',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(9,2,'footer','','Footer','Footer','','\n
\n\n \n \n \n\n
\n\n\n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:28:20',NULL,NULL,'other','en_US',NULL,'','',NULL,''),(10,2,'header','','Header and Top Menu','Header with menu','','\n\n\n\n\n
\n
\n
\n \n \n
\n
\n
\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:10:17',NULL,NULL,'other','en_US',NULL,'','',NULL,''),(11,2,'home','','Home','Welcome','','
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
Boost your business\n
\n
\n

We provide powerful solutions for all businesses

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
 Best prices on the market \n
\n
\n

Our optimized processes allows us to provide you very competitive prices

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n

Our sales representative are also technicians.

\n
\n
\n
\n
\n
\n \n
\n

Take a look at our offers...

\n
\n
\n
\n
\n
\n \n
\n

Our customer-supplier relationship is very appreciated by our customers

\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n

We continue to follow and assist you after the sale. Contact us at any time.

\n
\n
\n
\n
\n
\n\n\n \n
\n
\n

Looking for

\n

a high quality service?

\n

With a lot of experience, hiring us is a security for your business!

\n
\n
\n
11
\n
Years of Experience
\n
\n
\n
\n query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?>\n
\n
Experts
\n
\n
\n
\n query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?>\n
\n
Trusted Clients
\n
\n
\n
\n \n
\n
\n
\n\n \n \n \n
\n
\n
\n \n
\n \n
\n \n
\n

our plans

\n\n \n
\n \n
\n
\n
\n
FREE
\n
The best choice for personal use
\n
The service 1 for free
\n
\n 0/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1 \n
  • \n
\n
\n
\n Subcribe\n
\n
\n
\n \n \n \n
\n
\n
\n
STARTER
\n
For small companiess
\n
The service 1 and product 1 at low price
\n
\n 29/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1\n
  • \n
  • \n \n Product 1\n
  • \n
\n
\n
\n Subscribe\n
\n
\n
\n \n \n \n
\n
\n
\n
PREMIUM
\n
For large companies
\n
The full option package for a one shot price\n
\n
\n 2499\n
\n
\n Available features are :\n
    \n
  • \n \n Service 1
  • \n
  • \n \n Service 2
  • \n
  • \n \n Product 1
  • \n
\n
\n
\n Buy\n
\n
\n
\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n
\n \n \n \n
\n
\n

our team

\n
\n
\n \n
\n
\n
\n
\n\n\n \n
\n
\n
\n
\n
\n

Request a callback

\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n

successful cases

\n
\n
\n
\n
\n
\"\"\n
\n
\n
\n
\"\"\n
\n
\n
\n
\"\"\n
\n
\n
\n
\"\"\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Albert Einstein\n
\n
Scientist, www.emc2.org
\n
\n
\n
\n
\n
-20%
\n
Expenses
\n
\n
\n
\n
\n
\n
\n \n They did everything, with almost no time or effort for me. The best part was that I could trust their team to represent our company professionally with our clients.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Pierre Curie\n
\n
CEO “Cyclonic”
\n
\n
\n
\n
\n
-30%
\n
Expenses
\n
\n
\n
\n
\n
\n
\n \n Their course gave me the confidence to implement new techniques in my work. I learn “how” to write – “what” and “why” also became much clearer.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Marie Curie\n
\n
CTO \"Cyclonic\"
\n
\n
\n
\n
\n
+22%
\n
Turnover
\n
\n
\n
\n
\n
\n
\n \n We were skeptical to work with a consultant to optimize our sales emails, but they were highly recommended by many other startups we knew. They helped us to reach our objective of 20% turnover increase, in 4 monthes.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n John Doe\n
\n
Sale representative
\n
\n
\n
\n
\n
+40%
\n
Quotes
\n
\n
\n
\n
\n
\n
\n \n Their work on our website and Internet marketing has made a significant different to our business. We’ve seen a +40% increase in quote requests from our website.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n\n \n
\n
\n

Latest News

\n
\n fetchAll($website->id, \'DESC\', \'date_creation\', $MAXNEWS, 0, array(\'type_container\'=>\'blogpost\', \'lang\'=>\'en_US\'));\n foreach($arrayofblogs as $blog)\n {\n $fuser->fetch($blog->fk_user_creat);\n ?>\n \n \n \n
\n
\n
\n\n\n \n\n\n
\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:29:04',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(12,2,'our-team','','Our team','Our team','team','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Our team\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n

\n

The crew...




\n query($sql);\n if (! $resql) dol_print_error($db);\n while ($obj = $db->fetch_object($resql))\n {\n $arrayofusers[]=$obj->rowid;\n }\n \n print \'
\';\n foreach($arrayofusers as $id)\n {\n $fuser->fetch($id);\n\n print \'
\';\n print \'
\';\n print \'
\';\n if ($fuser->photo) print Form::showphoto(\'userphoto\', $fuser, 100, 0, 0, \'photowithmargin\', \'\', 0);\n //print \'photo.\'\" width=\"129\" height=\"129\" alt=\"\">\';\n else print \'\"\"\';\n print \'
\';\n print \'
\';\n print \'
\'.$fuser->firstname.\'
\';\n print \'
    \';\n //print \'
  • September 24, 2018
  • \';\n if ($fuser->job) print \'
  • \'.$fuser->job.\'
  • \';\n else print \'
  • \';\n print \'
\';\n print \'
\';\n print \'
\';\n print \'
\';\n }\n print \'
\';\n\n ?>\n
\n
\n\n

\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:29:25',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(13,2,'partners','','Partners','Partners','partners','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Partners\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n

Our partners...

\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:29:51',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(14,2,'pricing','','Pricing','All the prices of our offers','pricing','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Our plans\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n\n\n \n
\n
\n
\n \n
\n \n
\n \n
\n\n \n
\n \n
\n
\n
\n
FREE
\n
The best choice for personal use
\n
The service 1 for free
\n
\n 0/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1 \n
  • \n
\n
\n
\n Subcribe\n
\n
\n
\n \n \n \n
\n
\n
\n
STARTER
\n
For small companiess
\n
The service 1 and product 1 at low price
\n
\n 29/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1\n
  • \n
  • \n \n Product 1\n
  • \n
\n
\n
\n Subscribe\n
\n
\n
\n \n \n \n
\n
\n
\n
PREMIUM
\n
For large companies
\n
The full option package for a one shot price\n
\n
\n 2499\n
\n
\n Available features are :\n
    \n
  • \n \n Service 1
  • \n
  • \n \n Service 2
  • \n
  • \n \n Product 1
  • \n
\n
\n
\n Buy\n
\n
\n
\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n
\n \n \n \n

\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:26:54',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(15,2,'privacy-policies','','Privacy Policies','Privacy Policies','Privacy policies, GDPR','
\n \n \n \n\n\n
\n
\n
\n
\n
\n
\n
\n
\n
Privacy Policy\n
\n
\n
\n
\n
\n
\n
\n
\n\n


\n\n
\n
\n

Information collected and used


\n

* Your customer information (email, phone, business name, first and last name of contact, address, postal code, country and VAT number) are stored when you become a customer. This information allows us to bill you. \n

* If you paid using our online service, we also store the last 4 digits of your card. The full details of your credit card is stored by our payment provider Stripe (the world leader in online payment).

\n

* You have the option to request the deletion of your data and the above information at any time (except data required y fiscal tracking rules, like your invoices).

\n

* The Privacy Policies and GDPR referral contact for our services is: global->MAIN_INFO_GDPR; ?>

\n


\n

Data Storage and Backups


\n

* The storage of collected data (see \'Information collected and used\') is done in a database.

\n

* We made one backup every week. Only 4 weeks are kept.

\n


\n

Subcontractor


\n

* Our services relies on the following subcontractors and service:
\n** The host of computer servers, which is ABC company. These servers are hosted in US. No customer information is communicated to this subcontractor who only provides the hardware and network layer, the installation and operation being carried out by us directly.
\n** The online payment service Stripe, which is used, to ensure regular payment of subscription or your invoices paid online.

\n


\n

Software Protection


\n

* Our services runs on Linux Ubuntu systems and software. They benefit from regular security updates when the operating system editor (Ubuntu Canonical) publishes them.

\n

* Our services are accessible in HTTPS (HTTP encrypted) only, encrypted with SHA256 certificates.

\n

* Our technical platform are protected by various solutions.

\n


\n

Data theft


\n

* In case of suspicion of a theft of the data we have collected (see first point \'Information collected and used\'), customers will be informed by email, at email corresponding to their customer account

\n

 

\n
\n
\n\n\n \n \n \n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:27:09',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(16,2,'product-p','','Product P','Product P','','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Product P\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nThis is a description page of our product P...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:27:20',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(17,2,'search','','Search Page','Search Page','','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Search\n
\n
\n
\n
\n
\n
\n
\n
\n\n


\n\n
\n \n
\n
\n
\n \">\n
\n
\n \n
\n
\n
\n \n ref.\'.php\">\'.$websitepagefound->title.\' - \'.$websitepagefound->description.\'
\';\n }\n }\n else\n {\n print $listofpages[\'message\'];\n }\n }\n }\n else\n {\n print $weblang->trans(\"FeatureNotYetAvailable\");\n }\n ?>\n \n





\n\n\n \n\n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:27:33',NULL,NULL,'page','fr_FR',NULL,'','',NULL,''),(18,2,'service-s','','Service S','Service S','','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Service S\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nThis is a description page of our service S...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:27:45',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(19,2,'test','','test','Page test','test','Test\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:03:30',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(20,3,'credits','','Credits','Credits and legal notices','',' \n \n
\n\n \n
\n

Mentions légales

\n

Curriculum Vitae

\n
\n\n \n \n\n \n
\n\n \n
\n\n

\n \nThis site is edited by name; ?>\n\n \n

\n\n
\n\n
\n\n \n \n\n
\n\n',1,'2019-08-15 16:39:56',NULL,'2019-08-16 03:55:59',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(21,3,'footer','','Footer','','',' \n
\n
\n

Aliquam sed mauris

\n

Sed lorem ipsum dolor sit amet et nullam consequat feugiat consequat magna adipiscing tempus etiam dolore veroeros. eget dapibus mauris. Cras aliquet, nisl ut viverra sollicitudin, ligula erat egestas velit, vitae tincidunt odio.

\n \n
\n
\n

Etiam feugiat

\n
\n
Address
\n
getFullAddress(1, \'
\'); ?>
\n
Phone
\n
phone; ?>
\n
Email
\n
email; ?>\">email; ?>
\n
\n \n
\n
© Untitled. Design: HTML5 UP adapted for Dolibarr by NLTechno.
\n
\n\n\n\n',1,'2019-08-15 16:42:44',NULL,'2019-08-29 13:25:37',NULL,NULL,'page','fr_FR',NULL,'','',NULL,''),(22,3,'generic','','Generic page','Generic page or my personal Blog','My generic page',' \n\n
\n\n \n
\n

Generic

\n

Ipsum dolor sit amet nullam

\n
\n\n \n \n\n \n
\n\n \n
\n \"\"\n

Magna feugiat lorem

\n

Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis. Praesent rutrum sem diam, vitae egestas enim auctor sit amet. Pellentesque leo mauris, consectetur id ipsum sit amet, fergiat. Pellentesque in mi eu massa lacinia malesuada et a elit. Donec urna ex, lacinia in purus ac, pretium pulvinar mauris. Curabitur sapien risus, commodo eget turpis at, elementum convallis fames ac ante ipsum primis in faucibus.

\n

Pellentesque venenatis dolor imperdiet dolor mattis sagittis. Praesent rutrum sem diam, vitae egestas enim auctor sit amet.

\n

Tempus veroeros

\n

Cep risus aliquam gravida cep ut lacus amet. Adipiscing faucibus nunc placerat. Tempus adipiscing turpis non blandit accumsan eget lacinia nunc integer interdum amet aliquam ut orci non col ut ut praesent.

\n
\n\n \n
\n

Latest Blog posts

\n
\n loadLangs(array(\"main\",\"website\"));\n $websitepage = new WebsitePage($db);\n $fuser = new User($db);\n $arrayofblogs = $websitepage->fetchAll($website->id, \'DESC\', \'date_creation\', 5, 0, array(\'type_container\'=>\'blogpost\', \'keywords\'=>$keyword));\n if (is_numeric($arrayofblogs) && $arrayofblogs < 0)\n {\n print \'
\'.$weblangs->trans($websitepage->error).\'
\';\n }\n elseif (is_array($arrayofblogs) && ! empty($arrayofblogs))\n {\n foreach($arrayofblogs as $blog)\n {\n print \'\';\n }\n }\n else\n {\n print \'
\';\n print \'
\';\n print $weblangs->trans(\"NoArticlesFoundForTheKeyword\", $keyword);\n print \'
\';\n print \'
\';\n \n }\n ?>\n
\n
\n\n
\n\n\n\n \n \n \n \n
\n\n',1,'2019-08-15 00:03:43',NULL,'2019-08-17 16:19:49',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(23,3,'home','','My personal blog','Home page or my personal Blog','My personal blog','\n
\n\n \n
\n \"\"\n

David Doe

\n

Welcome on my website
\n

\n
\n\n \n \n\n \n
\n\n \n
\n
\n
\n
\n

Ipsum sed adipiscing

\n
\n

Sed lorem ipsum dolor sit amet nullam consequat feugiat consequat magna\n adipiscing magna etiam amet veroeros. Lorem ipsum dolor tempus sit cursus.\n Tempus nisl et nullam lorem ipsum dolor sit amet aliquam.

\n \n
\n \"\"\n
\n
\n\n \n
\n
\n

Magna veroeros

\n
\n
    \n
  • \n \n

    Ipsum consequat

    \n

    Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

    \n
  • \n
  • \n \n

    Amed sed feugiat

    \n

    Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

    \n
  • \n
  • \n \n

    Dolor nullam

    \n

    Sed lorem amet ipsum dolor et amet nullam consequat a feugiat consequat tempus veroeros sed consequat.

    \n
  • \n
\n \n
\n\n \n
\n
\n

Ipsum consequat

\n

Donec imperdiet consequat consequat. Suspendisse feugiat congue
\n posuere. Nulla massa urna, fermentum eget quam aliquet.

\n
\n
    \n
  • \n \n 5,120 Etiam\n
  • \n
  • \n \n 8,192 Magna\n
  • \n
  • \n \n 2,048 Tempus\n
  • \n
  • \n \n 4,096 Aliquam\n
  • \n
  • \n \n 1,024 Nullam\n
  • \n
\n

Nam elementum nisl et mi a commodo porttitor. Morbi sit amet nisl eu arcu faucibus hendrerit vel a risus. Nam a orci mi, elementum ac arcu sit amet, fermentum pellentesque et purus. Integer maximus varius lorem, sed convallis diam accumsan sed. Etiam porttitor placerat sapien, sed eleifend a enim pulvinar faucibus semper quis ut arcu. Ut non nisl a mollis est efficitur vestibulum. Integer eget purus nec nulla mattis et accumsan ut magna libero. Morbi auctor iaculis porttitor. Sed ut magna ac risus et hendrerit scelerisque. Praesent eleifend lacus in lectus aliquam porta. Cras eu ornare dui curabitur lacinia.

\n \n
\n\n \n
\n
\n

Congue imperdiet

\n

Donec imperdiet consequat consequat. Suspendisse feugiat congue
\n posuere. Nulla massa urna, fermentum eget quam aliquet.

\n
\n \n
\n\n
\n\n \n\n
\n\n',1,'2019-08-15 00:03:43',NULL,'2019-08-29 13:32:53',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(24,3,'menu','','Menu','Menu common to all pages','','\n\n \n',1,'2019-08-15 00:03:43',NULL,'2019-08-29 13:33:08',NULL,NULL,'other','fr_FR',NULL,'','',NULL,''),(25,3,'this-is-a-blog-post','','This is a Blog post','This is a full meta description of the article','blog','\n
\n This is a blog post article...\n
\n',1,'2019-08-17 17:18:45',NULL,'2019-08-17 16:26:25',NULL,NULL,'blogpost','fr_FR',NULL,'','',NULL,''); /*!40000 ALTER TABLE `llx_website_page` ENABLE KEYS */; UNLOCK TABLES; @@ -12320,4 +12324,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-09-26 14:36:09 +-- Dump completed on 2019-10-08 21:05:17 diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 6773e1d2c03..015733ed95f 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -122,14 +122,14 @@ - + 0 0 - + @@ -186,7 +186,7 @@ - - + + - + @@ -213,6 +213,8 @@ 0 + + @@ -337,7 +339,7 @@ - @@ -375,7 +377,7 @@ 0 - + 0 diff --git a/dev/tools/dolibarr-mysql2pgsql.pl b/dev/tools/dolibarr-mysql2pgsql.pl index 1f510ad60f1..2fe03aaf2b5 100755 --- a/dev/tools/dolibarr-mysql2pgsql.pl +++ b/dev/tools/dolibarr-mysql2pgsql.pl @@ -58,7 +58,7 @@ foreach my $file (keys %filelist) { $ARGV[1]="$DESTI/$file"; print "Convert file $ARGV[0] into $ARGV[1]\n"; - + # MySQL to PostgreSQL dump file converter # # For usage: perl mysql2pgsql.perl --help @@ -76,18 +76,18 @@ foreach my $file (keys %filelist) { # 4) add debug option # see rest of changelog at http://cvs.linux.hr/cvsweb.cgi/sql/mysql2pgsql # 2003-12-16 jsp -- Joe Speigle : - # converts: s/\) *Type=MyISAM;/);/i, enum data type -> references, + # converts: s/\) *Type=MyISAM;/);/i, enum data type -> references, # auto_increment->sequences # 2004-01-13 jsp -- moved project to gborg; both the above declined ownership # 2004-06-29 converts: year(4), year(2) - # homepage: gborg.postgresql.org - + # homepage: gborg.postgresql.org + GetOptions("debug", "help"); - + my $DEBUG = $opt_debug || 0; my $HELP = $opt_help || 0; - - + + if (($HELP) || ! defined($ARGV[0]) || ! defined($ARGV[1])) { print "Usage: perl $0 {--verbose|--help|--debug} mysql_dump_file.sql pg_dump_file.sql\n"; print "\t* OPTIONS\n"; @@ -106,15 +106,15 @@ foreach my $file (keys %filelist) { print "\tpg_dump_file.sql (undefined)\n"; } exit 1; - } - + } + open(IN,"<$ARGV[0]") || die "can't open mysql dump file $ARGV[0]"; open(OUT,">$ARGV[1]") || die "can't open pg dump file $ARGV[1]"; print OUT "-- Generated by $PROG\n"; print OUT "-- (c) 2004, PostgreSQL Inc.\n"; print OUT "-- (c) 2005, Laurent Destailleur.\n"; print OUT "\n"; - + # Output for create table and create index sub output_create { # If command ends with "xxx,);", we change to "xxx);" @@ -128,7 +128,7 @@ foreach my $file (keys %filelist) { print OUT $create_index; } } - + # Reset when moving from each "create table" to "insert" part of dump sub reset_vars() { $create_sql=""; @@ -137,24 +137,24 @@ foreach my $file (keys %filelist) { $enum_column=''; } - + # Boucle sur contenu fichier source #---------------------------------- while() { - + # comments or empty lines - if (/^-- \$Id/) { + if (/^-- \$Id/) { $_ =~ s/\$//g; - print OUT $_; + print OUT $_; next; } # comments or empty lines if (/^#/ || /^$/ || /^--/) { - print OUT $_; + print OUT $_; next; } - if (/^USE\s*([^;]*);/) { - print OUT "\\c ". $1; + if (/^USE\s*([^;]*);/) { + print OUT "\\c ". $1; next; } if ($create_sql ne "") { # we are inside create table statement so lets process datatypes @@ -167,14 +167,14 @@ foreach my $file (keys %filelist) { # LDR Added "innodb" and "engine" } elsif (/(ISAM|innodb)/i) { # end of create table sequence - s/\) *type=(MyISAM|innodb);/);/i; - s/\) *engine=(MyISAM|innodb);/);/i; + s/\) *type=(MyISAM|innodb);/);/i; + s/\) *engine=(MyISAM|innodb);/);/i; $create_sql =~ s/,$//g; # strip last , inside create table $create_sql .= $_; &output_create; &reset_vars(); next; - } + } # enum -> check if (/([\w\"]*)\s+enum\s*\(((?:['"][\?\w]+['"]\s*,)+['"][\?\w]+['"])\)(.*)$/i) { @@ -189,7 +189,7 @@ foreach my $file (keys %filelist) { $enum_datafield{$enum_column} =~ s/\"/\'/g; $_ = qq~ $enum_column CHAR($maxlength) CHECK ($enum_column IN ($enum_datafield{$enum_column})) $suite\n~; # int, auto_increment -> serial - } elsif (/^[\s\t]*(\w*)\s*.*int.*auto_increment/i) { + } elsif (/^[\s\t]*(\w*)\s*.*int.*auto_increment/i) { $seq = qq~${table}_${1}_seq~; s/[\s\t]*([a-zA-Z_0-9]*)\s*.*int.*auto_increment[^,]*/ $1 SERIAL PRIMARY KEY/ig; $create_sql.=$_; @@ -211,40 +211,40 @@ foreach my $file (keys %filelist) { elsif (/tinyint/i) { s/tinyint/smallint/g; } - + # nuke unsigned s/(int\w+|smallint)\s+unsigned/$1/gi; - + # blob -> text s/\w*blob/text/gi; # tinytext/mediumtext -> text s/tinytext/text/gi; s/mediumtext/text/gi; - + # char -> varchar # PostgreSQL would otherwise pad with spaces as opposed # to MySQL! Your user interface may depend on this! s/(\s+)char/${1}varchar/gi; - + # nuke date representation (not supported in PostgreSQL) s/datetime default '[^']+'/datetime/i; s/date default '[^']+'/datetime/i; s/time default '[^']+'/datetime/i; - + # change not null datetime field to null valid ones # (to support remapping of "zero time" to null s/datetime not null/datetime/i; s/datetime/timestamp/i; - + # nuke size of timestamp s/timestamp\([^)]*\)/timestamp/i; - + # double -> numeric s/^double/numeric/i; s/(\s*)double/${1}numeric/i; - + # float -> numeric s/^float/numeric/i; s/(\s*)float/${1}numeric/i; @@ -261,7 +261,7 @@ foreach my $file (keys %filelist) { $create_sql.=$_; next; } - + # unique key [name] (field) if (/unique key\s*(\w*)\s*\((\w+)\)/i) { s/unique key\s*(\w*)\s*\((\w+)\)/UNIQUE\($2\)/i; @@ -288,30 +288,30 @@ foreach my $file (keys %filelist) { $create_index .= "CREATE INDEX $idxname ON $table ($fieldlist);\n"; next; } - + # index(field) if (/index\s*(\w*)\s*\((\w+)\)/i) { my $idxname=($1?"$1":"idx_${table}_$2"); $create_index .= "CREATE INDEX $idxname ON $table ($2);\n"; next; } - + # primary key if (/\bkey\b/i && !/^\s+primary key\s+/i) { s/KEY(\s+)[^(]*(\s+)/$1 UNIQUE $2/i; # hack off name of the non-primary key } - + # key(xxx) if (/key\s*\((\w+)\)/i) { my $idxname="idx_${table}_$1"; $create_index .= "CREATE INDEX $idxname ON $table ($1);\n"; next; } - + # Quote column names s/(^\s*)([^\s\-\(]+)(\s*)/$1"$2"$3/gi if (!/\bkey\b/i); - - # Remap colums with names of existing system attribute + + # Remap columns with names of existing system attribute if (/"oid"/i) { s/"oid"/"_oid"/g; print STDERR "WARNING: table $table uses column \"oid\" which is renamed to \"_oid\"\nYou should fix application manually! Press return to continue."; @@ -330,13 +330,13 @@ foreach my $file (keys %filelist) { s!\x85!... !g; # \ldots s!\x92!`!g; } - + # fix dates '0000-00-00 00:00:00' (should be null) s/'0000-00-00 00:00:00'/null/gi; s/'0000-00-00'/null/gi; s/'00:00:00'/null/gi; s/([12]\d\d\d)([01]\d)([0-3]\d)([0-2]\d)([0-6]\d)([0-6]\d)/'$1-$2-$3 $4:$5:$6'/; - + if (/create\s+table\s+(\w+)/i) { $create_sql = $_; /create\s*table\s*(\w+)/i; @@ -345,11 +345,11 @@ foreach my $file (keys %filelist) { print OUT $_; } } # end of if inside create_table - } # END while() - + } # END while() + close IN; close OUT; - + } print "\n"; @@ -358,4 +358,4 @@ print "\n"; print "Press a key to finish...\n"; $stop=; -0; \ No newline at end of file +0; diff --git a/dev/tools/fixdosfiles.sh b/dev/tools/fixdosfiles.sh index e4ccb1485e1..6fd152127fb 100755 --- a/dev/tools/fixdosfiles.sh +++ b/dev/tools/fixdosfiles.sh @@ -17,14 +17,14 @@ fi # To detec if [ "x$1" = "xlist" ] then - find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF -# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'documents\/website' | grep -v 'htdocs\/includes' | grep CRLF + find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep -v 'documents\/mdedias' | grep CRLF +# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'documents\/website' | grep -v 'documents\/mdedias' | grep -v 'htdocs\/includes' | grep CRLF fi # To convert if [ "x$1" = "xfix" ] then - for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF | awk -F':' '{ print $1 }' ` + for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep -v 'documents\/mdedias' | grep CRLF | awk -F':' '{ print $1 }' ` do echo "Fix file $fic" dos2unix "$fic" diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 7f095a744db..f568ba2b04b 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -149,9 +149,9 @@ foreach ($langstrings_3d AS $filename => $file) $keys = array_keys($langstrings_full, $value); if (count($keys)>1) { - foreach ($keys AS $key) { - $dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]); - } + foreach ($keys AS $key) { + $dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]); + } } } } diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index bc8fff8395c..10a65cab2fe 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -46,7 +46,7 @@ $search_pcgtype = GETPOST('search_pcgtype', 'alpha'); $search_pcgsubtype = GETPOST('search_pcgsubtype', 'alpha'); // Security check -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->chartofaccount) accessforbidden(); // Load variable for pagination @@ -138,7 +138,7 @@ if (empty($reshook)) if ($result > 0) { - setEventMessages($langs->trans("ChartLoaded"), null); + setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs'); } else { diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 06a2fb60d67..da726597345 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -71,7 +71,7 @@ $search_country_id = GETPOST('search_country_id', 'int'); // Security check -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->chartofaccount) accessforbidden(); @@ -456,7 +456,7 @@ if ($id) print ''; print '
'; - print ''; + print '
'; // Form to add a new line if ($tabname[$id]) @@ -677,7 +677,6 @@ if ($id) { foreach ($fieldlist as $field => $value) { - $showfield=1; $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index c49ed42741b..faab333890b 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -220,7 +220,7 @@ if ($action == 'create') { dol_fiche_head(); - print '
'; + print '
'; // Chart of account print ''; @@ -273,7 +273,6 @@ if ($action == 'create') { print ''; } elseif ($id > 0 || $ref) { - $result = $object->fetch($id, $ref, 1); if ($result > 0) { @@ -292,7 +291,7 @@ elseif ($id > 0 || $ref) { print ''; print ''; - print '
' . $langs->trans("Chartofaccounts") . '
'; + print '
'; // Account number print ''; @@ -349,7 +348,7 @@ elseif ($id > 0 || $ref) { print '
'; print '
'; - print '
' . $langs->trans("AccountNumber") . '
'; + print '
'; // Label print ''; diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index a7fe40acefc..8313a45a504 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -104,7 +104,7 @@ print ''; dol_fiche_head(); -print '
' . $langs->trans("Label") . '
'; +print '
'; // Select the category print ''; @@ -130,7 +130,6 @@ if (! empty($cat_id)) } if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) { - print $form->multiselectarray('cpt_bk', $arraykeyvalue, GETPOST('cpt_bk', 'array'), null, null, null, null, "90%"); print '
'; /*print '
' . $langs->trans("AccountingCategory") . '
\n"; print ''; print '"; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 28c771c19b9..f3f3efa572c 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -170,7 +170,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) } if (isset($_POST["code"])) { - if ($_POST["code"]=='0') + if ($_POST["code"]=='0') { $ok=0; setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors'); @@ -449,7 +449,7 @@ if ($id) print ''; print '
'; - print '
'.$langs->trans("AccountAccounting")."
'; + print '
'; // Form to add a new line if ($tabname[$id]) @@ -468,7 +468,7 @@ if ($id) $valuetoshow=$langs->trans($valuetoshow); // try to translate $class="left"; if ($fieldlist[$field]=='type') { - if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") { + if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") { $valuetoshow=$form->textwithtooltip($langs->trans("Type"), $langs->trans("TypePaymentDesc"), 2, 1, img_help(1, '')); } else { $valuetoshow=$langs->trans("Type"); @@ -501,7 +501,7 @@ if ($id) if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Comment"); } - if ($fieldlist[$field]=='category_type') { + if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); } @@ -742,7 +742,6 @@ if ($id) { foreach ($fieldlist as $field => $value) { - $showfield=1; $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index 55ed84d4ad0..cc69462d893 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -96,10 +96,9 @@ print '' print ''; // Define main accounts for closure -print '
'; +print '
'; foreach ($list_account_main as $key) { - print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 13d3a267956..78d438aa4da 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -83,7 +83,6 @@ if (GETPOST('change_chart', 'alpha')) $chartofaccounts = GETPOST('chartofaccounts', 'int'); if (! empty($chartofaccounts)) { - if (! dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) { $error ++; } @@ -141,10 +140,9 @@ print ''; // Define main accounts for thirdparty -print '
'; +print '
'; foreach ($list_account_main as $key) { - print ''; // Param $label = $langs->trans($key); @@ -169,10 +167,9 @@ print '
'; // Define default accounts -print '
'; +print '
'; foreach ($list_account as $key) { - print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index e13a66998b7..8cda5284ba8 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -114,7 +114,7 @@ if ($action == 'update') { $error ++; } } - } + } if (! $error) { // reload @@ -195,7 +195,7 @@ print ''; * Main Options */ -print '
'; +print '
'; print ''; print ''; print "\n"; @@ -203,7 +203,6 @@ print "\n"; $num = count($main_option); if ($num) { foreach ($main_option as $key) { - print ''; // Param @@ -224,7 +223,7 @@ print "
\n"; /* * Export model */ -print '
' . $langs->trans('Options') . '
'; +print '
'; print ''; print ''; @@ -255,7 +254,7 @@ print "
\n"; $num2 = count($model_option); if ($num2) { - print '
' . $langs->trans("Modelcsv") . '
'; + print '
'; print ''; print ''; print "\n"; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 5cc03376808..6d321e60756 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -43,9 +43,9 @@ if (! $sortorder) $sortorder="ASC"; $langs->loadLangs(array("admin","compta")); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); -if (! $user->rights->accounting->fiscalyear) // If we can read accounting records, we should be able to see fiscal year. +if (! $user->rights->accounting->fiscalyear->write) // If we can read accounting records, we should be able to see fiscal year. accessforbidden(); $error = 0; @@ -112,7 +112,7 @@ if ($result) $i = 0; - $addbutton.= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear); + $addbutton.= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear->write); $title = $langs->trans('AccountingPeriods'); @@ -120,7 +120,7 @@ if ($result) // Load attribute_label print '
'; - print '
' . $langs->trans('OtherOptions') . '
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index f12aaba054b..31000b8ec8a 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -31,9 +31,9 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php'; $langs->loadLangs(array("admin","compta")); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); -if (empty($user->rights->accounting->fiscalyear)) +if (empty($user->rights->accounting->fiscalyear->write)) accessforbidden(); $error = 0; @@ -163,7 +163,7 @@ if ($action == 'create') dol_fiche_head(); - print '
' . $langs->trans("Ref") . '' . $langs->trans("Label") . '
'; + print '
'; // Label print ''; @@ -211,7 +211,7 @@ if ($action == 'create') print ''; print ''; - print '
' . $langs->trans("Label") . '
'; + print '
'; // Ref print ""; @@ -261,7 +261,7 @@ if ($action == 'create') dol_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron'); - print '
'; + print '
'; $linkback = '' . $langs->trans("BackToList") . ''; @@ -300,7 +300,7 @@ if ($action == 'create') dol_fiche_end(); - if (! empty($user->rights->accounting->fiscalyear)) + if (! empty($user->rights->accounting->fiscalyear->write)) { /* * Barre d'actions diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index cfe6c20bd7b..a02141f449e 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -30,9 +30,9 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php'; $langs->loadLangs(array("admin","compta")); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); -if (! $user->rights->accounting->fiscalyear) +if (! $user->rights->accounting->fiscalyear->write) accessforbidden(); $id = GETPOST('id', 'int'); diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 4cf2401d51b..dcc2e608f0b 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -88,11 +88,11 @@ if ($action == 'setlistsorttodo') { if (! $res > 0) $error ++; - if (! $error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + if (! $error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setlistsortdone') { @@ -100,11 +100,11 @@ if ($action == 'setlistsortdone') { $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; - if (! $error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + if (! $error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setmanagezero') { @@ -112,11 +112,11 @@ if ($action == 'setmanagezero') { $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; - if (! $error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + if (! $error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setdisabledirectinput') { @@ -124,11 +124,11 @@ if ($action == 'setdisabledirectinput') { $res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; - if (! $error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + if (! $error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setenabledraftexport') { @@ -136,11 +136,11 @@ if ($action == 'setenabledraftexport') { $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; - if (! $error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + if (! $error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setenablesubsidiarylist') { @@ -172,7 +172,7 @@ print ''; // Default mode for calculating turnover (parameter ACCOUNTING_MODE) /* -print '
'; +print '
'; print ''; print ''; @@ -202,7 +202,7 @@ print '
'; // Others params -print '
' . $langs->trans('OptionMode') . '' . $langs->trans('Description') . '
'; +print '
'; print ''; print ''; print "\n"; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index fcdf4de032c..b0eaff04494 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -412,7 +412,7 @@ if ($id) print ''; print '
'; - print '
' . $langs->trans('OtherOptions') . '
'; + print '
'; // Form to add a new line if ($tabname[$id]) @@ -609,7 +609,6 @@ if ($id) $langs->load("accountancy"); foreach ($fieldlist as $field => $value) { - $showfield=1; $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 2922d3bdf23..0ed3254f484 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -117,7 +117,6 @@ if ($action == 'update') { ); if (in_array($accounting_product_mode, $accounting_product_modes)) { - if (! dolibarr_set_const($db, 'ACCOUNTING_PRODUCT_MODE', $accounting_product_mode, 'chaine', 0, '', $conf->entity)) { $error ++; } @@ -129,7 +128,6 @@ if ($action == 'update') { if (! empty($btn_changeaccount)) { //$msg = '
' . $langs->trans("Processing") . '...
'; if (! empty($chk_prod)) { - $accounting = new AccountingAccount($db); //$msg .= '
' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '
'; @@ -327,7 +325,7 @@ if ($result) print '
'; // Select mode - print '
'; + print '
'; print ''; print ''; print "\n"; diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 3c04548d7c6..7d48790348d 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -279,8 +279,8 @@ if ($action != 'export_csv') print ''; } - // Affiche le compte comptable en debut de ligne - print ""; + // Show first line of a break + print ''; print ''; print ''; diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index d0e9b940074..1d77a9a2186 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -70,7 +70,7 @@ if ($result) { $y = $year_current; -print '
' . $langs->trans('Options') . '' . $langs->trans('Description') . '
' . $line->numero_compte . ($root_account_description ? ' - ' . $root_account_description : '') . '
'; +print '
'; print ''; print ''; for($i = 1; $i <= 12; $i++) @@ -105,7 +105,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $i < $num ) { - $row = $db->fetch_row($resql); print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 5f9ba37d341..80c9ffb7792 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -45,7 +45,7 @@ $mode = GETPOST('mode', 'aZ09'); // '' or 'tmp' $piece_num = GETPOST("piece_num", 'int'); // id of transaction (several lines share the same transaction id) // Security check -if ($user->societe_id > 0) { +if ($user->socid > 0) { accessforbidden(); } @@ -83,7 +83,6 @@ $object = new BookKeeping($db); */ if ($action == "confirm_update") { - $error = 0; if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) { @@ -355,7 +354,7 @@ if ($action == 'create') dol_fiche_head(); - print '
' . $langs->trans("Label") . '
' . length_accountg($row[0]) . '
'; + print '
'; /*print ''; print ''; @@ -585,7 +584,6 @@ if ($action == 'create') if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { - print load_fiche_titre($langs->trans("ListeMvts"), '', ''); print ''; @@ -601,7 +599,6 @@ if ($action == 'create') print "
' . $langs->trans("NumPiece") . '
"; if (count($object->linesmvt) > 0) { - $total_debit = 0; $total_credit = 0; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 5cf64a70e67..f449a99c8bf 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -155,6 +155,12 @@ $arrayfields=array( if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']); +$listofformat=AccountancyExport::getType(); +$formatexportset = $conf->global->ACCOUNTING_EXPORT_MODELCSV; +if (empty($listofformat[$formatexportset])) $formatexportset = 1; + +$error = 0; + /* * Actions @@ -310,7 +316,6 @@ if (empty($reshook)) } if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) { - $import_key = GETPOST('importkey', 'alpha'); if (! empty($import_key)) { @@ -325,7 +330,6 @@ if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->suppri } } if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) { - $delyear = GETPOST('delyear', 'int'); if ($delyear==-1) { $delyear=0; @@ -356,7 +360,6 @@ if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouveme } } if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->supprimer) { - $mvt_num = GETPOST('mvt_num', 'int'); if (! empty($mvt_num)) { @@ -373,10 +376,96 @@ if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->suppri exit; } } +if ($action == 'setreexport') { + $setreexport = GETPOST('value', 'int'); + if (! dolibarr_set_const($db, "ACCOUNTING_REEXPORT", $setreexport, 'yesno', 0, '', $conf->entity)) $error++; + + if (! $error) { + if ($conf->global->ACCOUNTING_REEXPORT == 1) { + setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsEnable"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsDisable"), null, 'mesgs'); + } + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +// Build and execute select (used by page and export action) +// must de set after the action that set $filter +// -------------------------------------------------------------------- + +$sql = 'SELECT'; +$sql .= ' t.rowid,'; +$sql .= " t.doc_date,"; +$sql .= " t.doc_type,"; +$sql .= " t.doc_ref,"; +$sql .= " t.fk_doc,"; +$sql .= " t.fk_docdet,"; +$sql .= " t.thirdparty_code,"; +$sql .= " t.subledger_account,"; +$sql .= " t.subledger_label,"; +$sql .= " t.numero_compte,"; +$sql .= " t.label_compte,"; +$sql .= " t.label_operation,"; +$sql .= " t.debit,"; +$sql .= " t.credit,"; +$sql .= " t.lettering_code,"; +$sql .= " t.montant,"; +$sql .= " t.sens,"; +$sql .= " t.fk_user_author,"; +$sql .= " t.import_key,"; +$sql .= " t.code_journal,"; +$sql .= " t.journal_label,"; +$sql .= " t.piece_num,"; +$sql .= " t.date_creation,"; +$sql .= " t.tms as date_modification,"; +$sql .= " t.date_export"; +$sql .= ' FROM ' . MAIN_DB_PREFIX . $object->table_element . ' as t'; +// Manage filter +$sqlwhere = array (); +if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.doc_date') { + $sqlwhere[] = $key . '=\'' . $db->idate($value) . '\''; + } elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') { + $sqlwhere[] = $key . '\'' . $db->idate($value) . '\''; + } elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.subledger_account>=' || $key == 't.subledger_account<=') { + $sqlwhere[] = $key . '\'' . $db->escape($value) . '\''; + } elseif ($key == 't.fk_doc' || $key == 't.fk_docdet' || $key == 't.piece_num') { + $sqlwhere[] = $key . '=' . $value; + } elseif ($key == 't.subledger_account' || $key == 't.numero_compte') { + $sqlwhere[] = $key . ' LIKE \'' . $db->escape($value) . '%\''; + } elseif ($key == 't.date_creation>=' || $key == 't.date_creation<=') { + $sqlwhere[] = $key . '\'' . $db->idate($value) . '\''; + } elseif ($key == 't.tms>=' || $key == 't.tms<=') { + $sqlwhere[] = $key . '\'' . $db->idate($value) . '\''; + } elseif ($key == 't.date_export>=' || $key == 't.date_export<=') { + $sqlwhere[] = $key . '\'' . $db->idate($value) . '\''; + } elseif ($key == 't.credit' || $key == 't.debit') { + $sqlwhere[] = natural_search($key, $value, 1, 1); + } else { + $sqlwhere[] = natural_search($key, $value, 0, 1); + } + } +} +$sql.= ' WHERE t.entity IN (' . getEntity('accountancy') . ')'; +if ($conf->global->ACCOUNTING_REEXPORT == 0) { + $sql .= " AND t.date_export IS NULL"; +} +if (count($sqlwhere) > 0) { + $sql .= ' AND ' . implode(' AND ', $sqlwhere); +} +if (! empty($sortfield)) { + $sql .= $db->order($sortfield, $sortorder); +} +//print $sql; + // Export into a file with format defined into setup (FEC, CSV, ...) +// Must be after definition of $sql if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { - + // TODO Replace the fetchAll + ->export later that consume too much memory on large export with the query($sql) and loop on each line to export them. $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); if ($result < 0) @@ -387,55 +476,54 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { { // Export files $accountancyexport = new AccountancyExport($db); - $accountancyexport->export($object->lines); + $accountancyexport->export($object->lines, $formatexportset); if (! empty($accountancyexport->errors)) { setEventMessages('', $accountancyexport->errors, 'errors'); - } else { + } + else + { // Specify as export : update field date_export - // TODO Move in class bookKeeping $error=0; $db->begin(); - if (is_array($object->lines)) { - foreach ($object->lines as $movement) { + if (is_array($object->lines)) + { + foreach ($object->lines as $movement) + { $now = dol_now(); + $sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping"; $sql .= " SET date_export = '" . $db->idate($now) . "'"; $sql .= " WHERE rowid = " . $movement->id; dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=" . $sql, LOG_DEBUG); $result = $db->query($sql); - if ($result) { - $db->commit(); - // setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExported"), null, 'mesgs'); - } else { - $db->rollback(); - // setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExported"), null, 'errors'); + if (! $result) + { + $error++; + break; } } } + + if (! $error) + { + $db->commit(); + // setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExported"), null, 'mesgs'); + } + else + { + $error++; + $db->rollback(); + setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExported"), null, 'errors'); + } } exit; } } -if ($action == 'setreexport') { - $export = 0; - $setreexport = GETPOST('value', 'int'); - if (! dolibarr_set_const($db, "ACCOUNTING_REEXPORT", $setreexport, 'yesno', 0, '', $conf->entity)) $error++; - - if (! $error) { - if ($conf->global->ACCOUNTING_REEXPORT == 1) { - setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsEnable"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsDisable"), null, 'mesgs'); - } - } else { - setEventMessages($langs->trans("Error"), null, 'errors'); - } -} /* * View @@ -443,31 +531,49 @@ if ($action == 'setreexport') { $title_page = $langs->trans("Bookkeeping"); -llxHeader('', $title_page); - -// List +// Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); - if ($nbtotalofrecords < 0) { - setEventMessages($object->error, $object->errors, 'errors'); +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0 + { + $page = 0; + $offset = 0; } } +// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) +{ + $num = $nbtotalofrecords; +} +else +{ + $sql.= $db->plimit($limit+1, $offset); -// TODO Do not use this -$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); -if ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); + $resql=$db->query($sql); + if (! $resql) + { + dol_print_error($db); + exit; + } + + $num = $db->num_rows($resql); } -$num=count($object->lines); + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title_page); + if ($action == 'delmouv') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?mvt_num='.GETPOST('mvt_num').$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvtPartial'), 'delmouvconfirm', '', 0, 1); print $formconfirm; } if ($action == 'delbookkeepingyear') { - $form_question = array (); $delyear = GETPOST('delyear'); $deljournal = GETPOST('deljournal'); @@ -502,35 +608,32 @@ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&con if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; print ''; +print ''; print ''; if ($optioncss != '') print ''; -print ''; print ''; print ''; print ''; print ''; -$button .= ''; - -$listofformat=AccountancyExport::getType(); if (count($filter)) $buttonLabel = $langs->trans("ExportFilteredList"); else $buttonLabel = $langs->trans("ExportList"); // Button re-export if (! empty($conf->global->ACCOUNTING_REEXPORT)) { - $newcardbutton =''.img_picto($langs->trans("Activated"), 'switch_on').' '; + $newcardbutton =''.img_picto($langs->trans("Activated"), 'switch_on').' '; } else { - $newcardbutton =''.img_picto($langs->trans("Disabled"), 'switch_off').' '; + $newcardbutton =''.img_picto($langs->trans("Disabled"), 'switch_off').' '; } $newcardbutton.= ''.$langs->trans("IncludeDocsAlreadyExported").''; -$newcardbutton.= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''), $user->rights->accounting->mouvements->export); +$newcardbutton.= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''), $user->rights->accounting->mouvements->export); $newcardbutton.= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param); $newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create', '', $user->rights->accounting->mouvements->creer); -print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit); +print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $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 @@ -542,7 +645,7 @@ if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; else $moreforfilter = $hookmanager->resPrint; print '
'; -print '
'; +print '
'; // Filters lines print ''; @@ -650,7 +753,6 @@ if (! empty($arrayfields['t.code_journal']['checked'])) print ''; } - // Fields from hook $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook @@ -727,170 +829,177 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $ print "\n"; -if ($num > 0) +$line = new BookKeepingLine(); + +// Loop on record +// -------------------------------------------------------------------- +$i=0; +$totalarray=array(); +while ($i < min($num, $limit)) { - $i=0; - $totalarray=array(); - while ($i < min($num, $limit)) + $obj = $db->fetch_object($resql); + if (empty($obj)) break; // Should not happen + + $line->id = $obj->rowid; + $line->doc_date = $db->jdate($obj->doc_date); + $line->doc_type = $obj->doc_type; + $line->doc_ref = $obj->doc_ref; + $line->fk_doc = $obj->fk_doc; + $line->fk_docdet = $obj->fk_docdet; + $line->thirdparty_code = $obj->thirdparty_code; + $line->subledger_account = $obj->subledger_account; + $line->subledger_label = $obj->subledger_label; + $line->numero_compte = $obj->numero_compte; + $line->label_compte = $obj->label_compte; + $line->label_operation = $obj->label_operation; + $line->debit = $obj->debit; + $line->credit = $obj->credit; + $line->montant = $obj->montant; + $line->sens = $obj->sens; + $line->lettering_code = $obj->lettering_code; + $line->fk_user_author = $obj->fk_user_author; + $line->import_key = $obj->import_key; + $line->code_journal = $obj->code_journal; + $line->journal_label = $obj->journal_label; + $line->piece_num = $obj->piece_num; + $line->date_creation = $db->jdate($obj->date_creation); + $line->date_modification = $db->jdate($obj->date_modification); + $line->date_export = $db->jdate($obj->date_export); + + $total_debit += $line->debit; + $total_credit += $line->credit; + + print ''; + + // Piece number + if (! empty($arrayfields['t.piece_num']['checked'])) { - $line = $object->lines[$i]; - - $total_debit += $line->debit; - $total_credit += $line->credit; - - print ''; - - // Piece number - if (! empty($arrayfields['t.piece_num']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Document date - if (! empty($arrayfields['t.doc_date']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Document ref - if (! empty($arrayfields['t.doc_ref']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Account number - if (! empty($arrayfields['t.numero_compte']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Subledger account - if (! empty($arrayfields['t.subledger_account']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Label operation - if (! empty($arrayfields['t.label_operation']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Amount debit - if (! empty($arrayfields['t.debit']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totaldebitfield']=$totalarray['nbfield']; - $totalarray['totaldebit'] += $line->debit; - } - - // Amount credit - if (! empty($arrayfields['t.credit']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalcreditfield']=$totalarray['nbfield']; - $totalarray['totalcredit'] += $line->credit; - } - - // Lettering code - if (! empty($arrayfields['t.lettering_code']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Journal code - if (! empty($arrayfields['t.code_journal']['checked'])) - { - $accountingjournal = new AccountingJournal($db); - $result = $accountingjournal->fetch('', $line->code_journal); - $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - // Creation operation date - if (! empty($arrayfields['t.date_creation']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Modification operation date - if (! empty($arrayfields['t.tms']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Exported operation date - if (! empty($arrayfields['t.date_export']['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - - // Action column - print ''; - - if (! $i) $totalarray['nbfield']++; - - print "\n"; - - $i++; + if (! $i) $totalarray['nbfield']++; } - // Show total line - if (isset($totalarray['totaldebitfield']) || isset($totalarray['totalcreditfield'])) + // Document date + if (! empty($arrayfields['t.doc_date']['checked'])) { - $i=0; - print ''; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totaldebitfield'] == $i) print ''; - elseif ($totalarray['totalcreditfield'] == $i) print ''; - else print ''; - } - $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print ''; + print ''; + if (! $i) $totalarray['nbfield']++; } + + // Document ref + if (! empty($arrayfields['t.doc_ref']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Account number + if (! empty($arrayfields['t.numero_compte']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Subledger account + if (! empty($arrayfields['t.subledger_account']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Label operation + if (! empty($arrayfields['t.label_operation']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Amount debit + if (! empty($arrayfields['t.debit']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totaldebit'; + $totalarray['val']['totaldebit'] += $line->debit; + } + + // Amount credit + if (! empty($arrayfields['t.credit']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalcredit'; + $totalarray['val']['totalcredit'] += $line->credit; + } + + // Lettering code + if (! empty($arrayfields['t.lettering_code']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Journal code + if (! empty($arrayfields['t.code_journal']['checked'])) + { + $accountingjournal = new AccountingJournal($db); + $result = $accountingjournal->fetch('', $line->code_journal); + $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + // Creation operation date + if (! empty($arrayfields['t.date_creation']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Modification operation date + if (! empty($arrayfields['t.tms']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Exported operation date + if (! empty($arrayfields['t.date_export']['checked'])) + { + print ''; + if (! $i) $totalarray['nbfield']++; + } + + // Action column + print ''; + + if (! $i) $totalarray['nbfield']++; + + print "\n"; + + $i++; } +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + print "
'; - $object->id = $line->id; - $object->piece_num = $line->piece_num; - print $object->getNomUrl(1, '', 0, '', 1); - print '' . dol_print_date($line->doc_date, 'day') . '' . $line->doc_ref . '' . length_accountg($line->numero_compte) . '' . length_accounta($line->subledger_account) . '' . $line->label_operation . '' . ($line->debit ? price($line->debit) : ''). '' . ($line->credit ? price($line->credit) : '') . '' . $line->lettering_code . '' . $journaltoshow . '' . dol_print_date($line->date_creation, 'dayhour') . '' . dol_print_date($line->date_modification, 'dayhour') . '' . dol_print_date($line->date_export, 'dayhour') . ''; - if (empty($line->date_export)) { - if ($user->rights->accounting->mouvements->creer) { - print '' . img_edit() . ''; - } - if ($user->rights->accounting->mouvements->supprimer) { - print ' ' . img_delete() . ''; - } - } + print ''; + $object->id = $line->id; + $object->piece_num = $line->piece_num; + print $object->getNomUrl(1, '', 0, '', 1); print '
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totaldebit']).''.price($totalarray['totalcredit']).'
' . dol_print_date($line->doc_date, 'day') . '' . $line->doc_ref . '' . length_accountg($line->numero_compte) . '' . length_accounta($line->subledger_account) . '' . $line->label_operation . '' . ($line->debit ? price($line->debit) : ''). '' . ($line->credit ? price($line->credit) : '') . '' . $line->lettering_code . '' . $journaltoshow . '' . dol_print_date($line->date_creation, 'dayhour') . '' . dol_print_date($line->date_modification, 'dayhour') . '' . dol_print_date($line->date_export, 'dayhour') . ''; + if (empty($line->date_export)) { + if ($user->rights->accounting->mouvements->creer) { + print '' . img_edit() . ''; + } + if ($user->rights->accounting->mouvements->supprimer) { + print ' ' . img_delete() . ''; + } + } + print '
"; print '
'; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index d3dc9b4a190..4f275e3e2b0 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -37,9 +37,6 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array("accountancy")); -$page = GETPOST("page"); -$sortorder = GETPOST("sortorder"); -$sortfield = GETPOST("sortfield"); $action = GETPOST('action', 'alpha'); $search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); $search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); @@ -71,9 +68,9 @@ $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if ($sortorder == "") $sortorder = "ASC"; -if ($sortfield == "") $sortfield = "t.rowid"; +if ($sortfield == "") $sortfield = "t.doc_date,t.rowid"; -if (empty($search_date_start) && empty($search_date_end)) { +if (empty($search_date_start) && empty($search_date_end) && GETPOSTISSET('search_date_startday') && GETPOSTISSET('search_date_startmonth') && GETPOSTISSET('search_date_starthour')) { $sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; $sql.= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'"; $sql.= $db->plimit(1); @@ -182,7 +179,6 @@ if (! empty($search_credit)) { if ($action == 'delmouvconfirm') { - $mvt_num = GETPOST('mvt_num', 'int'); if (! empty($mvt_num)) { @@ -232,7 +228,6 @@ if ($action == 'delmouv') { print $formconfirm; } if ($action == 'delbookkeepingyear') { - $form_question = array (); $delyear = GETPOST('delyear'); @@ -255,6 +250,14 @@ if ($action == 'delbookkeepingyear') { print ''; +print ''; +print ''; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; + $newcardbutton.= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param); $newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create'); @@ -265,12 +268,11 @@ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($lim print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$newcardbutton, '', $limit); // Reverse sort order -if ( preg_match('/^asc/i', $sortorder) ) - $sortorder = "asc"; -else - $sortorder = "desc"; +if (preg_match('/^asc/i', $sortorder)) $sortorder = "asc"; +else $sortorder = "desc"; -print ''; +print '
'; +print '
'; print ''; print ''; +print ''; print ''; print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']); @@ -313,8 +316,6 @@ print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", " print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60"', $sortfield, $sortorder, 'center '); print "\n"; -print ''; - $total_debit = 0; $total_credit = 0; @@ -335,7 +336,6 @@ while ($i < min($num, $limit)) // Is it a break ? if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) { - // Affiche un Sous-Total par compte comptable if (isset($displayed_account_number)) { print ''; @@ -376,8 +376,8 @@ while ($i < min($num, $limit)) print strlen(length_accounta($line->subledger_account)) == 0 ? '' : ''; - print ''; - print ''; + print ''; + print ''; $accountingjournal = new AccountingJournal($db); $result = $accountingjournal->fetch('', $line->code_journal); @@ -397,27 +397,32 @@ while ($i < min($num, $limit)) $i++; } -// Affiche un Sous-Total du dernier compte comptable affiché +// Show sub-total of last shown account print ''; print ''; -print "\n"; -print "\n"; +print ''; +print ''; print ''; -// Affiche le Total +// Show total print ''; print ''; -print ''; -print ''; -print ''; +print ''; +print ''; print ''; print "
'; @@ -300,6 +302,7 @@ print ''; $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).'' . $line->label_operation . '' . $line->label_operation . '
(' . length_accounta($line->subledger_account) . ')
' . ($line->debit ? price($line->debit) :''). '' . ($line->credit ? price($line->credit) : '') . '' . ($line->debit ? price($line->debit) :''). '' . ($line->credit ? price($line->credit) : '') . '
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).'  '; +print price($sous_total_debit - $sous_total_credit); +print '
'.$langs->trans("Total").':'; +print ''; print price($total_debit); print ''; +print ''; print price($total_credit); print '
"; +print ''; + print ''; // End of page diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index b7a19101758..4e96bf64602 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -83,7 +83,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', // Security check $socid = GETPOST("socid", 'int'); -// if ($user->societe_id) $socid=$user->societe_id; +// if ($user->socid) $socid=$user->socid; $lettering = new Lettering($db); $object = new Societe($db); @@ -100,7 +100,6 @@ if ($result < 0) */ if ($action == 'lettering') { - $result = $lettering->updateLettering($toselect); if ($result < 0) { @@ -140,7 +139,7 @@ dol_fiche_head($head, 'lettering_customer', $langs->trans("ThirdParty"), 0, 'com $linkback = ''.$langs->trans("BackToList").''; -dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom'); +dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom'); dol_fiche_end(); @@ -198,6 +197,7 @@ if ($resql) { $param="&socid=".$socid; print '
'; + print ''; print ''; $letteringbutton = ''; @@ -205,7 +205,7 @@ if ($resql) { print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit); print '
'; - print ''."\n"; + print '
'."\n"; /* print ''; @@ -251,7 +251,6 @@ if ($resql) { $tmp = ''; while ( $obj = $db->fetch_object($resql) ) { - if ($tmp != $obj->lettering_code || empty($tmp)) $tmp = $obj->lettering_code; /*if ($tmp != $obj->lettering_code || empty($obj->lettering_code))*/ $solde += ($obj->credit - $obj->debit); diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index eaa741e1722..d35eba34963 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -83,7 +83,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', // Security check $socid = GETPOST("socid", 'int'); -// if ($user->societe_id) $socid=$user->societe_id; +// if ($user->socid) $socid=$user->socid; $lettering = new Lettering($db); $object = new Societe($db); @@ -99,7 +99,6 @@ if ($result<0) * Action */ if ($action == 'lettering') { - $result = $lettering->updateLettering($toselect); if ($result < 0) { @@ -139,7 +138,7 @@ dol_fiche_head($head, 'lettering_supplier', $langs->trans("ThirdParty"), 0, 'com $linkback = ''.$langs->trans("BackToList").''; -dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom'); +dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom'); dol_fiche_end(); @@ -196,6 +195,7 @@ if ($resql) { $param="&socid=".$socid; print ''; + print ''; print ''; $letteringbutton = ''; @@ -203,7 +203,7 @@ if ($resql) { print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit); print '
'; - print '
'."\n"; + print '
'."\n"; /* print ''; @@ -248,7 +248,6 @@ if ($resql) { $solde = 0; $tmp = ''; while ($obj = $db->fetch_object($resql)) { - if ($tmp != $obj->lettering_code || empty($tmp)) $tmp = $obj->lettering_code; /*if ($tmp != $obj->lettering_code || empty($obj->lettering_code))*/ $solde += ($obj->credit - $obj->debit); diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index dac238f97d6..7e8f14f2a53 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -224,22 +224,23 @@ class AccountancyExport /** * Function who chose which export to use with the default config, and make the export into a file * - * @param array $TData data - * @return void + * @param array $TData Array with data + * @param int $formatexportset Id of export format + * @return void */ - public function export(&$TData) + public function export(&$TData, $formatexportset) { global $conf, $langs; global $search_date_end; // Used into /accountancy/tpl/export_journal.tpl.php // Define name of file to save - $filename = 'general_ledger-'.$this->getFormatCode($conf->global->ACCOUNTING_EXPORT_MODELCSV); + $filename = 'general_ledger-'.$this->getFormatCode($formatexportset); $type_export = 'general_ledger'; include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; - switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) { + switch ($formatexportset) { case self::$EXPORT_TYPE_CONFIGURABLE : $this->exportConfigurable($TData); break; @@ -548,7 +549,6 @@ class AccountancyExport $end_line = "\n"; foreach ($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%d%m%Y'); print $line->id . $separator; @@ -584,7 +584,6 @@ class AccountancyExport $end_line = "\n"; foreach ($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%d%m%Y'); print $line->piece_num . $separator; @@ -624,7 +623,6 @@ class AccountancyExport $end_line = "\n"; foreach ($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%d/%m/%Y'); print $date . $separator; @@ -926,91 +924,130 @@ class AccountancyExport * * @return void */ - public function exportLDCompta($objectLines) - { + public function exportLDCompta($objectLines) + { - $separator = ';'; - $end_line = "\n"; + $separator = ';'; + $end_line = "\r\n"; - foreach ($objectLines as $line) { + foreach ($objectLines as $line) { + $date_document = dol_print_date($line->doc_date, '%Y%m%d'); + $date_creation = dol_print_date($line->date_creation, '%Y%m%d'); - $date_document = dol_print_date($line->doc_date, '%Y%m%d'); - $date_creation = dol_print_date($line->date_creation, '%Y%m%d'); + // TYPE + $type_enregistrement = 'E'; // For write movement + print $type_enregistrement . $separator; + // JNAL + print substr($line->code_journal, 0, 2) . $separator; + // NECR + print $line->id . $separator; + // NPIE + print $line->piece_num . $separator; + // DATP + print $date_document . $separator; + // LIBE + print $line->label_operation . $separator; + // DATH + print $line->date_lim_reglement . $separator; + // CNPI + if ($line->doc_type == 'supplier_invoice') { + if ($line->montant < 0) { + $nature_piece = 'AF'; + } else { + $nature_piece = 'FF'; + } + } elseif ($line->doc_type == 'customer_invoice') { + if ($line->montant < 0) { + $nature_piece = 'AC'; + } else { + $nature_piece = 'FC'; + } + } else { + $nature_piece = ''; + } + print $nature_piece . $separator; + // RACI + /* + if (! empty($line->subledger_account)) { + if ($line->doc_type == 'supplier_invoice') { + $racine_subledger_account = '40'; + } elseif ($line->doc_type == 'customer_invoice') { + $racine_subledger_account = '41'; + } else { + $nature_piece = ''; + } + print $racine_subledger_account . $separator; + } else { + print $separator; + } + */ + print $separator; // deprecated CPTG & CPTA use instead + // MONT + print price(abs($line->montant), 0, '', 1, 2) . $separator; + // CODC + print $line->sens . $separator; + // CPTG + print length_accountg($line->numero_compte) . $separator; + // DATE + print $date_creation . $separator; + // CLET + print $line->lettering_code . $separator; + // DATL + print $line->date_lettering . $separator; + // CPTA + if (! empty($line->subledger_account)) { + print length_accounta($line->subledger_account) . $separator; + } else { + print $separator; + } + // CNAT + if ($line->doc_type == 'supplier_invoice' && ! empty($line->subledger_account)) { + print 'F' . $separator; + } elseif ($line->doc_type == 'customer_invoice' && ! empty($line->subledger_account)) { + print 'C' . $separator; + } else { + print $separator; + } + // SECT + print $separator; + // CTRE + print $separator; + // NORL + print $separator; + // DATV + print $separator; + // REFD + print $line->doc_ref . $separator; + // CODH + print $separator; + // NSEQ + print $separator; + // MTDV + print '0' . $separator; + // CODV + print $separator; + // TXDV + print '0' . $separator; + // MOPM + print $separator; + // BONP + print $separator; + // BQAF + print $separator; + // ECES + print $separator; + // TXTL + print $separator; + // ECRM + print $separator; + // DATK + print $separator; + // HEUK + print $separator; - // TYPE - $type_enregistrement = 'E'; // For write movement - print $type_enregistrement . $separator; - // JNAL - print substr($line->code_journal, 0, 2) . $separator; - // NECR - print $line->id . $separator; - // NPIE - print $line->piece_num . $separator; - // DATP - print $date_document . $separator; - // LIBE - print $line->label_operation . $separator; - // DATH - print $line->date_lim_reglement . $separator; - // CNPI - if ($line->doc_type == 'supplier_invoice') { - if ($line->montant < 0) { - $nature_piece = 'AF'; - } else { - $nature_piece = 'FF'; - } - } elseif ($line->doc_type == 'customer_invoice') { - if ($line->montant < 0) { - $nature_piece = 'AC'; - } else { - $nature_piece = 'FC'; - } - } else { - $nature_piece = ''; - } - print $nature_piece . $separator; - // RACI - /* - if (! empty($line->subledger_account)) { - if ($line->doc_type == 'supplier_invoice') { - $racine_subledger_account = '40'; - } elseif ($line->doc_type == 'customer_invoice') { - $racine_subledger_account = '41'; - } else { - $nature_piece = ''; - } - print $racine_subledger_account . $separator; - } else { - print $separator; - } - */ - // MONT - print price(abs($line->montant)) . $separator; - // CODC - print $line->sens . $separator; - // CPTG - print length_accountg($line->numero_compte) . $separator; - // DATE - print $date_creation . $separator; - // CLET - print $line->lettering_code . $separator; - // DATL - print $line->date_lettering . $separator; - // CPTA - if (! empty($line->subledger_account)) { - print length_accounta($line->subledger_account) . $separator; - } - // CNAT - if ($line->doc_type == 'supplier_invoice' && ! empty($line->subledger_account)) { - print 'F'; - } elseif ($line->doc_type == 'customer_invoice' && ! empty($line->subledger_account)) { - print 'C'; - } else { - print ''; - } - print $end_line; - } - } + print $end_line; + } + } /** * Export format : Charlemagne @@ -1046,7 +1083,6 @@ class AccountancyExport print $end_line; foreach($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%Y%m%d'); print $date . $separator; //Date diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index f9c2e3391ba..b244d8be123 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -154,7 +154,7 @@ class AccountingAccount extends CommonObject * @param int $rowid Id * @param string $account_number Account number * @param int|boolean $limittocurrentchart 1 or true=Load record only if it is into current active char of account - * @param string $limittoachartaccount 'ABC'=Load record only if it is into chart account with code 'ABC'. + * @param string $limittoachartaccount 'ABC'=Load record only if it is into chart account with code 'ABC' (better and faster than previous parameter if you have chart of account code). * @return int <0 if KO, 0 if not found, Id of record if OK and found */ public function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0, $limittoachartaccount = '') @@ -407,7 +407,6 @@ class AccountingAccount extends CommonObject $result = $this->checkUsage(); if ($result > 0) { - $this->db->begin(); // if (! $error) { @@ -639,11 +638,11 @@ class AccountingAccount extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -651,34 +650,33 @@ class AccountingAccount extends CommonObject if ($mode == 0) { - $prefix=''; - if ($statut == 1) return $langs->trans('Enabled'); - elseif ($statut == 0) return $langs->trans('Disabled'); + if ($status == 1) return $langs->trans('Enabled'); + elseif ($status == 0) return $langs->trans('Disabled'); } elseif ($mode == 1) { - if ($statut == 1) return $langs->trans('Enabled'); - elseif ($statut == 0) return $langs->trans('Disabled'); + if ($status == 1) return $langs->trans('Enabled'); + elseif ($status == 0) return $langs->trans('Disabled'); } elseif ($mode == 2) { - if ($statut == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($statut == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); + if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); } elseif ($mode == 3) { - if ($statut == 1) return img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($statut == 0) return img_picto($langs->trans('Disabled'), 'statut5'); + if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); } elseif ($mode == 4) { - if ($statut == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($statut == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); + if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); } elseif ($mode == 5) { - if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); + if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); + elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); } } } diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 16dc458d833..9e58ffed942 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1584,9 +1584,7 @@ class BookKeeping extends CommonObject dol_syslog(get_class($this) . "::" . __METHOD__, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { - while ($obj = $this->db->fetch_object($result)) { - $line = new BookKeepingLine(); $line->id = $obj->rowid; @@ -1966,6 +1964,7 @@ class BookKeepingLine public $credit; public $montant; public $sens; + public $lettering_code; /** * @var int ID @@ -1976,5 +1975,12 @@ class BookKeepingLine public $code_journal; public $journal_label; public $piece_num; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $date_modification; + public $date_export; } diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index e20b49dbd25..ef63fc8b15f 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -149,7 +149,6 @@ class Lettering extends BookKeeping } } } elseif ($obj->type == 'payment') { - $sql = 'SELECT DISTINCT bk.rowid, fac.ref, fac.ref, pay.fk_bank, fac.rowid as fact_id'; $sql .= " FROM " . MAIN_DB_PREFIX . "facture fac "; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid"; diff --git a/htdocs/install/doctemplates/contracts/index.html b/htdocs/accountancy/closure/index.html similarity index 100% rename from htdocs/install/doctemplates/contracts/index.html rename to htdocs/accountancy/closure/index.html diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php new file mode 100644 index 00000000000..35c556807f8 --- /dev/null +++ b/htdocs/accountancy/closure/index.php @@ -0,0 +1,132 @@ + + * + * 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 . + * + */ + +/** + * \file htdocs/accountancy/closure/index.php + * \ingroup Accountancy + * \brief Home closure page + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","other","main","accountancy")); + +// Security check +if (empty($conf->accounting->enabled)) { + accessforbidden(); +} +if ($user->socid > 0) + accessforbidden(); +if (! $user->rights->accounting->fiscalyear->write) + accessforbidden(); + + +$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); +if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); +else +{ + $year_start = dol_print_date(dol_now(), '%Y'); + if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year +} +$year_end = $year_start + 1; +$month_end = $month_start - 1; +if ($month_end < 1) +{ + $month_end = 12; + $year_end--; +} +$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start); +$search_date_end = dol_get_last_day($year_end, $month_end); +$year_current = $year_start; + +/* + * Actions + */ + + +/* + * View + */ + +llxHeader('', $langs->trans("Closure")); + +$textprevyear = '' . img_previous() . ''; +$textnextyear = ' ' . img_next() . ''; + + +print load_fiche_titre($langs->trans("Closure") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy'); + +print ''.$langs->trans("DescClosure") . '
'; +print '
'; + + +$y = $year_current; + +$buttonbind = '' . $langs->trans("ValidateMovements") . ''; + +print_barre_liste($langs->trans("OverviewOfMovementsNotValidated"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1); + +print '
'; +print '
'; +for($i = 1; $i <= 12; $i ++) { + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + print ''; +} +print ''; + +$sql = "SELECT COUNT(b.rowid) as detail,"; +for($i = 1; $i <= 12; $i ++) { + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + $sql .= " SUM(" . $db->ifsql('MONTH(b.doc_date)=' . $j, '1', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ","; +} +$sql .= " COUNT(b.rowid) as total"; +$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as b"; +$sql .= " WHERE b.doc_date >= '" . $db->idate($search_date_start) . "'"; +$sql .= " AND b.doc_date <= '" . $db->idate($search_date_end) . "'"; +$sql .= " AND b.entity IN (" . getEntity('bookkeeping', 0) . ")"; // We don't share object for accountancy + +dol_syslog('htdocs/accountancy/closure/index.php sql=' . $sql, LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + + while ($row = $db->fetch_row($resql)) { + print ''; + for($i = 1; $i <= 12; $i ++) { + print ''; + } + print ''; + print ''; + } + + $db->free($resql); +} else { + print $db->lasterror(); // Show last sql error +} +print "
' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("Total") . '
' . $row[$i] . '' . $row[13] . '
\n"; +print '
'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/accountancy/closure/validate.php b/htdocs/accountancy/closure/validate.php new file mode 100644 index 00000000000..0b079c57b20 --- /dev/null +++ b/htdocs/accountancy/closure/validate.php @@ -0,0 +1,157 @@ + + * + * 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 . + * + */ + +/** + * \file htdocs/accountancy/closure/validate.php + * \ingroup Accountancy + * \brief Validate entries page + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("compta","bills","other","main","accountancy")); + +// Security check +if (empty($conf->accounting->enabled)) { + accessforbidden(); +} +if ($user->socid > 0) + accessforbidden(); + if (! $user->rights->accounting->fiscalyear->write) + accessforbidden(); + + +$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); +if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); +else +{ + $year_start = dol_print_date(dol_now(), '%Y'); + if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year +} +$year_end = $year_start + 1; +$month_end = $month_start - 1; +if ($month_end < 1) +{ + $month_end = 12; + $year_end--; +} +$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start); +$search_date_end = dol_get_last_day($year_end, $month_end); +$year_current = $year_start; + +/* + * Actions + */ + +if ($action == 'validate') +{ + $now = dol_now(); + + // Update database + $db->begin(); + $sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping as b"; + $sql .= " SET b.date_validated = '" . $db->idate($now) . "'"; + $sql .= ' WHERE b.date_validated IS NULL'; + + dol_syslog("htdocs/accountancy/closure/validate.php validate", LOG_DEBUG); + $resql = $db->query($sql); + if (! $resql1) { + $error ++; + $db->rollback(); + setEventMessages($db->lasterror(), null, 'errors'); + } else { + $db->commit(); + } + // End clean database +} + + +/* + * View + */ + +llxHeader('', $langs->trans("ValidateMovements")); + +$textprevyear = '' . img_previous() . ''; +$textnextyear = ' ' . img_next() . ''; + + +print load_fiche_titre($langs->trans("ValidateMovements") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy'); + +print $langs->trans("DescValidateMovements") . '
'; +print '
'; + + +$y = $year_current; + +print_barre_liste($langs->trans("SelectMonthAndValidate"), '', '', '', '', '', '', -1, '', '', 0, '', 'class="right"', 0, 1, 1); + +print '
'; +print ''; +print ''; +for($i = 1; $i <= 12; $i ++) { + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + print ''; +} +print ''; + +print ''; +$sql = "SELECT COUNT(b.rowid) as detail,"; +for($i = 1; $i <= 12; $i ++) { + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; + if ($j > 12) $j-=12; + $sql .= " SUM(" . $db->ifsql('MONTH(b.doc_date)=' . $j, '1', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ","; +} +$sql .= " COUNT(b.rowid) as total"; +$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as b"; +$sql .= " WHERE b.doc_date >= '" . $db->idate($search_date_start) . "'"; +$sql .= " AND b.doc_date <= '" . $db->idate($search_date_end) . "'"; +$sql .= " AND b.entity IN (" . getEntity('bookkeeping', 0) . ")"; // We don't share object for accountancy + +dol_syslog('htdocs/accountancy/closure/index.php sql=' . $sql, LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + + while ($row = $db->fetch_row($resql)) { + for($i = 1; $i <= 12; $i ++) { + print '' ; + } + print ''; + } + + $db->free($resql); +} else { + print $db->lasterror(); // Show last sql error +} +print ''; +print "
' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("Total") . '
' . $row[$i] . '

'; + print ''; + print '
' . $row[13] . '
\n"; + +print '
'; +print '
'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 52057485a30..6b64d969518 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -38,7 +38,7 @@ $codeventil = GETPOST('codeventil'); $id = GETPOST('id'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); @@ -112,7 +112,6 @@ if (! empty($id)) { $i = 0; if ($num_lines) { - $objp = $db->fetch_object($result); print '' . "\n"; @@ -124,7 +123,7 @@ if (! empty($id)) { dol_fiche_head(); - print ''; + print '
'; // Ref facture print ''; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 68649aa264d..2aa6072f2c2 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -29,6 +29,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; // Load translation files required by the page @@ -38,7 +39,7 @@ $langs->loadLangs(array("compta","bills","other","main","accountancy")); if (empty($conf->accounting->enabled)) { accessforbidden(); } -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -65,6 +66,8 @@ $year_current = $year_start; // Validate History $action = GETPOST('action', 'aZ09'); +$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version'); + /* * Actions @@ -97,12 +100,11 @@ if ($action == 'clean' || $action == 'validatehistory') } if ($action == 'validatehistory') { - $error = 0; $db->begin(); // Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind - if ($db->type == 'pgsql') { + /*if ($db->type == 'pgsql') { $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet"; $sql1 .= " SET fk_code_ventilation = accnt.rowid"; $sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst"; @@ -115,16 +117,83 @@ if ($action == 'validatehistory') { $sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity; $sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number"; $sql1 .= " AND fd.fk_code_ventilation = 0"; - } + }*/ + + // Customer Invoice lines (must be same request than into page list.php for manual binding) + $sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype,"; + $sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; + $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,"; + $sql.= " p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,"; + $sql.= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,"; + $sql.= " co.code as country_code, co.label as country_label,"; + $sql.= " s.tva_intra"; + $sql.= " FROM " . MAIN_DB_PREFIX . "facture as f"; + $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc"; + $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays "; + $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture"; + $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; + $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity; + $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '" . $chartaccountcode."' AND aa2.entity = " . $conf->entity; + $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '" . $chartaccountcode."' AND aa3.entity = " . $conf->entity; + $sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; + $sql.= " AND l.product_type <= 2"; dol_syslog('htdocs/accountancy/customer/index.php'); - - $resql1 = $db->query($sql1); - if (! $resql1) { - $error ++; - $db->rollback(); + $result = $db->query($sql); + if (! $result) { + $error++; setEventMessages($db->lasterror(), null, 'errors'); } else { + $num_lines = $db->num_rows($result); + + $isSellerInEEC = isInEEC($mysoc); + + $i = 0; + while ($i < min($num_lines, 10000)) { // No more than 10000 at once + $objp = $db->fetch_object($result); + + // Search suggested account for product/service + $suggestedaccountingaccountfor = ''; + if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) + $objp->code_sell_p = $objp->code_sell; + $objp->aarowid_suggest = $objp->aarowid; + $suggestedaccountingaccountfor = ''; + } else { + if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + $objp->code_sell_p = $objp->code_sell_intra; + $objp->aarowid_suggest = $objp->aarowid_intra; + $suggestedaccountingaccountfor = 'eec'; + } else { // Foreign sale + $objp->code_sell_p = $objp->code_sell_export; + $objp->aarowid_suggest = $objp->aarowid_export; + $suggestedaccountingaccountfor = 'export'; + } + } + + if ($objp->aarowid_suggest > 0) + { + $sqlupdate = "UPDATE " . MAIN_DB_PREFIX . "facturedet"; + $sqlupdate.= " SET fk_code_ventilation = ".$objp->aarowid_suggest; + $sqlupdate.= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".$objp->rowid; + + $resqlupdate = $db->query($sqlupdate); + if (! $resqlupdate) + { + $error++; + setEventMessages($db->lasterror(), null, 'errors'); + break; + } + } + + $i++; + } + } + + if ($error) + { + $db->rollback(); + } + else { $db->commit(); setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs'); } @@ -156,7 +225,7 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', //print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, ''); print '
'; -print '
' . $langs->trans("Invoice") . '
'; +print '
'; print ''; print ''; for($i = 1; $i <= 12; $i ++) { @@ -195,7 +264,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '
'; if ($row[0] == 'tobind') { @@ -232,7 +300,7 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', //print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', ''); print '
'; -print ''; +print '
'; print ''; print ''; for($i = 1; $i <= 12; $i ++) { @@ -271,7 +339,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '
'; if ($row[0] == 'tobind') { @@ -312,7 +379,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. //print load_fiche_titre($langs->trans("OtherInfo"), '', ''); print '
'; - print ''; + print '
'; print ''; for($i = 1; $i <= 12; $i ++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; @@ -364,7 +431,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. if (! empty($conf->margin->enabled)) { print "
\n"; print '
'; - print '
' . $langs->trans("TotalVente") . '
'; + print '
'; print ''; for($i = 1; $i <= 12; $i ++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; @@ -398,7 +465,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. $num = $db->num_rows($resql); while ($row = $db->fetch_row($resql)) { - print ''; for($i = 1; $i <= 12; $i ++) { print ''; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 3385eb99b0e..9d32bbaebf4 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -72,7 +72,7 @@ if (! $sortorder) { } // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -358,6 +358,7 @@ if ($result) { // Ref Invoice print ''; + // Date invoice print ''; // Ref Product @@ -377,7 +378,13 @@ if ($result) { print ''; - print ''; + // Country + print ''; print ''; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 589eb10d6b4..f08b4e8d42d 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -83,7 +83,7 @@ if (! $sortorder) { } // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -129,8 +129,8 @@ if (empty($reshook)) // Mass actions $objectclass='AccountingAccount'; - $permtoread = $user->rights->accounting->read; - $permtodelete = $user->rights->accounting->delete; + $permissiontoread = $user->rights->accounting->read; + $permissiontodelete = $user->rights->accounting->delete; $uploaddir = $conf->accounting->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -180,8 +180,6 @@ if ($massaction == 'ventil') { } $msg.=''; $msg.= '
' . $langs->trans("EndProcessing") . '
'; - //} else { - // setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings'); } } @@ -221,9 +219,9 @@ $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc"; $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays "; $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture"; $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; -$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity; -$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.fk_pcg_version = '" . $chartaccountcode."' AND aa2.entity = " . $conf->entity; -$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.fk_pcg_version = '" . $chartaccountcode."' AND aa3.entity = " . $conf->entity; +$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity; +$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '" . $chartaccountcode."' AND aa2.entity = " . $conf->entity; +$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '" . $chartaccountcode."' AND aa3.entity = " . $conf->entity; $sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql.= " AND l.product_type <= 2"; // Add search filter like @@ -249,7 +247,7 @@ if (strlen(trim($search_account))) { $sql .= natural_search("aa.account_number", $search_account); } if (strlen(trim($search_vat))) { - $sql .= natural_search("l.tva_tx", $search_vat, 1); + $sql .= natural_search("l.tva_tx", price2num($search_vat), 1); } $sql.=dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year); if (strlen(trim($search_country))) { @@ -408,12 +406,13 @@ if ($result) { $isSellerInEEC = isInEEC($mysoc); - while ( $i < min($num_lines, $limit) ) { + $accountingaccount_codetotid_cache = array(); + + while ($i < min($num_lines, $limit)) { $objp = $db->fetch_object($result); $objp->code_sell_l = ''; $objp->code_sell_p = ''; - $objp->aarowid_suggest = ''; $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; @@ -425,7 +424,7 @@ if ($result) { $facture_static->type = $objp->ftype; $code_sell_p_notset = ''; - $objp->aarowid_suggest = $objp->aarowid; + $objp->aarowid_suggest = ''; // Will be set later $isBuyerInEEC = isInEEC($objp); @@ -459,8 +458,9 @@ if ($result) { } if ($objp->code_sell_l == -1) $objp->code_sell_l=''; + // Search suggested account for product/service $suggestedaccountingaccountfor = ''; - if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) + if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) $objp->code_sell_p = $objp->code_sell; $objp->aarowid_suggest = $objp->aarowid; $suggestedaccountingaccountfor = ''; @@ -476,8 +476,8 @@ if ($result) { } } - if (! empty($objp->code_sell)) { - //$objp->code_sell_p = $objp->code_sell; // Code on product + if (! empty($objp->code_sell_p)) { + // Value was defined previously } else { $code_sell_p_notset = 'color:orange'; } @@ -520,6 +520,7 @@ if ($result) { print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')); print ''; + // Country print ''; // Suggested accounting account + // $objp->code_sell_l = default (it takes the country into consideration), $objp->code_sell_p is value for product (it takes the country into consideration too) print ''; // Column with checkbox print ''; print ''; diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 2331111f620..0d0e6509769 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -42,7 +42,7 @@ $codeventil = GETPOST('codeventil'); $id = GETPOST('id'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); @@ -125,7 +125,7 @@ if (! empty($id)) { dol_fiche_head(); - print '
' . $langs->trans("TotalMarge") . '
' . $row[0] . '' . price(price2num($row[$i])) . '' . $facture_static->getNomUrl(1) . '' . dol_print_date($db->jdate($objp->datef), 'day') . '' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '' . $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')'; + if ($objp->country_code) + { + print $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')'; + } + print '' . $objp->tva_intra . ''; $labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label; print $labelcountry; @@ -548,13 +549,35 @@ if ($result) { print ''; - print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'); + $suggestedid = $objp->aarowid_suggest; + /*var_dump($suggestedid); + var_dump($objp->code_sell_p); + var_dump($objp->code_sell_l);*/ + if (empty($suggestedid) && empty($objp->code_sell_p) && ! empty($objp->code_sell_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) + { + if (empty($accountingaccount_codetotid_cache[$objp->code_sell_l])) + { + $tmpaccount = new AccountingAccount($db); + $tmpaccount->fetch(0, $objp->code_sell_l, 1); + if ($tmpaccount->id > 0) { + $suggestedid = $tmpaccount->id; + } + $accountingaccount_codetotid_cache[$objp->code_sell_l] = $tmpaccount->id; + } + else { + $suggestedid = $accountingaccount_codetotid_cache[$objp->code_sell_l]; + } + } + print $formaccounting->select_account($suggestedid, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'); print ''; - print 'aarowid ? "checked" : "") . '/>'; + //var_dump($objp->aarowid);var_dump($objp->aarowid_intra);var_dump($objp->aarowid_export);var_dump($objp->aarowid_suggest); + $ischecked = $objp->aarowid_suggest; + print ''; print '
'; + print '
'; // Ref print ''; diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index d3fc63d3bf8..29fe4a7aea3 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -36,7 +36,7 @@ $langs->loadLangs(array("compta","bills","other","main","accountancy")); if (empty($conf->accounting->enabled)) { accessforbidden(); } -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -94,7 +94,6 @@ if ($action == 'clean' || $action == 'validatehistory') } if ($action == 'validatehistory') { - $error = 0; $db->begin(); @@ -153,7 +152,7 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', //print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, ''); print '
'; -print '
' . $langs->trans("ExpenseReport") . '
'; +print '
'; print ''; print ''; for($i = 1; $i <= 12; $i ++) { @@ -187,7 +186,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '
'; if ($row[0] == 'tobind') { @@ -225,7 +223,7 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', print '
'; -print ''; +print '
'; print ''; print ''; for($i = 1; $i <= 12; $i ++) { @@ -259,7 +257,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '
'; if ($row[0] == 'tobind') { @@ -300,7 +297,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. //print load_fiche_titre($langs->trans("OtherInfo"), '', ''); print '
'; - print ''; + print '
'; print ''; for($i = 1; $i <= 12; $i ++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index c50031b82b2..56f7ee6ba96 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -67,7 +67,7 @@ if (! $sortorder) { } // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 77a97b86322..a1c354f010b 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -77,7 +77,7 @@ if (! $sortorder) { } // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -112,8 +112,8 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' // Mass actions $objectclass='ExpenseReport'; $objectlabel='ExpenseReport'; -$permtoread = $user->rights->expensereport->read; -$permtodelete = $user->rights->expensereport->delete; +$permissiontoread = $user->rights->expensereport->read; +$permissiontodelete = $user->rights->expensereport->delete; $uploaddir = $conf->expensereport->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -161,8 +161,6 @@ if ($massaction == 'ventil') { } $msg.=''; $msg.= '
' . $langs->trans("EndProcessing") . '
'; - //} else { - // setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings'); } } diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 4eab81ea49f..8dde1d0df22 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; $langs->loadLangs(array("compta","bills","other","accountancy","loans","banks","admin","dict")); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks @@ -88,7 +88,7 @@ if ($conf->accounting->enabled) } - print load_fiche_titre($langs->trans("AccountancyArea"), $showtutorial . $resultboxes['selectboxlist'], 'accountancy'); + print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial); print '
'; // hideobject is to start hidden print "
\n"; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index b36da4a2855..e8e1da09dd0 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -4,7 +4,7 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2019 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2017-2018 Frédéric France @@ -80,7 +80,7 @@ $now = dol_now(); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->societe_id > 0 && empty($id_journal)) +if ($user->socid > 0 && empty($id_journal)) accessforbidden(); @@ -167,7 +167,6 @@ $journal_label = $accountingjournalstatic->label; dol_syslog("accountancy/journal/bankjournal.php", LOG_DEBUG); $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result); //print $sql; @@ -268,10 +267,8 @@ if ($result) { // get_url may return -1 which is not traversable if (is_array($links) && count($links) > 0) { - // Now loop on each link of record in bank. foreach ($links as $key => $val) { - if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport', 'banktransfert', 'payment_donation', 'member', 'payment_loan', 'payment_salary', 'payment_various'))) { // So we excluded 'company' and 'user' here. We want only payment lines @@ -326,11 +323,11 @@ if ($result) { if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { if ($reg[1] == 'socialcontribution') $reg[1] = 'SocialContribution'; - $chargestatic->lib = $langs->trans($reg[1]); + $chargestatic->label = $langs->trans($reg[1]); } else { - $chargestatic->lib = $links[$key]['label']; + $chargestatic->label = $links[$key]['label']; } - $chargestatic->ref = $chargestatic->lib; + $chargestatic->ref = $chargestatic->label; $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); $tabpay[$obj->rowid]["paymentscid"] = $chargestatic->id; @@ -387,7 +384,9 @@ if ($result) { $tabpay[$obj->rowid]["paymentvariousid"] = $paymentvariousstatic->id; $paymentvariousstatic->fetch($paymentvariousstatic->id); $account_various = (! empty($paymentvariousstatic->accountancy_code) ? $paymentvariousstatic->accountancy_code : 'NotDefined'); // NotDefined is a reserved word - $tabtp[$obj->rowid][$account_various] += $obj->amount; + $account_subledger = (! empty($paymentvariousstatic->subledger_account) ? $paymentvariousstatic->subledger_account : ''); // NotDefined is a reserved word + $tabpay[$obj->rowid]["account_various"] = $account_various; + $tabtp[$obj->rowid][$account_subledger] += $obj->amount; } elseif ($links[$key]['type'] == 'payment_loan') { $paymentloanstatic->id = $links[$key]['url_id']; $paymentloanstatic->ref = $links[$key]['url_id']; @@ -660,11 +659,11 @@ if (! $error && $action == 'writebookkeeping') { $accountingaccount->fetch(null, $k, true); $bookkeeping->label_compte = $accountingaccount->label; } elseif ($tabtype[$key] == 'payment_various') { - $bookkeeping->subledger_account = ''; - $bookkeeping->subledger_label = ''; - $bookkeeping->numero_compte = $k; + $bookkeeping->subledger_account = $k; + $bookkeeping->subledger_label = $tabcompany[$key]['name']; + $bookkeeping->numero_compte = $tabpay[$obj->rowid]["account_various"]; - $accountingaccount->fetch(null, $k, true); + $accountingaccount->fetch(null, $bookkeeping->numero_compte, true); $bookkeeping->label_compte = $accountingaccount->label; } elseif ($tabtype[$key] == 'banktransfert') { $bookkeeping->subledger_account = ''; @@ -997,7 +996,7 @@ if (empty($action) || $action == 'view') { if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1' || ($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') { - print ''; + print ''; } else { if ($in_bookkeeping == 'notyet') print ''; @@ -1123,6 +1122,7 @@ if (empty($action) || $action == 'view') { if ($tabtype[$key] == 'payment_salary') $account_ledger = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; if ($tabtype[$key] == 'payment_vat') $account_ledger = $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT; if ($tabtype[$key] == 'member') $account_ledger = $conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT; + if ($tabtype[$key] == 'payment_various') $account_ledger = $tabpay[$key]["account_various"]; $accounttoshow = length_accounta($account_ledger); if (empty($accounttoshow) || $accounttoshow == 'NotDefined') { @@ -1156,7 +1156,7 @@ if (empty($action) || $action == 'view') { // Subledger account print "
'; - print ""; - print ""; - print ""; - // Account - print "'; + print ""; + print ""; + print ""; + // Account + print ""; + // Subledger account + print "'; + print ""; + print '"; + print '"; + print ""; } - else print $accountoshow; - print ""; - // Subledger account - print "'; - print ""; - print '"; - print '"; - print ""; - } } } } diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index c83c004c6b2..711a54f37a6 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -56,7 +56,7 @@ if ($in_bookkeeping == '') $in_bookkeeping = 'notyet'; $now = dol_now(); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); $hookmanager->initHooks(array('purchasesjournal')); @@ -242,7 +242,6 @@ if ($action == 'writebookkeeping') { $invoicestatic = new FactureFournisseur($db); foreach ($tabfac as $key => $val) { // Loop on each invoice - $errorforline = 0; $totalcredit = 0; @@ -295,7 +294,61 @@ if ($action == 'writebookkeeping') { if (! $errorforline) { foreach ($tabttc[$key] as $k => $mt) { - //if ($mt) { + $bookkeeping = new BookKeeping($db); + $bookkeeping->doc_date = $val["date"]; + $bookkeeping->date_lim_reglement = $val["datereg"]; + $bookkeeping->doc_ref = $val["refsologest"]; + $bookkeeping->date_creation = $now; + $bookkeeping->doc_type = 'supplier_invoice'; + $bookkeeping->fk_doc = $key; + $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add + $bookkeeping->thirdparty_code = $companystatic->code_fournisseur; + $bookkeeping->subledger_account = $tabcompany[$key]['code_compta_fournisseur']; + $bookkeeping->subledger_label = $tabcompany[$key]['name']; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; + + $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, true); + $bookkeeping->label_compte = $accountingaccount->label; + + $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount"); + $bookkeeping->montant = $mt; + $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D'; + $bookkeeping->debit = ($mt <= 0) ? -$mt : 0; + $bookkeeping->credit = ($mt > 0) ? $mt : 0; + $bookkeeping->code_journal = $journal; + $bookkeeping->journal_label = $journal_label; + $bookkeeping->fk_user_author = $user->id; + $bookkeeping->entity = $conf->entity; + + $totaldebit += $bookkeeping->debit; + $totalcredit += $bookkeeping->credit; + + $result = $bookkeeping->create($user); + if ($result < 0) { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists + { + $error++; + $errorforline++; + $errorforinvoice[$key]='alreadyjournalized'; + //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); + } + else + { + $error++; + $errorforline++; + $errorforinvoice[$key]='other'; + setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); + } + } + } + } + + // Product / Service + if (! $errorforline) + { + foreach ($tabht[$key] as $k => $mt) { + // get compte id and label + if ($accountingaccount->fetch(null, $k, true)) { $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->date_lim_reglement = $val["datereg"]; @@ -303,20 +356,17 @@ if ($action == 'writebookkeeping') { $bookkeeping->date_creation = $now; $bookkeeping->doc_type = 'supplier_invoice'; $bookkeeping->fk_doc = $key; - $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add + $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add $bookkeeping->thirdparty_code = $companystatic->code_fournisseur; - $bookkeeping->subledger_account = $tabcompany[$key]['code_compta_fournisseur']; - $bookkeeping->subledger_label = $tabcompany[$key]['name']; - $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; - - $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, true); + $bookkeeping->subledger_account = ''; + $bookkeeping->subledger_label = ''; + $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $accountingaccount->label; - - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount"); + $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label; $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D'; - $bookkeeping->debit = ($mt <= 0) ? -$mt : 0; - $bookkeeping->credit = ($mt > 0) ? $mt : 0; + $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; + $bookkeeping->debit = ($mt > 0) ? $mt : 0; + $bookkeeping->credit = ($mt <= 0) ? -$mt : 0; $bookkeeping->code_journal = $journal; $bookkeeping->journal_label = $journal_label; $bookkeeping->fk_user_author = $user->id; @@ -342,62 +392,7 @@ if ($action == 'writebookkeeping') { setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); } } - //} - } - } - - // Product / Service - if (! $errorforline) - { - foreach ($tabht[$key] as $k => $mt) { - //if ($mt) { - // get compte id and label - if ($accountingaccount->fetch(null, $k, true)) { - $bookkeeping = new BookKeeping($db); - $bookkeeping->doc_date = $val["date"]; - $bookkeeping->date_lim_reglement = $val["datereg"]; - $bookkeeping->doc_ref = $val["refsologest"]; - $bookkeeping->date_creation = $now; - $bookkeeping->doc_type = 'supplier_invoice'; - $bookkeeping->fk_doc = $key; - $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add - $bookkeeping->thirdparty_code = $companystatic->code_fournisseur; - $bookkeeping->subledger_account = ''; - $bookkeeping->subledger_label = ''; - $bookkeeping->numero_compte = $k; - $bookkeeping->label_compte = $accountingaccount->label; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label; - $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; - $bookkeeping->debit = ($mt > 0) ? $mt : 0; - $bookkeeping->credit = ($mt <= 0) ? -$mt : 0; - $bookkeeping->code_journal = $journal; - $bookkeeping->journal_label = $journal_label; - $bookkeeping->fk_user_author = $user->id; - $bookkeeping->entity = $conf->entity; - - $totaldebit += $bookkeeping->debit; - $totalcredit += $bookkeeping->credit; - - $result = $bookkeeping->create($user); - if ($result < 0) { - if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists - { - $error++; - $errorforline++; - $errorforinvoice[$key]='alreadyjournalized'; - //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); - } - else - { - $error++; - $errorforline++; - $errorforinvoice[$key]='other'; - setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); - } - } - } - //} + } } } @@ -716,7 +711,6 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! } if (empty($action) || $action == 'view') { - llxHeader('', $langs->trans("PurchasesJournal")); $nom = $langs->trans("PurchasesJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0, 1, 1, '', 1); @@ -867,34 +861,32 @@ if (empty($action) || $action == 'view') { // Third party foreach ($tabttc[$key] as $k => $mt) { - //if ($mt) { - print ''; - print ""; - print ""; - print ""; - // Account - print "'; - // Subledger account - print "'; - print ""; - print '"; - print '"; - print ""; - //} + print ''; + print ""; + print ""; + print ""; + // Account + print "'; + // Subledger account + print "'; + print ""; + print '"; + print '"; + print ""; } // Product / Service @@ -902,30 +894,28 @@ if (empty($action) || $action == 'view') { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch(null, $k, true); - //if ($mt) { - print ''; - print ""; - print ""; - print ""; - // Account - print ""; - // Subledger account - print "'; - $companystatic->id = $tabcompany[$key]['id']; - $companystatic->name = $tabcompany[$key]['name']; - print ""; - print '"; - print '"; - print ""; - //} + print ''; + print ""; + print ""; + print ""; + // Account + print ""; + // Subledger account + print "'; + $companystatic->id = $tabcompany[$key]['id']; + $companystatic->name = $tabcompany[$key]['name']; + print ""; + print '"; + print '"; + print ""; } // VAT diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 17b2657b5dc..7781d612575 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -58,7 +58,7 @@ if ($in_bookkeeping == '') $in_bookkeeping = 'notyet'; $now = dol_now(); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); $hookmanager->initHooks(array('sellsjournal')); @@ -124,7 +124,7 @@ if ($in_bookkeeping == 'already') if ($in_bookkeeping == 'notyet') { $sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')"; -// $sql .= " AND fd.rowid NOT IN (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')"; // Useless, we save one line for all products with same account + // $sql .= " AND fd.rowid NOT IN (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')"; // Useless, we save one line for all products with same account } $sql .= " ORDER BY f.datef"; //print $sql; @@ -255,7 +255,6 @@ if ($action == 'writebookkeeping') { $invoicestatic = new Facture($db); foreach ($tabfac as $key => $val) { // Loop on each invoice - $errorforline = 0; $totalcredit = 0; @@ -306,7 +305,61 @@ if ($action == 'writebookkeeping') { if (! $errorforline) { foreach ($tabttc[$key] as $k => $mt) { - //if ($mt) { + $bookkeeping = new BookKeeping($db); + $bookkeeping->doc_date = $val["date"]; + $bookkeeping->date_lim_reglement = $val["datereg"]; + $bookkeeping->doc_ref = $val["ref"]; + $bookkeeping->date_creation = $now; + $bookkeeping->doc_type = 'customer_invoice'; + $bookkeeping->fk_doc = $key; + $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add + $bookkeeping->thirdparty_code = $companystatic->code_client; + $bookkeeping->subledger_account = $tabcompany[$key]['code_compta']; + $bookkeeping->subledger_label = $tabcompany[$key]['name']; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; + + $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, true); + $bookkeeping->label_compte = $accountingaccount->label; + + $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount"); + $bookkeeping->montant = $mt; + $bookkeeping->sens = ($mt >= 0) ? 'D' : 'C'; + $bookkeeping->debit = ($mt >= 0) ? $mt : 0; + $bookkeeping->credit = ($mt < 0) ? -$mt : 0; + $bookkeeping->code_journal = $journal; + $bookkeeping->journal_label = $journal_label; + $bookkeeping->fk_user_author = $user->id; + $bookkeeping->entity = $conf->entity; + + $totaldebit += $bookkeeping->debit; + $totalcredit += $bookkeeping->credit; + + $result = $bookkeeping->create($user); + if ($result < 0) { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists + { + $error++; + $errorforline++; + $errorforinvoice[$key]='alreadyjournalized'; + //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); + } + else + { + $error++; + $errorforline++; + $errorforinvoice[$key]='other'; + setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); + } + } + } + } + + // Product / Service + if (! $errorforline) + { + foreach ($tabht[$key] as $k => $mt) { + // get compte id and label + if ($accountingaccount->fetch(null, $k, true)) { $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->date_lim_reglement = $val["datereg"]; @@ -316,18 +369,15 @@ if ($action == 'writebookkeeping') { $bookkeeping->fk_doc = $key; $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add $bookkeeping->thirdparty_code = $companystatic->code_client; - $bookkeeping->subledger_account = $tabcompany[$key]['code_compta']; - $bookkeeping->subledger_label = $tabcompany[$key]['name']; - $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; - - $accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, true); + $bookkeeping->subledger_account = ''; + $bookkeeping->subledger_label = ''; + $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $accountingaccount->label; - - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount"); + $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label; $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt >= 0) ? 'D' : 'C'; - $bookkeeping->debit = ($mt >= 0) ? $mt : 0; - $bookkeeping->credit = ($mt < 0) ? -$mt : 0; + $bookkeeping->sens = ($mt < 0) ? 'D' : 'C'; + $bookkeeping->debit = ($mt < 0) ? -$mt : 0; + $bookkeeping->credit = ($mt >= 0) ? $mt : 0; $bookkeeping->code_journal = $journal; $bookkeeping->journal_label = $journal_label; $bookkeeping->fk_user_author = $user->id; @@ -353,62 +403,7 @@ if ($action == 'writebookkeeping') { setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); } } - //} - } - } - - // Product / Service - if (! $errorforline) - { - foreach ($tabht[$key] as $k => $mt) { - //if ($mt) { - // get compte id and label - if ($accountingaccount->fetch(null, $k, true)) { - $bookkeeping = new BookKeeping($db); - $bookkeeping->doc_date = $val["date"]; - $bookkeeping->date_lim_reglement = $val["datereg"]; - $bookkeeping->doc_ref = $val["ref"]; - $bookkeeping->date_creation = $now; - $bookkeeping->doc_type = 'customer_invoice'; - $bookkeeping->fk_doc = $key; - $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add - $bookkeeping->thirdparty_code = $companystatic->code_client; - $bookkeeping->subledger_account = ''; - $bookkeeping->subledger_label = ''; - $bookkeeping->numero_compte = $k; - $bookkeeping->label_compte = $accountingaccount->label; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label; - $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt < 0) ? 'D' : 'C'; - $bookkeeping->debit = ($mt < 0) ? -$mt : 0; - $bookkeeping->credit = ($mt >= 0) ? $mt : 0; - $bookkeeping->code_journal = $journal; - $bookkeeping->journal_label = $journal_label; - $bookkeeping->fk_user_author = $user->id; - $bookkeeping->entity = $conf->entity; - - $totaldebit += $bookkeeping->debit; - $totalcredit += $bookkeeping->credit; - - $result = $bookkeeping->create($user); - if ($result < 0) { - if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists - { - $error++; - $errorforline++; - $errorforinvoice[$key]='alreadyjournalized'; - //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); - } - else - { - $error++; - $errorforline++; - $errorforinvoice[$key]='other'; - setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); - } - } - } - //} + } } } @@ -654,7 +649,6 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! if (empty($action) || $action == 'view') { - llxHeader('', $langs->trans("SellsJournal")); $nom = $langs->trans("SellsJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0, 1, 1, '', 1); @@ -803,34 +797,32 @@ if (empty($action) || $action == 'view') { // Third party foreach ($tabttc[$key] as $k => $mt) { - //if ($mt) { - print ''; - print ""; - print ""; - print ""; - // Account - print "'; - // Subledger account - print "'; - print ""; - print '"; - print '"; - print ""; - //} + print ''; + print ""; + print ""; + print ""; + // Account + print "'; + // Subledger account + print "'; + print ""; + print '"; + print '"; + print ""; } // Product / Service @@ -839,30 +831,28 @@ if (empty($action) || $action == 'view') { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch(null, $k, true); - //if ($mt) { - print ''; - print ""; - print ""; - print ""; - // Account - print ""; - // Subledger account - print "'; - $companystatic->id = $tabcompany[$key]['id']; - $companystatic->name = $tabcompany[$key]['name']; - print ""; - print '"; - print '"; - print ""; - //} + print ''; + print ""; + print ""; + print ""; + // Account + print ""; + // Subledger account + print "'; + $companystatic->id = $tabcompany[$key]['id']; + $companystatic->name = $tabcompany[$key]['name']; + print ""; + print '"; + print '"; + print ""; } // VAT diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 7e9d7fbbd7c..e39decd7c57 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -42,7 +42,7 @@ $codeventil = GETPOST('codeventil'); $id = GETPOST('id'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); @@ -125,7 +125,7 @@ if (! empty($id)) { dol_fiche_head(); - print '
' . $langs->trans("Total") . '"; - if (in_array($tabtype[$key], array('payment', 'payment_supplier', 'payment_expensereport', 'payment_salary'))) // Type of payment with subledger + if (in_array($tabtype[$key], array('payment', 'payment_supplier', 'payment_expensereport', 'payment_salary', 'payment_various'))) // Type of payment with subledger { $accounttoshowsubledger = length_accounta($k); if ($accounttoshow != $accounttoshowsubledger) diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 23d97360563..a80036b3b05 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -56,7 +56,7 @@ if ($in_bookkeeping == '') $in_bookkeeping = 'notyet'; $now = dol_now(); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); /* @@ -115,7 +115,6 @@ $sql .= " ORDER BY er.date_debut"; dol_syslog('accountancy/journal/expensereportsjournal.php', LOG_DEBUG); $result = $db->query($sql); if ($result) { - $taber = array (); $tabht = array (); $tabtva = array (); @@ -307,49 +306,49 @@ if ($action == 'writebookkeeping') { foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { - // get compte id and label - $bookkeeping = new BookKeeping($db); - $bookkeeping->doc_date = $val["date"]; - $bookkeeping->doc_ref = $val["ref"]; - $bookkeeping->date_creation = $now; - $bookkeeping->doc_type = 'expense_report'; - $bookkeeping->fk_doc = $key; - $bookkeeping->fk_docdet = $val["fk_expensereportdet"]; - $bookkeeping->subledger_account = ''; - $bookkeeping->subledger_label = ''; - $bookkeeping->numero_compte = $k; + // get compte id and label + $bookkeeping = new BookKeeping($db); + $bookkeeping->doc_date = $val["date"]; + $bookkeeping->doc_ref = $val["ref"]; + $bookkeeping->date_creation = $now; + $bookkeeping->doc_type = 'expense_report'; + $bookkeeping->fk_doc = $key; + $bookkeeping->fk_docdet = $val["fk_expensereportdet"]; + $bookkeeping->subledger_account = ''; + $bookkeeping->subledger_label = ''; + $bookkeeping->numero_compte = $k; - $accountingaccount->fetch($k, null, true); - $bookkeeping->label_compte = $accountingaccount->label; + $accountingaccount->fetch($k, null, true); + $bookkeeping->label_compte = $accountingaccount->label; - $bookkeeping->label_operation = $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'; - $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; - $bookkeeping->debit = ($mt > 0) ? $mt : 0; - $bookkeeping->credit = ($mt <= 0) ? $mt : 0; - $bookkeeping->code_journal = $journal; - $bookkeeping->journal_label = $journal_label; - $bookkeeping->fk_user_author = $user->id; - $bookkeeping->entity = $conf->entity; + $bookkeeping->label_operation = $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'; + $bookkeeping->montant = $mt; + $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; + $bookkeeping->debit = ($mt > 0) ? $mt : 0; + $bookkeeping->credit = ($mt <= 0) ? $mt : 0; + $bookkeeping->code_journal = $journal; + $bookkeeping->journal_label = $journal_label; + $bookkeeping->fk_user_author = $user->id; + $bookkeeping->entity = $conf->entity; - $totaldebit += $bookkeeping->debit; - $totalcredit += $bookkeeping->credit; + $totaldebit += $bookkeeping->debit; + $totalcredit += $bookkeeping->credit; - $result = $bookkeeping->create($user); - if ($result < 0) { - if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists - { - $error++; - $errorforline++; - //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); + $result = $bookkeeping->create($user); + if ($result < 0) { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists + { + $error++; + $errorforline++; + //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); + } + else + { + $error++; + $errorforline++; + setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); + } } - else - { - $error++; - $errorforline++; - setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); - } - } } } } @@ -439,53 +438,52 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print "\n"; foreach ($taber as $key => $val) { - $date = dol_print_date($val["date"], 'day'); + $date = dol_print_date($val["date"], 'day'); - $userstatic->id = $tabuser[$key]['id']; - $userstatic->name = $tabuser[$key]['name']; + $userstatic->id = $tabuser[$key]['id']; + $userstatic->name = $tabuser[$key]['name']; - // Fees - foreach ($tabht[$key] as $k => $mt) { - $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch(null, $k, true); - if ($mt) { - print '"' . $date . '"' . $sep; - print '"' . $val["ref"] . '"' . $sep; - print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; - print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; - print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; - print "\n"; + // Fees + foreach ($tabht[$key] as $k => $mt) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k, true); + if ($mt) { + print '"' . $date . '"' . $sep; + print '"' . $val["ref"] . '"' . $sep; + print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; + print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; + print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; + print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; + print "\n"; + } } - } - // VAT - foreach ($tabtva[$key] as $k => $mt) { - if ($mt) { - print '"' . $date . '"' . $sep; - print '"' . $val["ref"] . '"' . $sep; - print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($langs->trans("VAT")) . '"' . $sep; - print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; - print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; - print "\n"; + // VAT + foreach ($tabtva[$key] as $k => $mt) { + if ($mt) { + print '"' . $date . '"' . $sep; + print '"' . $val["ref"] . '"' . $sep; + print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; + print '"' . dol_trunc($langs->trans("VAT")) . '"' . $sep; + print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; + print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; + print "\n"; + } } - } - // Third party - foreach ($tabttc[$key] as $k => $mt) { - print '"' . $date . '"' . $sep; - print '"' . $val["ref"] . '"' . $sep; - print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($userstatic->name) . '"' . $sep; - print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; - print '"' . ($mt >= 0 ? price($mt) : '') . '"'; - } - print "\n"; + // Third party + foreach ($tabttc[$key] as $k => $mt) { + print '"' . $date . '"' . $sep; + print '"' . $val["ref"] . '"' . $sep; + print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep; + print '"' . dol_trunc($userstatic->name) . '"' . $sep; + print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; + print '"' . ($mt >= 0 ? price($mt) : '') . '"'; + } + print "\n"; } } if (empty($action) || $action == 'view') { - llxHeader('', $langs->trans("ExpenseReportsJournal")); $nom = $langs->trans("ExpenseReportsJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0, 1, 1, '', 1); @@ -640,29 +638,29 @@ if (empty($action) || $action == 'view') { if ($numtax == 2) $arrayofvat = $tablocaltax2; foreach ($arrayofvat[$key] as $k => $mt) { - if ($mt) { - print '
" . $date . "" . $expensereportstatic->getNomUrl(1) . ""; - $accountoshow = length_accountg($k); - if (($accountoshow == "") || $accountoshow == 'NotDefined') - { - print ''.$langs->trans("VATAccountNotDefined").''; + if ($mt) { + print '
" . $date . "" . $expensereportstatic->getNomUrl(1) . ""; + $accountoshow = length_accountg($k); + if (($accountoshow == "") || $accountoshow == 'NotDefined') + { + print ''.$langs->trans("VATAccountNotDefined").''; + } + else print $accountoshow; + print ""; + print '" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:''); + print "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
"; - print '" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:''); - print "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; - $accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER); - if (($accountoshow == "") || $accountoshow == 'NotDefined') - { - print ''.$langs->trans("MainAccountForSuppliersNotDefined").''; - } - else print $accountoshow; - print '"; - $accountoshow = length_accounta($k); - if (($accountoshow == "") || $accountoshow == 'NotDefined') - { - print ''.$langs->trans("ThirdpartyAccountNotDefined").''; - } - else print $accountoshow; - print '" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "'. ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; + $accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER); + if (($accountoshow == "") || $accountoshow == 'NotDefined') + { + print ''.$langs->trans("MainAccountForSuppliersNotDefined").''; + } + else print $accountoshow; + print '"; + $accountoshow = length_accounta($k); + if (($accountoshow == "") || $accountoshow == 'NotDefined') + { + print ''.$langs->trans("ThirdpartyAccountNotDefined").''; + } + else print $accountoshow; + print '" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "'. ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; - $accountoshow = length_accountg($k); - if (($accountoshow == "") || $accountoshow == 'NotDefined') - { - print ''.$langs->trans("ProductAccountNotDefined").''; - } - else print $accountoshow; - print ""; - print '" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; + $accountoshow = length_accountg($k); + if (($accountoshow == "") || $accountoshow == 'NotDefined') + { + print ''.$langs->trans("ProductAccountNotDefined").''; + } + else print $accountoshow; + print ""; + print '" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; - $accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER); - if (($accountoshow == "") || $accountoshow == 'NotDefined') - { - print ''.$langs->trans("MainAccountForCustomersNotDefined").''; - } - else print $accountoshow; - print '"; - $accountoshow = length_accounta($k); - if (($accountoshow == "") || $accountoshow == 'NotDefined') - { - print ''.$langs->trans("ThirdpartyAccountNotDefined").''; - } - else print $accountoshow; - print '" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; + $accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER); + if (($accountoshow == "") || $accountoshow == 'NotDefined') + { + print ''.$langs->trans("MainAccountForCustomersNotDefined").''; + } + else print $accountoshow; + print '"; + $accountoshow = length_accounta($k); + if (($accountoshow == "") || $accountoshow == 'NotDefined') + { + print ''.$langs->trans("ThirdpartyAccountNotDefined").''; + } + else print $accountoshow; + print '" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; - $accountoshow = length_accountg($k); - if (($accountoshow == "") || $accountoshow == 'NotDefined') - { - print ''.$langs->trans("ProductNotDefined").''; - } - else print $accountoshow; - print ""; - print '" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; + $accountoshow = length_accountg($k); + if (($accountoshow == "") || $accountoshow == 'NotDefined') + { + print ''.$langs->trans("ProductNotDefined").''; + } + else print $accountoshow; + print ""; + print '" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
'; + print '
'; // ref invoice print ''; diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index 88a599d1fc5..945c5567b0b 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -27,6 +27,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; // Load translation files required by the page @@ -36,7 +37,7 @@ $langs->loadLangs(array("compta","bills","other","main","accountancy")); if (empty($conf->accounting->enabled)) { accessforbidden(); } -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -63,6 +64,7 @@ $year_current = $year_start; // Validate History $action = GETPOST('action', 'aZ09'); +$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version'); /* @@ -95,12 +97,11 @@ if ($action == 'clean' || $action == 'validatehistory') } if ($action == 'validatehistory') { - $error = 0; $db->begin(); // Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind - if ($db->type == 'pgsql') { + /*if ($db->type == 'pgsql') { $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det"; $sql1 .= " SET fk_code_ventilation = accnt.rowid"; $sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst"; @@ -113,16 +114,85 @@ if ($action == 'validatehistory') { $sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity; $sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number"; $sql1 .= " AND fd.fk_code_ventilation = 0"; - } + }*/ + + // Supplier Invoice Lines (must be same request than into page list.php for manual binding) + $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.type as ftype,"; + $sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; + $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,"; + $sql.= " aa.rowid as aarowid,"; + $sql.= " co.code as country_code, co.label as country_label,"; + $sql.= " s.tva_intra"; + $sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f"; + $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays "; + $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn"; + $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; + $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity; + $sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; + $sql.= " AND l.product_type <= 2"; dol_syslog('htdocs/accountancy/supplier/index.php'); - $resql1 = $db->query($sql1); - if (! $resql1) { - $error ++; - $db->rollback(); + $result = $db->query($sql); + if (! $result) { + $error++; setEventMessages($db->lasterror(), null, 'errors'); } else { + $num_lines = $db->num_rows($result); + + $isSellerInEEC = isInEEC($mysoc); + + $i = 0; + while ($i < min($num_lines, 10000)) { // No more than 10000 at once + $objp = $db->fetch_object($result); + + // Search suggested account for product/service + $suggestedaccountingaccountfor = ''; + if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) + $objp->code_buy_p = $objp->code_buy; + $objp->aarowid_suggest = $objp->aarowid; + $suggestedaccountingaccountfor = ''; + } else { + if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + //$objp->code_buy_p = $objp->code_buy_intra; + $objp->code_buy_p = $objp->code_buy; + //$objp->aarowid_suggest = $objp->aarowid_intra; + $objp->aarowid_suggest = $objp->aarowid; + $suggestedaccountingaccountfor = 'eec'; + } else { // Foreign sale + //$objp->code_buy_p = $objp->code_buy_export; + $objp->code_buy_p = $objp->code_buy; + //$objp->aarowid_suggest = $objp->aarowid_export; + $objp->aarowid_suggest = $objp->aarowid; + $suggestedaccountingaccountfor = 'export'; + } + } + + if ($objp->aarowid_suggest > 0) + { + $sqlupdate = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det"; + $sqlupdate.= " SET fk_code_ventilation = ".$objp->aarowid_suggest; + $sqlupdate.= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".$objp->rowid; + + $resqlupdate = $db->query($sqlupdate); + if (! $resqlupdate) + { + $error++; + setEventMessages($db->lasterror(), null, 'errors'); + break; + } + } + + $i++; + } + } + + if ($error) + { + $db->rollback(); + } + else { $db->commit(); setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs'); } @@ -153,7 +223,7 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', //print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, ''); print '
'; -print '
' . $langs->trans("BillsSuppliers") . '
'; +print '
'; print ''; print ''; for($i = 1; $i <= 12; $i ++) { @@ -187,7 +257,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '
'; if ($row[0] == 'tobind') { @@ -224,7 +293,7 @@ print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', //print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', ''); print '
'; -print ''; +print '
'; print ''; print ''; for($i = 1; $i <= 12; $i ++) { @@ -258,7 +327,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '
'; if ($row[0] == 'tobind') { @@ -298,7 +366,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. //print load_fiche_titre($langs->trans("OtherInfo"), '', ''); print '
'; - print ''; + print '
'; print ''; for($i = 1; $i <= 12; $i ++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 97f1c771122..00ac4d02d73 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -74,7 +74,7 @@ if (! $sortorder) { } // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -192,12 +192,12 @@ if ($search_lineid) { if (strlen(trim($search_invoice))) { $sql .= natural_search("f.ref", $search_invoice); } +if (strlen(trim($search_label))) { + $sql .= natural_search("f.libelle", $search_label); +} if (strlen(trim($search_ref))) { $sql .= natural_search("p.ref", $search_ref); } -if (strlen(trim($search_label))) { - $sql .= natural_search("p.label", $search_label); -} if (strlen(trim($search_desc))) { $sql .= natural_search("l.description", $search_desc); } @@ -300,14 +300,13 @@ if ($result) { print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; - //print ''; print ''; print ''; print ''; @@ -368,6 +367,7 @@ if ($result) { print $objp->invoice_label; print ''; + // Date invoice print ''; // Ref product @@ -388,7 +388,12 @@ if ($result) { print ''; - print ''; + print ''; print ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index d00e5901107..249cb920c47 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -83,7 +83,7 @@ if (! $sortorder) { } // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->bind->write) accessforbidden(); @@ -133,8 +133,8 @@ if (empty($reshook)) // Mass actions $objectclass='AccountingAccount'; - $permtoread = $user->rights->accounting->read; - $permtodelete = $user->rights->accounting->delete; + $permissiontoread = $user->rights->accounting->read; + $permissiontodelete = $user->rights->accounting->delete; $uploaddir = $conf->accounting->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -184,8 +184,6 @@ if ($massaction == 'ventil') { } $msg.=''; $msg.= '
' . $langs->trans("EndProcessing") . '
'; - //} else { - // setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings'); } } @@ -224,7 +222,7 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays "; $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn"; $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; -$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity; +$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity; $sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql.= " AND l.product_type <= 2"; // Add search filter like @@ -234,12 +232,12 @@ if ($search_lineid) { if (strlen(trim($search_invoice))) { $sql .= natural_search("f.ref", $search_invoice); } +if (strlen(trim($search_label))) { + $sql .= natural_search("f.libelle", $search_label); +} if (strlen(trim($search_ref))) { $sql .= natural_search("p.ref", $search_ref); } -if (strlen(trim($search_label))) { - $sql .= natural_search("p.label", $search_label); -} if (strlen(trim($search_desc))) { $sql .= natural_search("l.description", $search_desc); } @@ -309,14 +307,15 @@ if ($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 (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($search_lineid) $param.='&search_lineid='.urlencode($search_lineid); if ($search_day) $param.='&search_day='.urlencode($search_day); if ($search_month) $param.='&search_month='.urlencode($search_month); if ($search_year) $param.='&search_year='.urlencode($search_year); if ($search_invoice) $param.='&search_invoice='.urlencode($search_invoice); if ($search_ref) $param.='&search_ref='.urlencode($search_ref); + if ($search_label) $param.='&search_label='.urlencode($search_label); if ($search_desc) $param.='&search_desc='.urlencode($search_desc); if ($search_amount) $param.='&search_amount='.urlencode($search_amount); if ($search_vat) $param.='&search_vat='.urlencode($search_vat); @@ -362,14 +361,13 @@ if ($result) { print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; - //print ''; print ''; print ''; print ''; @@ -465,7 +463,7 @@ if ($result) { print ''; - // Ref product + // Ref Product print ''; // Description - print ''; // Column with checkbox print ''; print ''; diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 526b325c7ac..d7d78184e6f 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -154,7 +154,7 @@ print ''; print ''; print load_fiche_titre($langs->trans("MemberMainOptions"), '', ''); -print '
' . $langs->trans("Total") . '
'; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; $formother->select_year($search_year, 'search_year', 1, 20, 5); print '' . dol_print_date($db->jdate($objp->datef), 'day') . '' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '' . $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')'; + if ($objp->country_code) + { + print $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')'; + } + print '' . $objp->tva_intra . '
'; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; $formother->select_year($search_year, 'search_year', 1, 20, 5); print '' . dol_print_date($db->jdate($objp->datef), 'day') . ''; if ($product_static->id > 0) print $product_static->getNomUrl(1); @@ -473,7 +471,7 @@ if ($result) { print ''; + print ''; $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); @@ -521,12 +519,14 @@ if ($result) { // Suggested accounting account print ''; - print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'); + $suggestedid = $objp->aarowid_suggest; + print $formaccounting->select_account($suggestedid, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'); print ''; - print 'aarowid ? "checked" : "") . '/>'; + $ischecked = $objp->aarowid_suggest; + print ''; print '
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index ead5e767243..f0dd8ac58d7 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -163,7 +163,7 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC)) { print '
'; - print '
'.$langs->trans("Description").''.$langs->trans("Value").'
'; + print '
'; print ''; print ''; @@ -178,7 +178,7 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC)) $listofval = array(-1 => $langs->trans("Undefined")); $listofval += $adht->liste_array(); $forcetype = $conf->global->MEMBER_NEWFORM_FORCETYPE ?: -1; - print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listetype)>1?1:0); + print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listofval)>1?1:0); print "\n"; // Amount diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index 87190bef2fe..51f121ad903 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -26,17 +26,12 @@ if (empty($conf) || ! is_object($conf)) $contact = $GLOBALS['objcanvas']->control->object; -?> +echo "\n"; +echo $this->control->tpl['showhead']; - -control->tpl['showhead']; ?> - -control->tpl['error'], $this->control->tpl['errors']); -?> - -control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; ?> -control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?> +if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; +if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
'.$langs->trans("Parameter").'
@@ -121,29 +116,28 @@ dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors'
-control->tpl['showend']; ?> +control->tpl['showend']; -societe_id)) { ?> -
+if (empty($user->socid)) { + echo '
'; -rights->adherent->creer) { ?> -">trans('Modify'); ?> - + if ($user->rights->adherent->creer) { + echo ''.$langs->trans('Modify').''; + } -control->tpl['user_id'] && $user->rights->user->user->creer) { ?> -">trans("CreateDolibarrLogin"); ?> - + if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { + echo ''.$langs->trans("CreateDolibarrLogin").''; + } -rights->adherent->supprimer) { ?> -">trans('Delete'); ?> - + if ($user->rights->adherent->supprimer) { + echo ''.$langs->trans('Delete').''; + } -

-
'; +} echo $this->control->tpl['actionstodo']; echo $this->control->tpl['actionsdone']; -?> - +echo "\n"; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 20da8ffd2f7..417d4cd2c99 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -70,6 +70,8 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); +$socialnetworks = getArrayOfSocialNetworks(); + // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $object->getCanvas($id); $canvas = $object->canvas?$object->canvas:GETPOST("canvas"); @@ -302,10 +304,16 @@ if (empty($reshook)) $object->phone_perso = trim(GETPOST("phone_perso", 'alpha')); $object->phone_mobile= trim(GETPOST("phone_mobile", 'alpha')); $object->email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); - $object->skype = trim(GETPOST("skype", 'alpha')); - $object->twitter = trim(GETPOST("twitter", 'alpha')); - $object->facebook = trim(GETPOST("facebook", 'alpha')); - $object->linkedin = trim(GETPOST("linkedin", 'alpha')); + $object->socialnetworks = array(); + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml')!='') { + $object->socialnetworks[$key] = trim(GETPOST($key, 'alphanohtml')); + } + } + //$object->skype = trim(GETPOST("skype", 'alpha')); + //$object->twitter = trim(GETPOST("twitter", 'alpha')); + //$object->facebook = trim(GETPOST("facebook", 'alpha')); + //$object->linkedin = trim(GETPOST("linkedin", 'alpha')); $object->birth = $birthdate; $object->typeid = GETPOST("typeid", 'int'); @@ -448,10 +456,10 @@ if (empty($reshook)) $phone=GETPOST("phone", 'alpha'); $phone_perso=GETPOST("phone_perso", 'alpha'); $phone_mobile=GETPOST("phone_mobile", 'alpha'); - $skype=GETPOST("member_skype", 'alpha'); - $twitter=GETPOST("member_twitter", 'alpha'); - $facebook=GETPOST("member_facebook", 'alpha'); - $linkedin=GETPOST("member_linkedin", 'alpha'); + // $skype=GETPOST("member_skype", 'alpha'); + // $twitter=GETPOST("member_twitter", 'alpha'); + // $facebook=GETPOST("member_facebook", 'alpha'); + // $linkedin=GETPOST("member_linkedin", 'alpha'); $email=preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); $login=GETPOST("member_login", 'alpha'); $pass=GETPOST("password", 'alpha'); @@ -478,11 +486,19 @@ if (empty($reshook)) $object->phone = $phone; $object->phone_perso = $phone_perso; $object->phone_mobile= $phone_mobile; + $object->socialnetworks = array(); + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml')!='') { + $object->socialnetworks[$key] = GETPOST("member_".$key, 'alphanohtml'); + } + } + } - $object->skype = $skype; - $object->twitter = $twitter; - $object->facebook = $facebook; - $object->linkedin = $linkedin; + // $object->skype = $skype; + // $object->twitter = $twitter; + // $object->facebook = $facebook; + // $object->linkedin = $linkedin; $object->email = $email; $object->login = $login; @@ -802,7 +818,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->adherent->dir_output; - $permissioncreate=$user->rights->adherent->creer; + $permissiontoadd=$user->rights->adherent->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails @@ -867,6 +883,18 @@ else $object->country=$tmparray['label']; } + if (!empty($socid)) { + $object = new Societe($db); + if ($socid > 0) $object->fetch($socid); + + if (! ($object->id > 0)) + { + $langs->load("errors"); + print($langs->trans('ErrorRecordNotFound')); + exit; + } + } + $adht = new AdherentType($db); print load_fiche_titre($langs->trans("NewMember"), '', 'members'); @@ -905,11 +933,12 @@ else print ''; print ''; print ''; + print ''; if ($backtopage) print ''; dol_fiche_head(''); - print ''; + print '
'; print ''; // Login @@ -970,7 +999,7 @@ else print ''; // EMail - print ''; + print ''; // Address print ''; + print ''; // Personal phone - print ''; + print ''; // Mobile phone - print ''; + print ''; - // Skype - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } - - // Twitter - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } - - // Facebook - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } - - // LinkedIn - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (!$value['active']) break; + print ''; + } + } // Birth Date print "
'.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'
'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'
'.$langs->trans("Address").''; @@ -1007,37 +1036,20 @@ else } // Pro phone - print '
'.$langs->trans("PhonePro").'
'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'
'.$langs->trans("PhonePerso").'
'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'
'.$langs->trans("PhoneMobile").'
'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'
'.$langs->trans("Skype").'
'.$langs->trans("Twitter").'
'.$langs->trans("Facebook").'
'.$langs->trans("LinkedIn").'
'.$langs->trans($value['label']).'
".$langs->trans("DateToBirth")."\n"; @@ -1170,7 +1182,7 @@ else dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user'); - print ''; + print '
'; // Ref print ''; @@ -1246,7 +1258,7 @@ else print ''; // EMail - print ''; + print ''; // Address print ''; + print ''; // Personal phone - print ''; + print ''; // Mobile phone - print ''; + print ''; - // Skype - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } - - // Twitter - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } - - // Facebook - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } - - // LinkedIn - if (! empty($conf->socialnetworks->enabled)) - { - print ''; - } + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (!$value['active']) break; + print ''; + } + } // Birth Date print "
'.$langs->trans("Ref").''.$object->id.'
'.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'email).'">
'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED?'':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'':'').'email).'">
'.$langs->trans("Address").''; @@ -1276,37 +1288,20 @@ else } // Pro phone - print '
'.$langs->trans("PhonePro").'phone).'">
'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'phone).'">
'.$langs->trans("PhonePerso").'phone_perso).'">
'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">
'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'phone_mobile).'">
'.$langs->trans("Skype").'skype).'">
'.$langs->trans("Twitter").'twitter).'">
'.$langs->trans("Facebook").'facebook).'">
'.$langs->trans("LinkedIn").'linkedin).'">
'.$langs->trans($value['label']).'
".$langs->trans("DateToBirth")."\n"; @@ -1666,14 +1661,14 @@ else else { if ($object->need_subscription == 0) - { - print $langs->trans("SubscriptionNotNeeded"); + { + print $langs->trans("SubscriptionNotNeeded"); } - elseif (! $adht->subscription) + elseif (! $adht->subscription) { print $langs->trans("SubscriptionNotRecorded"); if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated - } + } else { print $langs->trans("SubscriptionNotReceived"); @@ -1872,7 +1867,7 @@ else } // Create user - if (! $user->societe_id && ! $object->user_id) + if (! $user->socid && ! $object->user_id) { if ($user->rights->user->user->creer) { diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 177e2eef18f..e7686a0a055 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -259,6 +259,7 @@ print '
'; print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' '; print ''; +print ''; print ''; print ''; print ''; @@ -278,6 +279,7 @@ print '

'; print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' '; print ''; +print ''; print ''; print ''; print $langs->trans("DescADHERENT_CARD_TYPE").' '; @@ -297,6 +299,7 @@ print '

'; print img_picto('', 'puce').' '.$langs->trans("DocForLabels", $conf->global->ADHERENT_ETIQUETTE_TYPE).' '; print ''; +print ''; print ''; print ''; print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' '; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 98543cfbcbe..ff2e5082736 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -124,23 +124,32 @@ class Adherent extends CommonObject */ public $email; + /** + * @var array array of socialnetworks + */ + public $socialnetworks; + /** * @var string skype account + * @deprecated */ public $skype; /** * @var string twitter account + * @deprecated */ public $twitter; /** * @var string facebook account + * @deprecated */ public $facebook; /** * @var string linkedin account + * @deprecated */ public $linkedin; @@ -174,7 +183,7 @@ class Adherent extends CommonObject // -1:brouillon, 0:resilie, >=1:valide,paye // def in common object - //public $statut; + //public $status; public $photo; @@ -566,10 +575,7 @@ class Adherent extends CommonObject $sql.= ", country = ".($this->country_id>0?$this->db->escape($this->country_id):"null"); $sql.= ", state_id = ".($this->state_id>0?$this->db->escape($this->state_id):"null"); $sql.= ", email = '".$this->db->escape($this->email)."'"; - $sql.= ", skype = '".$this->db->escape($this->skype)."'"; - $sql.= ", twitter = '".$this->db->escape($this->twitter)."'"; - $sql.= ", facebook = '".$this->db->escape($this->facebook)."'"; - $sql.= ", linkedin = '".$this->db->escape($this->linkedin)."'"; + $sql.= ", socialnetworks = '".$this->db->escape(json_encode($this->socialnetworks))."'"; $sql.= ", phone = ".($this->phone?"'".$this->db->escape($this->phone)."'":"null"); $sql.= ", phone_perso = ".($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null"); $sql.= ", phone_mobile = ".($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null"); @@ -581,6 +587,7 @@ class Adherent extends CommonObject $sql.= ", fk_adherent_type = ".$this->db->escape($this->typeid); $sql.= ", morphy = '".$this->db->escape($this->morphy)."'"; $sql.= ", birth = ".($this->birth?"'".$this->db->idate($this->birth)."'":"null"); + if ($this->socid) $sql.= ", fk_soc = '".$this->db->escape($this->socid)."'"; // Must be modified only when creating from a third-party if ($this->datefin) $sql.= ", datefin = '".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription if ($this->datevalid) $sql.= ", datevalid = '".$this->db->idate($this->datevalid)."'"; // Must be modified only when validating a member $sql.= ", fk_user_mod = ".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest @@ -693,10 +700,7 @@ class Adherent extends CommonObject $luser->state_id=$this->state_id; $luser->email=$this->email; - $luser->skype=$this->skype; - $luser->twitter=$this->twitter; - $luser->facebook=$this->facebook; - $luser->linkedin=$this->linkedin; + $luser->socialnetworks=$this->socialnetworks; $luser->office_phone=$this->phone; $luser->user_mobile=$this->phone_mobile; @@ -735,10 +739,7 @@ class Adherent extends CommonObject $lthirdparty->zip=$this->zip; $lthirdparty->town=$this->town; $lthirdparty->email=$this->email; - $lthirdparty->skype=$this->skype; - $lthirdparty->twitter=$this->twitter; - $lthirdparty->facebook=$this->facebook; - $lthirdparty->linkedin=$this->linkedin; + $lthirdparty->socialnetworks=$this->socialnetworks; $lthirdparty->phone=$this->phone; $lthirdparty->state_id=$this->state_id; $lthirdparty->country_id=$this->country_id; @@ -1227,7 +1228,7 @@ class Adherent extends CommonObject $sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_code, d.gender, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,"; $sql.= " d.note_public,"; - $sql.= " d.email, d.skype, d.twitter, d.facebook, d.linkedin, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass, d.pass_crypted,"; + $sql.= " d.email, d.socialnetworks, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass, d.pass_crypted,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; $sql.= " d.tms as datem,"; @@ -1281,7 +1282,7 @@ class Adherent extends CommonObject $this->societe = $obj->company; $this->company = $obj->company; $this->socid = $obj->fk_soc; - $this->fk_soc = $obj->fk_soc; // For backward comaptibility + $this->fk_soc = $obj->fk_soc; // For backward compatibility $this->address = $obj->address; $this->zip = $obj->zip; $this->town = $obj->town; @@ -1306,10 +1307,7 @@ class Adherent extends CommonObject $this->phone_mobile = $obj->phone_mobile; $this->email = $obj->email; - $this->skype = $obj->skype; - $this->twitter = $obj->twitter; - $this->facebook = $obj->facebook; - $this->linkedin = $obj->linkedin; + $this->socialnetworks = (array) json_decode($obj->socialnetworks, true); $this->photo = $obj->photo; $this->statut = $obj->statut; @@ -2131,7 +2129,11 @@ class Adherent extends CommonObject // Only picto if ($withpictoimg > 0) $picto=''.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).''; // Picto must be a photo - else $picto=''.Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).''; + else { + $picto=''; + $picto.=Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1); + $picto.=''; + } $result.=$picto; } if ($withpictoimg > -2 && $withpictoimg != 2) @@ -2163,94 +2165,61 @@ class Adherent extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $need_subscription 1 if member type need subscription, 0 otherwise * @param int $date_end_subscription Date fin adhesion * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $need_subscription, $date_end_subscription, $mode = 0) + public function LibStatut($status, $need_subscription, $date_end_subscription, $mode = 0) { // phpcs:enable global $langs; $langs->load("members"); - if ($mode == 0) + + $statusType = ''; + $labelStatus = ''; + $labelStatusShort = ''; + + if ($status == -1) { - if ($statut == -1) return $langs->trans("MemberStatusDraft"); - elseif ($statut >= 1) { - if ($need_subscription == 0) return $langs->trans("MemberStatusNoSubscription"); - elseif (! $date_end_subscription) return $langs->trans("MemberStatusActive"); - elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLate"); - else return $langs->trans("MemberStatusPaid"); - } - elseif ($statut == 0) return $langs->trans("MemberStatusResiliated"); + $statusType = 'status0'; + $labelStatus = $langs->trans("MemberStatusDraft"); + $labelStatusShort = $langs->trans("MemberStatusDraftShort"); } - elseif ($mode == 1) + elseif ($status >= 1) { + if ($need_subscription == 0) + { + $statusType = 'status4'; + $labelStatus = $langs->trans("MemberStatusNoSubscription"); + $labelStatusShort = $langs->trans("MemberStatusNoSubscriptionShort"); + } + elseif (! $date_end_subscription) + { + $statusType = 'status1'; + $labelStatus = $langs->trans("MemberStatusActive"); + $labelStatusShort = $langs->trans("MemberStatusActiveShort"); + } + elseif ($date_end_subscription < time()) + { + $statusType = 'status3'; + $labelStatus = $langs->trans("MemberStatusActiveLate"); + $labelStatusShort = $langs->trans("MemberStatusActiveLateShort"); + } + else { + $statusType = 'status4'; + $labelStatus = $langs->trans("MemberStatusPaid"); + $labelStatusShort = $langs->trans("MemberStatusPaidShort"); + } + } + elseif ($status == 0) { - if ($statut == -1) return $langs->trans("MemberStatusDraftShort"); - elseif ($statut >= 1) { - if ($need_subscription == 0) return $langs->trans("MemberStatusNoSubscription"); - elseif (! $date_end_subscription) return $langs->trans("MemberStatusActiveShort"); - elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLateShort"); - else return $langs->trans("MemberStatusPaidShort"); - } - elseif ($statut == 0) return $langs->trans("MemberStatusResiliatedShort"); - } - elseif ($mode == 2) - { - if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'), 'statut0').' '.$langs->trans("MemberStatusDraftShort"); - elseif ($statut >= 1) { - if ($need_subscription == 0) return img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4').' '.$langs->trans("MemberStatusNoSubscriptionShort"); - elseif (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1').' '.$langs->trans("MemberStatusActiveShort"); - elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'), 'statut3').' '.$langs->trans("MemberStatusActiveLateShort"); - else return img_picto($langs->trans('MemberStatusPaid'), 'statut4').' '.$langs->trans("MemberStatusPaidShort"); - } - elseif ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'), 'statut5').' '.$langs->trans("MemberStatusResiliatedShort"); - } - elseif ($mode == 3) - { - if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'), 'statut0'); - elseif ($statut >= 1) { - if ($need_subscription == 0) return img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4'); - elseif (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1'); - elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'), 'statut3'); - else return img_picto($langs->trans('MemberStatusPaid'), 'statut4'); - } - elseif ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'), 'statut5'); - } - elseif ($mode == 4) - { - if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'), 'statut0').' '.$langs->trans("MemberStatusDraft"); - elseif ($statut >= 1) { - if ($need_subscription == 0) return img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4').' '.$langs->trans("MemberStatusNoSubscription"); - elseif (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1').' '.$langs->trans("MemberStatusActive"); - elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'), 'statut3').' '.$langs->trans("MemberStatusActiveLate"); - else return img_picto($langs->trans('MemberStatusPaid'), 'statut4').' '.$langs->trans("MemberStatusPaid"); - } - if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'), 'statut5').' '.$langs->trans("MemberStatusResiliated"); - } - elseif ($mode == 5) - { - if ($statut == -1) return ''.$langs->trans("MemberStatusDraftShort").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0'); - elseif ($statut >= 1) { - if ($need_subscription == 0) return ''.$langs->trans("MemberStatusNoSubscriptionShort").' '.img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4'); - elseif (! $date_end_subscription) return ''.$langs->trans("MemberStatusActiveShort").' '.img_picto($langs->trans('MemberStatusActive'), 'statut1'); - elseif ($date_end_subscription < time()) return ''.$langs->trans("MemberStatusActiveLateShort").' '.img_picto($langs->trans('MemberStatusActiveLate'), 'statut3'); - else return ''.$langs->trans("MemberStatusPaidShort").' '.img_picto($langs->trans('MemberStatusPaid'), 'statut4'); - } - if ($statut == 0) return ''.$langs->trans("MemberStatusResiliated").' '.img_picto($langs->trans('MemberStatusResiliated'), 'statut5'); - } - elseif ($mode == 6) - { - if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0'); - if ($statut >= 1) { - if ($need_subscription == 0) return $langs->trans("MemberStatusNoSubscription").' '.img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4'); - elseif (! $date_end_subscription) return $langs->trans("MemberStatusActive").' '.img_picto($langs->trans('MemberStatusActive'), 'statut1'); - elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLate").' '.img_picto($langs->trans('MemberStatusActiveLate'), 'statut3'); - else return $langs->trans("MemberStatusPaid").' '.img_picto($langs->trans('MemberStatusPaid'), 'statut4'); - } - if ($statut == 0) return $langs->trans("MemberStatusResiliated").' '.img_picto($langs->trans('MemberStatusResiliated'), 'statut5'); + $statusType = 'status6'; + $labelStatus = $langs->trans("MemberStatusResiliated"); + $labelStatusShort = $langs->trans("MemberStatusResiliatedShort"); } + + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } @@ -2369,7 +2338,6 @@ class Adherent extends CommonObject $langs->load("orders"); if (! dol_strlen($modele)) { - $modele = 'standard'; if ($this->modelpdf) { @@ -2414,10 +2382,12 @@ class Adherent extends CommonObject $this->country = 'France'; $this->morphy = 'mor'; $this->email = 'specimen@specimen.com'; - $this->skype = 'skypepseudo'; - $this->twitter = 'twitterpseudo'; - $this->facebook = 'facebookpseudo'; - $this->linkedin = 'linkedinpseudo'; + $this->socialnetworks = array( + 'skype' => 'skypepseudo', + 'twitter' => 'twitterpseudo', + 'facebook' => 'facebookpseudo', + 'linkedin' => 'linkedinpseudo', + ); $this->phone = '0999999999'; $this->phone_perso = '0999999998'; $this->phone_mobile = '0999999997'; @@ -2471,7 +2441,7 @@ class Adherent extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore - /** + /** * Initialise tableau info (tableau des attributs LDAP) * * @return array Tableau info des attributs diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index a57a90a3aac..5d992b168d4 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -71,6 +71,18 @@ class AdherentType extends CommonObject */ public $morphy; + public $duration; + + /* + * type expiration + */ + public $duration_value; + + /** + * Expiration unit + */ + public $duration_unit; + /** * @var int Subsription required (0 or 1) * @since 5.0 @@ -88,8 +100,8 @@ class AdherentType extends CommonObject /** @var array Array of members */ public $members=array(); - - public $multilangs=array(); + + public $multilangs=array(); /** @@ -129,9 +141,9 @@ class AdherentType extends CommonObject $this->description = $obj->description; $this->email = $obj->email; } - $this->multilangs["$obj->lang"]["label"] = $obj->label; - $this->multilangs["$obj->lang"]["description"] = $obj->description; - $this->multilangs["$obj->lang"]["email"] = $obj->email; + $this->multilangs["$obj->lang"]["label"] = $obj->label; + $this->multilangs["$obj->lang"]["description"] = $obj->description; + $this->multilangs["$obj->lang"]["email"] = $obj->email; } return 1; } @@ -141,7 +153,7 @@ class AdherentType extends CommonObject return -1; } } - + /** * Update or add a translation for a product * @@ -248,7 +260,7 @@ class AdherentType extends CommonObject return 1; } - + /** * Delete a language for this product * @@ -361,7 +373,7 @@ class AdherentType extends CommonObject */ public function update($user, $notrigger = 0) { - global $langs, $conf, $hookmanager; + global $langs, $conf, $hookmanager; $error=0; @@ -373,8 +385,9 @@ class AdherentType extends CommonObject $sql.= "SET "; $sql.= "statut = ".$this->statut.","; $sql.= "libelle = '".$this->db->escape($this->label) ."',"; - $sql.= "morphy = '".$this->db->escape($this->morphy) ."',"; + $sql.= "morphy = '".$this->db->escape($this->morphy) ."',"; $sql.= "subscription = '".$this->db->escape($this->subscription)."',"; + $sql.= "duration = '" . $this->db->escape($this->duration_value . $this->duration_unit) ."',"; $sql.= "note = '".$this->db->escape($this->note)."',"; $sql.= "vote = ".(integer) $this->db->escape($this->vote).","; $sql.= "mail_valid = '".$this->db->escape($this->mail_valid)."'"; @@ -383,17 +396,16 @@ class AdherentType extends CommonObject $result = $this->db->query($sql); if ($result) { - - $this->description = $this->db->escape($this->note); + $this->description = $this->db->escape($this->note); - // Multilangs - if (! empty($conf->global->MAIN_MULTILANGS)) { - if ($this->setMultiLangs($user) < 0) { - $this->error=$langs->trans("Error")." : ".$this->db->error()." - ".$sql; - return -2; - } + // Multilangs + if (! empty($conf->global->MAIN_MULTILANGS)) { + if ($this->setMultiLangs($user) < 0) { + $this->error=$langs->trans("Error")." : ".$this->db->error()." - ".$sql; + return -2; } - + } + $action='update'; // Actions on extra fields @@ -475,9 +487,9 @@ class AdherentType extends CommonObject */ public function fetch($rowid) { - global $langs, $conf; - - $sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut, d.subscription, d.mail_valid, d.note, d.vote"; + global $langs, $conf; + + $sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut, d.duration, d.subscription, d.mail_valid, d.note, d.vote"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql .= " WHERE d.rowid = ".(int) $rowid; @@ -495,15 +507,18 @@ class AdherentType extends CommonObject $this->label = $obj->label; $this->morphy = $obj->morphy; $this->statut = $obj->statut; + $this->duration = $obj->duration; + $this->duration_value = substr($obj->duration, 0, dol_strlen($obj->duration)-1); + $this->duration_unit = substr($obj->duration, -1); $this->subscription = $obj->subscription; $this->mail_valid = $obj->mail_valid; $this->note = $obj->note; $this->vote = $obj->vote; - - // multilangs - if (! empty($conf->global->MAIN_MULTILANGS)) { - $this->getMultiLangs(); - } + + // multilangs + if (! empty($conf->global->MAIN_MULTILANGS)) { + $this->getMultiLangs(); + } } return 1; diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index 9ef8e122c9b..1357e4a3b4b 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -70,7 +70,7 @@ class AdherentStats extends Stats $this->where.= " m.statut != 0"; $this->where.= " AND p.fk_adherent = m.rowid AND m.entity IN (".getEntity('adherent').")"; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; + //if (!$user->rights->societe->client->voir && !$user->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; if($this->memberid) { $this->where .= " AND m.rowid = ".$this->memberid; @@ -92,7 +92,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%m') as dm, count(*)"; $sql.= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE date_format(p.dateadh,'%Y') = '".$year."'"; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; @@ -112,7 +112,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%Y') as dm, count(*)"; $sql.= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; $sql.= " GROUP BY dm"; $sql.= $this->db->order('dm', 'DESC'); @@ -133,7 +133,7 @@ class AdherentStats extends Stats $sql = "SELECT date_format(p.dateadh,'%m') as dm, sum(p.".$this->field.")"; $sql.= " FROM ".$this->from; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE date_format(p.dateadh,'%Y') = '".$year."'"; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 986649d15e2..e2fc13edadf 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -431,10 +431,10 @@ class Subscription extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @return string Label */ - public function LibStatut($statut) + public function LibStatut($status) { // phpcs:enable global $langs; diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 092827ef731..a6343596632 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -90,7 +90,6 @@ if ($id > 0) $result=$membert->fetch($object->typeid); if ($result > 0) { - // Build file list $filearray=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC), 1); $totalsize=0; diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php index 2dd8c95923f..84fc6bc9824 100644 --- a/htdocs/adherents/htpasswd.php +++ b/htdocs/adherents/htpasswd.php @@ -42,7 +42,7 @@ if (empty($sortorder)) { $sortorder="ASC"; } if (empty($sortfield)) { $sortfield="d.login"; } if (! isset($statut)) { - $statut = 1 ; + $statut = 1; } if (! isset($cotis)) @@ -54,7 +54,7 @@ if (! isset($cotis)) $sql = "SELECT d.login, d.pass, d.datefin"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d "; -$sql .= " WHERE d.statut = $statut "; +$sql .= " WHERE d.statut = ".$statut; if ($cotis==1) { $sql .= " AND datefin > '".$db->idate($now)."'"; diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index b858693255e..67adb031427 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -61,7 +61,7 @@ $AdherentsResilies=array(); $AdherentType=array(); -// Members list +// Type of membership $sql = "SELECT t.rowid, t.libelle as label, t.subscription,"; $sql.= " d.statut, count(d.rowid) as somme"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t"; @@ -71,7 +71,7 @@ $sql.= " AND d.entity IN (".getEntity('adherent').")"; $sql.= " WHERE t.entity IN (".getEntity('member_type').")"; $sql.= " GROUP BY t.rowid, t.libelle, t.subscription, d.statut"; -dol_syslog("index.php::select nb of members by type", LOG_DEBUG); +dol_syslog("index.php::select nb of members per type", LOG_DEBUG); $result = $db->query($sql); if ($result) { @@ -140,6 +140,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print ''; print ''; + print '
'; print ''; $i=0; foreach($listofsearchfields as $key => $value) @@ -152,6 +153,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele $i++; } print '
'; + print '
'; print ''; print '
'; } @@ -165,7 +167,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele if ($conf->use_javascript_ajax) { print '
'; - print ''; + print '
'; print ''; print '
'.$langs->trans("Statistics").'
'; @@ -227,10 +229,8 @@ $sql = "SELECT c.subscription, c.dateadh as dateh"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " WHERE d.entity IN (".getEntity('adherent').")"; $sql.= " AND d.rowid = c.fk_adherent"; -if(isset($date_select) && $date_select != '') -{ - $sql .= " AND c.dateadh LIKE '".$date_select."%'"; -} + + $result = $db->query($sql); if ($result) { @@ -249,23 +249,35 @@ if ($result) } print '
'; -print ''; +print '
'; print ''; -print ''; -print ''; +print ''; +print ''; print ''; print ''; print "\n"; krsort($Total); +$i = 0; foreach ($Total as $key=>$value) { - print ''; + if ($i >= 8) + { + print ''; + print ""; + print ""; + print ""; + print ""; + print "\n"; + break; + } + print ''; print ""; print ""; print ""; print ""; print "\n"; + $i++; } // Total @@ -282,7 +294,7 @@ print "
\n"; print '
'; /* - * Last modified members + * Latest modified members */ $max=5; @@ -299,7 +311,7 @@ $resql=$db->query($sql); if ($resql) { print '
'; - print '
'.$langs->trans("Subscriptions").''.$langs->trans("Number").''.$langs->trans("Year").''.$langs->trans("Subscriptions").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").'
...
$key".$Number[$key]."".price($value)."".price(price2num($value/$Number[$key], 'MT'))."
'; + print '
'; print ''; print ''; @@ -330,7 +342,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; $i++; } @@ -362,7 +374,7 @@ $resql=$db->query($sql); if ($resql) { print '
'; - print '
'.$langs->trans("LastMembersModified", $max).'
'.$staticmember->getNomUrl(1, 32).''.$statictype->getNomUrl(1, 32).''.dol_print_date($db->jdate($obj->datem), 'dayhour').''.$staticmember->LibStatut($obj->statut, ($obj->subscription=='yes'?1:0), $db->jdate($obj->date_end_subscription), 5).''.$staticmember->LibStatut($obj->statut, ($obj->subscription=='yes'?1:0), $db->jdate($obj->date_end_subscription), 3).'
'; + print '
'; print ''; print ''; @@ -408,7 +420,7 @@ else // Summary of members by type print '
'; -print '
'.$langs->trans("LastSubscriptionsModified", $max).'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index fafa69b8b3f..99326241485 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -37,9 +37,9 @@ $action = GETPOST('action', 'aZ09'); // Protection $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } $object = new Adherent($db); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 877dde34af0..81d6b7625b7 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -232,8 +232,8 @@ if (empty($reshook)) // Mass actions $objectclass='Adherent'; $objectlabel='Members'; - $permtoread = $user->rights->adherent->lire; - $permtodelete = $user->rights->adherent->supprimer; + $permissiontoread = $user->rights->adherent->lire; + $permissiontodelete = $user->rights->adherent->supprimer; $uploaddir = $conf->adherent->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -681,6 +681,7 @@ while ($i < min($num, $limit)) $memberstatic->datefin= $datefin; $memberstatic->socid = $obj->fk_soc; $memberstatic->photo = $obj->photo; + $memberstatic->morphy = $obj->morphy; if (! empty($obj->fk_soc)) { $memberstatic->fetch_thirdparty(); @@ -918,26 +919,8 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['pos'])) -{ - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index d954484c839..e75e1a61e70 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -33,10 +33,10 @@ $mode=GETPOST('mode')?GETPOST('mode'):''; // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $result=restrictedArea($user, 'adherent', '', '', 'cotisation'); @@ -117,7 +117,7 @@ else } // Print array -print '
'.$langs->trans("MembersTypes").''.$langs->trans("MembersStatusToValid").'
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index afc2e2b5218..956a71112cb 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -34,10 +34,10 @@ $mode=GETPOST('mode')?GETPOST('mode'):''; // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $result=restrictedArea($user, 'adherent', '', '', 'cotisation'); @@ -294,7 +294,7 @@ if (count($arrayjs) && $mode == 'memberbycountry') if ($mode) { // Print array / Affiche le tableau - print '
'.$langs->trans("Nature").''.$langs->trans("NbOfMembers").'
'; + print '
'; print ''; print ''; if ($label2) print ''; diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 2f2c6f33920..f02c012a48e 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -35,10 +35,10 @@ $userid=GETPOST('userid', 'int'); if ($userid < 0) $userid=0; $socid=GETPOST('socid', 'int'); if ($socid < 0) $socid=0; // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $result=restrictedArea($user, 'adherent', '', '', 'cotisation'); @@ -145,7 +145,7 @@ print '
'; // Show filter box /*print '
'; -print '
'.$label.''.$label2.'
'; +print '
'; print ''; print '
'.$langs->trans("Filter").'
'.$langs->trans("Member").''; print $form->select_company($id,'memberid','',1); @@ -211,7 +211,7 @@ print '
'; // Show graphs -print '
'; +print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 415efdc8570..f2250af5790 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -689,7 +689,7 @@ if ($rowid > 0) $num = $db->num_rows($result); $i = 0; - print ''."\n"; + print '
'."\n"; print ''; print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder); diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 0a40f441e92..aa203ffca42 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -197,7 +197,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') $linkback = ''.$langs->trans("BackToList").''; print "\n"; - print '
'; + print '
'; // Ref print ''; @@ -307,7 +307,7 @@ if ($rowid && $action != 'edit') print '
'; - print '
'.$langs->trans("Ref").'
'; + print '
'; // Member $adh->ref=$adh->getFullName($langs); diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index dbc14e2999e..c66dce0e8fd 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -588,26 +588,8 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['pos'])) -{ - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index 4334a54605b..accf7de07b6 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -24,11 +24,7 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - - - -\n"; global $user; @@ -39,23 +35,20 @@ $langs->load("members"); $total=0; foreach($linkedObjectBlock as $key => $objectlink) { - -?> - - - - - - '; + echo ''; + echo ''; + echo ''; + echo ' - - - -'; + echo ''; + echo ''; + echo ''; } -?> - +echo "\n"; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b24e3361d16..68d82c5d12a 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $langs->load("members"); @@ -61,6 +62,8 @@ $label=GETPOST("label", "alpha"); $morphy=GETPOST("morphy", "alpha"); $statut=GETPOST("statut", "int"); $subscription=GETPOST("subscription", "int"); +$duration_value = GETPOST('duration_value', 'int'); +$duration_unit = GETPOST('duration_unit', 'alpha'); $vote=GETPOST("vote", "int"); $comment=GETPOST("comment", 'alphanohtml'); $mail_valid=GETPOST("mail_valid", 'none'); @@ -94,7 +97,6 @@ $hookmanager->initHooks(array('membertypecard','globalcard')); */ if ($cancel) { - $action=''; if (! empty($backtopage)) { @@ -105,9 +107,11 @@ if ($cancel) { if ($action == 'add' && $user->rights->adherent->configurer) { $object->label = trim($label); - $object->morphy = trim($morphy); + $object->morphy = trim($morphy); $object->statut = (int) $statut; $object->subscription = (int) $subscription; + $object->duration_value = $duration_value; + $object->duration_unit = $duration_unit; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (int) $vote; @@ -160,9 +164,11 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object->oldcopy = clone $object; $object->label = trim($label); - $object->morphy = trim($morphy); + $object->morphy = trim($morphy); $object->statut = (int) $statut; $object->subscription = (int) $subscription; + $object->duration_value = $duration_value; + $object->duration_unit = $duration_unit; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -210,6 +216,7 @@ if ($action == 'confirm_delete' && $user->rights->adherent->configurer) */ $form=new Form($db); +$formproduct = new FormProduct($db); llxHeader('', $langs->trans("MembersTypeSetup"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'); @@ -330,7 +337,7 @@ if ($action == 'create') dol_fiche_head(''); - print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
trans("Subscription"); ?>getNomUrl(1); ?>dateh, 'day'); ?>'; + echo ''.$langs->trans("Subscription").''.$objectlink->getNomUrl(1).''.dol_print_date($objectlink->dateh, 'day').''; if ($user->rights->adherent->lire) { $total = $total + $objectlink->amount; echo price($objectlink->amount); - } ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'
'; + print '
'; print ''; print ''; @@ -355,6 +362,11 @@ if ($action == 'create') print $form->selectyesno("vote", 0, 1); print ''; + print ''; + print ''; @@ -418,7 +430,7 @@ if ($rowid > 0) print '
'; print '
'; - print '
'.$langs->trans("Label").'
'.$langs->trans("Duration").''; + print ' '; + print $formproduct->selectMeasuringUnits("duration_unit", "time", $_POST["duration_unit"], 0, 1); + print '
'.$langs->trans("Description").''; print '
'; + print '
'; print ''; + print ''; + print '"; @@ -524,14 +548,14 @@ if ($rowid > 0) { $sql.= natural_search("d.email", $search_email); } - if ($filter == 'uptodate') - { - $sql.=" AND (datefin >= '".$db->idate($now)."') OR t.subscription = 0)"; - } - if ($filter == 'outofdate') - { - $sql.=" AND (datefin < '".$db->idate($now)."' AND t.subscription = 1)"; - } + if ($filter == 'uptodate') + { + $sql.=" AND (datefin >= '".$db->idate($now)."') OR t.subscription = 0)"; + } + if ($filter == 'outofdate') + { + $sql.=" AND (datefin < '".$db->idate($now)."' AND t.subscription = 1)"; + } $sql.= " ".$db->order($sortfield, $sortorder); @@ -593,6 +617,7 @@ if ($rowid > 0) } print ''; + print ''; print ''; print '
'; @@ -762,7 +787,7 @@ if ($rowid > 0) dol_fiche_head($head, 'card', $langs->trans("MemberType"), 0, 'group'); - print '
'.$langs->trans("Status").''; if ( !empty($object->statut) ) { @@ -440,6 +452,18 @@ if ($rowid > 0) print yn($object->vote); print '
'.$langs->trans("Duration").''.$object->duration_value.' '; + if ($object->duration_value > 1) + { + $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years")); + } + elseif ($object->duration_value > 0) + { + $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); + } + print (! empty($object->duration_unit) && isset($dur[$object->duration_unit]) ? $langs->trans($dur[$object->duration_unit]) : '')." "; + print '
'.$langs->trans("Description").''; print nl2br($object->note)."
'; + print '
'; print ''; @@ -788,6 +813,11 @@ if ($rowid > 0) print $form->selectyesno("vote", $object->vote, 1); print ''; + print ''; + print ''; @@ -797,9 +827,12 @@ if ($rowid > 0) $doleditor->Create(); print ""; + // Other attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php'; + // Other attributes $parameters=array(); - $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $act, $action); // Note that $action and $object may have been modified by hook + $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { @@ -808,33 +841,6 @@ if ($rowid > 0) print '
'.$langs->trans("Ref").''.$object->id.'
'.$langs->trans("Duration").''; + print ' '; + print $formproduct->selectMeasuringUnits("duration_unit", "time", $object->duration_unit, 0, 1); + print '
'.$langs->trans("Description").''; print '
'; - // Extra field - if (empty($reshook)) - { - print '

'; - if (is_array($extrafields->attributes['adherent_type']['label'])) - { - foreach($extrafields->attributes['adherent_type']['label'] as $key=>$label) - { - if (isset($_POST["options_" . $key])) { - if (is_array($_POST["options_" . $key])) { - // $_POST["options"] is an array but following code expects a comma separated string - $value = implode(",", $_POST["options_" . $key]); - } else { - $value = $_POST["options_" . $key]; - } - } else { - $value = $object->array_options["options_" . $key]; - } - - print '\n"; - } - } - print '
'.$label.''; - print $extrafields->showInputField($key, $value); - print "


'; - } - dol_fiche_end(); print '
'; diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index 35704c592f9..847c259b6b2 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -99,7 +99,7 @@ dol_banner_tab($object, 'rowid', $linkback); print '
'; print '
'; -print ''; +print '
'; // LDAP DN print '\n"; diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index 5122bebcecf..673b6ef55b8 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -41,7 +41,7 @@ $cancel=GETPOST('cancel', 'alpha'); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; // Security check $result=restrictedArea($user, 'adherent', $id, 'adherent_type'); @@ -232,7 +232,7 @@ if ($action == 'edit') print "
".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
"; print '
'; - print '
LDAP '.$langs->trans("LDAPMemberTypeDn").''.$conf->global->LDAP_MEMBER_TYPE_DN."
'; + print '
'; print ''; print ''; print ''; print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); @@ -264,7 +264,7 @@ elseif ($action != 'add') print '
'; print '
'; - print ''; + print '
'; print ''; print ''; print '
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'; @@ -293,9 +293,9 @@ if ($action == 'add' && $user->rights->adherent->configurer) dol_fiche_head(); - print ''; + print '
'; print ''; print ''; print '
'.$langs->trans('Language').''; - print $formadmin->select_language('', 'forcelangprod', 0, $object->multilangs, 1); + print $formadmin->select_language('', 'forcelangprod', 0, $object->multilangs, 1); print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index cba3fd822cc..3f2e89f4f92 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -93,158 +93,87 @@ $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst") print ''.$langs->trans("AccountantDesc")."
\n"; print "
\n"; -if ($action == 'edit' || $action == 'updateedit') -{ - /** - * Edit parameters - */ - print "\n".''."\n"; +/** + * Edit parameters + */ +print "\n".''."\n"; - print ''; - print ''; - print ''; +print ''; +print ''; +print ''; - print ''; - print ''."\n"; +print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; +print ''."\n"; - // Name - print ''."\n"; +// Name +print ''."\n"; - // Address - print ''."\n"; +// Address +print ''."\n"; - print ''."\n"; +print ''."\n"; - print ''."\n"; +print ''."\n"; - // Country - print ''."\n"; +// Country +print ''."\n"; - print ''."\n"; +print ''."\n"; - print ''; - print ''."\n"; +print ''; +print ''."\n"; - print ''; - print ''."\n"; +print ''; +print ''."\n"; - print ''; - print ''."\n"; +print ''; +print ''."\n"; - // Web - print ''; - print ''."\n"; +// Web +print ''; +print ''."\n"; - // Code - print ''."\n"; +// Code +print ''."\n"; - // Note - print ''; - print ''; +// Note +print ''; +print ''; - print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; - print '
'; +print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'>
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization - print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'; +//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization +print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); +if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print '
'; - $formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); - print '
'; +$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; +print '
'; - print '
'; - print ''; - print '     '; - print ''; - print '
'; - print '
'; +print '
'; +print ''; +//print '     '; +//print ''; +print '
'; +//print '
'; - print ''; -} -else -{ - /* - * Show parameters - */ +print ''; - // Actions buttons - //print '
'; - //print ''.$langs->trans("Modify").''; - //print '

'; - - print '
'; - print ''; - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; - print $conf->global->MAIN_INFO_ACCOUNTANT_NAME; - print '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '
'.$langs->trans("CompanyCountry").''; - if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY)) - { - $code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2); - $img=picto_from_langcode($code); - print $img?$img.' ':''; - print getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 1); - } - print '
'.$langs->trans("Region-State").''; - else print '
'.$langs->trans("State").''; - if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); - else print ' '; - print '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '
'.$langs->trans("Web").'' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '
'.$langs->trans("AccountantFileNumber").'' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '
'; - print "
"; - - print ''; - - // Actions buttons - print '
'; - print ''; - print '
'; -} llxFooter(); diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index c253f6cbe91..0a87f4eda17 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -141,7 +141,7 @@ print ''.$langs->trans("AgendaAutoActionDesc")." ".$ print "
\n"; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table -print ''; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index a13b7bd1580..970d8675873 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -221,7 +221,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print load_fiche_titre($langs->trans("AgendaModelModule"), '', ''); - print '
'."\n"; + print '
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -268,18 +268,17 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // Active if (in_array($name, $def)) { - - print '"; } else @@ -325,6 +324,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) } print ''; +print ''; print ''; print '
'.$langs->trans("Name").''.$langs->trans("Description").''."\n"; - if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") - { - print 'scandir.'&label='.urlencode($module->name).'&type=action">'; - print img_picto($langs->trans("Enabled"), 'switch_on'); - print ''; - } - else - { - print img_picto($langs->trans("Enabled"), 'switch_on'); - } + print ''."\n"; + if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") + { + print 'scandir.'&label='.urlencode($module->name).'&type=action">'; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + } + else + { + print img_picto($langs->trans("Enabled"), 'switch_on'); + } print "
'."\n"; @@ -363,7 +363,6 @@ print ''."\n"; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print ''; print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 57a20b8bf42..614d4ef4407 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -180,6 +180,7 @@ $head=agenda_prepare_head(); dol_fiche_head($head, 'reminders', $langs->trans("Agenda"), -1, 'action'); print ''; +print ''; print ''; print '
'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'
'."\n"; diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index f3c16941ebc..b5f3fbafdc3 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -87,7 +87,7 @@ dol_fiche_head($head, 'xcal', $langs->trans("Agenda"), -1, 'action'); print ''.$langs->trans("AgendaSetupOtherDesc")."
\n"; print "
\n"; -print '
'; +print '
'; print ''; print ""; @@ -121,7 +121,7 @@ print '
".$langs->trans("Parameter")."
'; print '
'; -print ''; +print '
'; print ''; print '"; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 689202c023d..c0150ce5111 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -233,7 +233,7 @@ dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account' //Show bank account order print load_fiche_titre($langs->trans("BankOrderShow"), '', ''); -print '
'.$langs->trans("Parameter")."
'; +print '
'; print ''; print ''; print ''; @@ -253,7 +253,6 @@ $i = 0; $nbofbank = count($bankorder); while ($i < $nbofbank) { - print ''; print '
' . $langs->trans("Name") . '' . $langs->trans("Description") . '
' . $bankorder[$i][0] . "\n"; print $bankorder[$i][1]; @@ -341,7 +340,6 @@ foreach ($dirmodels as $reldir) { foreach ($filelist as $file) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir . '/' . $file)) { $name = substr($file, 4, dol_strlen($file) - 16); $classname = substr($file, 0, dol_strlen($file) - 12); @@ -433,7 +431,7 @@ print '
'; print '

'; print load_fiche_titre($langs->trans("BankColorizeMovement"), '', ''); -print ''; +print '
'; print "\n"; print ''; print ''."\n"; diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 0475cdfccf1..873f14ea68e 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -96,29 +96,29 @@ elseif ($action == 'updateengine') $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); - $i = 0; + $num = $db->num_rows($resql); + $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); + while ($i < $num) + { + $obj = $db->fetch_object($resql); - if (GETPOST('coder'.$obj->rowid, 'alpha')) - { - $coder = GETPOST('coder'.$obj->rowid, 'alpha'); - $code_id = $obj->rowid; + if (GETPOST('coder'.$obj->rowid, 'alpha')) + { + $coder = GETPOST('coder'.$obj->rowid, 'alpha'); + $code_id = $obj->rowid; - $sqlp = "UPDATE ".MAIN_DB_PREFIX."c_barcode_type"; - $sqlp.= " SET coder = '" . $coder."'"; - $sqlp.= " WHERE rowid = ". $code_id; - $sqlp.= " AND entity = ".$conf->entity; + $sqlp = "UPDATE ".MAIN_DB_PREFIX."c_barcode_type"; + $sqlp.= " SET coder = '" . $coder."'"; + $sqlp.= " WHERE rowid = ". $code_id; + $sqlp.= " AND entity = ".$conf->entity; - $upsql=$db->query($sqlp); - if (! $upsql) dol_print_error($db); - } + $upsql=$db->query($sqlp); + if (! $upsql) dol_print_error($db); + } - $i++; - } + $i++; + } } } @@ -200,7 +200,7 @@ if (empty($conf->use_javascript_ajax)) print ''; } -print '
' . $langs->trans("Name") . ''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; @@ -208,7 +208,7 @@ print ''; print ''; print "\n"; -$sql = "SELECT rowid, code as encoding, libelle, coder, example"; +$sql = "SELECT rowid, code as encoding, libelle as label, coder, example"; $sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type"; $sql.= " WHERE entity = ".$conf->entity; $sql.= " ORDER BY code"; @@ -225,7 +225,7 @@ if ($resql) $obj = $db->fetch_object($resql); print ''; - print ''; +print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("CodeBarGenerator").'
'; - print $obj->libelle; + print $obj->label; print "\n"; print $langs->trans('BarcodeDesc'.$obj->encoding); //print "L'EAN se compose de 8 caracteres, 7 chiffres plus une cle de controle.
"; @@ -309,7 +309,7 @@ print ""; print ''; print ""; -print ''; +print '
'; print ''; print ''; print ''; @@ -319,7 +319,6 @@ print ''; // Chemin du binaire genbarcode sous linux if (! isset($_SERVER['WINDIR'])) { - print ''; print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("GenbarcodeLocation").''; @@ -335,7 +334,6 @@ if (! isset($_SERVER['WINDIR'])) // Module products if (! empty($conf->product->enabled)) { - print '
'.$langs->trans("SetDefaultBarcodeTypeProducts").''; @@ -346,7 +344,6 @@ if (! empty($conf->product->enabled)) // Module thirdparty if (! empty($conf->societe->enabled)) { - print '
'.$langs->trans("SetDefaultBarcodeTypeThirdParties").''; @@ -369,7 +366,7 @@ if ($conf->product->enabled) { print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")", '', ''); - print ''; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index e5e12d41808..52a468b878d 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -183,16 +183,6 @@ elseif ($action == 'set_BOM_FREE_TEXT') { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action=="setshippableiconinlist") { - // Activate Set Shippable Icon In List - $setshippableiconinlist = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "SHIPPABLE_BOM_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity); - if (! $res > 0) $error++; - if (! $error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'errors'); - } } @@ -219,7 +209,7 @@ dol_fiche_head($head, 'settings', $langs->trans("BOMs"), -1, 'bom'); print load_fiche_titre($langs->trans("BOMsNumberingModules"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -255,7 +245,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -315,245 +304,217 @@ foreach ($dirmodels as $reldir) print "
'.$langs->trans("Name").''.$langs->trans("Description").'
'.$module->name."\n"; print $module->info(); print '

\n"; -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) +/* + * Document templates generators + */ + +print load_fiche_titre($langs->trans("BOMsModelModule"), '', ''); + +// Load array def with activated templates +$def = array(); +$sql = "SELECT nom"; +$sql.= " FROM ".MAIN_DB_PREFIX."document_model"; +$sql.= " WHERE type = '".$type."'"; +$sql.= " AND entity = ".$conf->entity; +$resql=$db->query($sql); +if ($resql) { - /* - * Document templates generators - */ + $i = 0; + $num_rows=$db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } +} +else +{ + dol_print_error($db); +} - print load_fiche_titre($langs->trans("BOMsModelModule"), '', ''); - // Load array def with activated templates - $def = array(); - $sql = "SELECT nom"; - $sql.= " FROM ".MAIN_DB_PREFIX."document_model"; - $sql.= " WHERE type = '".$type."'"; - $sql.= " AND entity = ".$conf->entity; - $resql=$db->query($sql); - if ($resql) +print "\n"; +print "\n"; +print ''; +print ''; +print '\n"; +print '\n"; +print ''; +print ''; +print "\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) +{ + foreach (array('','/doc') as $valdir) { - $i = 0; - $num_rows=$db->num_rows($resql); - while ($i < $num_rows) - { - $array = $db->fetch_array($resql); - array_push($def, $array[0]); - $i++; - } - } - else - { - dol_print_error($db); - } + $dir = dol_buildpath($reldir."core/modules/bom".$valdir); - - print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
\n"; - print "\n"; - print ''; - print ''; - print '\n"; - print '\n"; - print ''; - print ''; - print "\n"; - - clearstatcache(); - - foreach ($dirmodels as $reldir) - { - foreach (array('','/doc') as $valdir) + if (is_dir($dir)) { - $dir = dol_buildpath($reldir."core/modules/bom".$valdir); - - if (is_dir($dir)) + $handle=opendir($dir); + if (is_resource($handle)) { - $handle=opendir($dir); - if (is_resource($handle)) + while (($file = readdir($handle))!==false) { - while (($file = readdir($handle))!==false) + $filelist[]=$file; + } + closedir($handle); + arsort($filelist); + + foreach($filelist as $file) + { + if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - $filelist[]=$file; - } - closedir($handle); - arsort($filelist); + if (file_exists($dir.'/'.$file)) + { + $name = substr($file, 4, dol_strlen($file) -16); + $classname = substr($file, 0, dol_strlen($file) -12); - foreach($filelist as $file) - { - if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) - { + require_once $dir.'/'.$file; + $module = new $classname($db); - if (file_exists($dir.'/'.$file)) - { - $name = substr($file, 4, dol_strlen($file) -16); - $classname = substr($file, 0, dol_strlen($file) -12); + $modulequalified=1; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; - require_once $dir.'/'.$file; - $module = new $classname($db); + if ($modulequalified) + { + $var = !$var; + print ''; - $modulequalified=1; - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; + // Active + if (in_array($name, $def)) + { + print ''; + } + else + { + print '"; + } - if ($modulequalified) - { - $var = !$var; - print ''; + // Default + print ''; - // Active - if (in_array($name, $def)) - { - print ''; - } - else - { - print '"; - } - - // Default - print ''; - - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); - if ($module->type == 'pdf') - { - $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - } - $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); - $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1); - $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1); - $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); - //$htmltooltip.='
'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1); - //$htmltooltip.='
'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1); - $htmltooltip.='
'.$langs->trans("WatermarkOnDraftBOMs").': '.yn($module->option_draft_watermark, 1, 1); + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + if ($module->type == 'pdf') + { + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + } + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + $htmltooltip.='
'.$langs->trans("WatermarkOnDraftBOMs").': '.yn($module->option_draft_watermark, 1, 1); - print ''; + print ''; - // Preview - print ''; + // Preview + print ''; - print "\n"; - } - } - } + print "\n"; + } + } } } } } } - - print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
'; + print (empty($module->name)?$name:$module->name); + print "\n"; + if (method_exists($module, 'info')) print $module->info($langs); + else print $module->description; + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''."\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print "
'; - print (empty($module->name)?$name:$module->name); - print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; - print ''; + if ($conf->global->BOM_ADDON_PDF == $name) + { + print img_picto($langs->trans("Default"), 'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } + print ''."\n"; - print ''; - print img_picto($langs->trans("Enabled"), 'switch_on'); - print ''; - print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; - print "'; - if ($conf->global->BOM_ADDON_PDF == $name) - { - print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; - } - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; - if ($module->type == 'pdf') - { - print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); - } - print ''; + if ($module->type == 'pdf') + { + print ''.img_object($langs->trans("Preview"), 'bill').''; + } + else + { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print '
'; - print "
"; - - /* - * Other options - */ - - print load_fiche_titre($langs->trans("OtherOptions"), '', ''); - print ''; - print ''; - print ''; - print ''; - print "\n"; - print "\n"; - - $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); - $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); - $htmltext = ''.$langs->trans("AvailableVariables").':
'; - foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; - $htmltext.='
'; - - print ''; - print ''; - print ''; - print '\n"; - print ''; - - //Use draft Watermark - - print ""; - print ''; - print ""; - print '\n"; - print ''; - - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").' 
'; - print $form->textwithpicto($langs->trans("FreeLegalTextOnBOMs"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; - $variablename='BOM_FREE_TEXT'; - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) - { - print ''; - } - else - { - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); - print $doleditor->Create(); - } - print '
'; - print ''; - print "
'; - print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; - print '
'; - print ''; - print ''; - print ''; - print "
'; - print '
'; } +print '
'; +print "
"; + /* - * Notifications + * Other options */ -/* -print load_fiche_titre($langs->trans("Notifications"), '', ''); -print ''; + +print load_fiche_titre($langs->trans("OtherOptions"), '', ''); +print '
'; print ''; print ''; -print ''; -print ''; +print ''; +print "\n"; print "\n"; +$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); +$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); +$htmltext = ''.$langs->trans("AvailableVariables").':
'; +foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; +$htmltext.='
'; + +print ''; +print ''; +print ''; print '\n"; +print ''; + +//Use draft Watermark + +print ""; +print ''; +print ""; +print '\n"; +print ''; print '
'.$langs->trans("Parameter").' '.$langs->trans("Value").' 
'; -print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
'; +print $form->textwithpicto($langs->trans("FreeLegalTextOnBOMs"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; +$variablename='BOM_FREE_TEXT'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); + print $doleditor->Create(); +} print '
'; +print ''; print "
'; +print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; +print '
'; +print ''; +print ''; +print ''; +print "
'; -*/ +print '
'; + // End of page llxFooter(); diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 58c07b5ca3e..10bfa0030a8 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -222,7 +222,7 @@ llxHeader('', $langs->trans("Boxes")); print load_fiche_titre($langs->trans("Boxes"), '', 'title_setup'); -print $langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."
\n"; +print ''.$langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."
\n"; /* * Search for the default active boxes for each possible position @@ -456,7 +456,7 @@ print load_fiche_titre($langs->trans("Other")); print '
'; print ''; print ''; -print ''; +print '
'; print ''; print ''; @@ -474,7 +474,6 @@ print ''; // Activate FileCache - Developement if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { - print ''; diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 629018ba998..c4c6e4506d9 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -111,7 +111,7 @@ dol_fiche_head($head, 'checkreceipts', $langs->trans("BankSetupModule"), -1, 'ac print load_fiche_titre($langs->trans("ChequeReceiptsNumberingModule"), '', ''); -print '
'.$langs->trans("Parameter").'
'.$langs->trans("EnableFileCache").''; print $form->selectyesno('MAIN_ACTIVATE_FILECACHE', $conf->global->MAIN_ACTIVATE_FILECACHE, 1); print '
'; +print '
'; print ''; print ''; print ''; @@ -240,7 +240,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 0c3514015f2..fbf8bc63b6d 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -73,7 +73,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Parameters").' 
'; +print '
'; print ''; print ''; print ''; @@ -119,6 +119,7 @@ if (! empty($conf->global->CLICKTODIAL_URL)) if (GETPOST('phonefortest')) $phonefortest=GETPOST('phonefortest'); print ''; + print ''; print $langs->trans("LinkToTestClickToDial", $user->login).' : '; print ''; print ''; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index cb07d741a06..764db492959 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -262,7 +262,7 @@ dol_fiche_head($head, 'general', $langs->trans("Orders"), -1, 'order'); print load_fiche_titre($langs->trans("OrdersNumberingModules"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; @@ -282,7 +282,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 13) == 'mod_commande_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -299,7 +298,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -423,7 +421,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); @@ -473,7 +470,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') @@ -524,7 +521,7 @@ print "
"; */ print load_fiche_titre($langs->trans("OtherOptions"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'.$module->name."\n"; print $module->info(); print '
'; +print '
'; print ''; print ''; print ''; @@ -662,7 +659,7 @@ print '
'; */ print load_fiche_titre($langs->trans("Notifications"), '', ''); -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index a3534d3bc5a..bdfb783ce12 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -105,69 +105,79 @@ if ( ($action == 'update' && ! GETPOST("cancel", 'alpha')) dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE", GETPOST("note", 'none'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD", GETPOST("barcode", 'alpha'), 'chaine', 0, '', $conf->entity); - $varforimage='logo'; $dirforimage=$conf->mycompany->dir_output.'/logos/'; - if ($_FILES[$varforimage]["tmp_name"]) + $dirforimage=$conf->mycompany->dir_output.'/logos/'; + + $arrayofimages = array('logo', 'logo_squarred'); + + foreach($arrayofimages as $varforimage) { - if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) + if ($_FILES[$varforimage]["tmp_name"]) { - $original_file=$reg[1]; - - $isimage=image_format_supported($original_file); - if ($isimage >= 0) + $reg = array(); + if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) { - dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); - if (! is_dir($dirforimage)) - { - dol_mkdir($dirforimage); - } - $result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); - if ($result > 0) - { - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO", $original_file, 'chaine', 0, '', $conf->entity); + $original_file=$reg[1]; - // Create thumbs of logo (Note that PDF use original file and not thumbs) - if ($isimage > 0) + $isimage=image_format_supported($original_file); + if ($isimage >= 0) + { + dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); + if (! is_dir($dirforimage)) { - // Create thumbs - //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... - - // Create small thumb, Used on logon for example - $imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality); - if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) - { - $imgThumbSmall = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); - } - else dol_syslog($imgThumbSmall); - - // Create mini thumb, Used on menu or for setup page for example - $imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality); - if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) - { - $imgThumbMini = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); - } - else dol_syslog($imgThumbMini); + dol_mkdir($dirforimage); + } + $result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); + if ($result > 0) + { + $constant = "MAIN_INFO_SOCIETE_LOGO"; + if ($varforimage == 'logo_squarred') $constant = "MAIN_INFO_SOCIETE_LOGO_SQUARRED"; + + dolibarr_set_const($db, $constant, $original_file, 'chaine', 0, '', $conf->entity); + + // Create thumbs of logo (Note that PDF use original file and not thumbs) + if ($isimage > 0) + { + // Create thumbs + //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... + + // Create small thumb, Used on logon for example + $imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality); + if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) + { + $imgThumbSmall = $reg[1]; // Save only basename + dolibarr_set_const($db, $constant."_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); + } + else dol_syslog($imgThumbSmall); + + // Create mini thumb, Used on menu or for setup page for example + $imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality); + if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) + { + $imgThumbMini = $reg[1]; // Save only basename + dolibarr_set_const($db, $constant."_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); + } + else dol_syslog($imgThumbMini); + } + else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING); + } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { + $error++; + $langs->load("errors"); + $tmparray=explode(':', $result); + setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors'); + } + else + { + $error++; + setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); } - else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING); - } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { - $error++; - $langs->load("errors"); - $tmparray=explode(':', $result); - setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors'); } else { $error++; - setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); + $langs->load("errors"); + setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors'); } } - else - { - $error++; - $langs->load("errors"); - setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors'); - } } } @@ -247,7 +257,7 @@ if ( ($action == 'update' && ! GETPOST("cancel", 'alpha')) } } -if ($action == 'addthumb') // Regenerate thumbs +if ($action == 'addthumb' || $action == 'addthumbsquarred') // Regenerate thumbs { if (file_exists($conf->mycompany->dir_output.'/logos/'.$_GET["file"])) { @@ -256,15 +266,20 @@ if ($action == 'addthumb') // Regenerate thumbs // Create thumbs of logo if ($isimage > 0) { + $constant = "MAIN_INFO_SOCIETE_LOGO"; + if ($action == 'addthumbsquarred') $constant = "MAIN_INFO_SOCIETE_LOGO_SQUARRED"; + + $reg = array(); + // Create thumbs - //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... + //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... // Create small thumb. Used on logon for example $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small', $quality); if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) { $imgThumbSmall = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, $constant."_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); } else dol_syslog($imgThumbSmall); @@ -273,7 +288,7 @@ if ($action == 'addthumb') // Regenerate thumbs if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) { $imgThumbMini = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, $constant."_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); } else dol_syslog($imgThumbMini); @@ -297,24 +312,55 @@ if ($action == 'addthumb') // Regenerate thumbs } } -if ($action == 'removelogo') + +if ($action == 'removelogo' || $action == 'removelogosquarred') { + $constant = "MAIN_INFO_SOCIETE_LOGO"; + if ($action == 'removelogosquarred') $constant = "MAIN_INFO_SOCIETE_LOGO_SQUARRED"; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $logofile=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo != '') dol_delete_file($logofile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO", $conf->entity); - $mysoc->logo=''; + $logofilename = $mysoc->logo; + $logofilenamebis = $mysoc->logo_squarred; + if ($action == 'removelogosquarred') + { + $logofilename = $mysoc->logo_squarred; + $logofilenamebis = $mysoc->logo; + } - $logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small; - if ($mysoc->logo_small != '') dol_delete_file($logosmallfile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $conf->entity); - $mysoc->logo_small=''; + $logofile=$conf->mycompany->dir_output.'/logos/'.$logofilename; + if ($logofilename != '' && $logofilename != $logofilenamebis) dol_delete_file($logofile); + dolibarr_del_const($db, $constant, $conf->entity); + if ($action == 'removelogosquarred') $mysoc->logo_squarred=''; + else $mysoc->logo=''; - $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini; - if ($mysoc->logo_mini != '') dol_delete_file($logominifile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $conf->entity); - $mysoc->logo_mini=''; + $logofilename = $mysoc->logo_small; + $logofilenamebis = $mysoc->logo_squarred_small; + if ($action == 'removelogosquarred') + { + $logofilename = $mysoc->logo_squarred_small; + $logofilenamebis = $mysoc->logo_small; + } + + $logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$logofilename; + if ($logofilename != '' && $logofilename != $logofilenamebis) dol_delete_file($logosmallfile); + dolibarr_del_const($db, $constant."_SMALL", $conf->entity); + if ($action == 'removelogosquarred') $mysoc->logo_squarred_small=''; + else $mysoc->logo_small=''; + + $logofilename = $mysoc->logo_mini; + $logofilenamebis = $mysoc->logo_squarred_mini; + if ($action == 'removelogosquarred') + { + $logofilename = $mysoc->logo_squarred_mini; + $logofilenamebis = $mysoc->logo_mini; + } + + $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$logofilename; + if ($logofilename != '' && $logofilename != $logofilenamebis) dol_delete_file($logominifile); + dolibarr_del_const($db, $constant."_MINI", $conf->entity); + if ($action == 'removelogosquarred') $mysoc->logo_squarred_mini=''; + else $mysoc->logo_mini=''; } @@ -337,875 +383,416 @@ $head = company_admin_prepare_head(); dol_fiche_head($head, 'company', $langs->trans("Company"), -1, 'company'); -print ''.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Modify"), $langs->transnoentities("Save"))."
\n"; +print ''.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Save"))."
\n"; print "
\n"; -if ($action == 'edit' || $action == 'updateedit') + +/** + * Edit parameters + */ +print "\n".''."\n"; + +print ''; +print ''; +print ''; + +print '
'.$langs->trans("Parameter").'
'; +print ''."\n"; + +// Name + +print ''."\n"; + +// Addresse + +print ''."\n"; + + +print ''."\n"; + + +print ''."\n"; + +// Country + +print ''."\n"; + + +print ''; +// Fiscal year start +print '
'; +print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; +print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'>
'; +print '
'; +print '
'; +print '
'; +//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization +print $form->select_country($mysoc->country_id, 'country_id'); +if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print '
'; +$state_id=0; +if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) { - /** - * Edition des parametres - */ - print "\n".''."\n"; - - print ''; - print ''; - print ''; - - print ''; - print ''."\n"; - - // Name - - print ''."\n"; - - // Addresse - - print ''."\n"; + $tmp=explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE); + $state_id=$tmp[0]; +} +$formcompany->select_departement($state_id, $mysoc->country_code, 'state_id'); +print ''."\n"; - print ''."\n"; +print ''."\n"; - print ''."\n"; - - // Country - - print ''."\n"; +print ''; +print ''."\n"; - print ''; +print ''."\n"; + + +print ''; +print ''."\n"; + +// Web +print ''; +print ''."\n"; + +// Barcode +if (! empty($conf->barcode->enabled)) { + print ''; + print ''; +} + +// Logo +print ''; + +// Logo (squarred) +print ''; + +// Note +print ''; +print ''; + +print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; - print '
'; - print '
'; - print '
'; +print $form->selectCurrency($conf->currency, "currency"); +print '
'; - print '
'; - //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization - print $form->select_country($mysoc->country_id, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'; +print '
'; - $state_id=0; - if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) +print '
'; +print '
'; +print '
'; +print '
'; + print '
'; +print '
'; +print ''; +print ''; +if (! empty($mysoc->logo_mini)) { + print ''.img_delete($langs->trans("Delete")).''; + if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { + print '   '; + print ''; + } +} else { + print ''; +} +print '
'; +print '
'; +print '
'; +print ''; +print ''; +if (! empty($mysoc->logo_squarred_mini)) { + print ''.img_delete($langs->trans("Delete")).''; + if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { + print '   '; + print ''; + } +} else { + print ''; +} +print '
'; +print '
'; +print '
'; + +print '
'; + +// IDs of the company (country-specific) +print ''; +print ''; + +$langs->load("companies"); + +// Managing Director(s) + +print ''; + +// GDPR contact + +print ''; + +// Capital + +print ''; + +// Juridical Status + +print ''; + +// ProfID1 +if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') +{ + print ''."\n"; - - - print ''."\n"; - - - print ''; - print ''."\n"; - - - print ''; - print ''."\n"; - - - print ''; - print ''."\n"; - - // Web - print ''; - print ''."\n"; - - // Barcode - if (! empty($conf->barcode->enabled)) { - - print ''; - print ''; - } - - // Logo - print ''; - - // Note - print ''; - print ''; - - print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; +print '
'; +print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc")); +print ''; +print '
'; +print '
'; +if ($mysoc->country_code) { + print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); +} else { + print $countrynotdefined; +} +print '
'; + if (! empty($mysoc->country_code)) { - $tmp=explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE); - $state_id=$tmp[0]; + print ''; } - $formcompany->select_departement($state_id, $mysoc->country_code, 'state_id'); - print '
'; - print $form->selectCurrency($conf->currency, "currency"); - print '
'; - print '
'; - print '
'; - print '
'; - print '
'; - print '
'; - print '
'; - print ''; - print ''; - if (! empty($mysoc->logo_mini)) { - print ''.img_delete($langs->trans("Delete")).''; - if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { - print '   '; - print ''; - } - } else { - print ''; - } - print '
'; - print '
'; - print '
'; - - print '
'; - - // IDs of the company (country-specific) - print ''; - print ''; - - $langs->load("companies"); - - // Managing Director(s) - - print ''; - - // GDPR contact - - print ''; - - // Capital - - print ''; - - // Juridical Status - - print ''; - - // ProfID1 - if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId2 - if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId3 - if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId4 - if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId5 - if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId6 - if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') - { - - print ''; - } - - // TVA Intra - - print ''; - - // Object of the company - - print ''; - print ''; - - print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; - print '
'; - print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc")); - print ''; - print '
'; - print '
'; - if ($mysoc->country_code) { - print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); - } else { + else + { print $countrynotdefined; } print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - print ''; - print '
'; - print '
'; - - - // Fiscal year start - print '
'; - print ''; - print ''; - print ''; - print "\n"; - - print ''; - - print "
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
'; - print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1, 'maxwidth100') . '
"; - - - // Fiscal options - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - print ""; - print '\n"; - - - print ""; - print '\n"; - - print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").' 
'; - print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; - print "
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; - print "
'; - print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; - print "
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; - print "
"; - - /* - * Local Taxes - */ - if ($mysoc->useLocalTax(1)) - { - // Local Tax 1 - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; - print '\n"; - - - print ""; - print '\n"; - print "
'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."'; - print ''; - print ""; - $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsUsedExample"?"\n":""); - if(! isOnlyOneLocalTax(1)) - { - print ''; - } - - $opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc")); - - print ''; - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."
: '; - $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); - print '
'.$langs->trans("CalcLocaltax").': '; - print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); - print '
"; - print "
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - } - if ($mysoc->useLocalTax(2)) - { - // Local Tax 2 - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; - print '\n"; - - - print ""; - print '\n"; - print "
'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."'; - print ''; - print ""; - $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsUsedExample"?"\n":""); - if(! isOnlyOneLocalTax(2)) - { - print ''; - } - print ''; - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."
: '; - $formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); - print '
: '; - print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); - print '
"; - print "
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - } - - - print '
'; - print ''; - print '     '; - print ''; - print '
'; - print '
'; - - print ''; } -else + +// ProfId2 +if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') { - /* - * Show parameters - */ - - // Actions buttons - //print '
'; - //print ''.$langs->trans("Modify").''; - //print '

'; - - print '
'; - print ''; - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - // Web - - print ''; - - // Barcode - - if (! empty($conf->barcode->enabled)) - { - print ''; - } - - // Logo - - print ''; +} - - print ''; - - print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; - if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM; - else print img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyName")).''; - print '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '
'.$langs->trans("CompanyCountry").''; - if ($mysoc->country_code) + print '
'; + if (! empty($mysoc->country_code)) { - $img=picto_from_langcode($mysoc->country_code); - print $img?$img.' ':''; - print getCountry($mysoc->country_code, 1); - } - else print img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).''; - print '
'.$langs->trans("Region-State").''; - else print '
'.$langs->trans("State").''; - if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) - { - $tmp=explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE); - $state_id=$tmp[0]; - print getState($state_id, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); - } - print '
'.$langs->trans("CompanyCurrency").''; - print currency_name($conf->currency, 0); - print ' ('.$conf->currency; - print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : ''); - print ')'; - print ' - '.$langs->trans("PriceFormatInCurrentLanguage", $langs->defaultlang).' : '.price(price2num('99.333333333', 'MT'), 1, $langs, 1, -1, -1, $conf->currency); - print '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL, $mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX, $mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL, 0, 0, 0, 80) . '
'.$langs->trans("Web").''; - $arrayofurl = preg_split('/\s/', $conf->global->MAIN_INFO_SOCIETE_WEB); - foreach($arrayofurl as $urltoshow) - { - if ($urltoshow) print dol_print_url($urltoshow, '_blank', 80); - } - print '
'.$langs->trans("Gencod").'' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '
'.$langs->trans("Logo").''; - - $tagtd='tagtd '; - if ($conf->browser->layout == 'phone') $tagtd=''; - print '
'; - print $mysoc->logo; - print '
'; - - // It offers the generation of the thumbnail if it does not exist - if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i', $mysoc->logo)) - { - print '  '; - } - elseif ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) - { - print ''; + print ''; } else { - print ''; + print $countrynotdefined; } - print '
'; - print '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '
'; - print "
"; - - print '
'; - - - // IDs of the company (country-specific) - print '
'; - print ''; - - print '
'; - print ''; - print ''; - - // Managing Director(s) - - print ''; - - // GDPR Contact - - print ''; - - // Capital - - print ''; - - // Juridical Status - - print ''; - - // ProfId1 - if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') +// ProfId3 +if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') +{ + print ''; - } - - // ProfId2 - if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId3 - if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId4 - if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId5 - if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId6 - if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') - { - - print ''; - } - - // VAT - - print ''; - print ''; - print ''; + print ''; +} + +// ProfId4 +if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') +{ + print ''; +} + +// ProfId5 +if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') +{ + print ''; +} + +// ProfId6 +if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') +{ + print ''; +} + +// TVA Intra + +print ''; + +// Object of the company + +print ''; +print ''; + +print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("ManagingDirectors").''; - print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '
'.$langs->trans("GDPRContact").''; - print $conf->global->MAIN_INFO_GDPR . '
'.$langs->trans("Capital").''; - print $conf->global->MAIN_INFO_CAPITAL . '
'.$langs->trans("JuridicalStatus").''; - print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE); - print '
'; + if (! empty($mysoc->country_code)) { - - print '
'.$langs->transcountry("ProfId1", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_SIREN)) - { - print $conf->global->MAIN_INFO_SIREN; - $s = $mysoc->id_prof_url(1, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId2", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_SIRET)) - { - print $conf->global->MAIN_INFO_SIRET; - $s = $mysoc->id_prof_url(2, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId3", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_APE)) - { - print $conf->global->MAIN_INFO_APE; - $s = $mysoc->id_prof_url(3, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId4", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_RCS)) - { - print $conf->global->MAIN_INFO_RCS; - $s = $mysoc->id_prof_url(4, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId5", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_PROFID5)) - { - print $conf->global->MAIN_INFO_PROFID5; - $s = $mysoc->id_prof_url(5, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId6", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_PROFID6)) - { - print $conf->global->MAIN_INFO_PROFID6; - $s = $mysoc->id_prof_url(6, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->trans("VATIntra").''; - if (! empty($conf->global->MAIN_INFO_TVAINTRA)) - { - $s=''; - $s.=$conf->global->MAIN_INFO_TVAINTRA; - $s.=''; - if (empty($conf->global->MAIN_DISABLEVATCHECK) && $mysoc->isInEEC()) - { - $s.=' - '; - if (! empty($conf->use_javascript_ajax)) - { - print "\n"; - print ''; - print "\n"; - $s.=''.$langs->trans("VATIntraCheck").''; - $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1); - } - else - { - $s.='id_country).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').''; - } - } - print $s; + print ''; } else { - print ' '; + print $countrynotdefined; } - print '
'; + if (! empty($mysoc->country_code)) + { + print ''; + } + else + { + print $countrynotdefined; + } + print '
'; + if (! empty($mysoc->country_code)) + { + print ''; + } + else + { + print $countrynotdefined; + } + print '
'; + if (! empty($mysoc->country_code)) + { + print ''; + } + else + { + print $countrynotdefined; + } + print '
'; +print ''; +print '
'; +print '
'; - print '
'.$langs->trans("CompanyObject").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '
'; +print ''; +print ''; +print "\n"; - print '
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
'; - print ""; +print '
'; +print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1, 'maxwidth100') . '
"; - /* - * fiscal year beginning - */ + +// Fiscal options +print '
'; +print ''; +print ''; +print ''; +print ''; +print "\n"; + + +print ""; +print '\n"; + + +print ""; +print '\n"; + +print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").' 
'; +print ""; +print ""; +if ($mysoc->country_code == 'FR') print "\n"; +print "
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; +print "
'; +print ""; +print ""; +if ($mysoc->country_code == 'FR') print "\n"; +print "
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; +print "
"; + +/* + * Local Taxes + */ +if ($mysoc->useLocalTax(1)) +{ + // Local Tax 1 print '
'; - - print '
'; - print ''; + print '
'; print ''; - print ''; + print ''; + print ''; print "\n"; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option + print ""; + print '\n"; - /* - * tax options - */ + + print ""; + print '\n"; + print "
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").''.$langs->transcountry("LocalTax1Management", $mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."'; + print ''; + print ""; + $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code); + print ($example!="LocalTax1IsUsedExample"?"\n":""); + if(! isOnlyOneLocalTax(1)) + { + print ''; + } - print ''; + $opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc")); + print ''; print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."
: '; + $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); + print '
'.$langs->trans("FiscalMonthStart").''; - $monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1; - print dol_print_date(dol_mktime(12, 0, 0, $monthstart, 1, 2000, 1), '%B', 'gm') . '
'.$langs->trans("CalcLocaltax").': '; + print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); + print '
"; - print ""; + print "
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."'; + print ""; + print ""; + $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code); + print ($example!="LocalTax1IsNotUsedExample"?"\n":""); + print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."
"; + print "
"; +} +if ($mysoc->useLocalTax(2)) +{ + // Local Tax 2 print '
'; - print '
'; - print ''; + print '
'; print ''; - print ''; + print ''; print ''; print "\n"; - print '"; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option + print ""; print '\n"; - print '"; + print ""; print '\n"; - print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").''.$langs->transcountry("LocalTax2Management", $mysoc->country_code).''.$langs->trans("Description").' 
'; - print "global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."'; - print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; + print '
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
'; + print ""; + $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code); + print ($example!="LocalTax2IsUsedExample"?"\n":""); + if(! isOnlyOneLocalTax(2)) + { + print ''; + } + print ''; print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."
: '; + $formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); + print '
: '; + print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); + print '
"; print "
'; - print "global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."'; print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; + print ""; + $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code); + print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."
"; print "
"; - print "
"; - - /* - * Local Taxes - */ - if ($mysoc->useLocalTax(1)) // True if we found at least on vat with a setup adding a localtax 1 - { - // Local Tax 1 - print '
'; - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - print ""; - print '\n"; - - - print '"; - print '\n"; - - print "
'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).''.$langs->trans("Description").' 
"; - print "global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsUsedExample"?"\n":""); - if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0) - { - print ''; - } - print ''; - print "
".$langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."
'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX1 .'
'.$langs->trans("CalcLocaltax").': '; - if($conf->global->MAIN_INFO_LOCALTAX_CALC1==0) - { - print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==1) - { - print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ - print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); - } - - print '
"; - print "
'; - print "global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - print "
"; - } - if ($mysoc->useLocalTax(2)) // True if we found at least on vat with a setup adding a localtax 1 - { - // Local Tax 2 - print '
'; - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - print ""; - print '\n"; - - - print ""; - print '\n"; - - print "
'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).''.$langs->trans("Description").' 
"; - print "global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsUsedExample"?"\n":""); - if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0) - { - print ''; - } - print ''; - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."
'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX2 .'
'.$langs->trans("CalcLocaltax").': '; - if($conf->global->MAIN_INFO_LOCALTAX_CALC2==0) - { - print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==1) - { - print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==2) - { - print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); - } - - print '
"; - print "
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - print "
"; - } - - - // Actions buttons - print '
'; - print ''; - print '
'; } + +print '
'; +print ''; +print '
'; + +print ''; + + // End of page llxFooter(); $db->close(); diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index bb2bfdde409..25cf1df9a11 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -68,7 +68,6 @@ if ($action == 'update') if (in_array($accounting_mode, $accounting_modes)) { - if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) { $error++; } @@ -111,7 +110,7 @@ print '
'; print ''; print ''; -print ''; +print '
'; // case of the parameter ACCOUNTING_MODE @@ -139,7 +138,7 @@ print "
\n"; print "
\n"; -print ''; +print '
'; print ''; print ''; print "\n"; diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index 06cf38c71cc..29940f95d56 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -97,7 +97,7 @@ dol_fiche_head($head, 'general', $langs->trans("Sendings"), -1, 'sending'); // Miscellaneous parameters -print '
'.$langs->trans('OtherOptions').'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index a5b1170d552..b3b1637e4fd 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -118,7 +118,6 @@ if (! empty($consts) && $action == 'update') // Mass delete if (! empty($consts) && $action == 'delete') { - $nbdeleted=0; foreach($consts as $const) { @@ -164,7 +163,7 @@ llxHeader('', $langs->trans("Setup"), $wikihelp); // Add logic to show/hide buttons if ($conf->use_javascript_ajax) { -?> + ?> -trans("OtherSetup"), '', 'title_setup'); @@ -195,9 +194,11 @@ $param = ''; print 'entity) && $debug)?'?debug=1':'').'" method="POST">'; print ''; print ''; +print ''; +print ''; print '
'; -print '
'.$langs->trans("Feature").' 
'; +print '
'; print ''; print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n"; print ''; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index e6c8c15c0d4..2938f97feef 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -199,7 +199,7 @@ dol_fiche_head($head, 'contract', $langs->trans("Contracts"), -1, 'contract'); print load_fiche_titre($langs->trans("ContractsNumberingModules"), '', ''); -print '
'.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; @@ -219,7 +219,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -236,7 +235,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -325,7 +323,7 @@ else } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'.$module->nom."\n"; print $module->info(); print '
'; +print '
'; print ''; print ''; print ''; @@ -359,7 +357,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); @@ -409,7 +406,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') @@ -463,7 +460,7 @@ print ''; print ''; print load_fiche_titre($langs->trans("OtherOptions"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 1d187c57e17..a531a9c870c 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -77,7 +77,7 @@ if ($action == 'edit') print ''; print ''; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) @@ -116,7 +116,7 @@ if ($action == 'edit') } else { - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) diff --git a/htdocs/admin/debugbar.php b/htdocs/admin/debugbar.php index 6f2b4cea089..77969820598 100644 --- a/htdocs/admin/debugbar.php +++ b/htdocs/admin/debugbar.php @@ -93,7 +93,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 40ffed80e60..f4922a33bbb 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -245,7 +245,7 @@ print ''; print ''; print '
'; -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''; // Page $texthelp=$langs->trans("PageUrlForDefaultValues"); diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 47f668f69c3..23a9aa4b3b1 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -174,8 +174,8 @@ llxHeader(); print load_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"), '', 'title_setup'); -print $langs->transnoentities("DelaysOfToleranceDesc", img_warning()); -print " ".$langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php')."
\n"; +print ''.$langs->transnoentities("DelaysOfToleranceDesc", img_warning()); +print " ".$langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php')."
\n"; print "
\n"; $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; @@ -186,7 +186,7 @@ if ($action == 'edit') print ''; print ''; - print '
'; + print '
'; print ''; foreach($modules as $module => $delays) @@ -209,7 +209,7 @@ if ($action == 'edit') print '
'; // Show if meteo is enabled - print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'; + print '
'; print ''; print ''; @@ -225,7 +225,7 @@ else * Show parameters */ - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; print ''; foreach($modules as $module => $delays) @@ -248,7 +248,7 @@ else print '
'; // Show if meteo is enabled - print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'; + print '
'; print ''; print ''; @@ -265,7 +265,6 @@ print '
'; print ''.$langs->trans("DescWeather").' '; if($action == 'edit') { - $str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoPercentageMod')); $str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoStdMod')); if(empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $str_mode_enabled = $str_mode_std; @@ -292,8 +291,6 @@ $text=''; $options='class="valignmiddle" height="60px"'; if ($action == 'edit') { - - print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '' : 'style="display:none;"').'>'; print '
'; @@ -364,9 +361,7 @@ if ($action == 'edit') { global->MAIN_USE_METEO_WITH_PERCENTAGE)) { - print '
'; print '
'; print img_weather($text, 0, $options); @@ -386,7 +381,6 @@ if ($action == 'edit') { print '
'; print '
'; } else { - print '
'; print '
'; print img_weather($text, 0, $options); @@ -411,11 +405,9 @@ if ($action == 'edit') { print '
'; if($action == 'edit') { - print '
'; print '
'; } else { - print '
'; } diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d739205124e..8254c5931b8 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -11,6 +11,7 @@ * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud + * Copyright (C) 2019 Frédéric France * * 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 @@ -88,7 +89,7 @@ $hookmanager->initHooks(array('admin')); // Put here declaration of dictionaries properties // Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this. -$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,32,33,34,0,6,0,29,0,7,24,28,17,35,36,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,37,0,25,0); +$taborder=array(9,0,4,3,2,0,1,8,19,16,27,38,0,5,11,0,32,33,34,0,6,0,29,0,7,24,28,17,35,36,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,37,0,25,0); // Name of SQL tables of dictionaries $tabname=array(); @@ -130,6 +131,7 @@ $tabname[34]= MAIN_DB_PREFIX."c_hrm_function"; $tabname[35]= MAIN_DB_PREFIX."c_exp_tax_cat"; $tabname[36]= MAIN_DB_PREFIX."c_exp_tax_range"; $tabname[37]= MAIN_DB_PREFIX."c_units"; +$tabname[38]= MAIN_DB_PREFIX."c_socialnetworks"; // Dictionary labels $tablib=array(); @@ -170,6 +172,7 @@ $tablib[34]= "DictionaryFunction"; $tablib[35]= "DictionaryExpenseTaxCat"; $tablib[36]= "DictionaryExpenseTaxRange"; $tablib[37]= "DictionaryMeasuringUnits"; +$tablib[38]= "DictionarySocialNetworks"; // Requests to extract data $tabsql=array(); @@ -210,6 +213,7 @@ $tabsql[34]= "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PRE $tabsql[35]= "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c"; $tabsql[36]= "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r"; $tabsql[37]= "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r"; +$tabsql[38]= "SELECT rowid, entity, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks"; // Criteria to sort dictionaries $tabsqlsort=array(); @@ -250,6 +254,7 @@ $tabsqlsort[34]="code ASC"; $tabsqlsort[35]="c.label ASC"; $tabsqlsort[36]="r.fk_c_exp_tax_cat ASC, r.range_ik ASC"; $tabsqlsort[37]="r.unit_type ASC, r.scale ASC, r.code ASC"; +$tabsqlsort[38]="rowid, code ASC"; // Field names in select result for dictionary display $tabfield=array(); @@ -290,6 +295,7 @@ $tabfield[34]= "code,label"; $tabfield[35]= "label"; $tabfield[36]= "range_ik,fk_c_exp_tax_cat"; $tabfield[37]= "code,label,short_label,unit_type,scale"; +$tabfield[38]= "code,label,url,icon,entity"; // Edit field names for editing a record $tabfieldvalue=array(); @@ -330,6 +336,7 @@ $tabfieldvalue[34]= "code,label"; $tabfieldvalue[35]= "label"; $tabfieldvalue[36]= "range_ik,fk_c_exp_tax_cat"; $tabfieldvalue[37]= "code,label,short_label,unit_type,scale"; +$tabfieldvalue[38]= "code,label,url,icon"; // Field names in the table for inserting a record $tabfieldinsert=array(); @@ -371,6 +378,7 @@ $tabfieldinsert[34]= "code,label"; $tabfieldinsert[35]= "label"; $tabfieldinsert[36]= "range_ik,fk_c_exp_tax_cat"; $tabfieldinsert[37]= "code,label,short_label,unit_type,scale"; +$tabfieldinsert[38]= "code,label,url,icon,entity"; // Rowid name of field depending if field is autoincrement on or off.. // Use "" if id field is "rowid" and has autoincrement on @@ -413,6 +421,7 @@ $tabrowid[34]= "rowid"; $tabrowid[35]= ""; $tabrowid[36]= ""; $tabrowid[37]= ""; +$tabrowid[38]= ""; // Condition to show dictionary in setup page $tabcond=array(); @@ -453,6 +462,7 @@ $tabcond[34]= ! empty($conf->hrm->enabled); $tabcond[35]= ! empty($conf->expensereport->enabled); $tabcond[36]= ! empty($conf->expensereport->enabled); $tabcond[37]= ! empty($conf->product->enabled); +$tabcond[38]= ! empty($conf->socialnetworks->enabled); // List of help for fields $tabhelp=array(); @@ -493,6 +503,7 @@ $tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[35] = array(); $tabhelp[36] = array('range_ik'=>$langs->trans('PrevRangeToThisRange')); $tabhelp[37] = array('code'=>$langs->trans("EnterAnyCode")); +$tabhelp[38] = array('code'=>$langs->trans("EnterAnyCode"), 'url' => $langs->trans('UrlSocialNetworksDesc'), 'icon' => $langs->trans('FafaIconSocialNetworksDesc')); // List of check for fields (NOT USED YET) $tabfieldcheck=array(); @@ -533,6 +544,7 @@ $tabfieldcheck[34] = array(); $tabfieldcheck[35] = array(); $tabfieldcheck[36] = array(); $tabfieldcheck[37] = array(); +$tabfieldcheck[38] = array(); // Complete all arrays with entries found into modules complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqlsort, $tabfield, $tabfieldvalue, $tabfieldinsert, $tabrowid, $tabcond, $tabhelp, $tabfieldcheck); @@ -551,27 +563,27 @@ $elementList = array(); $sourceList=array(); if ($id == 11) { - $elementList = array( - '' => '', - 'societe' => $langs->trans('ThirdParty'), -// 'proposal' => $langs->trans('Proposal'), -// 'order' => $langs->trans('Order'), -// 'invoice' => $langs->trans('Bill'), - 'supplier_proposal' => $langs->trans('SupplierProposal'), - 'order_supplier' => $langs->trans('SupplierOrder'), - 'invoice_supplier' => $langs->trans('SupplierBill'), -// 'intervention' => $langs->trans('InterventionCard'), -// 'contract' => $langs->trans('Contract'), - 'project' => $langs->trans('Project'), - 'project_task' => $langs->trans('Task'), - 'agenda' => $langs->trans('Agenda'), - 'dolresource' => $langs->trans('Resource'), - // old deprecated - 'propal' => $langs->trans('Proposal'), - 'commande' => $langs->trans('Order'), - 'facture' => $langs->trans('Bill'), - 'fichinter' => $langs->trans('InterventionCard'), - 'contrat' => $langs->trans('Contract') + $elementList = array( + '' => '', + 'societe' => $langs->trans('ThirdParty'), + // 'proposal' => $langs->trans('Proposal'), + // 'order' => $langs->trans('Order'), + // 'invoice' => $langs->trans('Bill'), + 'supplier_proposal' => $langs->trans('SupplierProposal'), + 'order_supplier' => $langs->trans('SupplierOrder'), + 'invoice_supplier' => $langs->trans('SupplierBill'), + // 'intervention' => $langs->trans('InterventionCard'), + // 'contract' => $langs->trans('Contract'), + 'project' => $langs->trans('Project'), + 'project_task' => $langs->trans('Task'), + 'agenda' => $langs->trans('Agenda'), + 'dolresource' => $langs->trans('Resource'), + // old deprecated + 'propal' => $langs->trans('Proposal'), + 'commande' => $langs->trans('Order'), + 'facture' => $langs->trans('Bill'), + 'fichinter' => $langs->trans('InterventionCard'), + 'contrat' => $langs->trans('Contract'), ); if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty'); @@ -589,13 +601,13 @@ $localtax_typeList = array(); if ($id == 10) { $localtax_typeList = array( - "0" => $langs->trans("No"), - "1" => $langs->trans("Yes").' ('.$langs->trans("Type")." 1)", //$langs->trans("%ageOnAllWithoutVAT"), - "2" => $langs->trans("Yes").' ('.$langs->trans("Type")." 2)", //$langs->trans("%ageOnAllBeforeVAT"), - "3" => $langs->trans("Yes").' ('.$langs->trans("Type")." 3)", //$langs->trans("%ageOnProductsWithoutVAT"), - "4" => $langs->trans("Yes").' ('.$langs->trans("Type")." 4)", //$langs->trans("%ageOnProductsBeforeVAT"), - "5" => $langs->trans("Yes").' ('.$langs->trans("Type")." 5)", //$langs->trans("%ageOnServiceWithoutVAT"), - "6" => $langs->trans("Yes").' ('.$langs->trans("Type")." 6)" //$langs->trans("%ageOnServiceBeforeVAT"), + "0" => $langs->trans("No"), + "1" => $langs->trans("Yes").' ('.$langs->trans("Type")." 1)", //$langs->trans("%ageOnAllWithoutVAT"), + "2" => $langs->trans("Yes").' ('.$langs->trans("Type")." 2)", //$langs->trans("%ageOnAllBeforeVAT"), + "3" => $langs->trans("Yes").' ('.$langs->trans("Type")." 3)", //$langs->trans("%ageOnProductsWithoutVAT"), + "4" => $langs->trans("Yes").' ('.$langs->trans("Type")." 4)", //$langs->trans("%ageOnProductsBeforeVAT"), + "5" => $langs->trans("Yes").' ('.$langs->trans("Type")." 5)", //$langs->trans("%ageOnServiceWithoutVAT"), + "6" => $langs->trans("Yes").' ('.$langs->trans("Type")." 6)" //$langs->trans("%ageOnServiceBeforeVAT"), ); } @@ -636,8 +648,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) && (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy','tracking')) // Fields that are not mandatory && (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10 ) - ) - { + ) { $ok=0; $fieldnamekey=$listfield[$f]; // We take translate key of field @@ -1049,7 +1060,7 @@ if ($id) $fieldlist=explode(',', $tabfield[$id]); print '
'; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; // Line for title print ''; @@ -1231,7 +1242,7 @@ if ($id) } print '
'; - print '
'; + print '
'; // Title line with search input fields print ''; @@ -1510,6 +1521,10 @@ if ($id) $key=$langs->trans("PaymentType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } + elseif ($fieldlist[$field]=='type' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { + $payment_type_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); + $valuetoshow = $payment_type_list[$valuetoshow]; + } elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); @@ -1558,18 +1573,18 @@ if ($id) $class="center"; } elseif ($fieldlist[$field]=='localtax1_type') { - if ($obj->localtax1 != 0) - $valuetoshow=$localtax_typeList[$valuetoshow]; - else - $valuetoshow = ''; - $align="center"; + if ($obj->localtax1 != 0) + $valuetoshow=$localtax_typeList[$valuetoshow]; + else + $valuetoshow = ''; + $align="center"; } elseif ($fieldlist[$field]=='localtax2_type') { - if ($obj->localtax2 != 0) - $valuetoshow=$localtax_typeList[$valuetoshow]; - else - $valuetoshow = ''; - $align="center"; + if ($obj->localtax2 != 0) + $valuetoshow=$localtax_typeList[$valuetoshow]; + else + $valuetoshow = ''; + $align="center"; } elseif ($fieldlist[$field]=='taux') { $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); @@ -1709,7 +1724,7 @@ else $lastlineisempty=false; print '
'; - print '
'; + print '
'; print ''; print ''; print ''; @@ -1724,7 +1739,6 @@ else { if ($showemptyline) { - print ''; $showemptyline=0; } @@ -1876,6 +1890,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print $type.''; print ''; } + elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') + { + print ''; + } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { if ($fieldlist[$field] == 'type_cdr') print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index e8dbfab9942..d0c4e0dc542 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -203,7 +203,7 @@ dol_fiche_head($head, 'shipment', $langs->trans("Sendings"), -1, 'sending'); print load_fiche_titre($langs->trans("SendingsNumberingModules")); -print '
'.$langs->trans("Dictionary").''.$langs->trans("Table").'
   
'; + $select_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); + print $form->selectarray($fieldlist[$field], $select_list, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'2')); + print ''; else print ''; @@ -1990,9 +2011,9 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if (in_array($fieldlist[$field], array('libelle', 'label', 'tracking'))) $class='quatrevingtpercent'; print ''; $transfound=0; + $transkey=''; if (in_array($fieldlist[$field], array('label','libelle'))) // For label { - $transkey=''; // Special case for labels if ($tabname == MAIN_DB_PREFIX.'c_civility') { $transkey="Civility".strtoupper($obj->code); diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index c6262e84a79..e5acf71857e 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -18,10 +18,10 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @author PrestaShop SA -* @copyright 2007-2013 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA * PrestaShop Webservice Library * @package PrestaShopWebservice */ @@ -395,49 +395,6 @@ class PrestaShopWebservice self::checkStatusCode($request['status_code']);// check the response validity return self::parseXML($request['response']); } - - /** - * Delete (DELETE) a resource. - * Unique parameter must take :

- * 'resource' => Resource name
- * 'id' => ID or array which contains IDs of a resource(s) you want to delete

- * - * delete(array('resource' => 'orders', 'id' => 1)); - * // Following code will not be executed if an exception is thrown. - * echo 'Successfully deleted.'; - * } - * catch (PrestaShopWebserviceException $ex) - * { - * echo 'Error : '.$ex->getMessage(); - * } - * ?> - * - * - * @param array $options Array representing resource to delete. - * @return boolean True - */ - public function delete($options) - { - if (isset($options['url'])) - $url = $options['url']; - elseif (isset($options['resource']) && isset($options['id'])) - if (is_array($options['id'])) - $url = $this->url.'/api/'.$options['resource'].'/?id=['.implode(',', $options['id']).']'; - else - $url = $this->url.'/api/'.$options['resource'].'/'.$options['id']; - if (isset($options['id_shop'])) - $url .= '&id_shop='.$options['id_shop']; - if (isset($options['id_group_shop'])) - $url .= '&id_group_shop='.$options['id_group_shop']; - $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'DELETE')); - self::checkStatusCode($request['status_code']);// check the response validity - return true; - } } /** diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 4951f57c22f..22029b2c691 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -32,8 +32,8 @@ class Dolistore * beginning of pagination * @var int */ + public $start; - public $start; /** * end of pagination * @var int @@ -226,7 +226,6 @@ class Dolistore $html .= self::get_categories($cat->id); $html .= "\n"; } else { - } } diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 067ed0ea353..2fcf3fe6422 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -74,7 +74,7 @@ $linkback=''; -print ''; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 255fdb68a0d..43d0731c434 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -40,12 +40,12 @@ if (empty($conf->emailcollector->enabled)) accessforbidden(); $langs->loadLangs(array("admin", "mails", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); -$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectcard'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $operationid = GETPOST('operationid', 'int'); @@ -53,7 +53,7 @@ $operationid = GETPOST('operationid', 'int'); // Initialize technical objects $object = new EmailCollector($db); $extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->emailcollector->dir_output . '/temp/massgeneration/' . $user->id; +$diroutputmassaction = $conf->emailcollector->dir_output.'/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('emailcollectorcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels @@ -65,27 +65,26 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen $search_all = trim(GETPOST("search_all", 'alpha')); $search = array(); foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha'); + if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (GETPOST('saveoperation2')) $action = 'updateoperation'; -if (empty($action) && empty($id) && empty($ref)) $action='view'; +if (empty($action) && empty($id) && empty($ref)) $action = 'view'; // Load object -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0); //$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); -$permissionnote=$user->rights->emailcollector->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink=$user->rights->emailcollector->write; // Used by the include of actions_dellink.inc.php -$permissionedit=$user->rights->emailcollector->write; // Used by the include of actions_lineupdown.inc.php -$permissiontoadd=$user->rights->emailcollector->write; // Used by the include of actions_addupdatedelete.inc.php +$permissionnote = $user->rights->emailcollector->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->emailcollector->write; // Used by the include of actions_dellink.inc.php +$permissiontoadd = $user->rights->emailcollector->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$debuginfo=''; +$debuginfo = ''; /* @@ -100,8 +99,8 @@ if (empty($reshook)) { $error = 0; - $permissiontoadd=1; - $permissiontodelete=1; + $permissiontoadd = 1; + $permissiontodelete = 1; if (empty($backtopage)) $backtopage = DOL_URL_ROOT.'/admin/emailcollector_card.php?id='.($id > 0 ? $id : '__ID__'); $backurlforlist = DOL_URL_ROOT.'/admin/emailcollector_list.php'; @@ -253,31 +252,31 @@ jQuery(document).ready(function() { if ($action == 'create') { print load_fiche_titre($langs->trans("NewEmailCollector", $langs->transnoentitiesnoconv("EmailCollector"))); - print ''; - print ''; + print ''; + print ''; print ''; - print ''; + print ''; dol_fiche_head(array(), ''); - print '
'.$langs->trans("Description").' 
'."\n"; + print '
'."\n"; //unset($fields[]); // Common attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; // Other attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; print '
'."\n"; dol_fiche_end(); print '
'; - print ''; + print ''; print '  '; - print ''; // Cancel for create does not post form if we don't know the backtopage + print ''; // Cancel for create does not post form if we don't know the backtopage print '
'; print ''; @@ -288,28 +287,28 @@ if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("EmailCollector")); - print '
'; - print ''; + print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; dol_fiche_head(); - print '' . "\n"; + print '
'."\n"; // Common attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; // Other attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; print '
'; dol_fiche_end(); - print '
'; - print '   '; + print '
'; + print '   '; print '
'; print ''; @@ -331,14 +330,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation to delete if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteEmailCollector'), $langs->trans('ConfirmDeleteEmailCollector'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteEmailCollector'), $langs->trans('ConfirmDeleteEmailCollector'), 'confirm_delete', '', 0, 1); } // Clone confirmation if ($action == 'clone') { // Create an array for form $formquestion = array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneEmailCollector', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneEmailCollector', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Confirmation of action process @@ -346,21 +345,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formquestion = array( 'text' => $langs->trans("EmailCollectorConfirmCollect"), ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('EmailCollectorConfirmCollectTitle'), $text, 'confirm_collect', $formquestion, 0, 1, 220); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('EmailCollectorConfirmCollectTitle'), $text, 'confirm_collect', $formquestion, 0, 1, 220); } // Call Hook formConfirm $parameters = array('lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; - elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint; + if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; + elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; // Print form confirm print $formconfirm; // Object card // ------------------------------------------------------------ - $linkback = '
' . $langs->trans("BackToList") . ''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* @@ -409,7 +408,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtml = $langs->trans("NbOfEmailsInInbox").' : '; $sourcedir = $object->source_directory; - $targetdir = ($object->target_directory ? $object->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag' + $targetdir = ($object->target_directory ? $object->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag' $connection = null; $connectstringserver = ''; @@ -429,7 +428,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtml .= 'IMAP functions not available on your PHP'; } - if (! $connection) + if (!$connection) { $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; } @@ -448,23 +447,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; print '
'; print '
'; - print ''."\n"; + print '
'."\n"; // Common attributes //$keyforbreak='fieldkeytoswithonsecondcolumn'; - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; // Other attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '
'; - print '
'; - print ''; + print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; // Filters print ''; @@ -474,7 +473,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Add filter print ''; print ''; print ''; // List filters - foreach($object->filters as $rulefilter) + foreach ($object->filters as $rulefilter) { - $rulefilterobj=new EmailCollectorFilter($db); + $rulefilterobj = new EmailCollectorFilter($db); $rulefilterobj->fetch($rulefilter['id']); print ''; @@ -553,16 +552,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Add operation print ''; print ''; @@ -572,11 +571,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // List operations $nboflines = count($object->actions); $table_element_line = 'emailcollector_emailcollectoraction'; - $fk_element='position'; - $i=0; - foreach($object->actions as $ruleaction) + $fk_element = 'position'; + $i = 0; + foreach ($object->actions as $ruleaction) { - $ruleactionobj=new EmailcollectorAction($db); + $ruleactionobj = new EmailcollectorAction($db); $ruleactionobj->fetch($ruleaction['id']); print ''; @@ -605,7 +604,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { print ''.img_up('default', 0, 'imgupforline').''; } - if ($i < count($object->actions)-1) { + if ($i < count($object->actions) - 1) { print ''.img_down('default', 0, 'imgdownforline').''; } print ''; @@ -621,15 +620,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print '
'; - $arrayoftypes=array( + $arrayoftypes = array( 'from'=>array('label'=>'MailFrom', 'data-placeholder'=>$langs->trans('SearchString')), 'to'=>array('label'=>'MailTo', 'data-placeholder'=>$langs->trans('SearchString')), 'cc'=>array('label'=>'Cc', 'data-placeholder'=>$langs->trans('SearchString')), @@ -510,10 +509,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea else { jQuery("#rulevalue").prop("disabled", false); } jQuery("#rulevalue").attr("placeholder", (jQuery("#filtertype option:selected").attr("data-placeholder"))); '; - $noparam=array(); - foreach($arrayoftypes as $key => $value) + $noparam = array(); + foreach ($arrayoftypes as $key => $value) { - if ($value['noparam']) $noparam[]=$key; + if ($value['noparam']) $noparam[] = $key; } print '})'; print ''."\n"; @@ -524,9 +523,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; - $arrayoftypes=array( + $arrayoftypes = array( 'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")), 'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")), 'recordevent'=>'RecordEvent'); - if ($conf->projet->enabled) $arrayoftypes['project']='CreateLeadAndThirdParty'; - if ($conf->ticket->enabled) $arrayoftypes['ticket']='CreateTicketAndThirdParty'; + if ($conf->projet->enabled) $arrayoftypes['project'] = 'CreateLeadAndThirdParty'; + if ($conf->ticket->enabled) $arrayoftypes['ticket'] = 'CreateTicketAndThirdParty'; print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth300'); print ''; print ''; - $htmltext=$langs->transnoentitiesnoconv("OperationParamDesc"); + $htmltext = $langs->transnoentitiesnoconv("OperationParamDesc"); //var_dump($htmltext); print $form->textwithpicto('', $htmltext); print '
'; - if (! empty($conf->use_javascript_ajax)) { + if (!empty($conf->use_javascript_ajax)) { $urltorefreshaftermove = DOL_URL_ROOT.'/admin/emailcollector_card.php?id='.$id; - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } print '
'; print '
'; - print '
'; // End
+ print '
'; // End
print '

'; @@ -638,26 +637,26 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Buttons for actions if ($action != 'presend' && $action != 'editline') { - print '
' . "\n"; + print '
'."\n"; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if (empty($reshook)) { - print ''; + print ''; // Clone - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; } - print '
' . "\n"; + print '
'."\n"; } - if (! empty($debuginfo)) + if (!empty($debuginfo)) { print info_admin($debuginfo); } diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 09ba5f7224f..9cb83e3784b 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -78,9 +78,9 @@ if (! $sortorder) $sortorder="ASC"; // Security check $socid=0; -if ($user->societe_id > 0) // Protection if external user +if ($user->socid > 0) // Protection if external user { - //$socid = $user->societe_id; + //$socid = $user->socid; accessforbidden(); } //$result = restrictedArea($user, 'emailcollector', $id, ''); @@ -156,8 +156,8 @@ if (empty($reshook)) // Mass actions $objectclass='EmailCollector'; $objectlabel='EmailCollector'; - $permtoread = $user->rights->emailcollector->read; - $permtodelete = $user->rights->emailcollector->delete; + $permissiontoread = $user->rights->emailcollector->read; + $permissiontodelete = $user->rights->emailcollector->delete; $uploaddir = $conf->emailcollector->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -497,26 +497,8 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['pos'])) -{ - print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
'; +print '
'; print ''; print ''; print ''; @@ -332,7 +332,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -366,7 +366,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); @@ -416,7 +415,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 8dde3449b6e..3139de4849d 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -211,7 +211,7 @@ dol_fiche_head($head, 'expensereport', $langs->trans("ExpenseReports"), -1, 'tri print load_fiche_titre($langs->trans("ExpenseReportNumberingModules"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -247,7 +247,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -335,7 +334,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'.$module->nom."\n"; print $module->info(); print '
'; +print '
'; print ''; print ''; print ''; @@ -367,10 +366,8 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { - $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); @@ -469,7 +466,7 @@ print ''; print ''; print load_fiche_titre($langs->trans("OtherOptions"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index 4d10403c692..66897261207 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -110,7 +110,7 @@ if ($action == 'edit') echo ''; -echo '
'.$langs->trans("Parameter").'
'; +echo '
'; foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) { diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index a785d5f2927..610bd875c4f 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -161,7 +161,7 @@ if ($action != 'edit') echo ''; echo ''; - echo '
'; + echo '
'; echo ''; echo ''; @@ -204,7 +204,7 @@ if ($action == 'edit') echo ''; } -echo '
'.$langs->trans('ExpenseReportApplyTo').'
'; +echo '
'; echo ''; echo ''; diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index b12dcf4c530..4812b056e6a 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -72,7 +72,7 @@ $h++; dol_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "exports"); -print '
'.$langs->trans('ExpenseReportApplyTo').'
'; +print '
'; print ''; print ''."\n"; print ''; diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index d16f3e493f5..c73567a5745 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -79,7 +79,7 @@ if ($action == 'add' || GETPOST("modify")) if ($_POST["modify"]) { // Supprime boite box_external_rss de definition des boites -/* $sql = "UPDATE ".MAIN_DB_PREFIX."boxes_def"; + /* $sql = "UPDATE ".MAIN_DB_PREFIX."boxes_def"; $sql.= " SET name = '".$boxlabel."'"; $sql.= " WHERE file ='box_external_rss.php' AND note like '".$_POST["norss"]." %'"; @@ -89,7 +89,7 @@ if ($action == 'add' || GETPOST("modify")) dol_print_error($db,"sql=$sql"); exit; } -*/ + */ } else { @@ -200,7 +200,7 @@ print '
'; print ''; print ''; -print '
'.$langs->trans("Parameters").' 
'; +print '
'; print ''; print ''; print ''; @@ -254,7 +254,7 @@ if ($resql) print "
"; print ""; - print '
'.$langs->trans("NewRSS").''.$langs->trans("Example").'
'; + print '
'; print ''; print ""; @@ -300,7 +300,6 @@ if ($resql) // Logo if ($result > 0 && empty($rss->error)) { - print ''; print ""; print ''; + } + + if ($mysoc->useLocalTax(2)) + { + $locales.=($locales?' & ':'').$langs->transcountry("LT2", $mysoc->country_code); + + $text.= ''; + } +} + +$title = $langs->trans("PDFRulesForSalesTax"); +if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) +{ + $title.=' - '.$langs->trans("PDFLocaltax", $locales); +} + +print load_fiche_titre($title, '', ''); + +print '
".$langs->trans("Logo")."'; diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 759038930ef..6f1f621b90a 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -279,7 +279,7 @@ dol_fiche_head($head, 'general', $langs->trans("Invoices"), -1, 'invoice'); print load_fiche_titre($langs->trans("BillsNumberingModule"), '', ''); -print ''; +print '
'; print ''; print ''; print ''; @@ -468,7 +468,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -607,7 +607,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf print ''; print ''; print ''; - print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; + print '
'; print ''; print ''; print ''; @@ -648,7 +648,7 @@ print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice print ''; print ''; -print '
'.$langs->trans("Type").''.$langs->trans("Name").'
'; +print '
'; print ''; print '
'; @@ -720,7 +720,6 @@ if ($resql) $i = 0; while ($i < $num) { - $row = $db->fetch_row($resql); print '
'; +print ''; + + +print '
'; + + +// Localtaxes +$locales =''; +$text=''; +if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2)) +{ + if ($mysoc->useLocalTax(1)) + { + $locales = $langs->transcountry("LT1", $mysoc->country_code); + $text ='
' . $langs->trans("HideLocalTaxOnPDF", $langs->transcountry("LT1", $mysoc->country_code)) . ''; + $text.= $form->selectyesno('MAIN_PDF_MAIN_HIDE_SECOND_TAX', (!empty($conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX)) ? $conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX : 0, 1); + $text .= '
' . $langs->trans("HideLocalTaxOnPDF", $langs->transcountry("LT2", $mysoc->country_code)) . ''; + $text.= $form->selectyesno('MAIN_PDF_MAIN_HIDE_THIRD_TAX', (!empty($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX)) ? $conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX : 0, 1); + $text.= '
'; +print ''; + +// Hide any information on Sale tax / VAT + +print ''; + +// Locataxes +print $text; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideAnyVATInformationOnPDF").''; +print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT', (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0, 1); +print '
'; +print '
'; + + +// Other +print load_fiche_titre($langs->trans("Other"), '', ''); + +print '
'; +print ''; +print ''; + +//Desc + +print ''; + +//Ref + +print ''; + +//Details + +print ''; + +//Invert sender and recipient + +print ''; + +// Place customer adress to the ISO location + +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideDescOnPDF").''; +print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC', (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0, 1); +print '
'.$langs->trans("HideRefOnPDF").''; +print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF', (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0, 1); +print '
'.$langs->trans("HideDetailsOnPDF").''; +print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS', (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0, 1); +print '
'.$langs->trans("SwapSenderAndRecipientOnPDF").''; +print $form->selectyesno('MAIN_INVERT_SENDER_RECIPIENT', (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT))?$conf->global->MAIN_INVERT_SENDER_RECIPIENT:0, 1); +print '
'.$langs->trans("PlaceCustomerAddressToIsoLocation").''; +print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION', (! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0, 1); +print '
'.$langs->trans("ShowDetailsInPDFPageFoot").''; +print $form->selectarray('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS); +print '
'; +print '
'; + + +/* + * Library + */ + +print '
'; +print load_fiche_titre($langs->trans("Library"), '', ''); + +print '
'; +print ''."\n"; + +print ''."\n"; +print ''."\n"; +print ''."\n"; +print "\n"; + +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; + +print "
'.$langs->trans("Name").''.$langs->trans("Value").'
'.$langs->trans("LibraryToBuildPDF").''; +$i=0; +$pdf=pdf_getInstance('A4'); +if (class_exists('FPDF') && ! class_exists('TCPDF')) +{ + if ($i) print ' + '; + print 'FPDF'; + print ' ('.@constant('FPDF_PATH').')'; + $i++; +} +if (class_exists('TCPDF')) +{ + if ($i) print ' + '; + print 'TCPDF'; + print ' ('.@constant('TCPDF_PATH').')'; + $i++; +} +if (class_exists('FPDI')) +{ + if ($i) print ' + '; + print 'FPDI'; + print ' ('.@constant('FPDI_PATH').')'; + $i++; +} +if (class_exists('TCPDI')) +{ + if ($i) print ' + '; + print 'TCPDI'; + print ' ('.@constant('TCPDI_PATH').')'; + $i++; +} +print '
\n"; +print '
'; + + +print '
'; +print ''; +print '
'; + +print ''; + + // End of page llxFooter(); $db->close(); diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 8e1de4d83b6..23fa06887a9 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -124,7 +124,7 @@ dol_fiche_head($head, 'default', $langs->trans("Security"), -1); print info_admin(showModulesExludedForExternal($modules)).'
'."\n"; print '
'; -print ''; +print '
'; // Show permissions lines $sql = "SELECT r.id, r.libelle, r.module, r.perms, r.subperms, r.bydefault"; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 7dd00938dc9..1d9b181b295 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -210,7 +210,7 @@ print '
'; print ''; print ''; -print '
'; +print '
'; print ''; print ''; @@ -489,7 +489,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''; print ''; - print '
'.$langs->trans("Parameter").'
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 4c8f4188e4b..dc58a2c4809 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -258,7 +258,7 @@ dol_fiche_head($head, 'general', $langs->trans("Proposals"), -1, 'propal'); */ print load_fiche_titre($langs->trans("ProposalsNumberingModules"), '', ''); -print '
'.$langs->trans("User").''.$langs->trans("Value").'
'; +print '
'; print ''; print '\n"; print '\n"; @@ -294,7 +294,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -468,7 +467,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = $langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') @@ -524,7 +523,7 @@ if (empty($conf->facture->enabled)) print ''; print ''; - print '
'.$langs->trans("Name")."'.$langs->trans("Description")."
'.$module->nom."\n"; print $module->info(); print '
'; + print '
'; print ''; print ''; + print ''; + print ''; + print '
'; } else { print '
'; } print ''; print '

'; - print '
'; @@ -596,7 +595,6 @@ if (empty($conf->facture->enabled)) $i = 0; while ($i < $num) { - $row = $db->fetch_row($resql); print ''; + print '
'."\n"; + print '
'."\n"; print ''; print ''; print ''; @@ -414,18 +457,6 @@ if ($mode == 'template' && $user->admin) { dol_fiche_end(); } -// to remove after test -// $object=new stdClass(); -// $object->date_time = '2015-11-02 22:30:25'; -// $object->id = 1234; -// $object->customer_firstname = 'John'; -// $object->customer_lastname = 'Deuf'; -// $object->vendor_firstname = 'Jim'; -// $object->vendor_lastname = 'Big'; -// $object->barcode = '3700123862396'; -//$printer->sendToPrinter($object, 1, 16); -//setEventMessages($printer->error, $printer->errors, 'errors'); - // End of page llxFooter(); $db->close(); diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 0297333a917..eacf0deaf68 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -208,7 +208,7 @@ dol_fiche_head($head, 'reception', $langs->trans("Receptions"), -1, 'sending'); print load_fiche_titre($langs->trans("ReceptionsNumberingModules")); -print '
'.$langs->trans("Tag").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -337,7 +337,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -371,7 +371,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); @@ -421,7 +420,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 44e4d1ae9de..4304007d830 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -76,7 +76,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index d2d5ecde622..9be75bf125b 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -174,15 +174,15 @@ if ($action == 'maj_pattern') $explodePattern = explode(';', $pattern); $patternInError = false; - if($explodePattern[0] < 1 || $explodePattern[4] < 0){ + if ($explodePattern[0] < 1 || $explodePattern[4] < 0) { $patternInError = true; } - if($explodePattern[0] < $explodePattern[1] + $explodePattern[2] + $explodePattern[3]){ + if ($explodePattern[0] < $explodePattern[1] + $explodePattern[2] + $explodePattern[3]) { $patternInError = true; } - if(!$patternInError){ + if (!$patternInError) { dolibarr_set_const($db, "USER_PASSWORD_PATTERN", $pattern, 'chaine', 0, '', $conf->entity); header("Location: security.php"); exit; @@ -241,7 +241,7 @@ if (is_resource($handle)) } asort($arrayhandler); -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; @@ -289,11 +289,9 @@ print ''; //if($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 1) // Patter for Password Perso if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){ - - $tabConf = explode(";", $conf->global->USER_PASSWORD_PATTERN); print '
'; - print '
'.$langs->trans("RuleForGeneratedPasswords").''.$langs->trans("Example").'
'; + print '
'; print ''; print ''; print ''; @@ -404,7 +402,7 @@ print ""; print ''; print ""; -print '
'.$langs->trans("PasswordPatternDesc").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 0bd2dcdb1be..181ecad5c6b 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -107,7 +107,7 @@ dol_fiche_head($head, 'file', $langs->trans("Security"), -1); $var=false; print '
'; -print '
'.$langs->trans("Parameters").''.$langs->trans("Activated").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 28c3db6f1d3..87cd8519449 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -88,7 +88,7 @@ llxHeader('', $langs->trans("Miscellaneous"), $wikihelp); print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup'); -print $langs->trans("MiscellaneousDesc")."
\n"; +print ''.$langs->trans("MiscellaneousDesc")."
\n"; print "
\n"; @@ -103,7 +103,7 @@ dol_fiche_head($head, 'misc', $langs->trans("Security"), -1); // Other Options -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index e08c2c5eca8..5536424e939 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -147,7 +147,7 @@ llxHeader('', $langs->trans("Setup"), $wikihelp); print load_fiche_titre($langs->trans("SmsSetup"), '', 'title_setup'); -print $langs->trans("SmsDesc")."
\n"; +print ''.$langs->trans("SmsDesc")."
\n"; print "
\n"; // List of sending methods @@ -166,7 +166,7 @@ if ($action == 'edit') clearstatcache(); - print '
'.$langs->trans("Parameters").''.$langs->trans("Status").'
'; + print '
'; print ''; // Disable @@ -207,10 +207,9 @@ if ($action == 'edit') } else { - if (! count($listofmethods)) print '
'.$langs->trans("NoSmsEngine", 'DoliStore').'
'; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; print ''; // Disable @@ -263,11 +262,11 @@ else if (count($listofmethods) && ! empty($conf->global->MAIN_SMS_SENDMODE)) { - print ''.$langs->trans("DoTestSend").''; + print ''.$langs->trans("DoTestSend").''; } else { - print ''.$langs->trans("DoTestSend").''; + print ''.$langs->trans("DoTestSend").''; } print ''; diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 42daea12861..b36106b3e80 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -100,7 +100,7 @@ print '
'; //} // Title rule for stock decrease -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''; print "\n"; print ''."\n"; @@ -113,12 +113,12 @@ print ''; print ''; print ''; print ''; print '
".$langs->trans("RuleForStockManagementDecrease")."'.$langs->trans("Status").''.$langs->trans("DeStockOnBill").''; if (! empty($conf->facture->enabled)) { -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_BILL'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_BILL); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_BILL'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_BILL); + } } else { @@ -133,12 +133,12 @@ print ''.$langs->trans("DeStockOnValidateOrder").''; if (! empty($conf->commande->enabled)) { -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_VALIDATE_ORDER'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_VALIDATE_ORDER'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER); + } } else { @@ -155,12 +155,12 @@ print ''.$langs->trans("DeStockOnShipment").''; if (! empty($conf->expedition->enabled)) { -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT); + } } else { @@ -175,12 +175,12 @@ print ''.$langs->trans("DeStockOnShipmentOnClosing").''; if (! empty($conf->expedition->enabled)) { -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT_CLOSE'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT_CLOSE'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE); + } } else { @@ -202,7 +202,7 @@ print '
'; print '
'; // Title rule for stock increase -print ''; +print '
'; print ''; print "\n"; print ''."\n"; @@ -215,12 +215,12 @@ print ''; print ''; print ''; print ''; - print '\n\n"; $found++; -print ''; + print ''; print ''; - print '\n\n"; $found++; } @@ -284,15 +284,15 @@ else { print ''; print ''; - print '
".$langs->trans("RuleForStockManagementIncrease")."'.$langs->trans("Status").''.$langs->trans("ReStockOnBill").''; if (! empty($conf->fournisseur->enabled)) { -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_BILL'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_BILL'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL); + } } else { @@ -236,12 +236,12 @@ print ''.$langs->trans("ReStockOnValidateOrder").''; if (! empty($conf->fournisseur->enabled)) { -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER); + } } else { @@ -254,29 +254,29 @@ if (!empty($conf->reception->enabled)) { print '
'.$langs->trans("StockOnReception").''; + print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION); + } print "
'.$langs->trans("StockOnReceptionOnClosing").''; + print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION_CLOSE'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION_CLOSE'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE); + } print "
'.$langs->trans("ReStockOnDispatchOrder").''; + print ''; if (! empty($conf->fournisseur->enabled)) { -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER); -} + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER); + } } else { @@ -314,7 +314,7 @@ print '
'; print '
'; -print ''; +print '
'; print ''; print "\n"; print ''."\n"; @@ -338,28 +338,28 @@ if($conf->invoice->enabled) { print ''; print ''; - print '\n"; - print "\n"; + print '\n"; + print "\n"; } if($conf->order->enabled) { print ''; print ''; - print '\n"; print "\n"; } @@ -368,13 +368,13 @@ if($conf->expedition->enabled) { print ''; print ''; - print '\n"; print "\n"; } @@ -383,27 +383,30 @@ print '
".$langs->trans("RuleForStockAvailability")."'.$langs->trans("Status").'
'.$langs->trans("StockMustBeEnoughForInvoice").''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_INVOICE'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_INVOICE", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE); -} - print "
'; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_INVOICE'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_INVOICE", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE); + } + print "
'.$langs->trans("StockMustBeEnoughForOrder").''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_ORDER'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_ORDER", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER); -} + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_ORDER'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_ORDER", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER); + } print "
'.$langs->trans("StockMustBeEnoughForShipment").''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT); -} + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT); + } print "
'; print '
'; $virtualdiffersfromphysical=0; -if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) - || ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) - ) $virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs. +if ( + ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) + || ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) +) { + $virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs. +} if ($virtualdiffersfromphysical) { -print ''; -print ''; + print '
'; + print ''; print "\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; print ''; print ''; - print '\n"; print "\n"; print '
".$langs->trans("RuleForStockReplenishment")." ".img_help('help', $langs->trans("VirtualDiffersFromPhysical"))."'.$langs->trans("Status").''.$langs->trans("Status").'
'.$langs->trans("UseVirtualStockByDefault").''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_USE_VIRTUAL_STOCK'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_USE_VIRTUAL_STOCK", $arrval, $conf->global->STOCK_USE_VIRTUAL_STOCK); -} + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_USE_VIRTUAL_STOCK'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_USE_VIRTUAL_STOCK", $arrval, $conf->global->STOCK_USE_VIRTUAL_STOCK); + } print "
'; @@ -411,7 +414,7 @@ if ($conf->use_javascript_ajax) { } -print ''; +print '
'; print ''; print "\n"; @@ -461,7 +464,7 @@ print '
".$langs->trans("Other")."
'; print '
'; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - print ''; + print '
'; print ''; print ''."\n"; print ''."\n"; @@ -504,7 +507,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print $form->selectarray("INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT", $arrval, $conf->global->INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT); } print ''; - print '
'.$langs->trans("Inventory").''.$langs->trans("Status").'
'; } @@ -512,8 +514,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) If not used by a module, I still need to understand in which case user may need this now we can set rule on product page. if ($conf->global->PRODUIT_SOUSPRODUITS) { - - print '
'.$langs->trans("IndependantSubProductStock").''; diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 27a126c7ef6..f3f274e93dc 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -217,7 +217,7 @@ dol_fiche_head($head, 'invoice', $langs->trans("Suppliers"), -1, 'company'); print load_fiche_titre($langs->trans("SuppliersInvoiceNumberingModel"), '', ''); -print ''; +print '
'; print ''; print ''; print ''; @@ -237,7 +237,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 24) == 'mod_facture_fournisseur_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -347,7 +346,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'."\n"; +print '
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -365,7 +364,6 @@ foreach ($dirmodels as $reldir) if (is_dir($dir)) { - $handle=opendir($dir); @@ -467,7 +465,7 @@ print ''; print ''; print load_fiche_titre($langs->trans("OtherOptions"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -507,7 +505,7 @@ print ''; */ print load_fiche_titre($langs->trans("Notifications"), '', ''); -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index ac7d5e98539..d5a5d15eec3 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -247,7 +247,7 @@ dol_fiche_head($head, 'order', $langs->trans("Suppliers"), -1, 'company'); print load_fiche_titre($langs->trans("OrdersNumberingModules"), '', ''); -print '
'.$langs->trans("Parameter").'
'; +print '
'; print ''; print ''; print ''; @@ -267,7 +267,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 25) == 'mod_commande_fournisseur_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -375,7 +374,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'."\n"; +print '
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -414,8 +413,8 @@ foreach ($dirmodels as $reldir) print "\n"; // Active @@ -488,7 +487,7 @@ print ''; print ''; print load_fiche_titre($langs->trans("OtherOptions"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'\n"; require_once $dir.$file; $module = new $classname($db, $specimenthirdparty); - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) print $module->info($langs); + else print $module->description; print "
'; +print '
'; print ''; print ''; print ''; @@ -591,7 +590,7 @@ print ''; */ print load_fiche_titre($langs->trans("Notifications"), '', ''); -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 65bb18fcc5f..a66c849d9c7 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -194,7 +194,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Parameter").'
'; +print '
'; print ''; print ''; print ''; @@ -213,7 +213,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) @@ -319,7 +318,7 @@ print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; print '
'; print load_fiche_titre($langs->trans("PaymentsPDFModules"), '', ''); -print ''."\n"; +print '
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -337,7 +336,6 @@ foreach ($dirmodels as $reldir) if (is_dir($dir)) { - $handle=opendir($dir); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 55fb4329d39..60cc5634c1b 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -227,7 +227,7 @@ dol_fiche_head($head, 'general', $langs->trans("CommRequests"), -1, 'supplier_pr */ print load_fiche_titre($langs->trans("SupplierProposalNumberingModules"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print '\n"; print '\n"; @@ -246,7 +246,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -263,7 +262,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -435,7 +433,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') @@ -537,7 +535,6 @@ print ''; if ($conf->banque->enabled) { - print ''; } diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 92823045a62..96dd3d456b7 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -50,7 +50,6 @@ foreach ($dirsyslogs as $reldir) { $handle = opendir($newdir); if (is_resource($handle)) { - while (($file = readdir($handle)) !== false) { if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); @@ -199,7 +198,7 @@ print load_fiche_titre($langs->trans("SyslogOutput")); print ''; print ''; print ''; -print '
'.$langs->trans("Name")."'.$langs->trans("Description")."
'.$module->nom."\n"; print $module->info(); print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '; if (! empty($conf->use_javascript_ajax)) @@ -559,7 +556,6 @@ if ($conf->banque->enabled) } else { - print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '.$langs->trans('NotAvailable').'
'; +print '
'; print ''; print ''; print ''; @@ -272,7 +271,7 @@ print load_fiche_titre($langs->trans("SyslogLevel")); print ''; print ''; print ''; -print '
'.$langs->trans("Type").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php index ef5ec419c8f..5035c6c4a7d 100644 --- a/htdocs/admin/system/browser.php +++ b/htdocs/admin/system/browser.php @@ -47,7 +47,7 @@ $tmp=getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); // Browser print '
'; -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index 4e203a770f7..194c871958d 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -140,7 +140,7 @@ $configfilelib=array( 'Strict mode is on/off' ); -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("UserAgent").''.$_SERVER['HTTP_USER_AGENT'].'
'.$langs->trans("BrowserName").''.$tmp['browsername'].'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 195b5c83143..01fc5ff5fc1 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -189,8 +189,8 @@ else if ($base == 4) { // Sqlite by PDO or by Sqlite3 - print '
'; - print '
'.$langs->trans("Label").''.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; + print '
'; print ''; print ''; print ''; @@ -202,7 +202,6 @@ else if ($resql) { while ($row = $db->fetch_row($resql)) { - $rescount = $db->query("SELECT COUNT(*) FROM " . $row[0]); if ($rescount) { $row_count = $db->fetch_row($rescount); diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 6ed657ba8cd..dfd05a7694e 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -43,7 +43,7 @@ print load_fiche_titre($langs->trans("InfoDatabase"), '', 'title_setup'); // Database print '
'; -print '
'.$langs->trans("TableName").''.$langs->trans("NbOfRecord").'
'; +print '
'; print ''."\n"; print ''."\n"; print ''."\n"; @@ -60,7 +60,7 @@ print ''; // Tables print '
'; print '
'; -print '
'.$langs->trans("Database").'
'.$langs->trans("Version").''.$db::LABEL.' '.$db->getVersion().'
'.$langs->trans("DatabaseServer").''.$conf->db->host.'
'; +print '
'; print ''."\n"; print ''."\n"; print '
'.$langs->trans("Tables").'
'.$langs->trans("List").'
'; @@ -80,7 +80,7 @@ else { print '
'; print '
'; - print ''; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 5c55c668b1a..e822371bc4f 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -68,7 +68,7 @@ print load_fiche_titre($title, '', 'title_setup'); // Version print '
'; -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; +print '
'; print ''."\n"; print '
'.$langs->trans("Version").''.$langs->trans("Value").'
'.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").')'.DOL_VERSION; // If current version differs from last upgrade @@ -135,7 +135,7 @@ print '
'; // Session print '
'; -print ''; +print '
'; print ''."\n"; print ''."\n"; print ''."\n"; @@ -175,7 +175,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S $shmoparray=dol_listshmop(); print '
'; - print '
'.$langs->trans("Session").''.$langs->trans("Value").'
'.$langs->trans("SessionSavePath").''.session_save_path().'
'.$langs->trans("SessionName").''.session_name().'
'; + print '
'; print ''; print ''; print ''; @@ -198,7 +198,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S // Localisation print '
'; -print '
'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").''.$langs->trans("NbOfEntries").'
'; +print '
'; print ''."\n"; print ''."\n"; print ''."\n"; @@ -337,7 +337,7 @@ $configfileparameters=array( ); print '
'; -print '
'.$langs->trans("LocalisationDolibarrParameters").''.$langs->trans("Value").'
'.$langs->trans("LanguageBrowserParameter", "HTTP_ACCEPT_LANGUAGE").''.$_SERVER["HTTP_ACCEPT_LANGUAGE"].'
'.$langs->trans("CurrentUserLanguage").''.$langs->getDefaultLang().'
'; +print '
'; print ''; print '
'.$langs->trans("Parameters").' '; print $langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')'; diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 94864123220..b0da228e7a8 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -46,11 +46,11 @@ llxHeader(); print load_fiche_titre($langs->trans("FileCheckDolibarr"), '', 'title_setup'); -print $langs->trans("FileCheckDesc").'

'; +print ''.$langs->trans("FileCheckDesc").'

'; // Version print '
'; -print ''; +print '
'; print ''."\n"; print ''."\n"; print ''."\n"; @@ -239,6 +239,7 @@ if (! $error && $xml) $out.=''; $out.=''; $out.=''; + $out.=''; $out.=''; $out.=''."\n"; $tmpfilelist = dol_sort_array($file_list['missing'], 'filename'); @@ -251,6 +252,9 @@ if (! $error && $xml) $out.=''; $out.='' . "\n"; $out.='' . "\n"; + $out.='' . "\n"; $out.='' . "\n"; $out.="\n"; } @@ -275,7 +279,8 @@ if (! $error && $xml) $out.=''; $out.=''; $out.=''; - $out.=''; + $out.=''; + $out.=''; $out.=''; $out.=''."\n"; $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); @@ -290,6 +295,9 @@ if (! $error && $xml) $out.='' . "\n"; $out.='' . "\n"; $out.='' . "\n"; + $out.='' . "\n"; $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $totalsize += $size; $out.='' . "\n"; @@ -301,6 +309,7 @@ if (! $error && $xml) $out.='' . "\n"; $out.='' . "\n"; $out.='' . "\n"; + $out.='' . "\n"; $out.='' . "\n"; $out.='' . "\n"; $out.="\n"; diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php index d08eb564f17..cdb9e7dfcea 100644 --- a/htdocs/admin/system/index.php +++ b/htdocs/admin/system/index.php @@ -47,7 +47,7 @@ llxHeader(); print load_fiche_titre($langs->trans("SummarySystem"), '', 'title_setup'); -print '
'.$langs->trans("Version").''.$langs->trans("Value").'
'.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.'
'.$langs->trans("VersionLastUpgrade").''.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
#' . $langs->trans("Filename") . '' . $langs->trans("ExpectedSize") . '' . $langs->trans("ExpectedChecksum") . '
'.$i.''.$file['filename'].''; + if (! empty($file['expectedsize'])) $out.=dol_print_size($file['expectedsize']); + $out.=''.$file['expectedmd5'].'
' . $langs->trans("Filename") . '' . $langs->trans("ExpectedChecksum") . '' . $langs->trans("CurrentChecksum") . '' . $langs->trans("Size") . '' . $langs->trans("ExpectedSize") . '' . $langs->trans("CurrentSize") . '' . $langs->trans("DateModification") . '
'.$file['filename'].''.$file['expectedmd5'].''.$file['md5'].''; + if ($file['expectedsize']) $out.=dol_print_size($file['expectedsize']); + $out.=''.dol_print_size($size).''.$langs->trans("Total").''.dol_print_size($totalsize).'
'; +print '
'; print "\n"; $dolversion=version_dolibarr(); print "\n"; @@ -55,7 +55,7 @@ print '
Dolibarr
".$langs->trans("Version")."".$dolversion."
'; print "
\n"; -print ''; +print '
'; print "\n"; $osversion=version_os(); print "\n"; @@ -64,7 +64,7 @@ print '
".$langs->trans("OS")."
".$langs->trans("Version")."".$osversion."
'; print "
\n"; // Serveur web -print ''; +print '
'; print "\n"; $apacheversion=version_webserver(); print "\n"; @@ -73,7 +73,7 @@ print '
".$langs->trans("WebServer")."
".$langs->trans("Version")."".$apacheversion."
'; print "
\n"; // Php -print ''; +print '
'; print "\n"; $phpversion=version_php(); print "\n"; @@ -83,7 +83,7 @@ print '
".$langs->trans("PHP")."
".$langs->trans("Version")."".$phpversion."
'; print "
\n"; // Database -print ''; +print '
'; print "\n"; $dblabel=$db::LABEL; $dbversion=$db->getVersion(); @@ -94,15 +94,15 @@ if ($db->type == 'pgsql') { // Check option standard_conforming_strings is on $paramarray=$db->getServerParametersValues('standard_conforming_strings'); -// if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1) -// { -// $langs->load("errors"); -// } + // if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1) + // { + // $langs->load("errors"); + // } } print '
'; // Browser -print '
".$langs->trans("Database")."
'; +print '
'; print "\n"; print "\n"; print "\n"; diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 9b6d33e5faa..7a53b95fcf2 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -40,7 +40,7 @@ llxHeader(); print load_fiche_titre($langs->trans("AvailableModules"), '', 'title_setup'); -print $langs->trans("ToActivateModule").'
'; +print ''.$langs->trans("ToActivateModule").'
'; print "
\n"; $modules = array(); @@ -103,7 +103,7 @@ foreach($modulesdir as $dir) } print '
'; -print '
".$langs->trans("Browser")."
".$langs->trans("UserAgent")."" .$_SERVER["HTTP_USER_AGENT"]."
".$langs->trans("Smartphone")."".(($conf->browser->layout != 'phone')?$langs->trans("No"):$langs->trans("Yes"))."
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/admin/system/os.php b/htdocs/admin/system/os.php index 33587f3c1c6..7399a218e9c 100644 --- a/htdocs/admin/system/os.php +++ b/htdocs/admin/system/os.php @@ -37,7 +37,7 @@ llxHeader(); print load_fiche_titre($langs->trans("InfoOS"), '', 'title_setup'); -print '
'.$langs->trans("Modules").''.$langs->trans("Version").'
'; +print '
'; print ''; print "\n"; diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index afed312cdbd..bcc3aba20d4 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -67,7 +67,7 @@ if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2) } -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print ''; print "\n"; diff --git a/htdocs/admin/system/web.php b/htdocs/admin/system/web.php index b5e8e2c3866..114a251c8f3 100644 --- a/htdocs/admin/system/web.php +++ b/htdocs/admin/system/web.php @@ -45,7 +45,7 @@ llxHeader('', $langs->trans("InfoWebServer")); print load_fiche_titre($langs->trans("InfoWebServer"), '', 'title_setup'); print '
'; -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print '
'; print '\n"; print '\n"; print '\n"; diff --git a/htdocs/admin/system/xcache.php b/htdocs/admin/system/xcache.php index 3e0e087c424..5061305f2e2 100644 --- a/htdocs/admin/system/xcache.php +++ b/htdocs/admin/system/xcache.php @@ -39,10 +39,9 @@ print load_fiche_titre("XCache", '', 'title_setup'); print "
\n"; -//function_exists('apc_cache_info') || function_exists('eaccelerator_info') || function_exists('xcache_info')) if (!function_exists('xcache_info')) { - print 'XCache seems to be not installed. Function xcache_info not found.'; + print 'XCache seems to be not installed. Function xcache_info not found.'; llxFooter(); exit; } diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 99c67b038ae..8bab3b94ff5 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -137,7 +137,7 @@ else print ''; print ''; - print '
'.$langs->trans("Parameter")."".$langs->trans("Value")."
'.$langs->trans("Version")."".$_SERVER["SERVER_SOFTWARE"]."
'.$langs->trans("VirtualServerName")."" . $_SERVER["SERVER_NAME"] . "
'; + print '
'; print ''; print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; @@ -169,7 +169,7 @@ else print '
'; - print ''; + print '
'; // Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT print ''; @@ -195,7 +195,7 @@ else //print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')'; - print '
'; + print '
'; print ''; // Products diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index d97252dc53b..fa6a558e444 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -197,7 +197,7 @@ dol_fiche_end(); print load_fiche_titre($langs->trans("TicketNumberingModules")); -print '
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
'; +print '
'; print ''; print ''; print ''; @@ -214,7 +214,6 @@ foreach ($dirmodels as $reldir) { if (is_dir($dir)) { $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle)) !== false) { if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) { $file = $reg[1]; @@ -297,7 +296,7 @@ if (!$conf->use_javascript_ajax) { } print load_fiche_titre($langs->trans("TicketParams")); -print '
' . $langs->trans("Name") . '' . $langs->trans("Description") . '
'; +print '
'; print ''; print ''; @@ -401,7 +400,7 @@ if (!$conf->use_javascript_ajax) { // Admin var of module print load_fiche_titre($langs->trans("Notification")); -print '
' . $langs->trans("Parameter") . '
'; +print '
'; print ''; print ''; diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index c5cadac11c1..d6ab0d3830e 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -200,7 +200,7 @@ if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) print ''; } - print '
'; + print '
'; print ''; print ''; @@ -288,7 +288,7 @@ if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) // Admin var of module print load_fiche_titre($langs->trans("TicketParamMail")); - print '
' . $langs->trans("Parameters") . ''; print '
'; + print '
'; print ''; print ''; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 109b2a748fb..f1759ec6c06 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -111,13 +111,15 @@ jQuery(document).ready(function() { } }); - -}); -\n"; print load_fiche_titre($langs->trans("Backup"), '', 'title_setup'); //print_barre_liste($langs->trans("Backup"), '', '', '', '', '', $langs->trans("BackupDesc",DOL_DATA_ROOT), 0, 0, 'title_setup'); @@ -127,24 +129,17 @@ print $langs->trans("BackupDesc", DOL_DATA_ROOT); print ''; print '
'; -?> +print "\n"; +print ''; +print ''; +print ''; +print '
1'; - - - -
1 - -trans("BackupDesc3", $dolibarr_main_db_name).'
'; //print $langs->trans("BackupDescY").'
'; print '
'; -?> -
- -'; print load_fiche_titre($title?$title:$langs->trans("BackupDumpWizard")); @@ -155,275 +150,296 @@ print $langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.'
'; print ''; print ''; print '
'; print '
'; -?> - - - - -
+print ''; +print ''; +print ' - '; +print ''; +print ''; +print '
'; -
-
trans("ExportMethod"); ?> - -
- -
-
-
- -
- -
- -
- -
-
+print '
'; +print '
'.$langs->trans("ExportMethod").''; +if (in_array($type, array('mysql', 'mysqli'))) { + print '
'; + print ''; + print '
'; + print '
'; + print '
'; + print ''; + print '
'; +} elseif (in_array($type, array('pgsql'))) { + print '
'; + print ''; + print '
'; +} else { + print 'No method available with database '.$label; +} +print '
'; +print '
'; -
+print ''; -
- -
trans("MySqlExportParameters"); ?> +print '
'; +if (in_array($type, array('mysql', 'mysqli'))) { + print "\n"; + print '
'.$langs->trans("MySqlExportParameters").''; -
trans("FullPathToMysqldumpCommand"); - if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP)) - { - $fullpathofmysqldump=$db->getPathOfDump(); - } - else - { - $fullpathofmysqldump=$conf->global->SYSTEMTOOLS_MYSQLDUMP; - } - ?>
-
+ print '
'.$langs->trans("FullPathToMysqldumpCommand"); + if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP)) + { + $fullpathofmysqldump=$db->getPathOfDump(); + } + else + { + $fullpathofmysqldump=$conf->global->SYSTEMTOOLS_MYSQLDUMP; + } + print '
'; + print '
'; -
-
trans("ExportOptions"); ?> -
+ print '
'; + print '
'.$langs->trans("ExportOptions").''; + print '
'; + print ''; + print ''; -
+ print '
'; - global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?> -
-
- + if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { + print '
'; + print ''; + print ''; + print '
'; + } - + print ''; -
- -
+ print ''; + print '
'; + print ''; + print '
'; -
-
id="checkbox_dump_drop" />
-
+ print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print '
'; -
-

+ print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
-
+ print '
'; + print ''; + print "\n"; + print '
'; + print ''.$langs->trans("MySqlExportParameters").''; + print '
'; + print ''.$langs->trans("ExportOptions").''; + print '
'; + print ''; + print ''; - -
trans("MySqlExportParameters"); ?> -
- trans("ExportOptions"); ?> -
+ print '
'; + if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { + print '
'; + print ''; + print ''; + print '
'; + } + print '
'; -
- global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?> -
-
- -
+ print '
'; + print '
'.$langs->trans('ExportStructure').''; + print ''; + print ''; + print '
'; + print '
'; -
-
trans('ExportStructure') ?> id="checkbox_dump_drop" />
-
+ print '
'; + print '
'; + print ''.$langs->trans("Datas").''; -
-
- trans("Datas"); ?> + print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print ''; + print ''; + print '
'; -
+ print '
'; + print '
'; +} -
- +if (in_array($type, array('pgsql'))) { + print "\n"; + print '
'.$langs->trans("PostgreSqlExportParameters").''; - '.$langs->trans("FullPathToPostgreSQLdumpCommand"); + if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP)) { + $fullpathofpgdump=$db->getPathOfDump(); + } + else + { + $fullpathofpgdump=$conf->global->SYSTEMTOOLS_POSTGRESQLDUMP; + } + print '
'; + print '
'; - if (in_array($type, array('pgsql'))) - { - ?> -
trans("PostgreSqlExportParameters"); ?> + print '
'; + print '
'; + print ''.$langs->trans("ExportOptions").''; + print ''; + print ''; + print '
'; + print ''; + print '
'; + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print '
'; + print '
'; +} +print ''; -
trans("FullPathToPostgreSQLdumpCommand"); - if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP)) - { - $fullpathofpgdump=$db->getPathOfDump(); - } - else - { - $fullpathofpgdump=$conf->global->SYSTEMTOOLS_POSTGRESQLDUMP; - } - ?>
-
+print '
'; -
-
trans("ExportOptions"); ?> - -
- -
- -
-
- -
-

- -
- - - - -
- - - -
-
- -->'; +print '
'; +print ''; +print '
'; $prefix='dump'; $ext='.sql'; -if (in_array($type, array('mysql', 'mysqli'))) { $prefix='mysqldump'; $ext='sql'; } -//if ($label == 'PostgreSQL') { $prefix='pg_dump'; $ext='dump'; } -if (in_array($type, array('pgsql'))) { $prefix='pg_dump'; $ext='sql'; } +if (in_array($type, array('mysql', 'mysqli'))) { + $prefix='mysqldump'; + $ext='sql'; +} +//if ($label == 'PostgreSQL') { +// $prefix='pg_dump'; +// $ext='dump'; +//} +if (in_array($type, array('pgsql'))) { + $prefix='pg_dump'; + $ext='sql'; +} $file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.'.$ext; -echo $file; -?>" />
-
- -'; +print '
'; +print '
'; // Define compressions array $compression=array(); -if (in_array($type, array('mysql', 'mysqli'))) -{ - $compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("None")); - $compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip")); - // $compression['zip']= array('function' => 'dol_compress', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); // Not open source format. Must implement dol_compress function - $compression['bz'] = array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2")); +if (in_array($type, array('mysql', 'mysqli'))) { + $compression['none'] = array( + 'function' => '', + 'id' => 'radio_compression_none', + 'label' => $langs->trans("None") + ); + $compression['gz'] = array( + 'function' => 'gzopen', + 'id' => 'radio_compression_gzip', + 'label' => $langs->trans("Gzip") + ); + // Not open source format. Must implement dol_compress function + // $compression['zip']= array( + // 'function' => 'dol_compress', + // 'id' => 'radio_compression_zip', + // 'label' => $langs->trans("FormatZip") + // ); + $compression['bz'] = array( + 'function' => 'bzopen', + 'id' => 'radio_compression_bzip', + 'label' => $langs->trans("Bzip2") + ); } else { - $compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("Default")); - $compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip")); + $compression['none'] = array( + 'function' => '', + 'id' => 'radio_compression_none', + 'label' => $langs->trans("Default") + ); + $compression['gz'] = array( + 'function' => 'gzopen', + 'id' => 'radio_compression_gzip', + 'label' => $langs->trans("Gzip") + ); } // Show compression choices @@ -434,13 +450,14 @@ print $langs->trans("Compression").':   '; foreach($compression as $key => $val) { - if (! $val['function'] || function_exists($val['function'])) // Enabled export format - { + if (! $val['function'] || function_exists($val['function'])) { + // Enabled export format print ''; print ' '; } - else // Disabled export format + else { + // Disabled export format print ''; print ' '; print ' ('.$langs->trans("NotAvailable").')'; @@ -451,20 +468,18 @@ foreach($compression as $key => $val) print ''; print "\n"; -?> +print " \n"; +print '
'; +print '
'; +print ''; +print ''; +print '
'; +print '
'; -
-
- " id="buttonGo"> - -
-
- -'.$langs->trans("RunCommandSummary").':
'."\n"; + print '
'.$langs->trans("RunCommandSummary").':
'."\n"; print '
'."\n"; print '
'; @@ -491,71 +506,51 @@ if (! empty($_SESSION["commandbackuptorun"])) $_SESSION["commandbackuptorun"]=''; $_SESSION["commandbackupresult"]=''; } -?> -
+print "
\n"; -
'; - -?> - - +print " \n"; -
-
+print '
'; +print '
'; -admin->dir_output.'/backup', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1); $result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'backup/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles")); print '
'; -?> +print '
'; +print '
'; +print ''; +print ''; -
-
- - +print "
\n"; +print "\n"; -
- +print '
'; +print ''; +print ''; - - - +print '
2'; -
2 - -trans("BackupDesc2", DOL_DATA_ROOT).'
'; print $langs->trans("BackupDescX").'

'; -?> - -
- -'; print load_fiche_titre($title?$title:$langs->trans("BackupDumpWizard")); -?> -
-'.$langs->trans("FileNameToGenerate").'
'; $prefix='documents'; $ext='zip'; - $file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.'.$ext; -echo $file; -?>" />
-
+print '
'; +print '
'; -'; print "\n"; @@ -584,32 +579,26 @@ foreach($filecompression as $key => $val) print '
'; print "\n"; -?> -
-
" id="buttonGo" />
-
-
+print '
'; +print '
'; +print '
'; +print '
'; +print '
'; - +print ''; -
-
+print '
'; +print '
'; -admin->dir_output.'/documents', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1); $result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles")); print '
'; -?> +print '
'; +print '
'; -
-
- -
- - -'; +print ''; // End of page llxFooter(); diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index a5d52eb2929..c6c31fe7f45 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -99,21 +99,21 @@ print $langs->trans("RestoreDesc3", $dolibarr_main_db_name).'

'; + ?>
/>
- + ?>
/>
- trans("RestoreDesc3", $dolibarr_main_db_name).'

'; -
- trans('RestoreMySQL') ?> -
- '; + print ''.$langs->trans('RestoreMySQL').''; + print '
'; // Parameteres execution $command=$db->getPathOfRestore(); if (preg_match("/\s/", $command)) $command=$command=escapeshellarg($command); // Use quotes on command @@ -157,20 +155,18 @@ if (in_array($type, array('mysql', 'mysqli'))) print '
'; print ajax_autoselect('restorecommand'); - if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '
'.$langs->trans("UnHidePassword").''; - //else print '
'.$langs->trans("HidePassword").''; - ?> -
-
-'.$langs->trans("UnHidePassword").''; + } + //else print '
'.$langs->trans("HidePassword").''; + print ''; + print '
'; } elseif (in_array($type, array('pgsql'))) { -?> -
- Restore PostgreSQL -
- '; + print 'Restore PostgreSQL'; + print '
'; // Parameteres execution $command=$db->getPathOfRestore(); if (preg_match("/\s/", $command)) $command=$command=escapeshellarg($command); // Use quotes on command @@ -198,20 +194,16 @@ elseif (in_array($type, array('pgsql'))) print ajax_autoselect('restorecommand'); //if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '
'.$langs->trans("UnHidePassword").''; //else print '
'.$langs->trans("HidePassword").''; - ?> -
-
-'; + print ''; } -?> - +print ''; -
- +print '
'; +print ''; -close(); diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php deleted file mode 100644 index 660c1647783..00000000000 --- a/htdocs/admin/tools/eaccelerator.php +++ /dev/null @@ -1,338 +0,0 @@ - - * - * 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 . - */ - -/** - * \file htdocs/admin/tools/eaccelerator.php - * \brief Page administration de eaccelerator - */ - -require '../../main.inc.php'; - -$langs->load("admin"); - -if (!$user->admin) accessforbidden(); - - -/* - * View - */ - -llxHeader(); - - -if (!function_exists('eaccelerator_info')) { - print 'eAccelerator is not installed.'; - llxFooter(); - exit; -} - - -$info = eaccelerator_info(); -if (isset($_POST['caching'])) { - if ($info['cache']) { - eaccelerator_caching(false); - } else { - eaccelerator_caching(true); - } -} elseif (isset($_POST['optimizer']) && function_exists('eaccelerator_optimizer')) { - if ($info['optimizer']) { - eaccelerator_optimizer(false); - } else { - eaccelerator_optimizer(true); - } -} elseif (isset($_POST['clear'])) { - eaccelerator_clear(); -} elseif (isset($_POST['clean'])) { - eaccelerator_clean(); -} elseif (isset($_POST['purge'])) { - eaccelerator_purge(); -} -$info = eaccelerator_info(); -if (!is_array($info)) { - dol_print_error('', 'An error occured getting eAccelerator information, this is caused if eAccelerator isn\'t initalised properly'); - exit; -} - - -/** - * Compare revisions - * - * @param array $x Parts of version 1 - * @param array $y Parts of version 2 - * @return int -1 if 1<2, 0 if 1=2, 1 if 1>2 - */ -function compare($x, $y) -{ - global $sortby; - - if ( $x[$sortby] == $y[$sortby] ) { - return 0; - } elseif ($x[$sortby] < $y[$sortby]) { - return -1; - } else { - return 1; - } -} - -/** - * Compare revisions - * - * @param array $x Parts of version 1 - * @param array $y Parts of version 2 - * @return int 1 if 1<2, 0 if 1=2, -1 if 1>2 - */ -function revcompare($x, $y) -{ - global $sortby; - - if ($x[$sortby] == $y[$sortby]) { - return 0; - } elseif ($x[$sortby] < $y[$sortby]) { - return 1; - } else { - return -1; - } -} - -/** - * Output table - * - * @param array $list Array of records - * @return void - */ -function create_script_table($list) -{ - global $sortby,$langs; - - if (GETPOT('order', 'alpha') == "asc" || GETPOST('order', 'alpha') == "desc") { - $order = GETPOST('order', 'alpha'); - } else { - $order = "asc"; - } - - if (GETPOST('order', 'alpha')) { - switch (GETPOST('order', 'alpha')) { - case "mtime": - case "size": - case "reloads": - case "hits": - $sortby = GETPOST('sort'); - ($order == "asc" ? uasort($list, 'compare') : uasort($list, 'revcompare')); - break; - default: - $sortby = "file"; - ($order == "asc" ? uasort($list, 'compare') : uasort($list, 'revcompare')); - } - } - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - switch ($sortby) { - case "mtime": - case "size": - case "reloads": - case "hits": - ($order == "asc" ? uasort($list, 'compare') : uasort($list, 'revcompare')); - break; - case "file": - default: - $sortby = "file"; - ($order == "asc" ? uasort($list, 'compare') : uasort($list, 'revcompare')); - } - - foreach($list as $script) { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - print '
'.$langs->trans("Filename").' '; - if($sortby == "file") - print ($order == "asc" ? "↓" : "↑").''.$langs->trans("Date").' '; - if($sortby == "mtime") - print ($order == "asc" ? "↓" : "↑").''.$langs->trans("Size").' '; - if($sortby == "size") - print ($order == "asc" ? "↓" : "↑").''.$langs->trans("Reloads").' '; - if($sortby == "reloads") - print ($order == "asc" ? "↓" : "↑").''.$langs->trans("Hits").' '; - if($sortby == "hits") - print ($order == "asc" ? "↓" : "↑").'
'.dol_trunc($script['file'], 80, 'left').''.dol_print_date($script['mtime'], 'dayhour').''.number_format($script['size'] / 1024, 2).'KB'.$script['reloads'].' ('.$script['usecount'].')'.$script['hits'].'
'; -} - -/** - * Output table - * - * @param array $list Array of records - * @return void - */ -function create_key_table($list) -{ - global $langs; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - foreach($list as $key) { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - print '
NameCreated'.$langs->trans("Size").'ttl
'.dol_trunc($key['name'], 80, 'left').''.dol_print_date($key['created'], 'dayhour').''.number_format($key['size']/1024, 3).'KB'; - if ($key['ttl'] == -1) { - print 'expired'; - } elseif ($key['ttl'] == 0) { - print 'none'; - } else { - print dol_print_date($key['ttl'], 'dayhour'); - } - print '
'; -} - - -$form=new Form($db); -print load_fiche_titre('Dolibarr eAccelerator '.$info['version'].' control panel', '', 'title_setup'); - -print '
'; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; -print '
Information
Caching enabled'.($info['cache']?'yes':'no').'
Optimizer enabled'.$info['optimizer']?'yes':'no'.'
Memory usage'.number_format(100 * $info['memoryAllocated']/$info['memorySize'], 2).'%('.number_format($info['memoryAllocated'] / (1024*1024), 2).'MB / '.number_format($info['memorySize']/(1024*1024), 2).'MB)
Free memory in reserved cache'.number_format($info['memoryAvailable']/(1024*1024), 2).'MB
Cached scripts'.$info['cachedScripts'].'
Removed scripts'.$info['removedScripts'].'
Cached keys'.(isset($info['cachedKeys'])?$info['cachedKeys']:'').'
'; - -$resCached = @eaccelerator_cached_scripts(); // If success return an array -$resRemoved = @eaccelerator_removed_scripts(); - -if (is_array($resCached) || is_array($resRemoved)) { - print "
"; - print '
'; - print ''; - print ''; - print ''; - - if (is_array($resCached)) { - print ''; - print ""; - print ''; - print ""; - - print ''; - print ""; - print ''; - print ""; - } - - if (is_array($resRemoved)) { - print ''; - print ""; - print ''; - print ""; - - print ''; - print ""; - print ''; - print ""; - - print ''; - print ""; - print ''; - print "
Actions
Caching
Optimizer
Clear cache
Clean cache
Purge cache
"; - } - - if (is_array($resCached)) { - print "

"; - print "Cached scripts
"; - create_script_table($resCached); - } - - if (is_array($resRemoved)) { - print "

"; - print "Removed scripts
"; - create_script_table($resRemoved); - } -} else { - print "

"; - print "Check in your php.ini that eaccelerator.allowed_admin_path parameter is : "; - print "

"; - print "".$_SERVER["SCRIPT_FILENAME"].""; - print "

"; -} - -if (function_exists('eaccelerator_get')) { - print '

'; - print 'Cached keys
'; - $res=eaccelerator_list_keys(); - create_key_table($res); -} - -print "

"; - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 9bbe81993c4..f2625104fd8 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -35,10 +35,10 @@ $action=GETPOST('action', 'alpha'); $confirm=GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } // Load translation files required by the page @@ -238,7 +238,7 @@ if ($result) } print '
'; - print ''; + print '
'; // Fields title search print ''; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 7db64a8a3ed..d909dc8610b 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -35,10 +35,10 @@ $action=GETPOST('action', 'alpha'); $confirm=GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { - $action = ''; - $socid = $user->societe_id; + $action = ''; + $socid = $user->socid; } $sortfield = GETPOST("sortfield", 'alpha'); @@ -123,7 +123,7 @@ elseif ($action == 'lock') if ($savehandler == 'files') { - print '
'; + print '
'; print ''; print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "login", "", "", 'align="left"', $sortfield, $sortorder); print_liste_field_titre("SessionId", $_SERVER["PHP_SELF"], "id", "", "", 'align="left"', $sortfield, $sortorder); diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 3c99e3e10b8..91a03387f9c 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -86,7 +86,7 @@ print ''; print ''; print ''; -print '
'; +print '
'; print ''."\n"; // Detect if we need a fetch on each output line $needToFetchEachLine=0; -foreach ($extrafields->attribute_computed as $key => $val) -{ - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +if (is_array($extrafields->attributes[$object->table_element]['computed'])) { + foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) { + if (preg_match('/\$object/', $val)) { + // There is at least one compute field that use $object + $needToFetchEachLine++; + } + } } diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 0c03619d31c..dce1daaa3ca 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -46,8 +46,8 @@ $hookmanager->initHooks(array('assetnote')); // Note that conf->hooks_module $extrafields->fetch_name_optionals_label($object->table_element); // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'asset', $id); // Load object diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 6803f9d65e7..db8dfb60a2b 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -83,7 +83,6 @@ $hookmanager->initHooks(array('assettypecard','globalcard')); */ if ($cancel) { - $action=''; if (! empty($backtopage)) @@ -344,7 +343,7 @@ if ($action == 'create') dol_fiche_head(''); - print '
'; @@ -97,9 +97,9 @@ if (! empty($conf->syslog->enabled)) $filelogparam=$filelog; if ($user->admin && preg_match('/^dolibarr.*\.log$/', basename($filelog))) { - $filelogparam =''.$filelog.''; + $filelogparam =''.$filelog.''; } print '> '.$langs->trans("PurgeDeleteLogFile", $filelogparam); print '

'; diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index ad7a2278991..ffdecdecbd1 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -108,7 +108,6 @@ if ($action == 'update') } else { - $db->rollback(); if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -158,7 +157,6 @@ if ($action == 'add') } else { - $db->rollback(); if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -229,7 +227,7 @@ print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_ $current_language_code=$langs->defaultlang; $s=picto_from_langcode($current_language_code); -print $form->textwithpicto($langs->trans("CurrentUserLanguage").': '.$s.' '.$current_language_code.'', $langs->trans("TranslationDesc")).'
'; +print ''.$form->textwithpicto($langs->trans("CurrentUserLanguage").': '.$s.' '.$current_language_code.'', $langs->trans("TranslationDesc")).'
'; print '
'; @@ -277,7 +275,7 @@ if ($mode == 'overwrite') print ''; print '
'; - print ''; + print '
'; print ''; print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder); @@ -460,15 +458,15 @@ if ($mode == 'searchkey') //print 'param='.$param.' $_SERVER["PHP_SELF"]='.$_SERVER["PHP_SELF"].' num='.$num.' page='.$page.' nbtotalofrecords='.$nbtotalofrecords." sortfield=".$sortfield." sortorder=".$sortorder; $title = $langs->trans("TranslationKeySearch"); if ($nbtotalofrecords > 0) $title.=' ('.$nbtotalofrecords.' / '.$nbtotalofrecordswithoutfilters.' - '.$nbtotaloffiles.' '.$langs->trans("Files").')'; - print print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, '', '', $limit)."\n"; + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, '', '', $limit); print ''; print ''; print '
'; - print '
'; + print '
'; print ''; - print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).''; + print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder); print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder); //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,transkey', '', $param, '', $sortfield, $sortorder); diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index 819688ddcc1..bdc5ee5961d 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -49,7 +49,7 @@ $form = new Form($db); print load_fiche_titre($langs->trans("TriggersAvailable"), '', 'title_setup'); -print $langs->trans("TriggersDesc")."
"; +print ''.$langs->trans("TriggersDesc")."
"; print "
\n"; @@ -60,8 +60,8 @@ $param = ''; $align = ''; print '
'; print '
'; print ''; -print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n"; print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n"; +print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n"; print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n"; print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n"; print ''; @@ -69,7 +69,7 @@ print ''; foreach ($triggers as $trigger) { print ''; - print ''; + print ''; print ''; print ''; print '
'.$trigger['picto'].''.$trigger['picto'].''.$trigger['file'].''.$trigger['status'].''; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 2ead8e03210..cfc5a65cc54 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -145,7 +145,7 @@ $head=user_admin_prepare_head(); dol_fiche_head($head, 'card', $langs->trans("MenuUsersAndGroups"), -1, 'user'); -print ''; +print '
'; print ''; print ''; print ''; @@ -206,7 +206,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Description").' 
'; +print '
'; print ''; print ''; print ''; @@ -239,7 +239,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); @@ -289,9 +288,9 @@ foreach ($dirmodels as $reldir) } print ''; - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.= '
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') { $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index c0c4e3c57d8..fd7348bc603 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -153,7 +153,7 @@ else dol_print_error($db); } -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -186,7 +186,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); @@ -236,7 +235,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 1c7fe75f0de..c759b0a8d8c 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -421,7 +421,7 @@ $h++; dol_fiche_head($head, 'website', '', -1); -print $langs->trans("WebsiteSetupDesc").'
'; +print ''.$langs->trans("WebsiteSetupDesc").'
'; print "
\n"; @@ -447,7 +447,7 @@ if ($id) print ''; print ''; - print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; + print '
'; // Form to add a new line if ($tabname[$id]) @@ -532,7 +532,7 @@ if ($id) print ''; print ''; - print '
'; + print '
'; // Title of lines print ''; @@ -572,7 +572,6 @@ if ($id) // Lines with values while ($i < $num) { - $obj = $db->fetch_object($resql); //print_r($obj); print ''; diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index 610a83f302d..b72941cd6de 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -103,7 +103,7 @@ if ($action == 'edit') print ''; print ''; - print '
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) @@ -124,7 +124,7 @@ if ($action == 'edit') } else { - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 3c4232cbc0a..cb9e61e9da1 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -106,7 +106,7 @@ $workflowcodes = dol_sort_array($workflowcodes, 'position'); $nbqualified=0; $oldfamily=''; -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'."\n"; +print '
'."\n"; foreach($workflowcodes as $key => $params) { @@ -117,7 +117,7 @@ foreach($workflowcodes as $key => $params) if ($family == 'separator') { print '

'; - print ''."\n"; + print '
'."\n"; continue; } diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php index 0f541b93708..0fd34788adf 100644 --- a/htdocs/api/admin/explorer.php +++ b/htdocs/api/admin/explorer.php @@ -148,7 +148,7 @@ foreach ($modulesdir as $dir) }*/ //$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched); - /* } + /* } }*/ } diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index f8a354683e0..e85b6571c62 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -103,7 +103,7 @@ print ''; print ''; print ''; -print '
'; +print '
'; print ''; print ""; diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index c0e81bc77cb..f4c9076fbd9 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -102,6 +102,7 @@ class DolibarrApi unset($object->isextrafieldmanaged); unset($object->ismultientitymanaged); unset($object->restrictiononfksoc); + unset($object->table_rowid); // Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses unset($object->linkedObjects); @@ -127,13 +128,14 @@ class DolibarrApi unset($object->timespent_withhour); unset($object->timespent_fk_user); unset($object->timespent_note); + unset($object->fk_delivery_address); unset($object->statuts); unset($object->statuts_short); unset($object->statuts_logo); unset($object->statuts_long); - unset($object->labelstatut); - unset($object->labelstatut_short); + unset($object->labelStatus); + unset($object->labelStatusShort); unset($object->element); unset($object->fk_element); @@ -146,6 +148,11 @@ class DolibarrApi unset($object->skip_update_total); unset($object->context); + unset($object->next_prev_filter); + + if ($object->table_element != 'ticket') { + unset($object->comments); + } // Remove the $oldcopy property because it is not supported by the JSON // encoder. The following error is generated when trying to serialize @@ -178,6 +185,7 @@ class DolibarrApi unset($object->lines[$i]->cond_reglement); unset($object->lines[$i]->fk_delivery_address); unset($object->lines[$i]->fk_projet); + unset($object->lines[$i]->fk_project); unset($object->lines[$i]->thirdparty); unset($object->lines[$i]->user); unset($object->lines[$i]->model_pdf); @@ -262,9 +270,9 @@ class DolibarrApi if ($tmp[$i]==')') $counter--; if ($counter < 0) { - $error="Bad sqlfilters=".$sqlfilters; - dol_syslog($error, LOG_WARNING); - return false; + $error="Bad sqlfilters=".$sqlfilters; + dol_syslog($error, LOG_WARNING); + return false; } $i++; } @@ -290,6 +298,7 @@ class DolibarrApi if (count($tmp) < 3) return ''; $tmpescaped=$tmp[2]; + $regbis = array(); if (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) { $tmpescaped = "'".$db->escape($regbis[1])."'"; diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index edeb32e8353..53139b0df8c 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -148,11 +148,13 @@ class DolibarrApiAccess implements iAuthenticate $fuser->getrights(); static::$user = $fuser; - if($fuser->societe_id) + if ($fuser->socid) { static::$role = 'external'; + } - if($fuser->admin) + if ($fuser->admin) { static::$role = 'admin'; + } } else { diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index dd0a08039ef..b32eea1f57f 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -45,6 +45,68 @@ class Setup extends DolibarrApi $this->db = $db; } + /** + * Get the list of ordering methods. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number {@min 0} + * @param int $active Payment type is active or not {@min 0} {@max 1} + * @param string $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'CHQ')" + * + * @url GET dictionary/ordering_methods + * + * @return array [List of ordering methods] + * + * @throws 400 RestException + * @throws 200 OK + */ + public function getOrderingMethods($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid, code, libelle as label, module"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_input_method as t"; + $sql.= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (! DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql.= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(400, $this->db->lasterror()); + } + + return $list; + } + /** * Get the list of payments types. * @@ -197,13 +259,64 @@ class Setup extends DolibarrApi * @throws RestException */ public function getCountryByID($id, $lang = '') + { + return $this->_fetchCcountry($id, '', '', $lang); + } + + /** + * Get country by Code. + * + * @param string $code Code of country + * @param string $lang Code of the language the name of the + * country must be translated to + * @return array Array of cleaned object properties + * + * @url GET dictionary/countries/byCode/{code} + * + * @throws RestException + */ + public function getCountryByCode($code, $lang = '') + { + return $this->_fetchCcountry('', $code, '', $lang); + } + + /** + * Get country by Iso. + * + * @param string $iso ISO of country + * @param string $lang Code of the language the name of the + * country must be translated to + * @return array Array of cleaned object properties + * + * @url GET dictionary/countries/byISO/{iso} + * + * @throws RestException + */ + public function getCountryByISO($iso, $lang = '') + { + return $this->_fetchCcountry('', '', $iso, $lang); + } + + /** + * Get country. + * + * @param int $id ID of country + * @param string $code Code of country + * @param string $iso ISO of country + * @param string $lang Code of the language the name of the + * country must be translated to + * @return array Array of cleaned object properties + * + * @throws RestException + */ + private function _fetchCcountry($id, $code = '', $iso = '', $lang = '') { $country = new Ccountry($this->db); - if ($country->fetch($id) < 0) { + $result = $country->fetch($id, $code, $iso); + if ($result < 0) { throw new RestException(503, 'Error when retrieving country : '.$country->error); - } - elseif ($country->fetch($id) == 0) { + } elseif ($result == 0) { throw new RestException(404, 'country not found'); } @@ -320,6 +433,66 @@ class Setup extends DolibarrApi } } + /** + * Get the list of shipment methods. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * + * @return array List of shipment methods + * + * @url GET dictionary/shipment_methods + * + * @throws RestException + */ + public function getListOfShipmentMethods($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + $sql = "SELECT t.rowid, t.code, t.libelle, t.description, t.tracking"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as t"; + $sql.= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (! DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql.= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of shipment methods : '.$this->db->lasterror()); + } + + return $list; + } + /** * Get the list of events types. * @@ -329,7 +502,7 @@ class Setup extends DolibarrApi * @param int $page Page number (starting from zero) * @param string $type To filter on type of event * @param string $module To filter on module events - * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param int $active Event's type is active or not {@min 0} {@max 1} * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" * @return array List of events types * @@ -384,6 +557,70 @@ class Setup extends DolibarrApi return $list; } + /** + * Get the list of contacts types. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $type To filter on type of contact + * @param string $module To filter on module contacts + * @param int $active Contact's type is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of Contacts types + * + * @url GET dictionary/contact_types + * + * @throws RestException + */ + public function getListOfContactTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $type = '', $module = '', $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid, code, element as type, libelle as label, source, module, position"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact as t"; + $sql.= " WHERE t.active = ".$active; + if ($type) $sql.=" AND type LIKE '%" . $this->db->escape($type) . "%'"; + if ($module) $sql.=" AND t.module LIKE '%" . $this->db->escape($module) . "%'"; + // Add sql filters + if ($sqlfilters) + { + if (! DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql.= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of contacts types : '.$this->db->lasterror()); + } + + return $list; + } + /** * Get the list of civilities. * @@ -392,9 +629,9 @@ class Setup extends DolibarrApi * @param int $limit Number of items per page * @param int $page Page number (starting from zero) * @param string $module To filter on module events - * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param int $active Civility is active or not {@min 0} {@max 1} * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of civility types + * @return array List of civility types * * @url GET dictionary/civilities * @@ -469,13 +706,15 @@ class Setup extends DolibarrApi if (!empty($multicurrency)) $sql.= " , cr.date_sync, cr.rate "; $sql.= " FROM ".MAIN_DB_PREFIX."c_currencies as t"; if (!empty($multicurrency)) { - $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency as m ON m.code=t.code_iso"; - $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency_rate as cr ON (m.rowid = cr.fk_multicurrency)"; + $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency as m ON m.code=t.code_iso"; + $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency_rate as cr ON (m.rowid = cr.fk_multicurrency)"; } $sql.= " WHERE t.active = ".$active; if (!empty($multicurrency)) { - $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; - if (!empty($multicurrency) && $multicurrency != 2) $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; + if (!empty($multicurrency) && $multicurrency != 2) { + $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + } } // Add sql filters @@ -786,7 +1025,7 @@ class Setup extends DolibarrApi * @param string $sortorder Sort order * @param int $limit Number of items per page * @param int $page Page number (starting from zero) - * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param int $active Measuring unit is active or not {@min 0} {@max 1} * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" * @return array List of measuring unit * @@ -839,6 +1078,67 @@ class Setup extends DolibarrApi return $list; } + /** + * Get the list of social networks. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Social network is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of social networks + * + * @url GET dictionary/socialnetworks + * + * @throws RestException + */ + public function getListOfsocialNetworks($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + //TODO link with multicurrency module + $sql = "SELECT t.rowid, t.entity, t.code, t.label, t.url, t.icon, t.active"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_socialnetworks as t"; + $sql.= " WHERE t.entity IN (".getEntity('c_socialnetworks').")"; + $sql.= " AND t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (! DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql.= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of social networks: '.$this->db->lasterror()); + } + + return $list; + } + /** * Get the list of tickets categories. * @@ -860,7 +1160,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid, code, pos, label, use_default, description"; $sql.= " FROM ".MAIN_DB_PREFIX."c_ticket_category as t"; - $sql.= " WHERE t.active = ".$active; + $sql.= " WHERE t.active = ".$active; // Add sql filters if ($sqlfilters) { diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 2a734b9336d..7a9ef9ad24d 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -55,6 +55,12 @@ require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +$url = $_SERVER['PHP_SELF']; +// Fix for some NGINX setups (this should not be required even with NGINX, however setup of NGINX are often mysterious and this may help is such cases) +if (! empty($conf->global->MAIN_NGINX_FIX)) +{ + $url = (isset($_SERVER['SCRIPT_URI']) && $_SERVER["SCRIPT_URI"] !== null) ? $_SERVER["SCRIPT_URI"] : $_SERVER['PHP_SELF']; +} // Enable and test if module Api is enabled if (empty($conf->global->MAIN_MODULE_API)) @@ -67,7 +73,7 @@ if (empty($conf->global->MAIN_MODULE_API)) } // Test if explorer is not disabled -if (preg_match('/api\/index\.php\/explorer/', $_SERVER["PHP_SELF"]) && ! empty($conf->global->API_EXPLORER_DISABLED)) +if (preg_match('/api\/index\.php\/explorer/', $url) && ! empty($conf->global->API_EXPLORER_DISABLED)) { $langs->load("admin"); dol_syslog("Call Dolibarr API interfaces with module REST disabled"); @@ -91,7 +97,7 @@ if (preg_match('/api\/index\.php\/explorer/', $_SERVER["PHP_SELF"]) && ! empty($ $reg=array(); -preg_match('/index\.php\/([^\/]+)(.*)$/', $_SERVER["PHP_SELF"], $reg); +preg_match('/index\.php\/([^\/]+)(.*)$/', $url, $reg); // .../index.php/categories?sortfield=t.rowid&sortorder=ASC diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 77d16820a43..f43093d0936 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -69,7 +69,7 @@ if ($action == 'edit') print ''; print ''; - print '
".$langs->trans("Parameter")."
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) @@ -90,7 +90,7 @@ if ($action == 'edit') } else { - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 7c2f1b42f32..1f6966fcd15 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -39,38 +39,37 @@ $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); // Initialize technical objects -$object=new Asset($db); +$object = new Asset($db); $extrafields = new ExtraFields($db); -$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array +$diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all=trim(GETPOST("search_all", 'alpha')); -$search=array(); -foreach($object->fields as $key => $val) +$search_all = trim(GETPOST("search_all", 'alpha')); +$search = array(); +foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha'); + if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); } -if (empty($action) && empty($id) && empty($ref)) $action='view'; +if (empty($action) && empty($id) && empty($ref)) $action = 'view'; // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'asset', $id); // Load object -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. -$permissionnote=$user->rights->asset->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink=$user->rights->asset->write; // Used by the include of actions_dellink.inc.php -$permissionedit=$user->rights->asset->write; // Used by the include of actions_lineupdown.inc.php -$permissiontoadd=$user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php +$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php +$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php /* @@ -79,13 +78,13 @@ $permissiontoadd=$user->rights->asset->write; // Used by the include of actions_ * Put here all code to do according to value of "action" parameter */ -$parameters=array(); -$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +$parameters = array(); +$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)) { - $error=0; + $error = 0; $permissiontoadd = $user->rights->asset->create; $permissiontodelete = $user->rights->asset->delete; @@ -98,9 +97,9 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name='ASSET_SENTBYMAIL'; - $autocopy='MAIN_MAIL_AUTOCOPY_ASSET_TO'; - $trackid='asset'.$object->id; + $trigger_name = 'ASSET_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO'; + $trackid = 'asset'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; } @@ -113,11 +112,11 @@ if (empty($reshook)) * Put here all code to build page */ -$form=new Form($db); -$formfile=new FormFile($db); +$form = new Form($db); +$formfile = new FormFile($db); -$title=$langs->trans("Assets").' - '.$langs->trans("Card"); -$help_url=''; +$title = $langs->trans("Assets").' - '.$langs->trans("Card"); +$help_url = ''; llxHeader('', $title, $help_url); // Example : Adding jquery code @@ -151,10 +150,10 @@ if ($action == 'create') print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'."\n"; // Common attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; // Other attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; print '
'."\n"; @@ -163,7 +162,7 @@ if ($action == 'create') print '
'; print ''; print '  '; - print ''; // Cancel for create does not post form if we don't know the backtopage + print ''; // Cancel for create does not post form if we don't know the backtopage print '
'; print ''; @@ -185,10 +184,10 @@ if (($id || $ref) && $action == 'edit') print ''."\n"; // Common attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; // Other attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; print '
'; @@ -214,21 +213,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation to delete if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAssets'), $langs->trans('ConfirmDeleteAssets'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteAssets'), $langs->trans('ConfirmDeleteAssets'), 'confirm_delete', '', 0, 1); } // Confirmation of action xxxx if ($action == 'xxx') { - $formquestion=array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); } // Call Hook formConfirm $parameters = array('lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; - elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint; + if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; + elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; // Print form confirm print $formconfirm; @@ -236,9 +235,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Object card // ------------------------------------------------------------ - $linkback = '' . $langs->trans("BackToList") . ''; + $linkback = ''.$langs->trans("BackToList").''; - $morehtmlref='
'; + $morehtmlref = '
'; /* // Ref bis $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->asset->creer, 'string', '', 0, 1); @@ -246,7 +245,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); */ - $morehtmlref.='
'; + $morehtmlref .= '
'; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -257,10 +256,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Common attributes //$keyforbreak='fieldkeytoswithonsecondcolumn'; - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; // Other attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '
'; print '
'; @@ -275,14 +274,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Buttons for actions if ($action != 'presend' && $action != 'editline') { print '
'."\n"; - $parameters=array(); - $reshook=$hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if (empty($reshook)) { // Send - print '' . $langs->trans('SendMail') . ''."\n"; + print ''.$langs->trans('SendMail').''."\n"; if ($user->rights->asset->write) { @@ -336,11 +335,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $MAXEVENT = 10; $morehtmlright = ''; - $morehtmlright.= $langs->trans("SeeAll"); - $morehtmlright.= ''; + $morehtmlright .= $langs->trans("SeeAll"); + $morehtmlright .= ''; // List of actions on element - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'asset', $socid, 1, '', $MAXEVENT, '', $morehtmlright); diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 04c195c08ff..0e34cd9b989 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -128,7 +128,13 @@ class Asset extends CommonObject public $note_public; public $note_private; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $tms; /** diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index d1fa8c1e04b..976b8974f5a 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -40,8 +40,8 @@ $id=(GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'asset', $id); // Get parameters diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php index f3758ebca8e..f3c385831a1 100644 --- a/htdocs/asset/info.php +++ b/htdocs/asset/info.php @@ -34,7 +34,7 @@ $ref=GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'asset', $id, ''); $object = new Asset($db); diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index bd2d19bbc87..c43bd73eae8 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -72,9 +72,9 @@ if (! $sortorder) $sortorder="ASC"; // Protection if external user $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) { - //$socid = $user->societe_id; + //$socid = $user->socid; accessforbidden(); } //$result = restrictedArea($user, 'asset', $id,''); @@ -152,8 +152,8 @@ if (empty($reshook)) // Mass actions $objectclass='Asset'; $objectlabel='Asset'; - $permtoread = $user->rights->asset->read; - $permtodelete = $user->rights->asset->delete; + $permissiontoread = $user->rights->asset->read; + $permissiontodelete = $user->rights->asset->delete; $uploaddir = $conf->asset->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -407,9 +407,13 @@ print '
'; + print '
'; print ''; print ''; @@ -450,7 +449,7 @@ if ($rowid > 0) print '
'; print '
'; - print '
'.$langs->trans("Label").'
'; + print '
'; print ''; print ''; foreach($object->fields as $key => $val) { $cssforfield=(empty($val['css'])?'':$val['css']); - if ($key == 'status') $cssforfield='center'; + if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; - elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; if (! empty($arrayfields['t.'.$key]['checked'])) { print ''; } @@ -411,7 +516,7 @@ foreach($object->fields as $key => $val) if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; - elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; if (! empty($arrayfields['t.'.$key]['checked'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n"; @@ -424,7 +529,7 @@ $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sort $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print ''."\n"; @@ -460,11 +565,13 @@ while ($i < min($num, $limit)) foreach($object->fields as $key => $val) { $cssforfield=(empty($val['css'])?'':$val['css']); - if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; - elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; - elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; - elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; - elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right'; + if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + + if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield.=($cssforfield?' ':'').'right'; if (! empty($arrayfields['t.'.$key]['checked'])) { @@ -488,7 +595,7 @@ while ($i < min($num, $limit)) $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) @@ -545,6 +634,7 @@ print ''."\n"; print ''."\n"; + if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty=1; diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index 481d8f1d799..e733b96d12b 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -47,8 +47,8 @@ $hookmanager->initHooks(array('bomnote','globalcard')); // Note that conf->h $extrafields->fetch_name_optionals_label($object->table_element); // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'bom', $id); // Load object diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index f6b25d0cca7..6b629fd2852 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -100,7 +100,7 @@ class Boms extends DolibarrApi $obj_ret = array(); $tmpobject = new BOM($db); - + $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; $restrictonsocid = 0; // Set to 1 if there is a field socid in table of object @@ -260,7 +260,7 @@ class Boms extends DolibarrApi throw new RestException(500, 'Error when deleting BOM : '.$this->bom->error); } - return array( + return array( 'success' => array( 'code' => 200, 'message' => 'BOM deleted' @@ -281,12 +281,53 @@ class Boms extends DolibarrApi // phpcs:enable $object = parent::_cleanObjectDatas($object); - /*unset($object->note); - unset($object->address); + unset($object->rowid); + unset($object->canvas); + + unset($object->name); + unset($object->lastname); + unset($object->firstname); + unset($object->civility_id); + unset($object->statut); + unset($object->state); + unset($object->state_id); + unset($object->state_code); + unset($object->region); + unset($object->region_code); + unset($object->country); + unset($object->country_id); + unset($object->country_code); unset($object->barcode_type); unset($object->barcode_type_code); unset($object->barcode_type_label); - unset($object->barcode_type_coder);*/ + unset($object->barcode_type_coder); + unset($object->total_ht); + unset($object->total_tva); + unset($object->total_localtax1); + unset($object->total_localtax2); + unset($object->total_ttc); + unset($object->fk_account); + unset($object->comments); + unset($object->note); + unset($object->mode_reglement_id); + unset($object->cond_reglement_id); + unset($object->cond_reglement); + unset($object->shipping_method_id); + unset($object->fk_incoterms); + unset($object->label_incoterms); + unset($object->location_incoterms); + + // If object has lines, remove $db property + if (isset($object->lines) && is_array($object->lines) && count($object->lines) > 0) { + $nboflines = count($object->lines); + for ($i=0; $i < $nboflines; $i++) + { + $this->_cleanObjectDatas($object->lines[$i]); + + unset($object->lines[$i]->lines); + unset($object->lines[$i]->note); + } + } return $object; } diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 3835baf3b25..a95b6612d99 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -91,18 +91,20 @@ class BOM extends CommonObject 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'noteditable'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1',), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,), - 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'), + 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1:(finished IS NULL or finished <> 0)', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'), 'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1', 'css'=>'maxwidth75imp'), 'efficiency' => array('type'=>'real', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>-1, 'default'=>1, 'position'=>100, 'notnull'=>0, 'css'=>'maxwidth50imp', 'help'=>'ValueOfMeansLoss'), - 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>-1, 'position'=>161, 'notnull'=>-1,), - 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>-1, 'position'=>162, 'notnull'=>-1,), + 'duration' => array('type'=>'real', 'label'=>'EstimatedDuration', 'enabled'=>1, 'visible'=>-1, 'position'=>101, 'notnull'=>-1, 'css'=>'maxwidth50imp', 'help'=>'EstimatedDurationDesc'), + 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>-2, 'position'=>161, 'notnull'=>-1,), + 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>-2, 'position'=>162, 'notnull'=>-1,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>300, 'notnull'=>1,), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,), 'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,), - 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'llx_user.rowid',), - 'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,), - 'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0,), - 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900, 'notnull'=>-1,), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid',), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,), + 'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0,), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,), + 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>1010), 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Enabled', 9=>'Disabled')), ); public $rowid; @@ -111,7 +113,13 @@ class BOM extends CommonObject public $description; public $note_public; public $note_private; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $tms; public $fk_user_creat; public $fk_user_modif; @@ -202,7 +210,7 @@ class BOM extends CommonObject */ public function create(User $user, $notrigger = false) { - if ($this->efficiency < 0 || $this->efficiency > 1) $this->efficiency = 1; + if ($this->efficiency <= 0 || $this->efficiency > 1) $this->efficiency = 1; return $this->createCommon($user, $notrigger); } @@ -239,9 +247,10 @@ class BOM extends CommonObject unset($object->import_key); // Clear fields - $object->ref = "copy_of_".$object->ref; - $object->title = $langs->trans("CopyOf")." ".$object->title; - + $object->ref = empty($this->fields['ref']['default']) ? $langs->trans("copy_of_").$object->ref: $this->fields['ref']['default']; + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label: $this->fields['label']['default']; + $object->status = self::STATUS_DRAFT; + // ... // Clear extrafields that are unique if (is_array($object->array_options) && count($object->array_options) > 0) { @@ -412,7 +421,7 @@ class BOM extends CommonObject */ public function update(User $user, $notrigger = false) { - if ($this->efficiency < 0 || $this->efficiency > 1) $this->efficiency = 1; + if ($this->efficiency <= 0 || $this->efficiency > 1) $this->efficiency = 1; return $this->updateCommon($user, $notrigger); } @@ -512,7 +521,7 @@ class BOM extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <=0 if OK, 0=Nothing done, >0 if KO */ - public function valid($user, $notrigger = 0) + public function validate($user, $notrigger = 0) { global $conf, $langs; @@ -523,7 +532,7 @@ class BOM extends CommonObject // Protection if ($this->statut == self::STATUS_VALIDATED) { - dol_syslog(get_class($this)."::valid action abandonned: already validated", LOG_WARNING); + dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); return 0; } @@ -552,14 +561,14 @@ class BOM extends CommonObject $this->newref = $num; // Validate - $sql = "UPDATE ".MAIN_DB_PREFIX."bom_bom"; + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; $sql.= " SET ref = '".$this->db->escape($num)."',"; $sql.= " status = ".self::STATUS_VALIDATED.","; $sql.= " date_valid='".$this->db->idate($now)."',"; $sql.= " fk_user_valid = ".$user->id; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::valid()", LOG_DEBUG); + dol_syslog(get_class($this)."::validate()", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -596,7 +605,7 @@ class BOM extends CommonObject $dirdest = $conf->bom->dir_output.'/'.$newref; if (! $error && file_exists($dirsource)) { - dol_syslog(get_class($this)."::valid() rename dir ".$dirsource." into ".$dirdest); + dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); if (@rename($dirsource, $dirdest)) { @@ -639,64 +648,78 @@ class BOM extends CommonObject * Set draft status * * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - public function setDraft($user) + public function setDraft($user, $notrigger = 0) { - global $conf, $langs; + // Protection + if ($this->status <= self::STATUS_DRAFT) + { + return 0; + } - $error=0; + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ - // Protection - if ($this->status <= self::STATUS_DRAFT) - { - return 0; - } - - /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) - { - $this->error='Permission denied'; - return -1; - }*/ - - $this->db->begin(); - - $sql = "UPDATE ".MAIN_DB_PREFIX."bom"; - $sql.= " SET status = ".self::STATUS_DRAFT; - $sql.= " WHERE rowid = ".$this->id; - - dol_syslog(get_class($this)."::setDraft", LOG_DEBUG); - if ($this->db->query($sql)) - { - if (! $error) - { - $this->oldcopy= clone $this; - } - - if (!$error) { - // Call trigger - $result=$this->call_trigger('BOM_UNVALIDATE', $user); - if ($result < 0) $error++; - } - - if (!$error) { - $this->status=self::STATUS_DRAFT; - $this->db->commit(); - return 1; - } else { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -1; - } + return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'BOM_UNVALIDATE'); } + /** + * Set cancel status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function cancel($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_VALIDATED) + { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'BOM_CLOSE'); + } + + /** + * Set cancel status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function reopen($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_CANCELED) + { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'BOM_REOPEN'); + } + + /** * Return a link to the object card (with optionaly the picto) * @@ -793,43 +816,19 @@ class BOM extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelstatus)) + if (empty($this->labelStatus)) { global $langs; //$langs->load("mrp"); - $this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelstatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); } - if ($mode == 0) - { - return $this->labelstatus[$status]; - } - elseif ($mode == 1) - { - return $this->labelstatus[$status]; - } - elseif ($mode == 2) - { - return img_picto($this->labelstatus[$status], 'statut'.($status == self::STATUS_VALIDATED ? 4 : $status), '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - } - elseif ($mode == 3) - { - return img_picto($this->labelstatus[$status], 'statut'.($status == self::STATUS_VALIDATED ? 4 : $status), '', false, 0, 0, '', 'valignmiddle'); - } - elseif ($mode == 4) - { - return img_picto($this->labelstatus[$status], 'statut'.($status == self::STATUS_VALIDATED ? 4 : $status), '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - } - elseif ($mode == 5) - { - return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut'.($status == self::STATUS_VALIDATED ? 4 : $status), '', false, 0, 0, '', 'valignmiddle'); - } - elseif ($mode == 6) - { - return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut'.($status == self::STATUS_VALIDATED ? 4 : $status), '', false, 0, 0, '', 'valignmiddle'); - } + $statusType = 'status'.$status; + if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatus[$status], '', $statusType, $mode); } /** @@ -928,7 +927,6 @@ class BOM extends CommonObject $langs->load("mrp"); if (! dol_strlen($modele)) { - $modele = 'standard'; if ($this->modelpdf) { @@ -940,8 +938,7 @@ class BOM extends CommonObject $modelpath = "core/modules/bom/doc/"; - //return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - return 1; + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); } /** @@ -953,6 +950,7 @@ class BOM extends CommonObject public function initAsSpecimen() { $this->initAsSpecimenCommon(); + $this->ref = 'BOM-123'; $this->date = $this->date_creation; } @@ -1044,13 +1042,15 @@ class BOMLine extends CommonObject * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields=array( - 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), + 'rowid' => array('type'=>'integer', 'label'=>'LineID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), 'fk_bom' => array('type'=>'integer:BillOfMaterials:societe/class/bom.class.php', 'label'=>'BillOfMaterials', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1,), 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,), 'qty' => array('type'=>'double(24,8)', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'position'=>100, 'notnull'=>1, 'isameasure'=>'1',), - 'efficiency' => array('type'=>'double(8,4)', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>110, 'notnull'=>1, 'css'=>'maxwidth50imp', 'help'=>'ValueOfMeansLoss'), - 'position' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>1, 'visible'=>0, 'position'=>200, 'notnull'=>1,), + 'qty_frozen' => array('type'=>'smallint', 'label'=>'QuantityFrozen', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>105, 'css'=>'maxwidth50imp', 'help'=>'QuantityConsumedInvariable'), + 'disable_stock_change' => array('type'=>'smallint', 'label'=>'DisableStockChange', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>108, 'css'=>'maxwidth50imp', 'help'=>'DisableStockChangeHelp'), + 'efficiency' => array('type'=>'double(8,4)', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>110, 'notnull'=>1, 'css'=>'maxwidth50imp', 'help'=>'ValueOfMeansLoss'), + 'position' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>1, 'visible'=>0, 'default'=>0, 'position'=>200, 'notnull'=>1,), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,), ); public $rowid; @@ -1058,6 +1058,8 @@ class BOMLine extends CommonObject public $fk_product; public $description; public $qty; + public $qty_frozen; + public $disable_stock_change; public $efficiency; public $position; public $import_key; @@ -1324,47 +1326,7 @@ class BOMLine extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelstatus)) - { - global $langs; - //$langs->load("mrp"); - $this->labelstatus[1] = $langs->trans('Enabled'); - $this->labelstatus[0] = $langs->trans('Disabled'); - } - - if ($mode == 0) - { - return $this->labelstatus[$status]; - } - elseif ($mode == 1) - { - return $this->labelstatus[$status]; - } - elseif ($mode == 2) - { - if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - } - elseif ($mode == 3) - { - if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); - elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); - } - elseif ($mode == 4) - { - if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - } - elseif ($mode == 5) - { - if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); - elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); - } - elseif ($mode == 6) - { - if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); - elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); - } + return ''; } /** diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php index e78ef64b5c7..7da2c768b7f 100644 --- a/htdocs/bom/lib/bom.lib.php +++ b/htdocs/bom/lib/bom.lib.php @@ -90,7 +90,7 @@ function bomPrepareHead($object) if (!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/bom/bom_note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -102,7 +102,7 @@ function bomPrepareHead($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/bom/bom_document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index b574efc81df..9f6bfee98f2 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -47,98 +47,99 @@ $colspan = 3; // Columns: total ht + col edit + col delete // Lines for extrafield $objectline = new BOMLine($this->db); -?> - -\n"; + $nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines); if ($nolinesbefore) { -?> - - global->MAIN_VIEW_LINE_NUMBER)) { ?> - - - - - '; + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } + print ''; + print ''; if ($conf->global->PRODUCT_USE_UNITS) { - print ''; + print ''; } - ?> - - - -'.$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")).''; + print ''; + print ''; + print ''; + print ''; } -?> - -global->MAIN_VIEW_LINE_NUMBER)) { - $coldisplay++; - echo ''; - } +print ''; +$coldisplay=0; +// Adds a line numbering column +if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $coldisplay++; - ?> - '; +} - product->enabled) || ! empty($conf->service->enabled)) +$coldisplay++; +print ' - global->PRODUCT_USE_UNITS) - { - $coldisplay++; - print ''; - } + echo ''; +} - $coldisplay++; - ?> - - '; +print ''; - $coldisplay+=$colspan; - ?> - - +if($conf->global->PRODUCT_USE_UNITS) +{ + $coldisplay++; + print ''; +} + +$coldisplay++; +print ''; + +$coldisplay++; +print ''; + +$coldisplay++; +print ''; + + +$coldisplay += $colspan; +print ''; +print ''; -showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index 05b9094d10e..c7fc4f73cd7 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -49,22 +49,19 @@ $colspan = 3; // Columns: total ht + col edit + col delete // Lines for extrafield $objectline = new BOMLine($this->db); -?> - +print "\n"; - - - global->MAIN_VIEW_LINE_NUMBER)) { ?> - - '; +// Adds a line numbering column +if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; $coldisplay++; - ?> +} + +$coldisplay++; +?> - - element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines - { - $coldisplay++; - ?> - - - - - global->PRODUCT_USE_UNITS) - { - $coldisplay++; - print ''; - } - - $coldisplay++; - ?> - - - - - fk_product > 0) { + $tmpproduct = new Product($object->db); + $tmpproduct->fetch($line->fk_product); + print $tmpproduct->getNomUrl(1); +} + +if (is_object($hookmanager)) +{ + $fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line); + $parameters=array('line'=>$line,'fk_parent_line'=>$fk_parent_line,'var'=>$var,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer); + $reshook=$hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action); +} + +print ''; + +/*if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines +{ + $coldisplay++; +?> + +'; +if (($line->info_bits & 2) != 2) { + // I comment this because it shows info even when not required + // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated + // must also not be output for most entities (proposal, intervention, ...) + //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; + print ''; +} +print ''; + +if ($conf->global->PRODUCT_USE_UNITS) +{ + $coldisplay++; + print ''; +} + +$coldisplay++; +print ''; + +$coldisplay++; +print ''; + +$coldisplay++; +print ''; + +$coldisplay+=$colspan; +print ''; +print ''; + if (is_object($objectline)) { print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } -?> - +print "\n"; diff --git a/htdocs/bom/tpl/objectline_title.tpl.php b/htdocs/bom/tpl/objectline_title.tpl.php index 26010a70eb8..138a0b9aa58 100644 --- a/htdocs/bom/tpl/objectline_title.tpl.php +++ b/htdocs/bom/tpl/objectline_title.tpl.php @@ -39,9 +39,7 @@ if (empty($object) || ! is_object($object)) print "Error, template page can't be called as URL"; exit; } -?> - -\n"; // Title line print "\n"; @@ -61,6 +59,13 @@ if ($conf->global->PRODUCT_USE_UNITS) print ''; } +// Qty frozen +print ''; + +// Disable stock change +print ''; + +// Efficiency print ''; print ''; // No width to allow autodim @@ -79,6 +84,5 @@ if ($action == 'selectlines') print "\n"; print "\n"; -?> - +print "\n"; diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 9582e69f967..330f8ef8a33 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -59,100 +59,103 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; // Lines for extrafield $objectline = new BOMLine($object->db); -?> - - - > - global->MAIN_VIEW_LINE_NUMBER)) { ?> - - - - +$coldisplay=0; +print "\n"; +print ''; +if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + $coldisplay++; +} +print ''; +print ''; - global->PRODUCT_USE_UNITS) - { - print ''; +} + +print ''; +print ''; + +print ''; + +if ($this->status == 0 && ($object_rights->write) && $action != 'selectlines' ) { + print ''; + + print ''; + + if ($num > 1 && $conf->browser->layout != 'phone' && empty($disablemove)) { + print ''; + } else { + print ''; + $coldisplay++; } - ?> - - '; + $coldisplay=$coldisplay+3; +} - if ($this->statut == 0 && ($object_rights->write) && $action != 'selectlines' ) { ?> - +if ($action == 'selectlines') { + print ''; +} - +print ''; - 1 && $conf->browser->layout != 'phone' && empty($disablemove)) { ?> - - - - - - - - - - - - -showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } -?> - +print "\n"; diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index 1f227d7316f..5486a4887d1 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -69,7 +69,7 @@ print ''; print ''; print ''; -print '
'; @@ -554,7 +553,7 @@ if ($rowid > 0) dol_fiche_head($head, 'card', $langs->trans("AssetsType"), -1, 'setup'); - print ''; + print '
'; print ''; @@ -615,8 +614,8 @@ if ($rowid > 0) // Extra field if (empty($reshook)) { - print '

'.$langs->trans("Ref").''.$object->id.'
'; - foreach($extrafields->attribute_label as $key=>$label) + print '

'; + foreach($extrafields->attributes[$object->element]['label'] as $key=>$label) { if (isset($_POST["options_" . $key])) { if (is_array($_POST["options_" . $key])) { diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index a0bb66f2b81..1ed7c449868 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -197,7 +197,6 @@ if ($action == 'builddoc') // For labels if ($mode == 'label') { - $txtforsticker="%PHOTO%"; // Photo will be barcode image, %BARCODE% posible when using TCPDF generator $textleft=make_substitutions((empty($conf->global->BARCODE_LABEL_LEFT_TEXT)?$txtforsticker:$conf->global->BARCODE_LABEL_LEFT_TEXT), $substitutionarray); $textheader=make_substitutions((empty($conf->global->BARCODE_LABEL_HEADER_TEXT)?'':$conf->global->BARCODE_LABEL_HEADER_TEXT), $substitutionarray); diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index a0260cc6682..e5c089061eb 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -100,7 +100,7 @@ print ''.$langs->trans("BlockedLogDesc")."
'; -print '
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index b44f27f7fe8..63e94d00a47 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -92,7 +92,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' } if ($action === 'downloadblockchain') { - $auth = new BlockedLogAuthority($db); $bc = $auth->getLocalBlockChain(); @@ -362,7 +361,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Key").''.$langs->trans("Value").'
'; +print '
'; // Line of filters print ''; @@ -575,7 +574,7 @@ jQuery(document).ready(function () { if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { -?> + ?> -fetch(0, $signature)<=0) { if(!empty($hash)) { - echo $auth->checkBlockchain($hash) ? 'hashisok' : 'hashisjunk'; } elseif(!empty($newblock)){ @@ -62,7 +61,6 @@ elseif(!empty($newblock)){ echo 'blockadded'; } else{ - echo 'blockalreadyadded'; } } diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 7325f9ae50c..cec6410b7b6 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -310,17 +310,14 @@ class BlockedLogAuthority $signature=$block_static->getSignature(); foreach($blocks as &$block) { - $url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$signature.'&b='.$block->signature; $res = file_get_contents($url); echo $block->signature.' '.$url. ' '.$res.'
'; if($res === 'blockalreadyadded' || $res === 'blockadded') { - $block->setCertified(); } else { - $this->error = $langs->trans('ImpossibleToContactAuthority ', $url); return -1; } diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 1320c20ffbb..4981c05afd7 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -100,7 +100,12 @@ class BlockedLog */ public $fk_user = 0; + /** + * @var integer|string date_creation + */ public $date_creation; + + public $date_modification; public $date_object = 0; @@ -575,7 +580,7 @@ class BlockedLog foreach($tmpobject->thirdparty as $key=>$value) { if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties - if (! in_array($key, array( + if (! in_array($key, array( 'name','name_alias','ref_ext','address','zip','town','state_code','country_code','idprof1','idprof2','idprof3','idprof4','idprof5','idprof6','phone','fax','email','barcode', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur' ))) continue; // Discard if not into a dedicated list @@ -592,7 +597,7 @@ class BlockedLog foreach($tmpobject as $key=>$value) { if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties - if (! in_array($key, array( + if (! in_array($key, array( 'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public' ))) continue; // Discard if not into a dedicated list if (!is_object($value)) @@ -977,7 +982,6 @@ class BlockedLog if (empty($cachedlogs)) $cachedlogs=array(); if ($element=='all') { - $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity; } @@ -1006,7 +1010,6 @@ class BlockedLog $res = $this->db->query($sql); if($res) { - $results=array(); $i = 0; @@ -1046,8 +1049,8 @@ class BlockedLog global $db,$conf,$mysoc; if (empty($conf->global->BLOCKEDLOG_ENTITY_FINGERPRINT)) { // creation of a unique fingerprint - require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $fingerprint = dol_hash(print_r($mysoc, true).getRandomPassword(1), '5'); diff --git a/htdocs/bom/admin/setup.php b/htdocs/bom/admin/setup.php index 3bcdd0cbd79..b8fc1f1c1c1 100644 --- a/htdocs/bom/admin/setup.php +++ b/htdocs/bom/admin/setup.php @@ -77,7 +77,7 @@ if ($action == 'edit') print ''; print ''; - print '
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) @@ -99,7 +99,7 @@ else { if (! empty($arrayofparameters)) { - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print '
'; print ''; foreach($arrayofparameters as $key => $val) diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index 87fb55a6541..c38d0a82a69 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -53,8 +53,8 @@ else $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; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'bom', $id); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 5e24724b6f7..941eb621e7c 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -42,6 +42,11 @@ $contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'bomcard $backtopage = GETPOST('backtopage', 'alpha'); $lineid = GETPOST('lineid', 'int'); +// PDF +$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); +$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); +$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); + // Initialize technical objects $object=new BOM($db); $extrafields = new ExtraFields($db); @@ -65,15 +70,15 @@ if (empty($action) && empty($id) && empty($ref)) $action='view'; include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; -//$isdraft = (($object->statut == BillOfMaterials::STATUS_DRAFT) ? 1 : 0); +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); //$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); $permissionnote=$user->rights->bom->write; // Used by the include of actions_setnotes.inc.php $permissiondellink=$user->rights->bom->write; // Used by the include of actions_dellink.inc.php -$permissionedit=$user->rights->bom->write; // Used by the include of actions_lineupdown.inc.php -$permissiontoadd=$user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php +$permissiontoadd=$user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); /* @@ -88,12 +93,12 @@ if (empty($reshook)) { $error=0; - $permissiontoadd = $user->rights->bom->write; - $permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0); $backurlforlist = DOL_URL_ROOT.'/bom/bom_list.php'; - if (empty($backtopage)) { - if (empty($id)) $backtopage = $backurlforlist; - else $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.$id; + + if (empty($backtopage) || ($cancel && empty($id))) { + //var_dump($backurlforlist);exit; + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; + else $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.($id > 0 ? $id : '__ID__'); } $triggermodname = 'BOM_MODIFY'; // Name of trigger action code to execute when we modify record @@ -106,6 +111,12 @@ if (empty($reshook)) // Actions when printing a doc from card include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + // Action to move up and down lines of object + //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; + + // Action to build doc + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + // Actions to send emails $trigger_name='BOM_SENTBYMAIL'; $autocopy='MAIN_MAIL_AUTOCOPY_BOM_TO'; @@ -119,9 +130,11 @@ if (empty($reshook)) $error = 0; // Set if we used free entry or predefined product - $idprod=GETPOST('idprod', 'int'); - $qty=GETPOST('qty', 'int'); - $efficiency=GETPOST('efficiency', 'int'); + $idprod = GETPOST('idprod', 'int'); + $qty = GETPOST('qty', 'int'); + $qty_frozen = GETPOST('qty_frozen', 'int'); + $disable_stock_change = GETPOST('disable_stock_change', 'int'); + $efficiency = GETPOST('efficiency', 'int'); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); @@ -132,17 +145,27 @@ if (empty($reshook)) $error++; } - $bomline = new BOMLine($db); - $bomline->fk_bom = $id; - $bomline->fk_product = $idprod; - $bomline->qty = $qty; - $bomline->efficiency = $efficiency; - - $result = $bomline->create($user); - if ($result <= 0) + if (! $error) { - setEventMessages($bomline->error, $bomline->errors, 'errors'); - $action = ''; + $bomline = new BOMLine($db); + $bomline->fk_bom = $id; + $bomline->fk_product = $idprod; + $bomline->qty = $qty; + $bomline->qty_frozen = (int) $qty_frozen; + $bomline->disable_stock_change = (int) $disable_stock_change; + $bomline->efficiency = $efficiency; + + $result = $bomline->create($user); + if ($result <= 0) + { + setEventMessages($bomline->error, $bomline->errors, 'errors'); + $action = ''; + } + else + { + unset($_POST['qty_frozen']); + unset($_POST['disable_stock_change']); + } } } @@ -154,6 +177,8 @@ if (empty($reshook)) // Set if we used free entry or predefined product $qty=GETPOST('qty', 'int'); + $qty_frozen = GETPOST('qty_frozen', 'int'); + $disable_stock_change = GETPOST('disable_stock_change', 'int'); $efficiency=GETPOST('efficiency', 'int'); if ($qty == '') { @@ -164,6 +189,8 @@ if (empty($reshook)) $bomline = new BOMLine($db); $bomline->fetch($lineid); $bomline->qty = $qty; + $bomline->qty_frozen = (int) $qty_frozen; + $bomline->disable_stock_change = (int) $disable_stock_change; $bomline->efficiency = $efficiency; $result = $bomline->update($user); @@ -172,6 +199,11 @@ if (empty($reshook)) setEventMessages($bomline->error, $bomline->errors, 'errors'); $action = ''; } + else + { + unset($_POST['qty_frozen']); + unset($_POST['disable_stock_change']); + } } } @@ -213,7 +245,7 @@ if ($action == 'create') dol_fiche_head(array(), ''); - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'."\n"; + print '
'."\n"; // Common attributes include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; @@ -247,7 +279,9 @@ if (($id || $ref) && $action == 'edit') dol_fiche_head(); - print '
'."\n"; + //$object->fields['keyfield']['disabled'] = 1; + + print '
'."\n"; // Common attributes include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; @@ -286,6 +320,106 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); } + + // Confirmation of validation + if ($action == 'validate') + { + // We check that object has a temporary ref + $ref = substr($object->ref, 1, 4); + if ($ref == 'PROV') { + $object->fetch_product(); + $numref = $object->getNextNumRef($object->product); + } else { + $numref = $object->ref; + } + + $text = $langs->trans('ConfirmValidateBom', $numref); + /*if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('BOM_VALIDATE', $object->socid, $object); + }*/ + + $formquestion=array(); + if (! empty($conf->bom->enabled)) + { + $langs->load("mrp"); + require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + ); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220); + } + + // Confirmation of closing + if ($action == 'close') + { + $text = $langs->trans('ConfirmCloseBom', $object->ref); + /*if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('BOM_CLOSE', $object->socid, $object); + }*/ + + $formquestion=array(); + if (! empty($conf->bom->enabled)) + { + $langs->load("mrp"); + require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + ); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Close'), $text, 'confirm_close', $formquestion, 0, 1, 220); + } + + // Confirmation of reopen + if ($action == 'reopen') + { + $text = $langs->trans('ConfirmReopenBom', $object->ref); + /*if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('BOM_CLOSE', $object->socid, $object); + }*/ + + $formquestion=array(); + if (! empty($conf->bom->enabled)) + { + $langs->load("mrp"); + require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + ); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $text, 'confirm_reopen', $formquestion, 0, 1, 220); + } + // Clone confirmation if ($action == 'clone') { // Create an array for form @@ -294,20 +428,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Confirmation of action xxxx - if ($action == 'xxx') + if ($action == 'setdraft') { + $text = $langs->trans('ConfirmSetToDraft', $object->ref); + $formquestion=array(); - /* - $forcecombo=0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy - $formquestion = array( - // 'text' => $langs->trans("ConfirmClone"), - // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) - ); - */ - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220); } // Call Hook formConfirm @@ -336,7 +462,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; - if ($user->rights->bom->write) + if ($permissiontoadd) { if ($action != 'classify') $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; @@ -411,7 +537,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } print '
'; - if (! empty($object->lines) || ($object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) + if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { print '
'; } @@ -434,7 +560,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } - if (! empty($object->lines) || ($object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) + if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { print '
'; } @@ -444,8 +570,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } - // Buttons for actions + if ($action != 'presend' && $action != 'editline') { print '
'."\n"; $parameters=array(); @@ -457,8 +583,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Send //print '' . $langs->trans('SendMail') . ''."\n"; + if ($user->rights->bom->write && $object->status == BOM::STATUS_VALIDATED) + { + print '' . $langs->trans("SetToDraft") . ''; + } + // Modify - if ($user->rights->bom->write) + if ($permissiontoadd) { print ''.$langs->trans("Modify").''."\n"; } @@ -467,10 +598,35 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''.$langs->trans('Modify').''."\n"; } - // Clone - if ($user->rights->bom->write) + // Validate + if ($user->rights->bom->write && $object->status == BOM::STATUS_DRAFT) { - print ''; + if (is_array($object->lines) && count($object->lines) > 0) + { + print '' . $langs->trans("Validate") . ''; + } + else + { + print '' . $langs->trans("Validate") . ''; + } + } + + // Close / Cancel + if ($user->rights->bom->write && $object->status == BOM::STATUS_VALIDATED) + { + print '' . $langs->trans("Disable") . ''; + } + + // Re-open + if ($user->rights->bom->write && $object->status == BOM::STATUS_CANCELED) + { + print '' . $langs->trans("ReOpen") . ''; + } + + // Clone + if ($permissiontoadd) + { + print '' . $langs->trans("ToClone") . ''; } /* @@ -487,7 +643,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } */ - if ($user->rights->bom->delete) + if ($permissiontodelete) { print ''.$langs->trans('Delete').''."\n"; } @@ -511,14 +667,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; // ancre // Documents - /*$objref = dol_sanitizeFileName($object->ref); - $relativepath = $comref . '/' . $comref . '.pdf'; + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref . '/' . $objref . '.pdf'; $filedir = $conf->bom->dir_output . '/' . $objref; $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content - $delallowed = $user->rights->bom->create; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); - */ + $delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object, null, array('bom')); @@ -542,17 +697,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } //Select mail models is same action as presend - /* - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) $action = 'presend'; - // Presend form - $modelmail='inventory'; - $defaulttopic='InformationMessage'; - $diroutput = $conf->product->dir_output.'/inventory'; - $trackid = 'stockinv'.$object->id; + // Presend form + $modelmail='bom'; + $defaulttopic='InformationMessage'; + $diroutput = $conf->bom->dir_output; + $trackid = 'bom'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - */ + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; } // End of page diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php index 826222af8b0..f0dac37a5a0 100644 --- a/htdocs/bom/bom_document.php +++ b/htdocs/bom/bom_document.php @@ -41,8 +41,8 @@ $id=(GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'bom', $id); // Get parameters diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index 4b0a6ff29be..c61efc84591 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -1,6 +1,5 @@ - * 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 @@ -21,6 +20,7 @@ * \ingroup bom * \brief List page for bom */ + // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -72,9 +72,9 @@ if (! $sortorder) $sortorder="ASC"; // Security check $socid=0; -if ($user->societe_id > 0) // Protection if external user +if ($user->socid > 0) // Protection if external user { - //$socid = $user->societe_id; + //$socid = $user->socid; accessforbidden(); } //$result = restrictedArea($user, 'bom', $id, ''); @@ -99,7 +99,7 @@ $arrayfields=array(); foreach($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field - if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled'], 'position'=>$val['position']); + if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); } // Extra fields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) @@ -113,6 +113,9 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +$permissiontoread = $user->rights->bom->read; +$permissiontoadd = $user->rights->bom->write; +$permissiontodelete = $user->rights->bom->delete; /* @@ -150,13 +153,123 @@ if (empty($reshook)) // Mass actions $objectclass='BOM'; $objectlabel='BillOfMaterials'; - $permtoread = $user->rights->bom->read; - $permtodelete = $user->rights->bom->delete; + $permissiontoread = $user->rights->bom->read; + $permissiontodelete = $user->rights->bom->delete; $uploaddir = $conf->bom->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; -} + // Validate records + if (! $error && $massaction == 'disable' && $permissiontoadd) + { + $objecttmp=new $objectclass($db); + + if (! $error) + { + $db->begin(); + + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + if ($objecttmp->status != $objecttmp::STATUS_VALIDATED) + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorObjectMustHaveStatusActiveToBeDisabled", $objecttmp->ref), null, 'errors'); + $error++; + break; + } + + // Can be 'cancel()' or 'close()' + $result = $objecttmp->cancel($user); + if ($result < 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } + //var_dump($listofobjectthirdparties);exit; + } + } + + // Validate records + if (! $error && $massaction == 'enable' && $permissiontoadd) + { + $objecttmp=new $objectclass($db); + + if (! $error) + { + $db->begin(); + + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + if ($objecttmp->status != $objecttmp::STATUS_DRAFT && $objecttmp->status != $objecttmp::STATUS_CANCELED) + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated", $objecttmp->ref), null, 'errors'); + $error++; + break; + } + + // Can be 'cancel()' or 'close()' + $result = $objecttmp->validate($user); + if ($result < 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } + //var_dump($listofobjectthirdparties);exit; + } + } +} + /* * View @@ -179,8 +292,9 @@ foreach($object->fields as $key => $val) $sql.='t.'.$key.', '; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) +if (! empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook @@ -213,6 +327,7 @@ foreach($object->fields as $key => $val) // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); +} // Add where from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook @@ -258,7 +373,7 @@ if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && { $obj = $db->fetch_object($resql); $id = $obj->rowid; - header("Location: ".dol_buildpath('/bom/bom_card.php', 1).'?id='.$id); + header("Location: ".DOL_URL_ROOT.'/bom/bom_card.php?id='.$id); exit; } @@ -290,7 +405,8 @@ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&con if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); foreach($search as $key => $val) { - $param.= '&search_'.$key.'='.urlencode($search[$key]); + if (is_array($search[$key]) && count($search[$key])) foreach($search[$key] as $skey) $param.='&search_'.$key.'[]='.urlencode($skey); + else $param.= '&search_'.$key.'='.urlencode($search[$key]); } if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); // Add $param from extra fields @@ -299,7 +415,8 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + 'enable'=>$langs->trans("Enable"), + 'disable'=>$langs->trans("Disable"), ); if ($user->rights->bom->delete) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions=array(); @@ -315,19 +432,7 @@ print ''; print ''; print ''; -$newcardbutton=''; -//if ($user->rights->bom->creer) -//{ - $newcardbutton=''.$langs->trans('New').''; - $newcardbutton.= ''; - $newcardbutton.= ''; -//} -//else -//{ -// $newcardbutton=''.$langs->trans('New').''; -// $newcardbutton.= ''; -// $newcardbutton.= ''; -//} +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bom/bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->bom->write); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cubes', 0, $newcardbutton, '', $limit); @@ -338,10 +443,10 @@ $objecttmp=new BOM($db); $trackid='xxxx'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) +if ($search_all) { foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); - print '
'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'
'; + print '
'.$langs->trans("FilterOnInto", $search_all) . join(', ', $fieldstosearchall).'
'; } $moreforfilter = ''; @@ -375,14 +480,14 @@ print '
'; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 0, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); else print ''; print '
'; + print ''; if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected=0; @@ -504,26 +611,8 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['pos'])) -{ - print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
-
trans('AddNewLine'); ?>trans("FreeZone"); ?> -
trans('Qty'); ?>'; + print '
'.$langs->trans('AddNewLine').''; + // echo $langs->trans("FreeZone"); + print '
'.$langs->trans('Qty').''; - print ''; - print $langs->trans('Unit'); - print ''; + print ''; + print $langs->trans('Unit'); + print 'textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')); ?> 
'.$form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')).''.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).' 
+ echo ''; + +// Predefined product/service +if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) +{ + if ($forceall >= 0 && $freelines) echo '
'; + echo ''; + $filtertype=''; + if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1'; + + $statustoshow = -1; + if (! empty($conf->global->ENTREPOT_EXTRA_STATUS)) { - if ($forceall >= 0 && $freelines) echo '
'; - echo ''; - $filtertype=''; - if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1'; - - if (! empty($conf->global->ENTREPOT_EXTRA_STATUS)) - { - // hide products in closed warehouse, but show products for internal transfer - $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); - } - else - { - $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); - } - - echo ''; + // hide products in closed warehouse, but show products for internal transfer + $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); + } + else + { + $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); } - $coldisplay++; - ?> -
"> - '; - print $form->selectUnits($line->fk_unit, "units"); - print '"> - -
'; + print $form->selectUnits($line->fk_unit, "units"); + print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print '
'.($i+1).'
@@ -74,72 +71,74 @@ $coldisplay=0; - fk_product > 0) { - $tmpproduct = new Product($object->db); - $tmpproduct->fetch($line->fk_product); - print $tmpproduct->getNomUrl(1); - } - - if (is_object($hookmanager)) - { - $fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line); - $parameters=array('line'=>$line,'fk_parent_line'=>$fk_parent_line,'var'=>$var,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer); - $reshook=$hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action); - } - - ?> -
- info_bits & 2) != 2) { - // I comment this because it shows info even when not required - // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated - // must also not be output for most entities (proposal, intervention, ...) - //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; - print ''; - } - ?> - '; - print $form->selectUnits($line->fk_unit, "units"); - print ' - ">
- "> -
'; + print $form->selectUnits($line->fk_unit, "units"); + print 'qty_frozen?' checked="checked"':'')).'>'; +print 'disable_stock_change?' checked="checked"':'')).'">'; +print ''; +print ''; +$coldisplay+=$colspan; +print ''; +print '
'; +print ''; +print '
'.$langs->trans('Unit').''.$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")).''.$form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')).''.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).'
- db); - $tmpproduct->fetch($line->fk_product); - print $tmpproduct->getNomUrl(1); - ?> -
- qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price - ?> -
'.($i+1).''; +print '
'; +$coldisplay++; +$tmpproduct = new Product($object->db); +$tmpproduct->fetch($line->fk_product); +print $tmpproduct->getNomUrl(1); +print '
'; +$coldisplay++; +echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price +print ''; - $label = $line->getLabelOfUnit('short'); - if ($label !== '') { - print $langs->trans($label); +if($conf->global->PRODUCT_USE_UNITS) +{ + print ''; + $label = $line->getLabelOfUnit('short'); + if ($label !== '') { + print $langs->trans($label); + } + print ''; +$coldisplay++; +echo $line->qty_frozen ? yn($line->qty_frozen) : ''; +print ''; +$coldisplay++; +echo $line->disable_stock_change ? yn($line->disable_stock_change) : ''; // Yes, it is a quantity, not a price, but we just want the formating role of function price +print ''; +$coldisplay++; +echo $line->efficiency; +print ''; + $coldisplay++; + if (($line->info_bits & 2) == 2 || ! empty($disableedit)) { + } else { + print 'id.'#line_'.$line->id.'">'.img_edit().''; + } + print ''; + $coldisplay++; + if (($line->fk_prev_id == null ) && empty($disableremove)) { + //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation + print 'id . '">'; + print img_delete(); + print ''; + } + print ''; + $coldisplay++; + if ($i > 0) { + print 'id.'">'; + echo img_up('default', 0, 'imgupforline'); + print ''; + } + if ($i < $num-1) { + print 'id.'">'; + echo img_down('default', 0, 'imgdownforline'); + print ''; } print 'browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"').'> - efficiency; - ?> - - info_bits & 2) == 2 || ! empty($disableedit)) { ?> - - id.'#line_'.$line->id; ?>"> - - - - '; + print ''; + print ' - fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation - print 'id . '">'; - print img_delete(); - print ''; - } - ?> -
- 0) { ?> - id; ?>"> - - - - - id; ?>"> - - - - browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>>
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 1e54cc816fd..670f8768e9a 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -24,21 +24,15 @@ /** * Add area with bookmarks in menu * - * @param DoliDb $aDb Database handler - * @param Translate $aLangs Object lang * @return string */ -function printBookmarksList($aDb, $aLangs) +function printBookmarksList() { - global $conf, $user; - - $db = $aDb; - $langs = $aLangs; + global $conf, $user, $db, $langs; $ret = ''."\n"; if (! empty($conf->use_javascript_ajax)) { // Bookmark autosubmit can't work when javascript is off. - require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5; @@ -72,10 +66,11 @@ function printBookmarksList($aDb, $aLangs) $ret.= ''."\n"; $ret.= ''; + $ret.= ''; $ret.= '
'.$langs->trans("Name").''.$langs->trans("Value").'
'; + print '
'; print ''; dol_set_focus('#titlebookmark'); @@ -230,7 +229,7 @@ if ($id > 0 && ! preg_match('/^add/i', $action)) print '
'; print '
'; - print '
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
'; + print '
'; print '
'; if ($action == 'edit') { diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 7b5890d32b2..2c9189612f7 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -277,4 +277,69 @@ class Bookmark extends CommonObject { return ''; } + + /** + * Return a link to the object card (with optionaly the picto) + * + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to ('nolink', ...) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $conf, $langs, $hookmanager; + + if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips + + $result = ''; + + $label = '' . $langs->trans("Bookmark") . ''; + $label.= '
'; + $label.= '' . $langs->trans('Ref') . ': ' . $this->ref; + + $url = DOL_URL_ROOT.'/bookmarks/card.php?id='.$this->id; + + if ($option != 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1; + if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; + } + + $linkclose=''; + if (empty($notooltip)) + { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowBookmark"); + $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; + } + else $linkclose = ($morecss?' class="'.$morecss.'"':''); + + $linkstart = ''; + $linkend=''; + + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= $this->ref; + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + global $action,$hookmanager; + $hookmanager->initHooks(array('mybookmarkdao')); + $parameters=array('id'=>$this->id, 'getnomurl'=>$result); + $reshook=$hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) $result = $hookmanager->resPrint; + else $result .= $hookmanager->resPrint; + + return $result; + } } diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index bdd4f0b5429..2b34f673107 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -32,6 +32,7 @@ $massaction=GETPOST('massaction', 'alpha'); $show_files=GETPOST('show_files', 'int'); $confirm=GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectlist'; // To manage different context of search // Security check if (! $user->rights->bookmark->lire) { @@ -39,11 +40,12 @@ if (! $user->rights->bookmark->lire) { } $optioncss = GETPOST('optioncss', 'alpha'); +// Load variable for pagination $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 +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); +$page = GETPOST('page', 'int'); +if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -52,6 +54,12 @@ if (! $sortorder) $sortorder='ASC'; $id = GETPOST("id", 'int'); +$object=new Bookmark($db); + +$permissiontoread = $user->rights->bookmark->lire; +$permissiontoadd = $user->rights->bookmark->write; +$permissiontodelete = $user->rights->bookmark->delete; + /* * Actions @@ -59,8 +67,7 @@ $id = GETPOST("id", 'int'); if ($action == 'delete') { - $bookmark=new Bookmark($db); - $res=$bookmark->remove($id); + $res=$object->remove($id); if ($res > 0) { header("Location: ".$_SERVER["PHP_SELF"]); @@ -68,7 +75,7 @@ if ($action == 'delete') } else { - setEventMessages($bookmark->error, $bookmark->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -79,132 +86,182 @@ if ($action == 'delete') $userstatic=new User($db); -llxHeader('', $langs->trans("ListOfBookmarks")); +$title = $langs->trans("ListOfBookmarks"); -$newcardbutton=''; -$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, '', 'generic', 0, $newcardbutton); +llxHeader('', $title); $sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; $sql.= " u.login, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid"; $sql.= " WHERE 1=1"; -$sql.= " AND b.entity = ".$conf->entity; +$sql.= " AND b.entity IN (".getEntity('bookmark').")"; if (! $user->admin) $sql.= " AND (b.fk_user = ".$user->id." OR b.fk_user is NULL OR b.fk_user = 0)"; -$sql.= $db->order($sortfield.", position", $sortorder); -$sql.= $db->plimit($limit, $offset); -$resql=$db->query($sql); -if ($resql) +$sql.=$db->order($sortfield.", position", $sortorder); + +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $num = $db->num_rows($resql); - $i = 0; - $param = ""; - if ($optioncss != '') $param ='&optioncss='.$optioncss; - - $moreforfilter=''; - - print '
'; - print ''."\n"; - - print ""; - //print ""; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="left"', $sortfield, $sortorder); - print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, 'align="left"', $sortfield, $sortorder); - print_liste_field_titre("Link", $_SERVER["PHP_SELF"], "b.url", "", $param, 'align="left"', $sortfield, $sortorder); - print_liste_field_titre("Target", '', '', '', '', 'align="center"'); - print_liste_field_titre("Owner", $_SERVER["PHP_SELF"], "u.lastname", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.dateb", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $param, 'class="right"', $sortfield, $sortorder); - print_liste_field_titre(''); - print "\n"; - - while ($i < $num) + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0 { - $obj = $db->fetch_object($resql); - - print ''; - - // Id - print ''; - - $linkintern=0; - $title=$obj->title; - $link=$obj->url; - - // Title - print "\n"; - - // Url - print '\n"; - - // Target - print '\n"; - - // Author - print '\n"; - - // Date creation - print '"; - - // Position - print '"; - - // Actions - print '"; - print "\n"; - $i++; + $page = 0; + $offset = 0; } - print "
 
'; - print "rowid."\">".img_object($langs->trans("ShowBookmark"), "bookmark").' '.$obj->rowid.""; - print '"; - $linkintern=1; - if ($linkintern) print "url."\">"; - print $title; - if ($linkintern) print ""; - print "'; - if (! $linkintern) print 'target?' target="newlink"':'').'>'; - print $link; - if (! $linkintern) print ''; - print "'; - if ($obj->target == 0) print $langs->trans("BookmarkTargetReplaceWindowShort"); - if ($obj->target == 1) print $langs->trans("BookmarkTargetNewWindowShort"); - print "'; - if ($obj->fk_user) - { - $userstatic->id=$obj->fk_user; - $userstatic->lastname=$obj->login; - print $userstatic->getNomUrl(1); - } - else - { - print $langs->trans("Public"); - } - print "'.dol_print_date($db->jdate($obj->dateb), 'day')."'.$obj->position."'; - if ($user->rights->bookmark->creer) - { - print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().""; - } - if ($user->rights->bookmark->supprimer) - { - print "rowid\">".img_delete().""; - } - else - { - print " "; - } - print "
"; - print '
'; - - $db->free($resql); +} +// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) +{ + $num = $nbtotalofrecords; } else { - dol_print_error($db); + $sql.= $db->plimit($limit+1, $offset); + + $resql=$db->query($sql); + if (! $resql) + { + dol_print_error($db); + exit; + } + + $num = $db->num_rows($resql); } +$param = ""; +if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); +if ($optioncss != '') $param ='&optioncss='.urlencode($optioncss); + +$moreforfilter=''; + +// List of mass actions available +$arrayofmassactions = array( + //'validate'=>$langs->trans("Validate"), + //'generate_doc'=>$langs->trans("ReGeneratePDF"), + //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>$langs->trans("SendByMail"), +); +if ($permissiontodelete) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +$massactionbutton=$form->selectMassAction('', $arrayofmassactions); + +print ''; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +$newcardbutton=''; +$newcardbutton.= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer)); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit); + +print '
'; +print ''."\n"; + +print ""; +//print ""; +print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="left"', $sortfield, $sortorder); +print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, 'align="left"', $sortfield, $sortorder); +print_liste_field_titre("Link", $_SERVER["PHP_SELF"], "b.url", "", $param, 'align="left"', $sortfield, $sortorder); +print_liste_field_titre("Target", '', '', '', '', 'align="center"'); +print_liste_field_titre("Owner", $_SERVER["PHP_SELF"], "u.lastname", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.dateb", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $param, 'class="right"', $sortfield, $sortorder); +print_liste_field_titre(''); +print "\n"; + +$i = 0; +while ($i < min($num, $limit)) +{ + $obj = $db->fetch_object($resql); + + $object->id = $obj->rowid; + $object->ref = $obj->rowid; + + print ''; + + // Id + print ''; + + $linkintern=0; + $title=$obj->title; + $link=$obj->url; + + // Title + print "\n"; + + // Url + print '\n"; + + // Target + print '\n"; + + // Author + print '\n"; + + // Date creation + print '"; + + // Position + print '"; + + // Actions + print '"; + print "\n"; + $i++; +} +print "
 
'; + print $object->getNomUrl(1); + print '"; + $linkintern=1; + if ($linkintern) print "url."\">"; + print $title; + if ($linkintern) print ""; + print "'; + if (! $linkintern) print 'target?' target="newlink"':'').'>'; + print $link; + if (! $linkintern) print ''; + print "'; + if ($obj->target == 0) print $langs->trans("BookmarkTargetReplaceWindowShort"); + if ($obj->target == 1) print $langs->trans("BookmarkTargetNewWindowShort"); + print "'; + if ($obj->fk_user) + { + $userstatic->id=$obj->fk_user; + $userstatic->lastname=$obj->login; + print $userstatic->getNomUrl(1); + } + else + { + print $langs->trans("Public"); + } + print "'.dol_print_date($db->jdate($obj->dateb), 'day')."'.$obj->position."'; + if ($user->rights->bookmark->creer) + { + print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().""; + } + if ($user->rights->bookmark->supprimer) + { + print "rowid\">".img_delete().""; + } + else + { + print " "; + } + print "
"; +print '
'; + +$db->free($resql); + + // End of page llxFooter(); $db->close(); diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 22b8fea0a05..1602c02beaa 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -97,7 +97,7 @@ print ''; if (! empty($conf->service->enabled)) { - print ''; + print '
'; print ''; print ''; print "\n"; @@ -114,7 +114,7 @@ if (! empty($conf->service->enabled)) } -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print "\n"; @@ -125,7 +125,6 @@ print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY, 'socid', '(s. print ''; if (! empty($conf->banque->enabled)) { - print ''; print ''; // Force warehouse (this is not a default value) print ' diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index a35abb46789..d892c1df0e6 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -57,10 +57,8 @@ else echo ('

'.$tab[$i]['ref'].' - '.$tab[$i]['label'].'

'."\n"); if ( $tab[$i]['remise_percent'] > 0 ) { - $remise_percent = ' -'.$tab[$i]['remise_percent'].'%'; } else { - $remise_percent = ''; } diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index cb7b7dd2f10..813364d18a5 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -85,7 +85,7 @@ $object->fetch($facid); for($i=0;$i < $tab_size;$i++) { $remise = $tab[$i]['remise']; - ?> + ?> @@ -93,7 +93,7 @@ $object->fetch($facid); - diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 64f340983ff..fcbd95e8f29 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -36,18 +36,16 @@ $langs->loadLangs(array("main","bills","banks")); - montantTva() ) { - - echo (''); - } - else - { - - echo (''); - } - ?> +montantTva() ) { + echo (''); +} +else +{ + echo (''); +} +?> - getsetPaymentMode() == 'DIF' ) { +getsetPaymentMode() == 'DIF' ) { + echo (''); +} else { + echo (''); +} - echo (''); - } else { +// Affichage du montant rendu (reglement en especes) +if ( $obj_facturation->montantRendu() ) { + echo (''); +} - echo (''); - } - - // Affichage du montant rendu (reglement en especes) - if ( $obj_facturation->montantRendu() ) { - - echo (''); - } - - ?> +?>
'.$langs->trans("Terminal").' 0'.$langs->trans("Value").'
'.$langs->trans("CashDeskBankAccountForSell").''; $form->select_comptes($conf->global->CASHDESK_ID_BANKACCOUNT_CASH, 'CASHDESK_ID_BANKACCOUNT_CASH', 0, "courant=2", 1); @@ -146,16 +145,15 @@ if (! empty($conf->banque->enabled)) if (! empty($conf->stock->enabled)) { - print '
'.$langs->trans("CashDeskDoNotDecreaseStock").''; if (empty($conf->productbatch->enabled)) { - print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK', $conf->global->CASHDESK_NO_DECREASE_STOCK, 1); + print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK', $conf->global->CASHDESK_NO_DECREASE_STOCK, 1); } else { if (!$conf->global->CASHDESK_NO_DECREASE_STOCK) { - $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK", 1, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK", 1, 'chaine', 0, '', $conf->entity); } print $langs->trans("Yes").'
'; print ''.$langs->trans('StockDecreaseForPointOfSaleDisabledbyBatch').''; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 40b338ccca6..a8119225db9 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -194,9 +194,9 @@ class Facturation { if ($poscart[$key]['id'] != $aArticle) { - $newposcart[$j]=$poscart[$key]; - $newposcart[$j]['id']=$j; - $j++; + $newposcart[$j]=$poscart[$key]; + $newposcart[$j]['id']=$j; + $j++; } } unset($poscart); @@ -296,12 +296,10 @@ class Facturation } elseif ( $aId == 'RESET' ) { - $this->id = null; } else { - $this->id = $aId; } } @@ -343,7 +341,6 @@ class Facturation } elseif ( $aQte == 'RESET' ) { - $this->qte = null; } else @@ -408,13 +405,10 @@ class Facturation { if (is_null($aMontantRemise)) { - return $this->montant_remise; } elseif ( $aMontantRemise == 'RESET' ) { - $this->montant_remise = null; } else { - $this->montant_remise = $aMontantRemise; } } @@ -429,13 +423,10 @@ class Facturation { if (is_null($aPrix)) { - return $this->prix; } elseif ( $aPrix == 'RESET' ) { - $this->prix = null; } else { - $this->prix = $aPrix; } } @@ -449,13 +440,10 @@ class Facturation public function tva($aTva = null) { if (is_null($aTva)) { - return $this->tva; } elseif ( $aTva == 'RESET' ) { - $this->tva = null; } else { - $this->tva = $aTva; } } @@ -469,13 +457,10 @@ class Facturation public function numInvoice($aNumFacture = null) { if (is_null($aNumFacture)) { - return $this->num_facture; } elseif ( $aNumFacture == 'RESET' ) { - $this->num_facture = null; } else { - $this->num_facture = $aNumFacture; } } @@ -490,13 +475,10 @@ class Facturation { if (is_null($aModeReglement)) { - return $this->mode_reglement; } elseif ( $aModeReglement == 'RESET' ) { - $this->mode_reglement = null; } else { - $this->mode_reglement = $aModeReglement; } } @@ -511,13 +493,10 @@ class Facturation { if (is_null($aMontantEncaisse)) { - return $this->montant_encaisse; } elseif ( $aMontantEncaisse == 'RESET' ) { - $this->montant_encaisse = null; } else { - $this->montant_encaisse = $aMontantEncaisse; } } @@ -532,13 +511,10 @@ class Facturation { if (is_null($aMontantRendu)) { - return $this->montant_rendu; } elseif ( $aMontantRendu == 'RESET' ) { - $this->montant_rendu = null; } else { - $this->montant_rendu = $aMontantRendu; } } @@ -552,13 +528,10 @@ class Facturation public function paiementLe($aPaiementLe = null) { if (is_null($aPaiementLe)) { - return $this->paiement_le; } elseif ( $aPaiementLe == 'RESET' ) { - $this->paiement_le = null; } else { - $this->paiement_le = $aPaiementLe; } } @@ -572,13 +545,10 @@ class Facturation public function prixTotalHt($aTotalHt = null) { if (is_null($aTotalHt)) { - return $this->prix_total_ht; } elseif ( $aTotalHt == 'RESET' ) { - $this->prix_total_ht = null; } else { - $this->prix_total_ht = $aTotalHt; } } @@ -592,13 +562,10 @@ class Facturation public function montantTva($aMontantTva = null) { if (is_null($aMontantTva)) { - return $this->montant_tva; } elseif ( $aMontantTva == 'RESET' ) { - $this->montant_tva = null; } else { - $this->montant_tva = $aMontantTva; } } diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index f7e7c3af501..c52ecccef77 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -36,7 +36,6 @@ $form=new Form($db); // Get list of articles (in warehouse '$conf_fkentrepot' if defined and stock module enabled) if ( GETPOST('filtre', 'alpha') ) { - // Avec filtre $ret=array(); $i=0; @@ -88,7 +87,6 @@ if ( GETPOST('filtre', 'alpha') ) { } $tab_designations=$ret; } else { - // Sans filtre $ret=array(); $i=0; diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index e8dad4d2fb1..77de0e4ed8e 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -56,30 +56,33 @@ $langs->loadLangs(array("main","bills","cashdesk"));
currency);?>
trans("Invoice"); ?>numInvoice(); ?>
trans("TotalHT"); ?>prixTotalHt(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?>
'.$langs->trans("VAT").''.price(price2num($obj_facturation->montantTva(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'.$langs->trans("VAT").''.$langs->trans("NoVAT").'
'.$langs->trans("VAT").''.price(price2num($obj_facturation->montantTva(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'.$langs->trans("VAT").''.$langs->trans("NoVAT").'
trans("TotalTTC"); ?> prixTotalTtc(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?>
trans("PaymentMode"); ?> loadLangs(array("main","bills","banks")); ?>
'.$langs->trans("DateDue").''.$obj_facturation->paiementLe().'
'.$langs->trans("Received").''.price(price2num($obj_facturation->montantEncaisse(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'.$langs->trans("DateDue").''.$obj_facturation->paiementLe().'
'.$langs->trans("Change").''.price(price2num($obj_facturation->montantRendu(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'.$langs->trans("Received").''.price(price2num($obj_facturation->montantEncaisse(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'.$langs->trans("Change").''.price(price2num($obj_facturation->montantRendu(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index ece7ed2fa5b..7d47724ddd3 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -87,7 +87,7 @@ $head=categoriesadmin_prepare_head(); dol_fiche_head($head, 'setup', $langs->trans("Categories"), -1, 'category'); -print ''; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 57517299acb..f184f1b433f 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -779,9 +779,9 @@ class Categorie extends CommonObject $sql .= " AND c.fk_categorie = ".$this->id; $sql .= " AND c.fk_" . $this->MAP_CAT_FK[$type] . " = o.rowid"; // Protection for external users - if (($type == 'customer' || $type == 'supplier') && $user->societe_id > 0) + if (($type == 'customer' || $type == 'supplier') && $user->socid > 0) { - $sql.= " AND o.rowid = ".$user->societe_id; + $sql.= " AND o.rowid = ".$user->socid; } if ($limit > 0 || $offset > 0) $sql .= $this->db->plimit($limit + 1, $offset); $sql .= $this->db->order($sortfield, $sortorder); @@ -864,11 +864,14 @@ class Categorie extends CommonObject if ($type=="contact") { $subcol_name="fk_socpeople"; } + + $idoftype = array_search($type, self::$MAP_ID_TO_CODE); + $sql = "SELECT s.rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie as s"; $sql.= " , ".MAIN_DB_PREFIX."categorie_".$sub_type." as sub "; $sql.= ' WHERE s.entity IN ('.getEntity('category').')'; - $sql.= ' AND s.type='.array_search($type, self::$MAP_ID_TO_CODE); + $sql.= ' AND s.type='.$idoftype; $sql.= ' AND s.rowid = sub.fk_categorie'; $sql.= ' AND sub.'.$subcol_name.' = '.$id; @@ -887,7 +890,15 @@ class Categorie extends CommonObject } } - $sql.= $this->db->plimit($limit + 1, $offset); + if ($limit) { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; + + $sql.= $this->db->plimit($limit + 1, $offset); + } $result = $this->db->query($sql); if ($result) @@ -1007,11 +1018,11 @@ class Categorie extends CommonObject * fulllabel = nom avec chemin complet de la categorie * fullpath = chemin complet compose des id * - * @param string $type Type of categories ('customer', 'supplier', 'contact', 'product', 'member') or (0, 1, 2, ...). + * @param string $type Type of categories ('customer', 'supplier', 'contact', 'product', 'member', ...) * @param int|string|array $markafterid Keep only or removed all categories including the leaf $markafterid in category tree (exclude) or Keep only of category is inside the leaf starting with this id. * $markafterid can be an : * - int (id of category) - * - string (categories ids seprated by comma) + * - string (categories ids separated by comma) * - array (list of categories ids) * @param int $include [=0] Removed or 1=Keep only * @return array|int Array of categories. this->cats and this->motherof are set, -1 on error @@ -1626,7 +1637,6 @@ class Categorie extends CommonObject { $nbfile = count($file['name']); for ($i = 0; $i <= $nbfile; $i ++) { - $originImage = $dir . $file['name'][$i]; // Cree fichier en taille origine @@ -1825,13 +1835,13 @@ class Categorie extends CommonObject } } - // Call trigger - $result = $this->call_trigger('CATEGORY_SET_MULTILANGS', $user); - if ($result < 0) { - $this->error = $this->db->lasterror(); - return -1; - } - // End call triggers + // Call trigger + $result = $this->call_trigger('CATEGORY_SET_MULTILANGS', $user); + if ($result < 0) { + $this->error = $this->db->lasterror(); + return -1; + } + // End call triggers return 1; } diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 39db14a9613..9729e401632 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -146,7 +146,7 @@ print ''; dol_fiche_head(''); -print '
'.$langs->trans("Description").' 
'; +print '
'; // Ref print '
'; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 2ef44c51f4f..e0886da002c 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -87,7 +87,7 @@ print ''; print ''; -print ''; +print '
'; print ''; print ''; print ''; @@ -117,7 +117,7 @@ if ($catname || $id > 0) { $cats = $categstatic->rechercher($id, $catname, $typetext); - print '
'.$langs->trans("Search").'
'; + print '
'; print ''; foreach ($cats as $cat) diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 70cf6e3e8f7..5dbd6e68c47 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -69,7 +69,6 @@ if ($id > 0) if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if ($object->id) { - $file = $_FILES['userfile']; if (is_array($file['name']) && count($file['name']) > 0) { @@ -137,7 +136,7 @@ if ($object->id) } $morehtmlref.=''; - dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); + dol_banner_tab($object, 'ref', $linkback, ($user->socid?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); /* * Confirmation de la suppression de photo @@ -151,7 +150,7 @@ if ($object->id) print '
'; print '
'; - print '
'.$langs->trans("FoundCats").'
'; + print '
'; // Description print ''; // Multicurrency rate - print ''; - print ''; + print ''; } - print ''; } if ($soc->outstanding_limit) @@ -2471,39 +2475,49 @@ if ($action == 'create') { if ($usercanvalidate) { - print ''; + print '' . $langs->trans('Validate') . ''; } else - print ''; + print '' . $langs->trans('Validate') . ''; } // Create event /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. { - print ''; + print '' . $langs->trans("AddAction") . ''; }*/ // Edit if ($object->statut == Propal::STATUS_VALIDATED && $usercancreate) { - print ''; + print '' . $langs->trans('Modify') . ''; } // ReOpen if (($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) && $usercanclose) { - print ''; + print 'global->MAIN_JUMP_TAG) ? '' : '#reopen') . '"'; + print '>' . $langs->trans('ReOpen') . ''; } // Send if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { - print ''; + print '' . $langs->trans('SendMail') . ''; } else - print ''; + print '' . $langs->trans('SendMail') . ''; } - // Create an order + // Create a sale order if (! empty($conf->commande->enabled) && $object->statut == Propal::STATUS_SIGNED) { if ($usercancreateorder) { - print ''; + print '' . $langs->trans("AddOrder") . ''; + } + } + + // Create a purchase order + if (! empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_PROPOSAL)) + { + if (! empty($conf->fournisseur->enabled) && $object->statut == Propal::STATUS_SIGNED) { + if ($usercancreatepurchaseorder) { + print '' . $langs->trans("AddPurchaseOrder") . ''; + } } } @@ -2511,7 +2525,7 @@ if ($action == 'create') if (! empty($conf->service->enabled) && ! empty($conf->ficheinter->enabled) && $object->statut == Propal::STATUS_SIGNED) { if ($usercancreateintervention) { $langs->load("interventions"); - print ''; + print '' . $langs->trans("AddIntervention") . ''; } } @@ -2520,7 +2534,7 @@ if ($action == 'create') $langs->load("contracts"); if ($usercancreatecontract) { - print ''; + print '' . $langs->trans('AddContract') . ''; } } @@ -2529,7 +2543,7 @@ if ($action == 'create') { if (! empty($conf->facture->enabled) && $usercancreateinvoice) { - print ''; + print '' . $langs->trans("AddBill") . ''; } $arrayofinvoiceforpropal = $object->getInvoiceArrayList(); @@ -2537,30 +2551,30 @@ if ($action == 'create') { if ($usercanclose) { - print ''; + print 'socid . '">' . $langs->trans("ClassifyBilled") . ''; } else { - print ''; + print '' . $langs->trans("ClassifyBilled") . ''; } } } // Set accepted/refused if ($object->statut == Propal::STATUS_VALIDATED && $usercanclose) { - print ''; + print 'global->MAIN_JUMP_TAG) ? '' : '#close') . '"'; + print '>' . $langs->trans('SetAcceptedRefused') . ''; } // Clone if ($usercancreate) { - print ''; + print '' . $langs->trans("ToClone") . ''; } // Delete if ($usercandelete) { - print ''; + print '' . $langs->trans('Delete') . ''; } } } diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index 7afb14a8da2..1337c62da94 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -227,7 +227,7 @@ class Proposals extends DolibarrApi } if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $this->propal->getLinesArray(); $result = array(); @@ -255,7 +255,7 @@ class Proposals extends DolibarrApi $result = $this->propal->fetch($id); if (! $result) { - throw new RestException(404, 'Commercial Proposal not found'); + throw new RestException(404, 'Commercial Proposal not found'); } if (! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index e9d969e5ab8..0df1af873a8 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -13,7 +13,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -95,8 +95,17 @@ class Propal extends CommonObject */ public $socid; + /** + * ID of the contact + * @var int + */ public $contactid; public $author; + + /** + * Ref from thirdparty + * @var string + */ public $ref_client; /** @@ -192,8 +201,8 @@ class Propal extends CommonObject public $lines = array(); public $line; - public $labelstatut=array(); - public $labelstatut_short=array(); + public $labelStatus=array(); + public $labelStatusShort=array(); public $specimen; @@ -240,7 +249,7 @@ class Propal extends CommonObject * @param int $socid Id third party * @param int $propalid Id proposal */ - public function __construct($db, $socid = "", $propalid = 0) + public function __construct($db, $socid = 0, $propalid = 0) { global $conf,$langs; @@ -1287,7 +1296,11 @@ class Propal extends CommonObject $object->datep = $now; // deprecated $object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600); if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = ''; - + if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1) + { + $object->note_private = ''; + $object->note_public = ''; + } // Create clone $object->context['createfromclone']='createfromclone'; $result=$object->create($user); @@ -1682,13 +1695,13 @@ class Propal extends CommonObject $line->fk_product = $objp->fk_product; - $line->ref = $objp->product_ref; // TODO deprecated + $line->ref = $objp->product_ref; // deprecated $line->product_ref = $objp->product_ref; - $line->libelle = $objp->product_label; // TODO deprecated + $line->libelle = $objp->product_label; // deprecated $line->product_label = $objp->product_label; $line->product_desc = $objp->product_desc; // Description produit $line->product_tobatch = $objp->product_tobatch; - $line->fk_product_type = $objp->fk_product_type; // TODO deprecated + $line->fk_product_type = $objp->fk_product_type; // deprecated $line->fk_unit = $objp->fk_unit; $line->weight = $objp->weight; $line->weight_units = $objp->weight_units; @@ -1710,9 +1723,9 @@ class Propal extends CommonObject // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { - $line = new Product($this->db); - $line->fetch($objp->fk_product); - $line->getMultiLangs(); + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); } $this->lines[$i] = $line; @@ -3196,40 +3209,40 @@ class Propal extends CommonObject /** * Return label of a status (draft, validated, ...) * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 1) + public function LibStatut($status, $mode = 1) { // phpcs:enable global $conf; // Init/load array of translation of status - if (empty($this->labelstatut) || empty($this->labelstatut_short)) + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $langs->load("propal"); - $this->labelstatut[0]=$langs->trans("PropalStatusDraft"); - $this->labelstatut[1]=$langs->trans("PropalStatusValidated"); - $this->labelstatut[2]=$langs->trans("PropalStatusSigned"); - $this->labelstatut[3]=$langs->trans("PropalStatusNotSigned"); - $this->labelstatut[4]=$langs->trans("PropalStatusBilled"); - $this->labelstatut_short[0]=$langs->trans("PropalStatusDraftShort"); - $this->labelstatut_short[1]=$langs->trans("PropalStatusValidatedShort"); - $this->labelstatut_short[2]=$langs->trans("PropalStatusSignedShort"); - $this->labelstatut_short[3]=$langs->trans("PropalStatusNotSignedShort"); - $this->labelstatut_short[4]=$langs->trans("PropalStatusBilledShort"); + $this->labelStatus[0]=$langs->trans("PropalStatusDraft"); + $this->labelStatus[1]=$langs->trans("PropalStatusValidated"); + $this->labelStatus[2]=$langs->trans("PropalStatusSigned"); + $this->labelStatus[3]=$langs->trans("PropalStatusNotSigned"); + $this->labelStatus[4]=$langs->trans("PropalStatusBilled"); + $this->labelStatusShort[0]=$langs->trans("PropalStatusDraftShort"); + $this->labelStatusShort[1]=$langs->trans("PropalStatusValidatedShort"); + $this->labelStatusShort[2]=$langs->trans("PropalStatusSignedShort"); + $this->labelStatusShort[3]=$langs->trans("PropalStatusNotSignedShort"); + $this->labelStatusShort[4]=$langs->trans("PropalStatusBilledShort"); } $statusType=''; - if ($statut==self::STATUS_DRAFT) $statusType='status0'; - elseif ($statut==self::STATUS_VALIDATED) $statusType='status1'; - elseif ($statut==self::STATUS_SIGNED) $statusType='status3'; - elseif ($statut==self::STATUS_NOTSIGNED) $statusType='status5'; - elseif ($statut==self::STATUS_BILLED) $statusType='status6'; + if ($status==self::STATUS_DRAFT) $statusType='status0'; + elseif ($status==self::STATUS_VALIDATED) $statusType='status1'; + elseif ($status==self::STATUS_SIGNED) $statusType='status3'; + elseif ($status==self::STATUS_NOTSIGNED) $statusType='status5'; + elseif ($status==self::STATUS_BILLED) $statusType='status6'; - return dolGetStatus($this->labelstatut[$statut], $this->labelstatut_short[$statut], '', $statusType, $mode); + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -3250,7 +3263,7 @@ class Propal extends CommonObject $sql = "SELECT p.rowid, p.ref, p.datec as datec, p.fin_validite as datefin, p.total_ht"; $sql.= " FROM ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -3259,7 +3272,7 @@ class Propal extends CommonObject $sql.= $clause." p.entity IN (".getEntity('propal').")"; if ($mode == 'opened') $sql.= " AND p.fk_statut = ".self::STATUS_VALIDATED; if ($mode == 'signed') $sql.= " AND p.fk_statut = ".self::STATUS_SIGNED; - if ($user->societe_id) $sql.= " AND p.fk_soc = ".$user->societe_id; + if ($user->socid) $sql.= " AND p.fk_soc = ".$user->socid; $resql=$this->db->query($sql); if ($resql) @@ -3268,17 +3281,17 @@ class Propal extends CommonObject $now=dol_now(); $delay_warning = 0; - $statut = 0; + $status = 0; $label = $labelShort = ''; if ($mode == 'opened') { $delay_warning=$conf->propal->cloture->warning_delay; - $statut = self::STATUS_VALIDATED; + $status = self::STATUS_VALIDATED; $label = $langs->trans("PropalsToClose"); $labelShort = $langs->trans("ToAcceptRefuse"); } if ($mode == 'signed') { $delay_warning=$conf->propal->facturation->warning_delay; - $statut = self::STATUS_SIGNED; + $status = self::STATUS_SIGNED; $label = $langs->trans("PropalsToBill"); // We set here bill but may be billed or ordered $labelShort = $langs->trans("ToBill"); } @@ -3287,8 +3300,8 @@ class Propal extends CommonObject $response->warning_delay = $delay_warning/60/60/24; $response->label = $label; $response->labelShort = $labelShort; - $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals'; - $response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc'; + $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals'; + $response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc'; $response->img = img_object('', "propal"); // This assignment in condition is not a bug. It allows walking the results. @@ -3399,7 +3412,7 @@ class Propal extends CommonObject { $prodid = mt_rand(1, $num_prods); $line->fk_product=$prodids[$prodid]; - $line->product_ref='SPECIMEN'; + $line->product_ref='SPECIMEN'; } $this->lines[$xnbp]=$line; @@ -3429,7 +3442,7 @@ class Propal extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -3480,7 +3493,6 @@ class Propal extends CommonObject // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/propale/"); // Load file with numbering class (if found) @@ -3623,7 +3635,6 @@ class Propal extends CommonObject $langs->load("propale"); if (! dol_strlen($modele)) { - $modele = 'azur'; if ($this->modelpdf) { @@ -3917,7 +3928,7 @@ class PropaleLigne extends CommonObjectLine if (empty($this->multicurrency_total_tva)) $this->multicurrency_total_tva=0; if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc=0; - // if buy price not defined, define buyprice as configured in margin admin + // if buy price not defined, define buyprice as configured in margin admin if ($this->pa_ht == 0 && $pa_ht_isemptystring) { if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) @@ -4039,7 +4050,6 @@ class PropaleLigne extends CommonObjectLine dol_syslog("PropaleLigne::delete", LOG_DEBUG); if ($this->db->query($sql) ) { - // Remove extrafields if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used { diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index bd0f57bc801..0859bdb7974 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -112,7 +112,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, COUNT(*) as nb"; $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 96673084580..14f5913c4ce 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -41,7 +41,7 @@ $lineid=GETPOST('lineid', 'int'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'propal', $id); $object = new Propal($db); @@ -170,20 +170,21 @@ if ($object->id > 0) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->propal->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 14b845a3e8a..55a21445be2 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -46,9 +46,9 @@ $ref = GETPOST('ref', 'alpha'); // Security check $socid=''; -if (! empty($user->societe_id)) +if (! empty($user->socid)) { - $socid = $user->societe_id; + $socid = $user->socid; } $result = restrictedArea($user, 'propal', $id); @@ -60,6 +60,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; @@ -121,20 +125,21 @@ if ($object->id > 0) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->propal->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 321cb719f63..ed981d9488b 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -38,10 +38,10 @@ $langs->loadLangs(array('propal', 'companies')); // Security check $socid=GETPOST('socid', 'int'); -if (isset($user->societe_id) && $user->societe_id > 0) +if (isset($user->socid) && $user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $result = restrictedArea($user, 'propal'); @@ -69,7 +69,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; - print '
'; diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 07bf2861d71..c898fef8be1 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -62,6 +62,7 @@ $object = new Categorie($db); /* * Actions */ +$error = 0; // retour a l'affichage des traduction si annulation if ($cancel == $langs->trans("Cancel")) @@ -78,28 +79,44 @@ $cancel != $langs->trans("Cancel") && $object->fetch($id); $current_lang = $langs->getDefaultLang(); - // update de l'objet - if ( $_POST["forcelangprod"] == $current_lang ) - { - $object->label = $_POST["libelle"]; - $object->description = dol_htmlcleanlastbr($_POST["desc"]); - } - else - { - $object->multilangs[$_POST["forcelangprod"]]["label"] = $_POST["libelle"]; - $object->multilangs[$_POST["forcelangprod"]]["description"] = dol_htmlcleanlastbr($_POST["desc"]); - } + // check parameters + $forcelangprod = GETPOST('forcelangprod', 'alpha'); + $libelle = GETPOST('libelle', 'alpha'); + $desc = GETPOST('desc'); - // sauvegarde en base - if ( $object->setMultiLangs($user) > 0 ) - { - $action = ''; - } - else - { - $action = 'add'; - setEventMessages($object->error, $object->errors, 'errors'); - } + if (empty($forcelangprod)) { + $error++; + $object->errors[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Translation')); + } + + if (!$error) { + if (empty($libelle)) { + $error++; + $object->errors[] = $langs->trans('Language_' . $forcelangprod) . ' : ' . $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label')); + } + + if (!$error) { + // update de l'objet + if ($forcelangprod == $current_lang) { + $object->label = $libelle; + $object->description = dol_htmlcleanlastbr($desc); + } else { + $object->multilangs[$forcelangprod]["label"] = $libelle; + $object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr($desc); + } + + // sauvegarde en base + $res = $object->setMultiLangs($user); + if ($res < 0) $error++; + } + } + + if ($error) { + $action = 'add'; + setEventMessages($object->error, $object->errors, 'errors'); + } else { + $action = ''; + } } // Validation de l'edition @@ -112,27 +129,34 @@ $cancel != $langs->trans("Cancel") && foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet { - if ( $key == $current_lang ) - { - $object->label = $_POST["libelle-".$key]; - $object->description = dol_htmlcleanlastbr($_POST["desc-".$key]); - } - else - { - $object->multilangs[$key]["label"] = $_POST["libelle-".$key]; - $object->multilangs[$key]["description"] = dol_htmlcleanlastbr($_POST["desc-".$key]); + $libelle = GETPOST('libelle-'. $key, 'alpha'); + $desc = GETPOST('desc-' . $key); + + if (empty($libelle)) { + $error++; + $object->errors[] = $langs->trans('Language_' . $key) . ' : ' . $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label')); + } + + if ( $key == $current_lang ) { + $object->label = $libelle; + $object->description = dol_htmlcleanlastbr($desc); + } else { + $object->multilangs[$key]["label"] = $libelle; + $object->multilangs[$key]["description"] = dol_htmlcleanlastbr($desc); } } - if ( $object->setMultiLangs($user) > 0 ) - { - $action = ''; - } - else - { - $action = 'edit'; - setEventMessages($object->error, $object->errors, 'errors'); - } + if (!$error) { + $res = $object->setMultiLangs($user); + if ($res < 0) $error++; + } + + if ($error) { + $action = 'edit'; + setEventMessages($object->error, $object->errors, 'errors'); + } else { + $action = ''; + } } $result = $object->fetch($id, $ref); @@ -183,14 +207,14 @@ foreach ($ways as $way) } $morehtmlref.=''; -dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); +dol_banner_tab($object, 'ref', $linkback, ($user->socid?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); print '
'; print '
'; print '
'; -print ''; +print '
'; // Description print '
'; @@ -224,8 +248,8 @@ if ($action == '') { if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''.$langs->trans("Add").''; - if ($cnt_trans > 0) print ''.$langs->trans("Update").''; + print ''.$langs->trans('Add').''; + if ($cnt_trans > 0) print ''.$langs->trans('Update').''; } } @@ -242,16 +266,22 @@ if ($action == 'edit') print ''; print ''; print ''; + print ''; if (! empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { print "
".$langs->trans('Language_'.$key)." :
"; - print ''; - print ''; + print '
'.$langs->trans('Label').'
'; + + // Label + $libelle = (GETPOST('libelle-'.$key, 'alpha') ? GETPOST('libelle-'.$key, 'alpha') : $object->multilangs[$key]['label']); + print ''; + // Desc + $desc = (GETPOST('desc-'.$key) ? GETPOST('desc-'.$key) : $object->multilangs[$key]['description']); print ''; @@ -279,8 +309,8 @@ elseif ($action != 'add') foreach ($object->multilangs as $key => $value) { $s=picto_from_langcode($key); - print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; - $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); + $doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); print '
'; - print ''; + print '
'.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
'; + print ''; print ''; print ''; if (! empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION)) @@ -308,14 +338,16 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print ''; print ''; + print ''; - print '
'.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'; + print '
'; print ''; - print ''; + print ''; + print ''; print ''; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 737b488c090..e109970ce33 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -125,7 +125,6 @@ if ($id > 0 && $removeelem > 0) $elementtype = 'member'; } elseif ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { - require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $tmpobject = new Contact($db); $result = $tmpobject->fetch($removeelem); @@ -227,7 +226,7 @@ foreach ($ways as $way) } $morehtmlref.=''; -dol_banner_tab($object, 'label', $linkback, ($user->societe_id?0:1), 'label', 'label', $morehtmlref, '', 0, '', '', 1); +dol_banner_tab($object, 'label', $linkback, ($user->socid?0:1), 'label', 'label', $morehtmlref, '', 0, '', '', 1); /* @@ -370,7 +369,7 @@ if ($type == Categorie::TYPE_PRODUCT) print ''; print ''; print ''; - print '
'.$langs->trans('Translation').''; - print $formadmin->select_language('', 'forcelangprod', 0, $object->multilangs); + print $formadmin->select_language(GETPOST('forcelangprod', 'alpha'), 'forcelangprod', 0, $object->multilangs); print '
'.$langs->trans('Label').'
' . $langs->trans('Label') . '
'.$langs->trans('Description').''; - $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); + $doleditor = new DolEditor('desc', GETPOST('desc', 'none'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); print '
'; + print '
'; print ''; @@ -425,8 +425,6 @@ if ($object->id > 0) print ''; print ''; } @@ -567,7 +565,7 @@ if ($object->id > 0) if ($object->stcomm_id != $val['id']) print ''.img_action($titlealt, $val['code']).''; } print ''; - print "
'; print $langs->trans("AddProductServiceIntoCategory").'  '; print $form->select_produits('', 'elemid', '', 0, 0, -1, 2, '', 1); @@ -456,7 +455,7 @@ if ($type == Categorie::TYPE_SUPPLIER) $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; $newcardbutton = ''; print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit); - print ''."\n"; + print '
'."\n"; print '\n"; if (count($socs) > 0) @@ -521,7 +520,7 @@ if($type == Categorie::TYPE_CUSTOMER) $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; $newcardbutton = ''; print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit); - print '
'.$langs->trans("Name")."
'."\n"; + print '
'."\n"; print ''."\n"; if (count($socs) > 0) @@ -644,7 +643,6 @@ if ($type == Categorie::TYPE_CONTACT) } else { - print ''; print ''; print ''; @@ -656,7 +654,7 @@ if ($type == Categorie::TYPE_CONTACT) $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($contacts); $nbtotalofrecords = ''; $newcardbutton = ''; print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit); - print '
'.$langs->trans("Name").'
'."\n"; + print '
'."\n"; print ''."\n"; if (count($contacts) > 0) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index baf454fdf67..09c8e344794 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -69,9 +69,9 @@ $datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fullda // Security check $socid = GETPOST('socid', 'int'); $id = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id'); -if ($user->societe_id && $socid) $result = restrictedArea($user, 'societe', $socid); +if ($user->socid && $socid) $result = restrictedArea($user, 'societe', $socid); $error=GETPOST("error"); $donotclearsession=GETPOST('donotclearsession')?GETPOST('donotclearsession'):0; @@ -94,7 +94,7 @@ if ($id > 0 && $action!='add') { $ret1 = $object->fetch_userassigned(); } if ($ret < 0 || $ret1 < 0) { - dol_print_error('', $object->error); + dol_print_error('', $object->error); } } @@ -278,7 +278,6 @@ if (empty($reshook) && $action == 'add') $taskid = GETPOST('taskid', 'int'); if(!empty($taskid)){ - $taskProject = new Task($db); if($taskProject->fetch($taskid)>0){ $object->fk_project = $taskProject->fk_project; @@ -757,7 +756,7 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') // Actions to delete doc $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref); -$permissioncreate = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read)); +$permissiontoadd = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read)); if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -862,11 +861,11 @@ if ($action == 'create') if (GETPOST('datep', 'int', 1)) $datep=dol_stringtotime(GETPOST('datep', 'int', 1), 0); print ''; @@ -1025,8 +1024,8 @@ if ($action == 'create') $events=array(); $events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); //For external user force the company to user company - if (!empty($user->societe_id)) { - print $form->select_company($user->societe_id, 'socid', '', 1, 1, 0, $events, 0, 'minwidth300'); + if (!empty($user->socid)) { + print $form->select_company($user->socid, 'socid', '', 1, 1, 0, $events, 0, 'minwidth300'); } else { print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth300'); } @@ -1080,6 +1079,8 @@ if ($action == 'create') $formproject->selectTasks((! empty($societe->id)?$societe->id:-1), $tid, 'taskid', 24, 0, '1', 1, 0, 0, 'maxwidth500', $projectsListId); print ''; } + + // Object linked if (!empty($origin) && !empty($originid)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -1581,19 +1582,20 @@ if ($id > 0) if ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create)) { - if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); @@ -1610,7 +1612,7 @@ if ($id > 0) $morehtmlref.=''; - dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, ($user->socid?0:1), 'id', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 5803c0afc20..a07e4ceba1a 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -45,43 +45,67 @@ class ActionComm extends CommonObject */ public $table_element = 'actioncomm'; + /** + * @var string Name of id column + */ public $table_rowid = 'id'; /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + * @var string Name of icon for actioncomm object. Filename of icon is object_action.png */ public $picto = 'action'; /** - * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - * @var int + * @var int 0=No test on entity, 1=Test with field entity, 2=Test with link by societe */ public $ismultientitymanaged = 1; /** - * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user, 2=Same than 1 but accept record if fksoc is empty - * @var integer + * @var integer 0=Default + * 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user + * 2=Same than 1 but accept record if fksoc is empty */ public $restrictiononfksoc = 2; /** - * Id of the event - * @var int + * @var int Id of the event */ public $id; /** - * Id of the event. Use $id as possible - * @var int + * @var int Id of the event. Use $id as possible */ public $ref; - public $type_id; // Id into parent table llx_c_actioncomm (used only if option to use type is set) - public $type_code; // Code into parent table llx_c_actioncomm (used only if option to use type is set). With default setup, should be AC_OTH_AUTO or AC_OTH. + /** + * @var int Id into parent table llx_c_actioncomm (used only if option to use type is set) + */ + public $type_id; + + /** + * @var string Code into parent table llx_c_actioncomm (used only if option to use type is set). With default setup, should be AC_OTH_AUTO or AC_OTH. + */ + public $type_code; + + /** + * @var string Type label + */ public $type_label; - public $type; // Label into parent table llx_c_actioncomm (used only if option to use type is set) - public $type_color; // Color into parent table llx_c_actioncomm (used only if option to use type is set) - public $code; // Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...) + + /** + * @var string Label into parent table llx_c_actioncomm (used only if option to use type is set) + */ + public $type; + + /** + * @var string Color into parent table llx_c_actioncomm (used only if option to use type is set) + */ + public $type_color; + + /** + * @var string Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...) + */ + public $code; /** * @var string Agenda event label @@ -89,72 +113,56 @@ class ActionComm extends CommonObject public $label; /** - * Date creation record (datec) - * - * @var integer + * @var integer Date creation record (datec) */ public $datec; /** - * Date end record (datef) - * - * @var integer + * @var integer Date end record (datef) */ public $datef; /** - * Duration (duree) - * - * @var integer + * @var integer Duration (duree) */ public $duree; /** - * Date modification record (tms) - * - * @var integer + * @var integer Date modification record (tms) */ public $datem; /** - * Object user that create action - * @var User + * @var User Object user that create action * @deprecated * @see $authorid */ public $author; /** - * Object user that modified action - * @var User + * @var User Object user that modified action * @deprecated * @see $usermodid */ public $usermod; /** - * Id user that create action - * @var int + * @var int Id user that create action */ public $authorid; /** - * Id user that modified action - * @var int + * @var int Id user that modified action */ public $usermodid; /** - * Date action start (datep) - * - * @var integer + * @var integer Date action start (datep) */ public $datep; /** - * Date action end (datep2) - * - * @var integer + * @var integer Date action end (datep2) */ public $datep2; @@ -163,90 +171,178 @@ class ActionComm extends CommonObject * @deprecated */ public $durationp = -1; - public $fulldayevent = 0; // 1=Event on full day /** - * Milestone - * @var int + * @var int 1=Event on full day + */ + public $fulldayevent = 0; + + /** + * @var int Milestone * @deprecated Milestone is already event with end date = start date */ public $punctual = 1; - public $percentage; // Percentage - public $location; // Location - public $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events) - public $priority; // Small int (0 By default) + /** + * @var integer Percentage + */ + public $percentage; - public $userassigned = array(); // Array of user ids - public $userownerid; // Id of user owner = fk_user_action into table - public $userdoneid; // Id of user done (deprecated) + /** + * @var string Location + */ + public $location; - public $socpeopleassigned = array(); // Array of contact ids + /** + * @var int Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events) + */ + public $transparency; - public $otherassigned = array(); // Array of other contact emails (not user, not contact) + /** + * @var int (0 By default) + */ + public $priority; + + /** + * @var int[] Array of user ids + */ + public $userassigned = array(); + + /** + * @var int Id of user owner = fk_user_action into table + */ + public $userownerid; + + /** + * @var int Id of user done (deprecated) + * @deprecated + */ + public $userdoneid; + + /** + * @var int[] Array of contact ids + */ + public $socpeopleassigned = array(); + + /** + * @var int[] Array of other contact emails (not user, not contact) + */ + public $otherassigned = array(); - /** - * Object user of owner - * @var User + /** + * @var User Object user of owner * @deprecated * @see userownerid */ public $usertodo; /** - * Object user that did action - * @var User + * @var User Object user that did action * @deprecated * @see userdoneid */ public $userdone; + /** + * @var int thirdparty id linked to action + */ public $socid; + + /** + * @var int socpeople id linked to action + */ public $contactid; /** - * Company linked to action (optional) - * @var Societe|null + * @var Societe|null Company linked to action (optional) * @deprecated * @see socid */ public $societe; /** - * Contact linked to action (optional) - * @var Contact|null + * @var Contact|null Contact linked to action (optional) * @deprecated * @see contactid */ public $contact; // Properties for links to other objects + /** + * @var int Id of linked object + */ public $fk_element; // Id of record - public $elementid; // Id of record alternative for API - public $elementtype; // Type of record. This if property ->element of object linked to. - // Ical + /** + * @var int Id of record alternative for API + */ + public $elementid; + + /** + * @var string Type of record. This if property ->element of object linked to. + */ + public $elementtype; + + /** + * @var string Ical name + */ public $icalname; + + /** + * @var string Ical color + */ public $icalcolor; + /** + * @var array Actions + */ public $actions=array(); - // Fields for emails + /** + * @var string Email msgid + */ public $email_msgid; + + /** + * @var string Email from + */ public $email_from; + + /** + * @var string Email sender + */ public $email_sender; + + /** + * @var string Email to + */ public $email_to; + + /** + * @var string Email tocc + */ public $email_tocc; + /** + * @var string Email tobcc + */ public $email_tobcc; + + /** + * @var string Email subject + */ public $email_subject; + + /** + * @var string Email errors to + */ public $errors_to; /** * Constructor * - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler */ public function __construct(DoliDB $db) { @@ -484,9 +580,9 @@ class ActionComm extends CommonObject return $this->id; } else - { - $this->db->rollback(); - return -1; + { + $this->db->rollback(); + return -1; } } else @@ -1043,7 +1139,7 @@ class ActionComm extends CommonObject return $resarray; } else - { + { return $db->lasterror(); } } @@ -1067,13 +1163,13 @@ class ActionComm extends CommonObject $sql = "SELECT count(a.id) as nb"; } $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql.= " WHERE 1 = 1"; if(empty($load_state_board)) $sql.= " AND a.percent >= 0 AND a.percent < 100"; $sql.= " AND a.entity IN (".getEntity('agenda').")"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; - if ($user->societe_id) $sql.=" AND a.fk_soc = ".$user->societe_id; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; + if ($user->socid) $sql.=" AND a.fk_soc = ".$user->socid; if (! $user->rights->agenda->allactions->read) $sql.= " AND (a.fk_user_author = ".$user->id . " OR a.fk_user_action = ".$user->id . " OR a.fk_user_done = ".$user->id . ")"; $resql=$this->db->query($sql); @@ -1344,7 +1440,6 @@ class ActionComm extends CommonObject $linkstart = ''; $linkend = ''; } - //print 'rrr'.$this->libelle.'rrr'.$this->label.'rrr'.$withpicto; if ($withpicto == 2) { @@ -1461,9 +1556,9 @@ class ActionComm extends CommonObject $sql.= " a.fk_contact, a.percent as percentage,"; $sql.= " a.fk_element, a.elementtype,"; $sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,"; - $sql.= " u.firstname, u.lastname,"; + $sql.= " u.firstname, u.lastname, u.email,"; $sql.= " s.nom as socname,"; - $sql.= " c.id as type_id, c.code as type_code, c.libelle"; + $sql.= " c.id as type_id, c.code as type_code, c.libelle as type_label"; $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; @@ -1543,7 +1638,19 @@ class ActionComm extends CommonObject $event['uid']='dolibarragenda-'.$this->db->database_name.'-'.$obj->id."@".$_SERVER["SERVER_NAME"]; $event['type']=$type; $datestart=$this->db->jdate($obj->datep)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600)); - $dateend=$this->db->jdate($obj->datep2)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600)); + + // fix for -> Warning: A non-numeric value encountered + if(is_numeric($this->db->jdate($obj->datep2))) + { + $dateend = $this->db->jdate($obj->datep2) + - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); + } + else + { + // use start date as fall-back to avoid import erros on empty end date + $dateend = $datestart; + } + $duration=($datestart && $dateend)?($dateend - $datestart):0; $event['summary']=$obj->label.($obj->socname?" (".$obj->socname.")":""); $event['desc']=$obj->note; @@ -1556,7 +1663,8 @@ class ActionComm extends CommonObject $event['location']=$obj->location; $event['transparency']=(($obj->transparency > 0)?'OPAQUE':'TRANSPARENT'); // OPAQUE (busy) or TRANSPARENT (not busy) $event['punctual']=$obj->punctual; - $event['category']=$obj->libelle; // libelle type action + $event['category']=$obj->type_label; + $event['email']=$obj->email; // Define $urlwithroot $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file @@ -1566,6 +1674,22 @@ class ActionComm extends CommonObject $event['created']=$this->db->jdate($obj->datec)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600)); $event['modified']=$this->db->jdate($obj->datem)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600)); + // TODO: find a way to call "$this->fetch_userassigned();" without override "$this" properties + $this->id = $obj->id; + $this->fetch_userassigned(); + + $assignedUserArray = array(); + + foreach($this->userassigned as $key => $value) + { + $assignedUser = new User($this->db); + $assignedUser->fetch($value['id']); + + $assignedUserArray[$key]=$assignedUser; + } + + $event['assignedUsers']=$assignedUserArray; + if ($qualified && $datestart) { $eventarray[]=$event; diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 652e0d80966..f3fa2cd47c1 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -338,6 +338,7 @@ class AgendaEvents extends DolibarrApi // phpcs:enable $object = parent::_cleanObjectDatas($object); + unset($object->note); // alreaydy into note_private unset($object->usermod); unset($object->libelle); unset($object->context); @@ -350,6 +351,11 @@ class AgendaEvents extends DolibarrApi unset($object->origin_id); unset($object->ref_ext); unset($object->statut); + unset($object->state_code); + unset($object->state_id); + unset($object->state); + unset($object->region); + unset($object->region_code); unset($object->country); unset($object->country_id); unset($object->country_code); @@ -378,6 +384,9 @@ class AgendaEvents extends DolibarrApi unset($object->contact); unset($object->societe); + unset($object->actions); + unset($object->lines); + return $object; } } diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php index 7c696b70247..5587da16556 100644 --- a/htdocs/comm/action/class/ical.class.php +++ b/htdocs/comm/action/class/ical.class.php @@ -379,7 +379,7 @@ class ICal return $temp; } else - { + { return false; } } diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 6f0875be879..f01f49921e7 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -45,8 +45,8 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; -if ($user->societe_id > 0) +if ($user->socid) $socid=$user->socid; +if ($user->socid > 0) { unset($_GET["action"]); $action=''; @@ -159,7 +159,7 @@ if ($object->id > 0) } $morehtmlref.='
'; - dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, ($user->socid?0:1), 'id', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index d503c1bc71d..9b35f21a0b2 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -67,7 +67,7 @@ if (! $sortfield) $sortfield="a.datec"; // Security check $socid = GETPOST("search_socid", "int")?GETPOST("search_socid", "int"):GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'agenda', 0, '', 'myactions'); if ($socid < 0) $socid=''; @@ -519,14 +519,14 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND ca.type = 'systemauto'"; else { - if (is_array($actioncode)) - { + if (is_array($actioncode)) + { $sql.=" AND ca.code IN ('".implode("','", $actioncode)."')"; - } - else - { + } + else + { $sql.=" AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; - } + } } } } @@ -614,7 +614,7 @@ if ($resql) $event->type_label=$obj->type_label; $event->type_color=$obj->type_color; - $event->libelle=$obj->label; + $event->libelle=$obj->label; // deprecated $event->label=$obj->label; $event->percentage=$obj->percent; $event->authorid=$obj->fk_user_author; // user id of creator @@ -720,7 +720,7 @@ if ($showbirthday) $event->datep=dol_mktime(0, 0, 0, $datearray['mon'], $datearray['mday'], $year, true); // For full day events, date are also GMT but they wont but converted during output $event->datef=$event->datep; $event->type_code='BIRTHDAY'; - $event->libelle=$langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname); + $event->label=$langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname); $event->percentage=100; $event->fulldayevent=1; @@ -949,9 +949,9 @@ if (count($listofextcals)) $event->datef=$dateend+$usertime; $event->type_code="ICALEVENT"; - if($icalevent['SUMMARY']) $event->libelle=$icalevent['SUMMARY']; - elseif($icalevent['DESCRIPTION']) $event->libelle=dol_nl2br($icalevent['DESCRIPTION'], 1); - else $event->libelle = $langs->trans("ExtSiteNoLabel"); + if($icalevent['SUMMARY']) $event->label=$icalevent['SUMMARY']; + elseif($icalevent['DESCRIPTION']) $event->label=dol_nl2br($icalevent['DESCRIPTION'], 1); + else $event->label = $langs->trans("ExtSiteNoLabel"); $event->date_start_in_calendar=$event->datep; @@ -1554,7 +1554,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Show title $titletoshow = $daterange; - $titletoshow.=($titletoshow?' ':'').$event->libelle; + $titletoshow.=($titletoshow?' ':'').($event->label?$event->label:$event->libelle); if ($event->type_code == 'ICALEVENT') print $titletoshow; else @@ -1719,7 +1719,6 @@ function dol_color_minus($color, $minus, $minusunit = 16) return $newcolor; } - /** * Sort events by date * @@ -1729,11 +1728,52 @@ function dol_color_minus($color, $minus, $minusunit = 16) */ function sort_events_by_date($a, $b) { - if($a->datep != $b->datep) - { - return $a->datep - $b->datep; - } + // datep => Event start time + // datef => Event end time - // If both events have the same start time, longest first - return $b->datef - $a->datef; + // Events have different start time + if ($a->datep !== $b->datep) + { + return $a->datep - $b->datep; + } + + // Events have same start time and no end time + if ((! is_numeric($b->datef)) || (! is_numeric($a->datef))) + { + return sort_events_by_percentage($a, $b); + } + + // Events have the same start time and same end time + if ($b->datef === $a->datef) + { + return sort_events_by_percentage($a, $b); + } + + // Events have the same start time, but have different end time -> longest event first + return $b->datef - $a->datef; +} + +/** + * Sort events by percentage + * + * @param object $a Event A + * @param object $b Event B + * @return int < 0 if event A should be before event B, > 0 otherwise, 0 if they have the exact same percentage + */ +function sort_events_by_percentage($a, $b) +{ + // Sort events with no percentage before each other + // (usefull to sort holidays, sick days or similar on the top) + + if ($a->percentage < 0) + { + return -1; + } + + if ($b->percentage < 0) + { + return 1; + } + + return $b->percentage - $a->percentage; } diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index c873adee9de..a88ff67fd91 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -39,10 +39,10 @@ $langs->load("commercial"); $id = GETPOST('id', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { - $action = ''; - $socid = $user->societe_id; + $action = ''; + $socid = $user->socid; } $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id'); @@ -102,7 +102,7 @@ if (! empty($conf->projet->enabled)) } $morehtmlref.='
'; -dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', $morehtmlref); +dol_banner_tab($object, 'id', $linkback, ($user->socid?0:1), 'id', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index efb11a7e22b..48faa5ca2c0 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/comm/action/list.php + * \file htdocs/comm/action/list.php * \ingroup agenda * \brief Page to list actions */ @@ -110,7 +110,7 @@ if (! $sortfield) // Security check $socid = GETPOST("search_socid", 'int')?GETPOST("search_socid", 'int'):GETPOST("socid", 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'agenda', 0, '', 'myactions'); if ($socid < 0) $socid=''; @@ -138,13 +138,16 @@ $arrayfields=array( 'a.tms'=>array('label'=>'DateModification', 'checked'=>0) ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); /* @@ -239,7 +242,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $sql = "SELECT"; if ($usergroup > 0) $sql.=" DISTINCT"; $sql.= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,"; -$sql.= " a.id, a.label, a.note, a.datep as dp, a.datep2 as dp2,"; +$sql.= " a.id, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,"; $sql.= ' a.fk_user_author,a.fk_user_action,'; $sql.= " a.fk_contact, a.note, a.percent as percent,"; $sql.= " a.fk_element, a.elementtype, a.datec, a.tms as datem,"; @@ -247,7 +250,9 @@ $sql.= " c.code as type_code, c.libelle as type_label,"; $sql.= " sp.lastname, sp.firstname, sp.email, sp.phone, sp.address, sp.phone as phone_pro, sp.phone_mobile, sp.phone_perso, sp.fk_pays as country_id"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); @@ -286,14 +291,14 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'"; else { - if (is_array($actioncode)) - { - $sql.=" AND c.code IN ('".implode("','", $actioncode)."')"; - } - else - { - $sql.=" AND c.code IN ('".implode("','", explode(',', $actioncode))."')"; - } + if (is_array($actioncode)) + { + $sql.=" AND c.code IN ('".implode("','", $actioncode)."')"; + } + else + { + $sql.=" AND c.code IN ('".implode("','", explode(',', $actioncode))."')"; + } } } } @@ -460,7 +465,7 @@ if ($resql) print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0); print ''; } - if (! empty($arrayfields['a.datep2']['checked'])) { + if (! empty($arrayfields['a.datep2']['checked'])) { print ''; @@ -483,7 +488,7 @@ if ($resql) if (! empty($arrayfields['a.tms']['checked'])) print ''; if (! empty($arrayfields['a.percent']['checked'])) { print ''; } @@ -548,6 +553,7 @@ if ($resql) $actionstatic->type_label=$obj->type_label; $actionstatic->type_picto=$obj->type_picto; $actionstatic->label=$obj->label; + $actionstatic->location = $obj->location; $actionstatic->note=dol_htmlentitiesbr($obj->note); print ''; @@ -609,11 +615,11 @@ if ($resql) print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note); print ''; } - + $formatToUse = $obj->fulldayevent?'day':'dayhour'; // Start date if (! empty($arrayfields['a.datep']['checked'])) { print ''; } @@ -696,15 +702,15 @@ if ($resql) // Linked object if (! empty($arrayfields['a.fk_element']['checked'])) { - print ''; + print ''; } // Extra fields diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 286863c7dc6..134e239b66f 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -65,7 +65,7 @@ if (! $sortfield) $sortfield="a.datec"; // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'agenda', 0, '', 'myactions'); if ($socid < 0) $socid=''; @@ -616,12 +616,12 @@ $typeofevents=array(); // Load array of colors by type $colorsbytype=array(); $labelbytype=array(); -$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm"; +$sql="SELECT code, color, libelle as label FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position"; $resql=$db->query($sql); while ($obj = $db->fetch_object($resql)) { $colorsbytype[$obj->code]=$obj->color; - $labelbytype[$obj->code]=$obj->libelle; + $labelbytype[$obj->code]=$obj->label; } // Loop on each user to show calendar diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index e6ee5e9d1d0..3280ddc7af4 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -65,7 +65,7 @@ if (! $sortfield) $sortfield="a.datec"; // Security check $socid = GETPOST("search_socid", "int")?GETPOST("search_socid", "int"):GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'agenda', 0, '', 'myactions'); if ($socid < 0) $socid=''; @@ -418,14 +418,14 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND ca.type = 'systemauto'"; else { - if (is_array($actioncode)) - { + if (is_array($actioncode)) + { $sql.=" AND ca.code IN ('".implode("','", $actioncode)."')"; - } - else - { + } + else + { $sql.=" AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; - } + } } } } @@ -631,7 +631,6 @@ $currentdaytoshow = $firstdaytoshow; echo '
'; while($currentdaytoshow<$lastdaytoshow) { - echo '
'.$langs->trans("Ref").'
'.$langs->trans("DateActionStart").''; if (GETPOST("afaire") == 1) { - print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldayend'); + print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldayend'); } elseif (GETPOST("afaire") == 2) { - print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); } else { - print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart'); + print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart'); } print '
'; print $form->selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0); print ''; - print $formactions->form_select_status_action('formaction', $status, 1, 'status', 1, 2); + $formactions->form_select_status_action('formaction', $status, 1, 'status', 1, 2, 'minwidth100imp maxwidth125'); print ajax_combobox('selectstatus'); print '
'; - print dol_print_date($db->jdate($obj->dp), "dayhour"); + print dol_print_date($db->jdate($obj->dp), $formatToUse); $late=0; if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late=1; if ($obj->percent == 0 && ! $obj->dp && $obj->dp2 && $db->jdate($obj->dp) < ($now - $delay_warning)) $late=1; @@ -626,7 +632,7 @@ if ($resql) // End date if (! empty($arrayfields['a.datep2']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->dp2), "dayhour"); + print dol_print_date($db->jdate($obj->dp2), $formatToUse); print ''; - //var_dump($obj->fkelement.' '.$obj->elementtype); - if ($obj->fk_element > 0 && ! empty($obj->elementtype)) { - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - print dolGetElementUrl($obj->fk_element, $obj->elementtype, 1); - } else { - print " "; - } - print ''; + //var_dump($obj->fkelement.' '.$obj->elementtype); + if ($obj->fk_element > 0 && ! empty($obj->elementtype)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + print dolGetElementUrl($obj->fk_element, $obj->elementtype, 1); + } else { + print " "; + } + print '
'; echo ''; @@ -684,16 +683,16 @@ while($currentdaytoshow<$lastdaytoshow) { { foreach ($eventarray as $daykey => $notused) { - // Get all assigned users for each event - foreach ($eventarray[$daykey] as $index => $event) - { - $event->fetch_userassigned(); + // Get all assigned users for each event + foreach ($eventarray[$daykey] as $index => $event) + { + $event->fetch_userassigned(); $listofuserid=$event->userassigned; foreach($listofuserid as $userid => $tmp) { if (! in_array($userid, $usernamesid)) $usernamesid[$userid] = $userid; } - } + } } } /* Use this list to have for all users */ @@ -753,12 +752,12 @@ while($currentdaytoshow<$lastdaytoshow) { // Load array of colors by type $colorsbytype=array(); $labelbytype=array(); - $sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position"; + $sql="SELECT code, color, libelle as label FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position"; $resql=$db->query($sql); while ($obj = $db->fetch_object($resql)) { $colorsbytype[$obj->code]=$obj->color; - $labelbytype[$obj->code]=$obj->libelle; + $labelbytype[$obj->code]=$obj->label; } // Loop on each user to show calendar @@ -779,7 +778,6 @@ while($currentdaytoshow<$lastdaytoshow) { $i = 0; for ($iter_day = 0; $iter_day < 8; $iter_day++) { - if (($i + 1) < $begin_d || ($i + 1) > $end_d) { $i++; diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 5d1b7ba919e..c6549c5c39a 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -49,7 +49,7 @@ if (! $sortfield) $sortfield="a.datep"; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'agenda', $socid, '', 'myactions'); @@ -144,7 +144,6 @@ if ($resql) if ($obj) { - print ''; // Date diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 3f50c6ab6c8..a0263065dee 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -59,7 +59,7 @@ if (! empty($conf->notification->enabled)) $langs->load("mails"); // Security check $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); -if ($user->societe_id > 0) $id=$user->societe_id; +if ($user->socid > 0) $id=$user->socid; $result = restrictedArea($user, 'societe', $id, '&societe'); $action = GETPOST('action', 'aZ09'); @@ -240,7 +240,7 @@ if ($object->id > 0) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -387,7 +387,7 @@ if ($object->id > 0) print '
'; print $langs->trans("CustomerRelativeDiscountShort"); print ''; - if ($user->rights->societe->creer && !$user->societe_id > 0) + if ($user->rights->societe->creer && !$user->socid > 0) { print ''.img_edit($langs->trans("Modify")).''; } @@ -401,9 +401,9 @@ if ($object->id > 0) print '
'; print $langs->trans("CustomerAbsoluteDiscountShort"); print ''; - if ($user->rights->societe->creer && !$user->societe_id > 0) + if ($user->rights->societe->creer && !$user->socid > 0) { - print ''.img_edit($langs->trans("Modify")).''; + print ''.img_edit($langs->trans("Modify")).''; } print '
'; print '
'; $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount'; print $form->editfieldval("OutstandingBill", 'outstanding_limit', $object->outstanding_limit, $object, $user->rights->societe->creer, $limit_field_type, ($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); - //if (empty($object->outstanding_limit)) print $langs->trans("NoLimit"); - print '
"; + print "
"; } print '
'; @@ -1276,7 +1274,7 @@ if ($object->id > 0) } // Add invoice - if ($user->societe_id == 0) + if ($user->socid == 0) { if (! empty($conf->deplacement->enabled) && $object->status==1) { @@ -1299,8 +1297,8 @@ if ($object->id > 0) { if ($object->client != 0 && $object->client != 2) { - if (! empty($orders2invoice) && $orders2invoice > 0) print ''; - else print ''; + if (! empty($orders2invoice) && $orders2invoice > 0) print ''; + else print ''; } else print ''; } diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 0e0354a5641..8b3f4cf4894 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -47,7 +47,7 @@ $begin=GETPOST('begin', 'alpha'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $socid, ''); @@ -59,13 +59,13 @@ llxHeader('', $langs->trans("Contacts")); if ($type == "c" || $type == "p") { - $label = $langs->trans("Customers"); - $urlfiche="card.php"; + $label = $langs->trans("Customers"); + $urlfiche="card.php"; } if ($type == "f") { - $label = $langs->trans("Suppliers"); - $urlfiche="card.php"; + $label = $langs->trans("Suppliers"); + $urlfiche="card.php"; } /* @@ -88,29 +88,29 @@ if ($socid) $sql.= " AND s.rowid = ".$socid; if (dol_strlen($stcomm)) { - $sql.= " AND s.fk_stcomm=".$db->escape($stcomm); + $sql.= " AND s.fk_stcomm=".$db->escape($stcomm); } if (! empty($search_lastname)) { - $sql.= " AND p.name LIKE '%".$db->escape($search_lastname)."%'"; + $sql.= " AND p.name LIKE '%".$db->escape($search_lastname)."%'"; } if (! empty($search_firstname)) { - $sql.= " AND p.firstname LIKE '%".$db->escape($search_firstname)."%'"; + $sql.= " AND p.firstname LIKE '%".$db->escape($search_firstname)."%'"; } if (! empty($search_company)) { - $sql.= " AND s.nom LIKE '%".$db->escape($search_company)."%'"; + $sql.= " AND s.nom LIKE '%".$db->escape($search_company)."%'"; } if (! empty($contactname)) // acces a partir du module de recherche { - $sql.= " AND (p.name LIKE '%".$db->escape($contactname)."%' OR lower(p.firstname) LIKE '%".$db->escape($contactname)."%') "; - $sortfield = "p.name"; - $sortorder = "ASC"; + $sql.= " AND (p.name LIKE '%".$db->escape($contactname)."%' OR lower(p.firstname) LIKE '%".$db->escape($contactname)."%') "; + $sortfield = "p.name"; + $sortorder = "ASC"; } $sql.= $db->order($sortfield, $sortorder); @@ -128,7 +128,7 @@ if ($resql) print '
'; - print ''; + print '
'; print ''; print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.name", $begin, $param, "", $sortfield, $sortorder); print_liste_field_titre("Firstname", $_SERVER["PHP_SELF"], "p.firstname", $begin, $param, "", $sortfield, $sortorder); diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index c0d2c4703ca..d405d2526d3 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -51,10 +51,10 @@ $bid=GETPOST('bid', 'int'); // Securite acces client $socid=GETPOST('socid', 'int'); -if (isset($user->societe_id) && $user->societe_id > 0) +if (isset($user->socid) && $user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $max=3; @@ -120,6 +120,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print ''; print ''; + print '
'; print '
'; $i=0; foreach($listofsearchfields as $key => $value) @@ -132,6 +133,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele $i++; } print '
'; + print '
'; print ''; print '
'; } @@ -163,7 +165,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $num = $db->num_rows($resql); print '
'; - print ''; + print '
'; print ''; print ''; @@ -208,7 +210,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } else { - print ''; } print "
'.$langs->trans("ProposalsDraft").' '.$num.'
'.$langs->trans("NoProposal").'

"; @@ -248,7 +249,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos $num = $db->num_rows($resql); print '
'; - print ''; + print '
'; print ''; print ''; @@ -330,7 +331,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $num = $db->num_rows($resql); print '
'; - print '
'.$langs->trans("SupplierProposalsDraft").($num?' '.$num.'':'').'
'; + print '
'; print ''; print ''; @@ -379,7 +380,6 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } else { - print ''; } print "
'.$langs->trans("DraftOrders").($num?' '.$num.'':'').'
'.$langs->trans("NoOrder").'
"; @@ -420,7 +420,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande $num = $db->num_rows($resql); print '
'; - print ''; + print '
'; print ''; print ''; @@ -430,7 +430,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { - $obj = $db->fetch_object($resql); print ''; } print "
'.$langs->trans("DraftSuppliersOrders").($num?' '.$num.'':'').'
'; $supplierorderstatic->id=$obj->rowid; @@ -470,7 +469,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande } else { - print '
'.$langs->trans("NoSupplierOrder").'
"; @@ -514,7 +512,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) $i = 0; print '
'; - print ''; + print '
'; print ''; print '
'; if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects", $max); @@ -563,10 +561,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) $sql = "SELECT s.nom as name, s.rowid, s.datec as dc, s.canvas, s.tms as dm"; $sql.= ", s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fournisseur = 1"; $sql.= " AND s.entity IN (".getEntity($companystatic->element).")"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = ".$socid; $sql.= " ORDER BY s.datec DESC"; $sql.= $db->plimit($max, 0); @@ -578,7 +576,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) $i = 0; print '
'; - print ''; + print '
'; print ''; print ''; print ''; @@ -659,7 +657,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TO if ($num > 0) { print '
'; - print '
'.$langs->trans("BoxTitleLastModifiedSuppliers", min($max, $num)).''.$langs->trans("FullList").'
'; + print '
'; print ''; $i = 0; @@ -719,7 +717,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) if ($num > 0) { print '
'; - print '
'.$langs->trans("LastContracts", 5).'
'; + print '
'; print ''; $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); @@ -823,7 +821,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) if ($num > 0) { print '
'; - print '
'.$langs->trans("ProposalsOpened").' '.$num.'
'; + print '
'; print ''; $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index 9544a394508..42c1f191a0a 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -41,7 +41,7 @@ if (! empty($conf->categorie->enabled)) { } // Security check -if (! $user->rights->mailing->lire || $user->societe_id > 0) +if (! $user->rights->mailing->lire || $user->socid > 0) accessforbidden(); // Load variable for pagination @@ -114,7 +114,6 @@ if ($action == 'loadfilter') { } if ($action == 'add') { - $user_contact_query = false; $array_query = array (); @@ -168,7 +167,6 @@ if ($action == 'add') { } if (preg_match("/^contact_/", $key)) { - $array_query[$key] = GETPOST($key); $specials_date_key = array ( @@ -262,7 +260,6 @@ if ($action == 'clear') { } if ($action == 'savefilter' || $action == 'createfilter') { - $template_name = GETPOST('template_name'); $error = 0; @@ -272,7 +269,6 @@ if ($action == 'savefilter' || $action == 'createfilter') { } if (empty($error)) { - $array_query = array (); // Get extra fields @@ -325,7 +321,6 @@ if ($action == 'savefilter' || $action == 'createfilter') { } if (preg_match("/^contact_/", $key)) { - $array_query[$key] = GETPOST($key); $specials_date_key = array ( @@ -359,7 +354,6 @@ if ($action == 'savefilter' || $action == 'createfilter') { setEventMessages($advTarget->error, $advTarget->errors, 'errors'); } } elseif ($action == 'savefilter') { - $result = $advTarget->update($user); if ($result < 0) { setEventMessages($advTarget->error, $advTarget->errors, 'errors'); @@ -421,12 +415,11 @@ $formcompany = new FormCompany($db); $formother = new FormOther($db); if ($object->fetch($id) >= 0) { - $head = emailing_prepare_head($object); dol_fiche_head($head, 'advtargets', $langs->trans("Mailing"), 0, 'email'); - print '
'.$langs->trans("OrdersOpened").' '.$num.'
'; + print '
'; $linkback = '' . $langs->trans("BackToList") . ''; @@ -465,7 +458,6 @@ if ($object->fetch($id) >= 0) { // Show email selectors if ($object->statut == 0 && $user->rights->mailing->creer) { - include DOL_DOCUMENT_ROOT . '/core/tpl/advtarget.tpl.php'; } } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 33de68f22a1..f4a0e61095f 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->load("mails"); -if (! $user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->societe_id > 0)) accessforbidden(); +if (! $user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->socid > 0)) accessforbidden(); $id=(GETPOST('mailid', 'int') ? GETPOST('mailid', 'int') : GETPOST('id', 'int')); $action=GETPOST('action', 'alpha'); @@ -762,7 +762,7 @@ if ($action == 'create') print '
'; print '

'; - print ''; + print '
'; print ''; print '
'.$langs->trans("MailTopic").'
'.$langs->trans("BackgroundColorByDefault").''; print $htmlother->selectColor($_POST['bgcolor'], 'bgcolor', '', 0); @@ -851,7 +851,7 @@ else setEventMessages('', null, 'warnings'); if ($conf->file->mailing_limit_sendbyweb != '-1') // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed ot increase it. { - setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); // You can send online with constant... + setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); // You can send online with constant... } $_GET["action"]=''; } @@ -1189,7 +1189,7 @@ else print '
'; print '
'; - print ''; + print '
'; /* print ''; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 1e467331d90..f6e27fffaa3 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->load("mails"); // Security check -if (! $user->rights->mailing->lire || $user->societe_id > 0) accessforbidden(); +if (! $user->rights->mailing->lire || $user->socid > 0) accessforbidden(); // Load variable for pagination @@ -54,16 +54,17 @@ if (! $sortorder) $sortorder="ASC"; $id=GETPOST('id', 'int'); $rowid=GETPOST('rowid', 'int'); $action=GETPOST('action', 'aZ09'); -$search_lastname=GETPOST("search_lastname"); -$search_firstname=GETPOST("search_firstname"); -$search_email=GETPOST("search_email"); -$search_other=GETPOST("search_other"); -$search_dest_status=GETPOST('search_dest_status'); +$search_lastname=GETPOST("search_lastname", 'alphanohtml'); +$search_firstname=GETPOST("search_firstname", 'alphanohtml'); +$search_email=GETPOST("search_email", 'alphanohtml'); +$search_other=GETPOST("search_other", 'alphanohtml'); +$search_dest_status=GETPOST('search_dest_status', 'alphanohtml'); // Search modules dirs $modulesdir = dolGetModulesDirs('/mailings'); $object = new Mailing($db); +$result=$object->fetch($id); /* @@ -112,7 +113,7 @@ if ($action == 'add') } } -if (GETPOST('clearlist')) +if (GETPOST('clearlist', 'int')) { // Loading Class $obj = new MailingTargets($db); @@ -123,6 +124,50 @@ if (GETPOST('clearlist')) */ } +if (GETPOST('exportcsv', 'int')) +{ + $completefilename = 'targets_emailing'.$object->id.'_'.dol_print_date(dol_now(), 'dayhourlog').'.csv'; + header('Content-Type: text/csv'); + header('Content-Disposition: attachment;filename=' . $completefilename); + + // List of selected targets + $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.tms,"; + $sql .= " mc.source_url, mc.source_id, mc.source_type, mc.error_text"; + $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; + $sql .= " WHERE mc.fk_mailing=".$object->id; + $sql .= $db->order($sortfield, $sortorder); + + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $sep = ','; + + while ($obj = $db->fetch_object($resql)) + { + print $obj->rowid . $sep; + print $obj->lastname . $sep; + print $obj->firstname . $sep; + print $obj->email . $sep; + print $obj->other . $sep; + print $obj->date_envoi . $sep; + print $obj->tms . $sep; + print $obj->source_url . $sep; + print $obj->source_id . $sep; + print $obj->source_type . $sep; + print $obj->error_text . $sep; + print "\n"; + } + + exit; + } + else + { + dol_print_error($db); + } + exit; +} + if ($action == 'delete') { // Ici, rowid indique le destinataire et id le mailing @@ -252,7 +297,7 @@ if ($object->fetch($id) >= 0) { print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1):''), 'generic'); - //print '
'.$langs->trans("Ref").'
'; + //print '
'; print '
'; //print '
'; @@ -434,13 +479,13 @@ if ($object->fetch($id) >= 0) { $num = $db->num_rows($resql); - $param = "&id=".$object->id; + $param = "&id=".$object->id; //if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); - if ($search_lastname) $param.= "&search_lastname=".urlencode($search_lastname); - if ($search_firstname) $param.= "&search_firstname=".urlencode($search_firstname); - if ($search_email) $param.= "&search_email=".urlencode($search_email); - if ($search_other) $param.= "&search_other=".urlencode($search_other); + if ($search_lastname) $param.= "&search_lastname=".urlencode($search_lastname); + if ($search_firstname) $param.= "&search_firstname=".urlencode($search_firstname); + if ($search_email) $param.= "&search_email=".urlencode($search_email); + if ($search_other) $param.= "&search_other=".urlencode($search_other); print ''; print ''; @@ -449,11 +494,13 @@ if ($object->fetch($id) >= 0) print ''; print ''; - $cleartext=''; + $morehtmlcenter=''; if ($allowaddtarget) { - $cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'id.'" class="button reposition">'.$langs->trans("TargetsReset").''; + $morehtmlcenter=''.$langs->trans("ToClearAllRecipientsClickHere").'id.'" class="button reposition">'.$langs->trans("TargetsReset").''; } - print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $cleartext, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); + $morehtmlcenter.=' id.'">'.$langs->trans("Download").''; + + print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $morehtmlcenter, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); print ''; @@ -466,9 +513,6 @@ if ($object->fetch($id) >= 0) print ''; print ''; - - if ($page) $param.= "&page=".$page; - print '
'; print '
'; @@ -516,6 +560,8 @@ if ($object->fetch($id) >= 0) print ''; print ''; + if ($page) $param.= "&page=".urlencode($page); + print ''; print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "mc.email", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "mc.lastname", $param, "", "", $sortfield, $sortorder); diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 7346bf87543..465bf7dcc50 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -556,7 +556,6 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[]= 't.entity IN ('.getEntity('societe').')'; if (count($arrayquery)>0) { - if (array_key_exists('cust_saleman', $arrayquery)) { $sql.= " LEFT OUTER JOIN " . MAIN_DB_PREFIX . "societe_commerciaux as saleman ON saleman.fk_soc=t.rowid "; } @@ -565,7 +564,6 @@ class AdvanceTargetingMailing extends CommonObject } if (!empty($arrayquery['cust_name'])) { - $sqlwhere[]= $this->transformToSQL('t.nom', $arrayquery['cust_name']); } if (!empty($arrayquery['cust_code'])) { @@ -617,13 +615,11 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementtype = Societe::$table_element; $extrafields->fetch_name_optionals_label($elementtype); foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key])) { @@ -713,7 +709,6 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[]= 't.entity IN ('.getEntity('socpeople').')'; if (count($arrayquery)>0) { - if (array_key_exists('contact_categ', $arrayquery)) { $sql.= " LEFT OUTER JOIN " . MAIN_DB_PREFIX . "categorie_contact as contactcateg ON contactcateg.fk_socpeople=t.rowid "; } @@ -767,7 +762,6 @@ class AdvanceTargetingMailing extends CommonObject $extrafields->fetch_name_optionals_label($elementtype); foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key.'_cnct'])) { @@ -809,7 +803,6 @@ class AdvanceTargetingMailing extends CommonObject } if (!empty($arrayquery['cust_name'])) { - $sqlwhere[]= $this->transformToSQL('ts.nom', $arrayquery['cust_name']); } if (!empty($arrayquery['cust_code'])) { @@ -870,7 +863,6 @@ class AdvanceTargetingMailing extends CommonObject $extrafields->fetch_name_optionals_label($elementtype); foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key])) { diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 55b7177eb73..67ec7414e7c 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -114,7 +114,6 @@ class FormAdvTargetEmailing extends Form dol_syslog(get_class($this) . "::select_country sql=" . $sql); $resql = $this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) { @@ -175,7 +174,6 @@ class FormAdvTargetEmailing extends Form $resql_usr = $this->db->query($sql_usr); if ($resql_usr) { while ( $obj_usr = $this->db->fetch_object($resql_usr) ) { - $label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')'; $options_array [$obj_usr->rowid] = $label; @@ -249,7 +247,6 @@ class FormAdvTargetEmailing extends Form $sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1]; $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0]; if (! empty($InfoFieldList [3])) { - // We have to join on extrafield table if (strpos($InfoFieldList [3], 'extra') !== false) { $sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList [0] . '_extrafields as extra'; @@ -266,7 +263,6 @@ class FormAdvTargetEmailing extends Form dol_syslog(get_class($this) . "::".__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) { @@ -306,7 +302,6 @@ class FormAdvTargetEmailing extends Form $resql=$this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -396,7 +391,6 @@ class FormAdvTargetEmailing extends Form $resql=$this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -442,8 +436,6 @@ class FormAdvTargetEmailing extends Form dol_syslog(get_class($this) . "::".__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - - $out .= ''; - print '
'; + print '
'; + print '
'; print ''; print ''; @@ -68,12 +69,12 @@ print '
'; print '
'; - print "
'.$langs->trans("SearchAMailing").'
'; print $langs->trans("Ref").':
'; print $langs->trans("Other").':

\n"; + print "

\n"; //} // Affiche stats de tous les modules de destinataires mailings -print ''; +print '
'; print ''; $dir=DOL_DOCUMENT_ROOT."/core/modules/mailings"; @@ -131,7 +132,7 @@ if (is_resource($handle)) } else { - dol_print_error($db); + dol_print_error($db); } print ''; } @@ -160,7 +161,8 @@ $sql.= " ORDER BY m.date_creat DESC"; $sql.= " LIMIT ".$limit; $result=$db->query($sql); if ($result) { - print '
'.$langs->trans("TargetsStatistics").'
'; + print '
'; + print '
'; print ''; print ''; print ''; @@ -175,13 +177,15 @@ if ($result) { while ($i < $num ) { $obj = $db->fetch_object($result); + $mailstatic=new Mailing($db); + $mailstatic->id = $obj->rowid; + $mailstatic->ref = $obj->rowid; print ''; - print ''; + print ''; print ''; print ''; print ''; - $mailstatic=new Mailing($db); print ''; print ''; $i++; @@ -191,7 +195,7 @@ if ($result) { { print ''; } - print "
'.$langs->trans("LastMailings", $limit).''.$langs->trans("DateCreation").'
'.img_object($langs->trans("ShowEMail"), "email").' '.$obj->rowid.''.$mailstatic->getNomUrl(1).''.dol_trunc($obj->titre, 38).''.dol_print_date($db->jdate($obj->date_creat), 'day').''.($obj->nbemail?$obj->nbemail:"0").''.$mailstatic->LibStatut($obj->statut, 5).'
'.$langs->trans("None").'

"; + print "

"; $db->free($result); } else diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 0dbc6fc07ab..c0b01050d8f 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -33,7 +33,7 @@ $id=GETPOST('id'); $langs->load("mails"); // Security check -if (! $user->rights->mailing->lire || $user->societe_id > 0) +if (! $user->rights->mailing->lire || $user->socid > 0) accessforbidden(); @@ -57,12 +57,21 @@ if ($object->fetch($id) >= 0) $linkback = ''.$langs->trans("BackToList").''; $morehtmlright=''; - if ($object->statut == 2) $morehtmlright.=' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.') '; - + $nbtry = $nbok = 0; + if ($object->statut == 2 || $object->statut == 3) + { + $nbtry = $object->countNbOfTargets('alreadysent'); + $nbko = $object->countNbOfTargets('alreadysentko'); + + $morehtmlright.=' ('.$nbtry.'/'.$object->nbemail; + if ($nbko) $morehtmlright.=' - '.$nbko.' '.$langs->trans("Error"); + $morehtmlright.=')   '; + } + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', $morehtmlright); - + print '

'; - + //print '
'; $object->user_creation=$object->user_creat; $object->date_creation=$object->date_creat; @@ -70,7 +79,7 @@ if ($object->fetch($id) >= 0) $object->date_validation=$object->date_valid; dol_print_object_info($object, 0); //print '
'; - + dol_fiche_end(); } diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index ff69bd00c0c..0e3d7a7725e 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -102,8 +102,8 @@ if (empty($reshook)) // Mass actions /*$objectclass='MyObject'; $objectlabel='MyObject'; - $permtoread = $user->rights->mymodule->read; - $permtodelete = $user->rights->mymodule->delete; + $permissiontoread = $user->rights->mymodule->read; + $permissiontodelete = $user->rights->mymodule->delete; $uploaddir = $conf->mymodule->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; */ diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index a176f758d7a..82bf49261a1 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -33,9 +33,9 @@ $langs->loadLangs(array('orders', 'companies')); $id = GETPOST('id', 'int'); $_socid = GETPOST("id", 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { - $_socid = $user->societe_id; + $_socid = $user->socid; } @@ -91,15 +91,13 @@ if ($_socid > 0) dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company'); - print ''; - print '\n"; - - - print ""; - print "
'; - print ''; + print '
'; - print '"; + print '"; - print '
'; - print $langs->trans("PriceLevel").''.$objsoc->price_level."
'; + print $langs->trans("PriceLevel").''.$objsoc->price_level."
'; - print $langs->trans("NewValue").''; + print '
'; + print $langs->trans("NewValue").''; print '
"; - print "
"; - dol_fiche_end(); print '
'; @@ -144,7 +136,7 @@ if ($_socid > 0) $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; $tag = !$tag; print ''; print ''; @@ -157,8 +149,8 @@ if ($_socid > 0) while ($i < $num ) { $obj = $db->fetch_object($resql); - $tag = !$tag; - print ''; + + print ''; print ''; print ''; $userstatic->id=$obj->uid; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 92267d97033..11d57eabbfc 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -9,10 +9,10 @@ * Copyright (C) 2010-2018 Philippe Grand * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2016 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2016 Marcos García + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -58,7 +58,7 @@ if (!empty($conf->variants->enabled)) { } // Load translation files required by the page -$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings')); +$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings', 'other')); if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); @@ -86,7 +86,7 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($co $NBLINES = 4; // Security check -if (! empty($user->societe_id)) $socid = $user->societe_id; +if (! empty($user->socid)) $socid = $user->socid; $result = restrictedArea($user, 'propal', $id); $object = new Propal($db); @@ -121,6 +121,7 @@ $usercancreateorder = $user->rights->commande->creer; $usercancreateinvoice = $user->rights->facture->creer; $usercancreatecontract = $user->rights->contrat->creer; $usercancreateintervention = $user->rights->ficheinter->creer; +$usercancreatepurchaseorder = $user->rights->fournisseur->commande->creer; $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php $permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php @@ -165,7 +166,7 @@ if (empty($reshook)) if ($object->id > 0) { if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY)) { //Get difference between old and new delivery date and change lines according to difference - $date_delivery = dol_mktime(12, 0, 0, + $date_delivery = dol_mktime(12, 0, 0, GETPOST('date_deliverymonth', 'int'), GETPOST('date_deliveryday', 'int'), GETPOST('date_deliveryyear', 'int') @@ -173,7 +174,7 @@ if (empty($reshook)) if (!empty($object->date_livraison) && !empty($date_delivery)) { //Attempt to get the date without possible hour rounding errors - $old_date_delivery = dol_mktime(12, 0, 0, + $old_date_delivery = dol_mktime(12, 0, 0, dol_print_date($object->date_livraison, '%m'), dol_print_date($object->date_livraison, '%d'), dol_print_date($object->date_livraison, '%Y') @@ -458,91 +459,91 @@ if (empty($reshook)) $id = $object->create($user); if ($id > 0) { - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); + dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); - $classname = ucfirst($subelement); - $srcobject = new $classname($db); + $classname = ucfirst($subelement); + $srcobject = new $classname($db); - dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); - $result = $srcobject->fetch($object->origin_id); + dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); + $result = $srcobject->fetch($object->origin_id); - if ($result > 0) + if ($result > 0) + { + $lines = $srcobject->lines; + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { + $srcobject->fetch_lines(); $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { - $srcobject->fetch_lines(); - $lines = $srcobject->lines; - } - - $fk_parent_line=0; - $num=count($lines); - for ($i=0;$i<$num;$i++) - { - $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); - $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); - - // Positive line - $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); - - // Date start - $date_start = false; - if ($lines[$i]->date_debut_prevue) - $date_start = $lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) - $date_start = $lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) - $date_start = $lines[$i]->date_start; - - // Date end - $date_end = false; - if ($lines[$i]->date_fin_prevue) - $date_end = $lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) - $date_end = $lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) - $date_end = $lines[$i]->date_end; - - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { - $fk_parent_line = 0; - } - - // Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { - $lines[$i]->fetch_optionals(); - $array_options = $lines[$i]->array_options; - } - - $tva_tx = $lines[$i]->tva_tx; - if (! empty($lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; - - $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_options, $lines[$i]->fk_unit); - - if ($result > 0) { - $lineid = $result; - } else { - $lineid = 0; - $error ++; - break; - } - - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) { - $fk_parent_line = $result; - } - } - - // Hooks - $parameters = array('objFrom' => $srcobject); - $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been - // modified by hook - if ($reshook < 0) - $error ++; - } else { - setEventMessages($srcobject->error, $srcobject->errors, 'errors'); - $error ++; } + + $fk_parent_line=0; + $num=count($lines); + for ($i=0;$i<$num;$i++) + { + $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); + $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); + + // Positive line + $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); + + // Date start + $date_start = false; + if ($lines[$i]->date_debut_prevue) + $date_start = $lines[$i]->date_debut_prevue; + if ($lines[$i]->date_debut_reel) + $date_start = $lines[$i]->date_debut_reel; + if ($lines[$i]->date_start) + $date_start = $lines[$i]->date_start; + + // Date end + $date_end = false; + if ($lines[$i]->date_fin_prevue) + $date_end = $lines[$i]->date_fin_prevue; + if ($lines[$i]->date_fin_reel) + $date_end = $lines[$i]->date_fin_reel; + if ($lines[$i]->date_end) + $date_end = $lines[$i]->date_end; + + // Reset fk_parent_line for no child products and special product + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { + $fk_parent_line = 0; + } + + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals(); + $array_options = $lines[$i]->array_options; + } + + $tva_tx = $lines[$i]->tva_tx; + if (! empty($lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; + + $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_options, $lines[$i]->fk_unit); + + if ($result > 0) { + $lineid = $result; + } else { + $lineid = 0; + $error ++; + break; + } + + // Defined the new fk_parent_line + if ($result > 0 && $lines[$i]->product_type == 9) { + $fk_parent_line = $result; + } + } + + // Hooks + $parameters = array('objFrom' => $srcobject); + $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been + // modified by hook + if ($reshook < 0) + $error ++; + } else { + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); + $error ++; + } } else { setEventMessages($object->error, $object->errors, 'errors'); $error ++; @@ -818,7 +819,6 @@ if (empty($reshook)) // Add line elseif ($action == 'addline' && $usercancreate) { - // Set if we used free entry or predefined product $predef=''; $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); @@ -920,8 +920,8 @@ if (empty($reshook)) $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility { - if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; - if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; + if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; } } // If price per customer @@ -1325,17 +1325,17 @@ if (empty($reshook)) $object->setProject(GETPOST('projectid', 'int')); } - // Delai de livraison + // Delivery time elseif ($action == 'setavailability' && $usercancreate) { $result = $object->set_availability($user, GETPOST('availability_id', 'int')); } - // Origine de la propale + // Origin of the commercial proposal elseif ($action == 'setdemandreason' && $usercancreate) { $result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int')); } - // Conditions de reglement + // Terms of payment elseif ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } @@ -1348,7 +1348,7 @@ if (empty($reshook)) $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); } - // Mode de reglement + // Payment choice elseif ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } @@ -1413,7 +1413,7 @@ if (empty($reshook)) } } - // Bascule du statut d'un contact + // Toggle the status of a contact elseif ($action == 'swapstatut') { if ($object->fetch($id) > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); @@ -1422,7 +1422,7 @@ if (empty($reshook)) } } - // Efface un contact + // Delete a contact elseif ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact($lineid); @@ -1438,7 +1438,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->propal->multidir_output[$object->entity]; - $permissioncreate=$usercancreate; + $permissiontoadd=$usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -1551,7 +1551,7 @@ if ($action == 'create') dol_fiche_head(); - print '
'.$langs->trans("Date").'
'.dol_print_date($db->jdate($obj->dc), "dayhour").''.$obj->price_level.'
'; + print '
'; // Reference print ''; @@ -1600,7 +1600,7 @@ if ($action == 'create') $form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist); print ''; - // Ligne info remises tiers + // Third party discounts info line print ''; print ''; @@ -1787,7 +1787,7 @@ if ($action == 'create') /* - * Combobox pour la fonction de copie + * Combobox for copy function */ if (empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) print ''; @@ -1853,7 +1853,7 @@ if ($action == 'create') $title = $langs->trans('ProductsAndServices'); print load_fiche_titre($title); - print '
' . $langs->trans('Ref') . '' . $langs->trans("Draft") . '
' . $langs->trans('Discounts') . ''; $absolute_discount = $soc->getAvailableDiscounts(); @@ -1717,7 +1717,7 @@ if ($action == 'create') print $doleditor->Create(1); // Private note - if (empty($user->societe_id)) + if (empty($user->socid)) { print '
' . $langs->trans('NotePrivate') . '
'; + print '
'; $objectsrc->printOriginLinesList(); @@ -1884,7 +1884,7 @@ if ($action == 'create') if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY) && !empty($object->date_livraison)) { $formquestion[] = array('type' => 'date','name' => 'date_delivery','label' => $langs->trans("DeliveryDate"),'value' => $object->date_livraison); } - // Paiement incomplet. On demande si motif = escompte ou autre + // Incomplete payment. We ask if reason = discount or other $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } @@ -1927,7 +1927,7 @@ if ($action == 'create') elseif ($action == 'validate') { $error = 0; - // We verifie whether the object is provisionally numbering + // We verify whether the object is provisionally numbering $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { $numref = $object->getNextNumRef($soc); @@ -2202,11 +2202,11 @@ if ($action == 'create') print '
'; - if ($action != 'editmulticurrencycode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT && $usercancreate) print ''; print '
'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; print '
'; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmulticurrencycode' && $usercancreate) { + if ($object->statut == $object::STATUS_DRAFT && $action == 'editmulticurrencycode' && $usercancreate) { $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code'); } else { $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none'); @@ -2214,29 +2214,33 @@ if ($action == 'create') print '
'; - print ''; - if ($action != 'editmulticurrencyrate' && $object->statut == Propal::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate) - print ''; - print '
'; - print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; - print '
'; - if ($object->statut == Propal::STATUS_DRAFT && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) { - if($action == 'actualizemulticurrencyrate') { - list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); - } - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); - } else { - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); - if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { - print '
        '; - print ''.$langs->trans("ActualizeCurrency").''; - print '
'; + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) + { + print '
'; + print ''; + print ''; + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate) + print ''; + print '
'; + print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($object->statut ==$object::STATUS_DRAFT && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) { + if($action == 'actualizemulticurrencyrate') { + list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); + } + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); + if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { + print '
        '; + print ''.$langs->trans("ActualizeCurrency").''; + print '
'; + } } + print '
'; + print '
'; print ''; print ''; @@ -87,7 +87,7 @@ $sql.= ", ".MAIN_DB_PREFIX."propal as p"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE p.fk_soc = s.rowid"; $sql.= " AND p.entity IN (".getEntity('propal').")"; -if ($user->societe_id) $sql.=' AND p.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND p.fk_soc = '.$user->socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " AND p.fk_statut IN (0,1,2,3,4)"; $sql.= " GROUP BY p.fk_statut"; @@ -118,7 +118,7 @@ if ($resql) } $db->free($resql); - print '
'.$langs->trans("Search").'
'; print $langs->trans("Proposal").':
'; + print '
'; print ''."\n"; $listofstatus=array(0,1,2,3,4); foreach ($listofstatus as $status) @@ -126,7 +126,6 @@ if ($resql) $dataseries[]=array($propalstatic->LibStatut($status, 1), (isset($vals[$status])?(int) $vals[$status]:0)); if (! $conf->use_javascript_ajax) { - print ''; print ''; print ''; @@ -182,7 +181,7 @@ if (! empty($conf->propal->enabled)) if ($num) { print '
'; - print '
'.$langs->trans("Statistics").' - '.$langs->trans("Proposals").'
'.$propalstatic->LibStatut($status, 0).''.(isset($vals[$status])?$vals[$status]:0).'
'; + print '
'; print ''; $langs->load("propal"); print ''; @@ -249,7 +248,7 @@ $resql=$db->query($sql); if ($resql) { print '
'; - print '
'.$langs->trans("DraftPropals").' '.$num.'
'; + print '
'; print ''; print ''; @@ -333,7 +332,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) if ($num > 0) { print '
'; - print '
'.$langs->trans("LastModifiedProposals", $max).'
'; + print '
'; print ''; $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); @@ -420,7 +419,7 @@ if (! empty($conf->propal->enabled)) $num = $db->num_rows($resql); print '
'; - print '
'.$langs->trans("ProposalsOpened").' '.$num.'
'; + print '
'; print ''; print ''; @@ -493,7 +492,7 @@ if (! empty($conf->propal->enabled)) $num = $db->num_rows($resql); print '
'; - print '
'.$langs->trans("ProposalsToProcess").' '.$num.'
'; + print '
'; print ''; print ''; diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 108a09e7d07..1e27f187488 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -40,7 +40,7 @@ $ref=GETPOST('ref', 'alpha'); $socid=GETPOST('socid', 'int'); // Security check -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'propal', $id); $object = new Propal($db); @@ -86,20 +86,21 @@ if (! empty($conf->projet->enabled)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->propal->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 919ad77168d..bccc742aa8e 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -112,7 +112,7 @@ if (! $sortorder) $sortorder='DESC'; $module='propal'; $dbtable=''; $objectid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; if (! empty($socid)) { $objectid=$socid; @@ -139,6 +139,7 @@ $fieldstosearchall = array( 'p.ref_client'=>'CustomerRef', 'pd.description'=>'Description', 's.nom'=>"ThirdParty", + 's.name_alias'=>"AliasNameShort", 'p.note_public'=>'NotePublic', ); if (empty($user->socid)) $fieldstosearchall["p.note_private"]="NotePrivate"; @@ -240,9 +241,9 @@ if (empty($reshook)) { $objectclass='Propal'; $objectlabel='Proposals'; - $permtoread = $user->rights->propal->lire; - $permtodelete = $user->rights->propal->supprimer; - $permtoclose = $user->rights->propal->cloturer; + $permissiontoread = $user->rights->propal->lire; + $permissiontodelete = $user->rights->propal->supprimer; + $permissiontoclose = $user->rights->propal->cloturer; $uploaddir = $conf->propal->multidir_output[$conf->entity]; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -279,8 +280,9 @@ $sql.= ' u.login'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) +if (! empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -693,7 +695,7 @@ if ($resql) print ''; } - // Date cloture + // Date cloture if (! empty($arrayfields['p.date_cloture']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; - $totalarray['totalht'] += $obj->total_ht; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='p.total_ht'; + $totalarray['val']['p.total_ht'] += $obj->total_ht; } // Amount VAT if (! empty($arrayfields['p.total_vat']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; - $totalarray['totalvat'] += $obj->total_vat; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='p.total_vat'; + $totalarray['val']['p.total_vat'] += $obj->total_vat; } // Amount TTC if (! empty($arrayfields['p.total_ttc']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; - $totalarray['totalttc'] += $obj->total_ttc; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='p.total_ttc'; + $totalarray['val']['p.total_ttc'] += $obj->total_ttc; } // Amount invoiced if(! empty($arrayfields['p.total_ht_invoiced']['checked'])) { @@ -982,8 +984,8 @@ if ($resql) print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalhtinvoicedfield']=$totalarray['nbfield']; - $totalarray['totalhtinvoiced'] += $totalInvoiced; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='p.total_ht_invoiced'; + $totalarray['val']['p.total_ht_invoiced'] += $obj->total_ht_invoiced; } // Amount invoiced if(! empty($arrayfields['p.total_invoiced']['checked'])) { @@ -1003,8 +1005,8 @@ if ($resql) print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalinvoicedfield']=$totalarray['nbfield']; - $totalarray['totalinvoiced'] += $totalInvoiced; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='p.total_invoiced'; + $totalarray['val']['p.total_invoiced'] += $obj->total_invoiced; } $userstatic->id=$obj->fk_user_author; @@ -1118,45 +1120,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield']) - || isset($totalarray['totalvatfield']) - || isset($totalarray['totalttcfield']) - || isset($totalarray['totalamfield']) - || isset($totalarray['totalrtpfield']) - || isset($totalarray['totalizable']) - ) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - elseif ($totalarray['totalhtinvoicedfield'] == $i) print ''; - elseif ($totalarray['totalinvoicedfield'] == $i) print ''; - elseif ($totalarray['totalizable']) { - $printed = false; - foreach ($totalarray['totalizable'] as $totalizable) { - if ($totalizable['pos']==$i && ! $printed) { - print ''; - $printed = true; - } - } - if (! $printed) { - print ''; - } - } - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 2a3f0438ad0..ee9d9bd9c4f 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -41,7 +41,7 @@ $ref=GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'propale', $id, 'propal'); $object = new Propal($db); @@ -101,20 +101,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->propal->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 1d81b553f7a..4c7b393c8db 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -42,10 +42,10 @@ $object_status=GETPOST('object_status'); $userid=GETPOST('userid', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $nowyear=strftime("%Y", dol_now()); @@ -94,7 +94,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/proposalsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnbinyear-'.$user->id.'-'.$year.'.png'; @@ -134,7 +134,7 @@ if (! $mesg) $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, 0); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/proposalsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsamountinyear-'.$user->id.'-'.$year.'.png'; @@ -173,7 +173,7 @@ if (! $mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); $fileurl_avg=''; -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -243,7 +243,7 @@ print '
'; // Show filter box print '
'; print ''; - print '
'.$langs->trans("OnProcessOrders").' '.$num.'
'; print ''; @@ -945,24 +947,24 @@ if ($resql) { print ''.price($obj->total_ht)."'.price($obj->total_vat)."'.price($obj->total_ttc)."'.price($totalInvoiced)."'.price($totalInvoiced)."
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).''.price($totalarray['totalhtinvoiced']).''.price($totalarray['totalinvoiced']).''.price($totalizable['total']).'
'; + print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -272,7 +272,7 @@ print '
'; //} print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -320,7 +320,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("NbOfProposals").'
diff --git a/htdocs/product/card.php b/htdocs/product/card.php index ef144c10e0d..3a646528a28 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -17,6 +17,7 @@ * Copyright (C) 2016 Meziane Sof * Copyright (C) 2017 Josep Lluís Amador * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Thibault FOUCART * * 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,11 +73,12 @@ $ref=GETPOST('ref', 'alpha'); $type=GETPOST('type', 'int'); $action=(GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view'); $cancel=GETPOST('cancel', 'alpha'); +$backtopage = GETPOST('backtopage', 'alpha'); $confirm=GETPOST('confirm', 'alpha'); $socid=GETPOST('socid', 'int'); $duration_value = GETPOST('duration_value', 'int'); $duration_unit = GETPOST('duration_unit', 'alpha'); -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $object = new Product($db); $object->type = $type; // so test later to fill $usercancxxx is correct @@ -149,7 +151,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->product->dir_output; - $permissioncreate = $usercancreate; + $permissiontoadd = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; @@ -297,16 +299,18 @@ if (empty($reshook)) $object->duration_unit = $duration_unit; $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte')?GETPOST('seuil_stock_alerte'):0; - $object->desiredstock = GETPOST('desiredstock')?GETPOST('desiredstock'):0; + $object->desiredstock = GETPOST('desiredstock')?GETPOST('desiredstock'):0; $object->canvas = GETPOST('canvas'); + $object->net_measure = GETPOST('net_measure'); + $object->net_measure_units = GETPOST('net_measure_units'); // This is not the fk_unit but the power of unit $object->weight = GETPOST('weight'); $object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit $object->length = GETPOST('size'); $object->length_units = GETPOST('size_units'); // This is not the fk_unit but the power of unit $object->width = GETPOST('sizewidth'); $object->height = GETPOST('sizeheight'); - $object->surface = GETPOST('surface'); - $object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit + $object->surface = GETPOST('surface'); + $object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit $object->volume = GETPOST('volume'); $object->volume_units = GETPOST('volume_units'); // This is not the fk_unit but the power of unit $object->finished = GETPOST('finished', 'alpha'); @@ -354,8 +358,18 @@ if (empty($reshook)) $categories = GETPOST('categories', 'array'); $object->setCategories($categories); - header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); - exit; + if (! empty($backtopage)) + { + $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $backtopage); // New method to autoselect project after a New on another form object creation + if (preg_match('/\?/', $backtopage)) $backtopage.='&socid='.$object->id; // Old method + header("Location: ".$backtopage); + exit; + } + else + { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + exit; + } } else { @@ -403,6 +417,8 @@ if (empty($reshook)) $object->duration_unit = GETPOST('duration_unit', 'alpha'); $object->canvas = GETPOST('canvas'); + $object->net_measure = GETPOST('net_measure'); + $object->net_measure_units = GETPOST('net_measure_units'); // This is not the fk_unit but the power of unit $object->weight = GETPOST('weight'); $object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit $object->length = GETPOST('size'); @@ -535,6 +551,17 @@ if (empty($reshook)) } } + if (GETPOST('clone_prices')) { + $result = $object->clone_price($originalId, $id); + + if ($result < 1) { + $db->rollback(); + setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $originalId); + exit(); + } + } + // $object->clone_fournisseurs($originalId, $id); $db->commit(); @@ -934,6 +961,7 @@ else print ''; if (! empty($modBarCodeProduct->code_auto)) print ''; + print ''; if ($type==1) $title=$langs->trans("NewService"); else $title=$langs->trans("NewProduct"); @@ -1054,12 +1082,13 @@ else print $form->selectarray('finished', $statutarray, GETPOST('finished', 'alpha'), 1); print ''; - // Weight + // Brut Weight print ''; - // Length + + // Brut Length if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { print ''; } + + if (! empty($conf->global->PRODUCT_ADD_NET_MEASURE)) + { + // Net Measure + print ''; + } } // Units @@ -1144,7 +1182,7 @@ else { // We do no show price array on create when multiprices enabled. // We must set them on prices tab. - print '
'; +print ' - '; + print ' - - - - - - - -'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; } if (count($linkedObjectBlock) > 1) { - ?> - - - - - - - - - -'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; } -?> - +print "\n"; diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index c07bf53007b..b2cc1d8bbda 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -30,9 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; $langs->load("propal"); -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } @@ -57,7 +57,7 @@ if (! empty($conf->propal->enabled)) $var=false; print ''; print ''; - print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 4cc8768cafe..ccc62ab98c4 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -29,11 +29,8 @@ if (empty($conf) || ! is_object($conf)) { exit; } -?> - - -\n"; global $user; @@ -45,51 +42,46 @@ $langs->load("propal"); $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); -$total=0; $ilink=0; +$total=0; +$ilink=0; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> -
trans("Proposal"); ?> - global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) + print '
'.$langs->trans("Proposal"); + if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id; print ' '; } - ?> - getNomUrl(1); ?>ref_client; ?>date, 'day'); ?>rights->propale->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?>getLibStatut(3); ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'.$objectlink->getNomUrl(1).''.$objectlink->ref_client.''.dol_print_date($objectlink->date, 'day').''; + if ($user->rights->propale->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } + print ''.$objectlink->getLibStatut(3).''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'
trans("Total"); ?>
'.$langs->trans("Total").''.price($total).'
'; + print '
'; print ''; print ''; @@ -89,7 +89,7 @@ if ($resql) $i = 0; if ($num > 0 ) { - print '
'.$langs->trans("SearchAProposal").'
'; print $langs->trans("Ref").':
'; + print '
'; print ''; print ''; while ($i < $num) @@ -147,7 +147,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) $total += $obj->price; } if ($total>0) { - print '"; } print "
'.$langs->trans("ProspectsByStatus").'
'.$langs->trans("Total")."".price($total)."

"; @@ -194,7 +193,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) $i = 0; if ($num > 0) { - print ''; + print '
'; print ''; while ($i < $num) @@ -251,7 +250,7 @@ if ($resql) $i = 0; if ($num > 0 ) { - print '
'.$langs->trans("ProposalsOpened").'
'; + print '
'; print ''; while ($i < $num) diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php index c1339f7ebe9..f1e15a51ecc 100644 --- a/htdocs/comm/prospect/recap-prospect.php +++ b/htdocs/comm/prospect/recap-prospect.php @@ -32,10 +32,10 @@ if (! empty($conf->facture->enabled)) $langs->load("bills"); // Security check $socid = $_GET["socid"]; -if ($user->societe_id > 0) +if ($user->socid > 0) { - $action = ''; - $socid = $user->societe_id; + $action = ''; + $socid = $user->socid; } @@ -62,7 +62,7 @@ if ($socid > 0) print "
'.$langs->trans("ProspectToContact").'
\n"; print ''."\n"; if (! $i) $totalarray['nbfield']++; @@ -987,20 +978,21 @@ if ($resql) $userstatic->firstname = $obj->firstname; $userstatic->login = $obj->login; $userstatic->photo = $obj->photo; + $userstatic->email = $obj->user_email; if (! empty($arrayfields['u.login']['checked'])) { - print ""; if (! $i) $totalarray['nbfield']++; } // Thirdparty if (! empty($arrayfields['s.nom']['checked'])) { - print ''."\n"; if (! $i) $totalarray['nbfield']++; @@ -1071,24 +1063,24 @@ if ($resql) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; - $totalarray['totalht'] += $obj->total_ht; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cf.total_ht'; + $totalarray['val']['cf.total_ht'] += $obj->total_ht; } // Amount VAT if (! empty($arrayfields['cf.total_vat']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; - $totalarray['totalvat'] += $obj->total_tva; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cf.total_vat'; + $totalarray['val']['cf.total_vat'] += $obj->total_tva; } // Amount TTC if (! empty($arrayfields['cf.total_ttc']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; - $totalarray['totalttc'] += $obj->total_ttc; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cf.total_ttc'; + $totalarray['val']['cf.total_ttc'] += $obj->total_ttc; } // Extra fields @@ -1142,28 +1134,9 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield'])) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - else print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; - print ''; - } - $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql); $reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index d2c262d2e7a..63629af25bb 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -40,7 +40,7 @@ $ref = GETPOST('ref'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); $object = new CommandeFournisseur($db); @@ -103,20 +103,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->fournisseur->commande->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index aec6028aa34..c5df8e7d743 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -109,7 +109,6 @@ $hookmanager->initHooks(array('orderstoinvoicesupplier')); */ if (($action == 'create' || $action == 'add') && ! $error) { - require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php'; if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; @@ -140,8 +139,8 @@ if (($action == 'create' || $action == 'add') && ! $error) { $search_ref = GETPOST('sf_ref') ? GETPOST('sf_ref') : GETPOST('search_ref'); // Security check - if ($user->societe_id) - $socid = $user->societe_id; + if ($user->socid) + $socid = $user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $usehm = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE; @@ -159,17 +158,18 @@ if (($action == 'create' || $action == 'add') && ! $error) { $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); } if (! $error) { - $object->ref = GETPOST('ref'); - $object->ref_supplier = GETPOST('ref_supplier'); + $object->ref = GETPOST('ref', 'nohtml'); + $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); $object->socid = GETPOST('socid', 'int'); - $object->libelle = GETPOST('libelle'); + $object->libelle = (GETPOSTISSET('libelle') ? GETPOST('libelle', 'nohtml') : GETPOST('label', 'nohtml')); + $object->label = (GETPOSTISSET('libelle') ? GETPOST('libelle', 'nohtml') : GETPOST('label', 'nohtml')); $object->date = $datefacture; $object->date_echeance = $datedue; $object->note_public = GETPOST('note_public', 'none'); $object->note_private = GETPOST('note_private', 'none'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); - $projectid = GETPOST('projectid'); + $projectid = GETPOST('projectid', 'int'); if ($projectid > 0) $object->fk_project = $projectid; @@ -255,7 +255,6 @@ if (($action == 'create' || $action == 'add') && ! $error) { // End of object creation, we show it if ($id > 0 && ! $error) { - foreach($orders_id as $fk_supplier_order) { $supplier_order = new CommandeFournisseur($db); if ($supplier_order->fetch($fk_supplier_order)>0 && $supplier_order->statut == 5) @@ -299,7 +298,6 @@ $formfile = new FormFile($db); // Mode creation if ($action == 'create' && !$error) { - llxHeader(); print load_fiche_titre($langs->trans('NewBill')); @@ -335,7 +333,7 @@ if ($action == 'create' && !$error) { print ''; print ''; - print '
'; - print ''; + print '
'; // Name print ''; diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 7f16ce6b8b0..81e7446cff1 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -32,10 +32,10 @@ if (! empty($conf->facture->enabled)) $langs->load("bills"); // Security check $socid = $_GET["socid"]; -if ($user->societe_id > 0) +if ($user->socid > 0) { - $action = ''; - $socid = $user->societe_id; + $action = ''; + $socid = $user->socid; } @@ -62,7 +62,7 @@ if ($socid > 0) print "
'.$langs->trans("Thirdpary").''.$societe->getNomUrl(1).'
\n"; print '
'; - print ''; + print '
'; // Name print ''; diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index a704a4be173..229fca58d18 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -33,9 +33,9 @@ $id=GETPOST("id", 'int'); $socid = GETPOST('id', 'int')?GETPOST('id', 'int'):GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } $backtopage = GETPOST('backtopage', 'alpha'); @@ -116,7 +116,7 @@ if ($socid > 0) dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"), -1, 'company'); - dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', '', ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -229,7 +229,7 @@ if ($socid > 0) $resql=$db->query($sql); if ($resql) { - print '
'.$langs->trans("ThirdParty").''.$societe->getNomUrl(1).'
'; + print '
'; $tag = !$tag; print ''; print ''; @@ -288,7 +288,7 @@ if ($socid > 0) $resql=$db->query($sql); if ($resql) { - print '
'.$langs->trans("Date").'
'; + print '
'; $tag = !$tag; print ''; print ''; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 002eb7288e2..b3d3140db09 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -40,9 +40,9 @@ $backtopage=GETPOST('backtopage', 'alpha'); // Security check $socid = GETPOST('id', 'int')?GETPOST('id', 'int'):GETPOST('socid', 'int'); -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } @@ -252,7 +252,7 @@ if ($socid > 0) dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), 0, 'company'); - dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', '', ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -356,7 +356,7 @@ if ($socid > 0) print ''; } - print '
'.$langs->trans("Date").'
'; + print '
'; if($isCustomer && $isSupplier) { print ''; print '
'.$langs->trans('DiscountType').' '; @@ -776,7 +776,7 @@ if ($socid > 0) if ($resql2) { print '
'; - print ''; + print '
'; print ''; print ''; // Need 120+ for format with AM/PM print ''; @@ -946,7 +946,7 @@ if ($socid > 0) if ($resql2) { print '
'; - print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").'
'; + print '
'; print ''; print ''; // Need 120+ for format with AM/PM print ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 968607ed660..0daf73db702 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -44,8 +44,9 @@ require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -if (! empty($conf->propal->enabled)) +if (! empty($conf->propal->enabled)) { require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; +} if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; @@ -81,8 +82,8 @@ $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (! empty( $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); // Security check -if (! empty($user->societe_id)) - $socid = $user->societe_id; +if (! empty($user->socid)) + $socid = $user->socid; $result = restrictedArea($user, 'commande', $id); $object = new Commande($db); @@ -105,9 +106,11 @@ $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancr $usercancancel = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->annuler))); $usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send); +$usercancreatepurchaseorder = $user->rights->fournisseur->commande->creer; + $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php $permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php -$permissionedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php /* @@ -757,8 +760,8 @@ if (empty($reshook)) $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility { - if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; - if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; + if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; } } // If price per customer @@ -1080,7 +1083,6 @@ if (empty($reshook)) } if (! $error) { - if (empty($user->rights->margins->creer)) { foreach ($object->lines as &$line) @@ -1409,7 +1411,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->commande->multidir_output[$object->entity]; - $permissioncreate = $usercancreate; + $permissiontoadd = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails @@ -1603,7 +1605,7 @@ if ($action == 'create' && $usercancreate) dol_fiche_head(''); - print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").'
'; + print '
'; // Reference print ''; @@ -1801,7 +1803,7 @@ if ($action == 'create' && $usercancreate) print ''; // Note private - if (empty($user->societe_id)) { + if (empty($user->socid)) { print ''; print ''; print '
' . $langs->trans('Ref') . '' . $langs->trans("Draft") . '
' . $langs->trans('NotePrivate') . ''; @@ -1888,7 +1890,7 @@ if ($action == 'create' && $usercancreate) $title = $langs->trans('ProductsAndServices'); print load_fiche_titre($title); - print ''; + print '
'; $objectsrc->printOriginLinesList('', $selectedLines); @@ -1924,7 +1926,7 @@ if ($action == 'create' && $usercancreate) // Confirmation of validation if ($action == 'validate') { - // on verifie si l'objet est en numerotation provisoire + // We check that object has a temporary ref $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { $numref = $object->getNextNumRef($soc); @@ -2055,12 +2057,8 @@ if ($action == 'create' && $usercancreate) if ($action == 'clone') { // Create an array for form $formquestion = array( - // 'text' => $langs->trans("ConfirmClone"), - // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => - // 1), - // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' - // => 1), - array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)'))); + array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)')) + ); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } @@ -2289,25 +2287,28 @@ if ($action == 'create' && $usercancreate) print ''; // Multicurrency rate - print ''; - print ''; + print ''; } - print ''; } // Delivery delay @@ -2543,19 +2544,19 @@ if ($action == 'create' && $usercancreate) // Send if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { - print ''; + print '' . $langs->trans('SendMail') . ''; } else - print ''; + print '' . $langs->trans('SendMail') . ''; } // Valid if ($object->statut == Commande::STATUS_DRAFT && $object->total_ttc >= 0 && $numlines > 0 && $usercanvalidate) { - print ''; + print '' . $langs->trans('Validate') . ''; } // Edit if ($object->statut == Commande::STATUS_VALIDATED && $usercancreate) { - print ''; + print '' . $langs->trans('Modify') . ''; } // Create event /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) @@ -2566,15 +2567,25 @@ if ($action == 'create' && $usercancreate) print '' . $langs->trans("AddAction") . ''; }*/ + // Create a purchase order + if (! empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_SALE_ORDER)) + { + if (! empty($conf->fournisseur->enabled) && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { + if ($usercancreatepurchaseorder) { + print '' . $langs->trans("AddPurchaseOrder") . ''; + } + } + } + // Create intervention if ($conf->ficheinter->enabled) { $langs->load("interventions"); if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { if ($user->rights->ficheinter->creer) { - print ''; + print '' . $langs->trans('AddIntervention') . ''; } else { - print ''; + print '' . $langs->trans('AddIntervention') . ''; } } } @@ -2584,7 +2595,7 @@ if ($action == 'create' && $usercancreate) $langs->load("contracts"); if ($user->rights->contrat->creer) { - print ''; + print '' . $langs->trans('AddContract') . ''; } } @@ -2596,13 +2607,13 @@ if ($action == 'create' && $usercancreate) if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) { if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) { if ($user->rights->expedition->creer) { - print ''; + print '' . $langs->trans('CreateShipment') . ''; } else { - print ''; + print '' . $langs->trans('CreateShipment') . ''; } } else { $langs->load("errors"); - print ''; + print 'transnoentitiesnoconv("Shipment"))) . '">' . $langs->trans('CreateShipment') . ''; } } } diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index fb044b1fafa..b6d91b235ba 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -52,7 +52,7 @@ class Orders extends DolibarrApi } /** - * Get properties of an order object + * Get properties of an order object by id * * Return an array with order informations * @@ -64,26 +64,79 @@ class Orders extends DolibarrApi */ public function get($id, $contact_list = 1) { - if(! DolibarrApiAccess::$user->rights->commande->lire) { - throw new RestException(401); - } + return $this->_fetch($id, '', '', '', $contact_list); + } - $result = $this->commande->fetch($id); + /** + * Get properties of an order object by ref + * + * Return an array with order informations + * + * @param string $ref Ref of object + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @url GET byRef/{ref} + * + * @throws RestException + */ + public function getByRef($ref, $contact_list = 1) + { + return $this->_fetch('', $ref, '', '', $contact_list); + } + + /** + * Get properties of an order object by ref_ext + * + * Return an array with order informations + * + * @param string $ref_ext External reference of object + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @url GET byRefExt/{ref_ext} + * + * @throws RestException + */ + public function getByRefExt($ref_ext, $contact_list = 1) + { + return $this->_fetch('', '', $ref_ext, '', $contact_list); + } + + /** + * Get properties of an order object + * + * Return an array with order informations + * + * @param int $id ID of order + * @param string $ref Ref of object + * @param string $ref_ext External reference of object + * @param string $ref_int Internal reference of other objec + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @throws RestException + */ + private function _fetch($id, $ref = '', $ref_ext = '', $ref_int = '', $contact_list = 1) + { + if(! DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } + + $result = $this->commande->fetch($id, $ref, $ref_ext, $ref_int); if( ! $result ) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - // Add external contacts ids - $this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list); - $this->commande->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->commande); - } - + if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + // Add external contacts ids + $this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list); + $this->commande->fetchObjectLinked(); + return $this->_cleanObjectDatas($this->commande); + } /** * List orders @@ -437,7 +490,7 @@ class Orders extends DolibarrApi return $this->commande; } - /** + /** * Delete a contact type of given order * * @param int $id Id of order to update diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 16d9dcdc3d8..6e01ba2f5e2 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -53,19 +53,22 @@ class Commande extends CommonOrder public $table_element='commande'; /** - * @var int Name of subtable line + * @var string Name of subtable line */ public $table_element_line = 'commandedet'; + /** + * @var string Name of class line + */ public $class_element_line = 'OrderLine'; /** - * @var int Field with ID of parent key if this field has a parent + * @var string Field name with ID of parent key if this field has a parent */ public $fk_element = 'fk_commande'; /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + * @var string String with name of icon for commande class. Here is object_order.png */ public $picto = 'order'; @@ -87,13 +90,23 @@ class Commande extends CommonOrder protected $table_ref_field = 'ref'; /** - * Client ID - * @var int + * @var int Thirparty ID */ public $socid; + /** + * @var string Thirparty ref of order + */ public $ref_client; + + /** + * @var string Internal ref for order + */ public $ref_int; + + /** + * @var int Contact ID + */ public $contactid; /** @@ -103,10 +116,9 @@ class Commande extends CommonOrder public $statut; /** - * Billed - * @var int + * @var int Status Billed or not */ - public $billed; // billed or not + public $billed; /** * @var int Draft Status of the order @@ -115,25 +127,22 @@ class Commande extends CommonOrder public $cond_reglement_code; /** - * @var int ID + * @var int bank account ID */ public $fk_account; /** - * It holds the label of the payment mode. Use it in case translation cannot be found. - * @var string + * @var string It holds the label of the payment mode. Use it in case translation cannot be found. */ public $mode_reglement; /** - * Payment mode id - * @var int + * @var int Payment mode id */ public $mode_reglement_id; /** - * Payment mode code - * @var string + * @var string Payment mode code */ public $mode_reglement_code; @@ -157,9 +166,13 @@ class Commande extends CommonOrder public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) public $demand_reason_code; - public $date; // Date commande + /** + * @var int Date of order + */ + public $date; /** + * @var int Date of order * @deprecated * @see $date */ @@ -182,7 +195,14 @@ class Commande extends CommonOrder public $linked_objects=array(); + /** + * @var int User author ID + */ public $user_author_id; + + /** + * @var int User validator ID + */ public $user_valid; /** @@ -192,7 +212,7 @@ class Commande extends CommonOrder // Multicurrency /** - * @var int ID + * @var int Currency ID */ public $fk_multicurrency; @@ -202,6 +222,9 @@ class Commande extends CommonOrder public $multicurrency_total_tva; public $multicurrency_total_ttc; + /** + * @var Commande clone of order object + */ public $oldcopy; //! key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...) @@ -647,7 +670,7 @@ class Commande extends CommonOrder $now=dol_now(); - $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande'; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; $sql.= ' SET fk_statut = '.self::STATUS_CLOSED.','; $sql.= ' fk_user_cloture = '.$user->id.','; $sql.= " date_cloture = '".$this->db->idate($now)."'"; @@ -1995,9 +2018,9 @@ class Commande extends CommonOrder // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { - $line = new Product($this->db); - $line->fetch($objp->fk_product); - $line->getMultiLangs(); + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); } $this->lines[$i] = $line; @@ -2842,7 +2865,6 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::classifyBilled", LOG_DEBUG); if ($this->db->query($sql)) { - if (! $error) { $this->oldcopy= clone $this; @@ -2974,7 +2996,6 @@ class Commande extends CommonOrder if ($this->statut == Commande::STATUS_DRAFT) { - // Clean parameters if (empty($qty)) $qty=0; if (empty($info_bits)) $info_bits=0; @@ -3395,7 +3416,7 @@ class Commande extends CommonOrder $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut, c.total_ht"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON c.fk_soc = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -3404,7 +3425,7 @@ class Commande extends CommonOrder $sql.= $clause." c.entity IN (".getEntity('commande').")"; //$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0"; $sql.= " AND ((c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.")) OR (c.fk_statut = ".self::STATUS_CLOSED." AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected - if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id; + if ($user->socid) $sql.=" AND c.fk_soc = ".$user->socid; $resql=$this->db->query($sql); if ($resql) @@ -3471,13 +3492,13 @@ class Commande extends CommonOrder /** * Return label of status * - * @param int $statut Id statut + * @param int $status Id status * @param int $billed If invoiced * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @param int $donotshowbilled Do not show billed status after order status * @return string Label of status */ - public function LibStatut($statut, $billed, $mode, $donotshowbilled = 0) + public function LibStatut($status, $billed, $mode, $donotshowbilled = 0) { // phpcs:enable global $langs, $conf; @@ -3485,49 +3506,49 @@ class Commande extends CommonOrder $billedtext = ''; if (empty($donotshowbilled)) $billedtext .= ($billed?' - '.$langs->trans("Billed"):''); - if ($statut==self::STATUS_CANCELED){ - $labelstatut = $langs->trans('StatusOrderCanceled'); - $labelstatutShort = $langs->trans('StatusOrderCanceledShort'); + if ($status==self::STATUS_CANCELED){ + $labelStatus = $langs->trans('StatusOrderCanceled'); + $labelStatusShort = $langs->trans('StatusOrderCanceledShort'); $statusType='status5'; } - elseif ($statut==self::STATUS_DRAFT){ - $labelstatut = $langs->trans('StatusOrderDraft'); - $labelstatutShort = $langs->trans('StatusOrderDraftShort'); + elseif ($status==self::STATUS_DRAFT){ + $labelStatus = $langs->trans('StatusOrderDraft'); + $labelStatusShort = $langs->trans('StatusOrderDraftShort'); $statusType='status0'; } - elseif ($statut==self::STATUS_VALIDATED){ - $labelstatut = $langs->trans('StatusOrderValidated').$billedtext; - $labelstatutShort = $langs->trans('StatusOrderValidatedShort').$billedtext; + elseif ($status==self::STATUS_VALIDATED){ + $labelStatus = $langs->trans('StatusOrderValidated').$billedtext; + $labelStatusShort = $langs->trans('StatusOrderValidatedShort').$billedtext; $statusType='status1'; } - elseif ($statut==self::STATUS_SHIPMENTONPROCESS){ - $labelstatut = $langs->trans('StatusOrderSentShort').$billedtext; - $labelstatutShort = $langs->trans('StatusOrderSentShort').$billedtext; + elseif ($status==self::STATUS_SHIPMENTONPROCESS){ + $labelStatus = $langs->trans('StatusOrderSentShort').$billedtext; + $labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext; $statusType='status3'; } - elseif ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ - $labelstatut = $langs->trans('StatusOrderToBill'); - $labelstatutShort = $langs->trans('StatusOrderToBillShort'); + elseif ($status==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ + $labelStatus = $langs->trans('StatusOrderToBill'); + $labelStatusShort = $langs->trans('StatusOrderToBillShort'); $statusType='status4'; } - elseif ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ - $labelstatut = $langs->trans('StatusOrderProcessed').$billedtext; - $labelstatutShort = $langs->trans('StatusOrderProcessed').$billedtext; + elseif ($status==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ + $labelStatus = $langs->trans('StatusOrderProcessed').$billedtext; + $labelStatusShort = $langs->trans('StatusOrderProcessed').$billedtext; $statusType='status6'; } - elseif ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ - $labelstatut = $langs->trans('StatusOrderDelivered'); - $labelstatutShort = $langs->trans('StatusOrderDelivered'); + elseif ($status==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ + $labelStatus = $langs->trans('StatusOrderDelivered'); + $labelStatusShort = $langs->trans('StatusOrderDelivered'); $statusType='status6'; } else{ - $labelstatut = $langs->trans('Unknown'); - $labelstatutShort = ''; + $labelStatus = $langs->trans('Unknown'); + $labelStatusShort = ''; $statusType=''; $mode = 0; } - return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode); + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } @@ -3776,7 +3797,7 @@ class Commande extends CommonOrder $sql = "SELECT count(co.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as co"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON co.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -3830,7 +3851,6 @@ class Commande extends CommonOrder $langs->load("orders"); if (! dol_strlen($modele)) { - $modele = 'einstein'; if ($this->modelpdf) { diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 10276e34c0e..0311f4c49ed 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -212,7 +212,7 @@ class CommandeStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; $sql.= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid"; $sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 82d24ad3646..97890c9d2ef 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -40,7 +40,7 @@ $ref=GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'commande', $id, ''); $object = new Commande($db); @@ -164,20 +164,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->commande->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 2f275adadb9..f6594b5694a 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -33,10 +33,10 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $action=GETPOST('action', 'aZ09'); // Secrutiy check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } if (! $user->rights->facture->creer) @@ -123,7 +123,7 @@ if ($resql) print ''; - print '
'; - $editenable = $usercancreate && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $object->statut == Commande::STATUS_DRAFT; - print $form->editfieldkey("CurrencyRate", 'multicurrencyrate', '', $object, $editenable); - print ''; - if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { - if($action == 'actualizemulticurrencyrate') { - list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); - } - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); - } else { - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); - if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { - print '
        '; - print ''.$langs->trans("ActualizeCurrency").''; - print '
'; + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) + { + print '
'; + $editenable = $usercancreate && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $object->statut == $object::STATUS_DRAFT; + print $form->editfieldkey("CurrencyRate", 'multicurrencyrate', '', $object, $editenable); + print ''; + if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { + if($action == 'actualizemulticurrencyrate') { + list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); + } + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); + if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { + print '
        '; + print ''.$langs->trans("ActualizeCurrency").''; + print '
'; + } } + print '
'; + print '
'; print ''; print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "", 'valign="center"', $sortfield, $sortorder); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 4d784e299fb..565583e1fae 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -45,9 +45,9 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref'); // Security check -if ($user->societe_id) +if ($user->socid) { - $socid = $user->societe_id; + $socid = $user->socid; } $result=restrictedArea($user, 'commande', $id, ''); @@ -59,6 +59,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; @@ -123,20 +127,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->commande->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 33630de2acd..6c5fb4701dd 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -42,10 +42,10 @@ $langs->loadLangs(array('orders', 'bills')); // Security check $socid=GETPOST('socid', 'int'); -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } @@ -74,7 +74,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele $var=false; print ''; print ''; - print '
'; + print '
'; print ''; print ''; @@ -92,7 +92,7 @@ $sql.= ", ".MAIN_DB_PREFIX."commande as c"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; $sql.= " AND c.entity IN (".getEntity('societe').")"; -if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND c.fk_soc = '.$user->socid; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " GROUP BY c.fk_statut"; @@ -123,7 +123,7 @@ if ($resql) $i++; } $db->free($resql); - print '
'.$langs->trans("Search").'
'; print $langs->trans("CustomerOrder").':
'; + print '
'; print ''."\n"; $listofstatus=array(0,1,2,3,-1); foreach ($listofstatus as $status) @@ -190,7 +190,7 @@ if (! empty($conf->commande->enabled)) $resql=$db->query($sql); if ($resql) { - print '
'.$langs->trans("Statistics").' - '.$langs->trans("CustomersOrders").'
'; + print '
'; print ''; print ''; $langs->load("orders"); @@ -201,7 +201,6 @@ if (! empty($conf->commande->enabled)) $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); $commandestatic->id=$obj->rowid; @@ -225,7 +224,6 @@ if (! empty($conf->commande->enabled)) } else { - print ''; } print "
'.$langs->trans("DraftOrders").'
'.$langs->trans("NoOrder").'

"; @@ -261,7 +259,7 @@ $sql.= $db->plimit($max, 0); $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; print ''; print ''; @@ -272,7 +270,6 @@ if ($resql) $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; @@ -343,7 +340,7 @@ if (! empty($conf->commande->enabled)) { $num = $db->num_rows($resql); - print '
'.$langs->trans("LastModifiedOrders", $max).'
'; + print '
'; print ''; print ''; @@ -353,7 +350,6 @@ if (! empty($conf->commande->enabled)) $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; print '
'.$langs->trans("OrdersToProcess").' '.$num.'
'; @@ -425,7 +421,7 @@ if (! empty($conf->commande->enabled)) { $num = $db->num_rows($resql); - print ''; + print '
'; print ''; print ''; @@ -435,7 +431,6 @@ if (! empty($conf->commande->enabled)) $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; print ''; if (! $i) $totalarray['nbfield']++; @@ -983,7 +978,7 @@ if ($resql) if (! empty($arrayfields['s.nom']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; - $totalarray['totalht'] += $obj->total_ht; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='c.total_ht'; + $totalarray['val']['c.total_ht'] += $obj->total_ht; } // Amount VAT if (! empty($arrayfields['c.total_vat']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; - $totalarray['totalvat'] += $obj->total_tva; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='c.total_tva'; + $totalarray['val']['c.total_tva'] += $obj->total_tva; } // Amount TTC if (! empty($arrayfields['c.total_ttc']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; - $totalarray['totalttc'] += $obj->total_ttc; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='c.total_ttc'; + $totalarray['val']['c.total_ttc'] += $obj->total_ttc; } // Extra fields @@ -1144,30 +1139,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield']) - || isset($totalarray['totalvatfield']) - || isset($totalarray['totalttcfield']) - || isset($totalarray['totalamfield']) - || isset($totalarray['totalrtpfield']) - ) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 0931067f155..5b8fe052b06 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -42,7 +42,7 @@ $action=GETPOST('action', 'alpha'); // Security check $socid=0; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'commande', $id, ''); @@ -97,20 +97,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->commande->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index fae23fa8bcd..4cc5ce532e4 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -139,7 +139,7 @@ if (($action == 'create' || $action == 'add') && !$error) // Security check $fieldid = GETPOST('ref', 'alpha')?'ref':'rowid'; - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid); $usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE; @@ -415,7 +415,7 @@ if ($action == 'create' && !$error) dol_fiche_head(); - print '
'.$langs->trans("OnProcessOrders").' '.$num.'
'; diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index f42a9fc5b60..4ca81f77771 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -42,7 +42,7 @@ $id = GETPOST("id", 'int'); $ref=GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'commande', $comid, ''); $object = new Commande($db); @@ -84,20 +84,21 @@ if (! empty($conf->projet->enabled)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->commande->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 39844ce390f..dadc25737b6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -88,7 +88,7 @@ $search_project=GETPOST('search_project', 'alpha'); // Security check $id = (GETPOST('orderid')?GETPOST('orderid', 'int'):GETPOST('id', 'int')); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'commande', $id, ''); $diroutputmassaction=$conf->commande->multidir_output[$conf->entity] . '/temp/massgeneration/'.$user->id; @@ -120,6 +120,7 @@ $fieldstosearchall = array( 'c.ref_client'=>'RefCustomerOrder', 'pd.description'=>'Description', 's.nom'=>"ThirdParty", + 's.name_alias'=>"AliasNameShort", 'c.note_public'=>'NotePublic', ); if (empty($user->socid)) $fieldstosearchall["c.note_private"]="NotePrivate"; @@ -219,8 +220,8 @@ if (empty($reshook)) // Mass actions $objectclass='Commande'; $objectlabel='Orders'; - $permtoread = $user->rights->commande->lire; - $permtodelete = $user->rights->commande->supprimer; + $permissiontoread = $user->rights->commande->lire; + $permissiontodelete = $user->rights->commande->supprimer; $uploaddir = $conf->commande->multidir_output[$conf->entity]; $trigger_name='ORDER_SENTBYMAIL'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -267,7 +268,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; if (! empty($search_categ_cus)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ $sql.= ', '.MAIN_DB_PREFIX.'commande as c'; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)"; if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande'; if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = c.fk_projet"; @@ -768,6 +769,7 @@ if ($resql) $total=0; $subtotal=0; $productstat_cache=array(); + $getNomUrl_cache=array(); $generic_commande = new Commande($db); $generic_product = new Product($db); @@ -784,11 +786,14 @@ if ($resql) $text_warning=''; $nbprod=0; - $companystatic->id=$obj->socid; + $companystatic->id = $obj->socid; $companystatic->code_client = $obj->code_client; - $companystatic->name=$obj->name; - $companystatic->client=$obj->client; - $companystatic->email=$obj->email; + $companystatic->name = $obj->name; + $companystatic->client = $obj->client; + $companystatic->email = $obj->email; + if (!isset($getNomUrl_cache[$obj->socid])) { + $getNomUrl_cache[$obj->socid] = $companystatic->getNomUrl(1, 'customer'); + } $generic_commande->id=$obj->rowid; $generic_commande->ref=$obj->ref; @@ -814,10 +819,7 @@ if ($resql) $generic_commande->lines=array(); $generic_commande->getLinesArray(); - print ''; - print ''; // Show shippable Icon (create subloop, so may be slow) if ($conf->stock->enabled) @@ -903,16 +905,15 @@ if ($resql) } } } - if ($notshippable==0) { - $text_icon = img_picto('', 'object_sending'); + if ($notshippable == 0) { + $text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'green paddingleft'); $text_info = $langs->trans('Shippable').'
'.$text_info; } else { - $text_icon = img_picto('', 'error'); + $text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'error paddingleft'); $text_info = $langs->trans('NonShippable').'
'.$text_info; } } - print ''; } // Warning late icon and note - print ''; - print ''; - print '
'; print $generic_commande->getNomUrl(1, ($viewstatut != 2?0:$obj->fk_statut), 0, 0, 0, 1); - print ''; if ($nbprod) { print $form->textwithtooltip('', $text_info, 2, 1, $text_icon, '', 2); @@ -920,11 +921,9 @@ if ($resql) if ($warning) { // Always false in default mode print $form->textwithtooltip('', $langs->trans('NotEnoughForAllOrders').'
'.$text_warning, 2, 1, img_picto('', 'error'), '', 2); } - print '
'; if ($generic_commande->hasDelay()) { print img_picto($langs->trans("Late").' : '.$generic_commande->showDelay(), "warning"); } @@ -934,15 +933,11 @@ if ($resql) print ''.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').''; print ''; } - print ''; $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->commande->multidir_output[$conf->entity] . '/' . dol_sanitizeFileName($obj->ref); $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir); - print '
'; print '
'; - print $companystatic->getNomUrl(1, 'customer'); + print $getNomUrl_cache[$obj->socid]; // If module invoices enabled and user with invoice creation permissions if (! empty($conf->facture->enabled) && ! empty($conf->global->ORDER_BILLING_ALL_CUSTOMER)) @@ -1062,24 +1057,24 @@ if ($resql) { print ''.price($obj->total_ht)."'.price($obj->total_tva)."'.price($obj->total_ttc)."
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).'
'; + print '
'; // Ref print ''; @@ -503,7 +503,7 @@ if ($action == 'create' && !$error) print ''; // Private note - if (empty($user->societe_id)) + if (empty($user->socid)) { print ''; print ''; @@ -606,7 +606,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) } print '
'; - print '
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('NotePrivate').'
'; + print '
'; print ''; print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.ref', '', '&socid='.$socid, '', $sortfield, $sortorder); print_liste_field_titre('RefCustomerOrder', $_SERVER["PHP_SELF"], 'c.ref_client', '', '&socid='.$socid, '', $sortfield, $sortorder); diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 696823f4e41..e3413f5b927 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -43,10 +43,10 @@ $object_status=GETPOST('object_status'); $userid=GETPOST('userid', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $nowyear=strftime("%Y", dol_now()); @@ -101,7 +101,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/ordersnbinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$user->id.'-'.$year.'.png'; @@ -144,7 +144,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/ordersamountinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$user->id.'-'.$year.'.png'; @@ -185,7 +185,7 @@ if (! $mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -256,7 +256,7 @@ print '
'; // Show filter box print '
'; print ''; -print '
'; +print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -299,7 +299,7 @@ print '

'; print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -350,7 +350,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("NbOfOrders").'
'; +print ' - - - - - - - - -'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo "\n"; } -if (count($linkedObjectBlock) > 1) -{ - ?> - - - - - - - - - - 1) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo "\n"; } -?> - +echo "\n"; diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 17ea98e1eef..eec09bb94cc 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -73,7 +73,7 @@ $arrayfields=array( if (empty($conf->comptabilite->enabled) && empty($conf->accounting->enabled)) { accessforbidden(); } -if ($user->societe_id > 0) { +if ($user->socid > 0) { accessforbidden(); } @@ -92,7 +92,6 @@ $entity = GETPOST('entity', 'int')?GETPOST('entity', 'int'):$conf->entity; $filesarray=array(); $result=false; if (($action=="searchfiles" || $action=="dl" )) { - if (empty($date_start)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors'); @@ -295,7 +294,18 @@ if ($result && $action == "dl" && ! $error) dol_mkdir($dirfortmpfile); - $log=$langs->transnoentitiesnoconv("Type").','.$langs->transnoentitiesnoconv("Date").','.$langs->transnoentitiesnoconv("Ref").','.$langs->transnoentitiesnoconv("TotalHT").','.$langs->transnoentitiesnoconv("TotalTTC").','.$langs->transnoentitiesnoconv("TotalVAT").','.$langs->transnoentitiesnoconv("Paid").',filename,item_id,'.$langs->transnoentitiesnoconv("ThirdParty").','.$langs->transnoentitiesnoconv("Code").','.$langs->transnoentitiesnoconv("Country").','.$langs->transnoentitiesnoconv("VATIntra")."\n"; + $log = $langs->transnoentitiesnoconv("Type"); + $log .= ',' . $langs->transnoentitiesnoconv("Date"); + $log .= ',' . $langs->transnoentitiesnoconv("Ref"); + $log .= ',' . $langs->transnoentitiesnoconv("TotalHT"); + $log .= ',' . $langs->transnoentitiesnoconv("TotalTTC"); + $log .= ',' . $langs->transnoentitiesnoconv("TotalVAT"); + $log .= ',' . $langs->transnoentitiesnoconv("Paid"); + $log .= ',filename,item_id'; + $log .= ',' . $langs->transnoentitiesnoconv("ThirdParty"); + $log .= ',' . $langs->transnoentitiesnoconv("Code"); + $log .= ',' . $langs->transnoentitiesnoconv("Country"); + $log .= ',' . $langs->transnoentitiesnoconv("VATIntra")."\n"; $zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip'; dol_delete_file($zipname); @@ -306,8 +316,20 @@ if ($result && $action == "dl" && ! $error) { foreach ($filesarray as $key => $file) { - if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); // - $log.=$file['item'].','.dol_print_date($file['date'], 'dayrfc').','.$file['ref'].','.$file['amount_ht'].','.$file['amount_ttc'].','.$file['amount_vat'].','.$file['paid'].','.$file["name"].','.$file['fk'].','.$file['thirdparty_name'].','.$file['thirdparty_code'].','.$file['country_code'].',"'.$file['vatnum'].'"'."\n"; + if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); + $log .= $file['item']; + $log .= ',' . dol_print_date($file['date'], 'dayrfc'); + $log .= ',' . $file['ref']; + $log .= ',' . $file['amount_ht']; + $log .= ',' . $file['amount_ttc']; + $log .= ',' . $file['amount_vat']; + $log .= ',' . $file['paid']; + $log .= ',' . $file["name"]; + $log .= ',' . $file['fk']; + $log .= ',' . $file['thirdparty_name']; + $log .= ',' . $file['thirdparty_code']; + $log .= ',' . $file['country_code']; + $log .= ',"' . $file['vatnum'].'"'."\n"; } $zip->addFromString('transactions.csv', $log); $zip->close(); @@ -401,7 +423,7 @@ if (!empty($date_start) && !empty($date_stop)) print '
'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 03c03378f40..459940dcc64 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -18,17 +18,12 @@ */ // Protection to avoid direct call of template -if (empty($conf) || ! is_object($conf)) -{ +if (empty($conf) || ! is_object($conf)) { print "Error, template page can't be called as URL"; exit; } -?> - - - -\n"; global $user; global $noMoreLinkedObjectBlockAfter; @@ -41,54 +36,48 @@ $langs->load("orders"); $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); -$total=0; $ilink=0; +$total=0; +$ilink=0; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> -
trans("CustomerOrder"); ?> - global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print ' - getNomUrl(1); ?>ref_client; ?>date, 'day'); ?>rights->commande->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?>getLibStatut(3); ?> - element != 'shipping') { - ?> - ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> - -
'.$langs->trans("CustomerOrder"); + if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + print ' '; + echo ''.$objectlink->getNomUrl(1).''.$objectlink->ref_client.''.dol_print_date($objectlink->date, 'day').''; + if ($user->rights->commande->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } + echo ''.$objectlink->getLibStatut(3).''; + // For now, shipments must stay linked to order, so link is not deletable + if($object->element != 'shipping') { + echo ''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; + } + echo '
trans("Total"); ?>
'.$langs->trans("Total").''.price($total).'
'; + print '
'; print ''; print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'nowrap '); print_liste_field_titre($arrayfields['date']['label'], $_SERVER["PHP_SELF"], "date", "", $param, '', $sortfield, $sortorder, 'center nowrap '); diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php new file mode 100644 index 00000000000..bc260a4e527 --- /dev/null +++ b/htdocs/compta/bank/account_statement_document.php @@ -0,0 +1,156 @@ + + * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI + * + * 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 2 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 . + */ + +/** + * \file htdocs/compta/bank/document.php + * \ingroup banque + * \brief Page de gestion des documents attaches a un compte bancaire + */ +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT . "/core/lib/bank.lib.php"; +require_once DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php"; +require_once DOL_DOCUMENT_ROOT . "/core/lib/images.lib.php"; +require_once DOL_DOCUMENT_ROOT . "/core/class/html.formfile.class.php"; +require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; + +global $conf,$db,$langs; +// Load translation files required by the page +$langs->loadLangs(array('banks', 'companies', 'other')); + +$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); +$num = (GETPOST('num', 'alpha') ? GETPOST('num', 'alpha') : GETPOST('sectionid', 'alpha')); + +$mesg = ''; +if (isset($_SESSION['DolMessage'])) { + $mesg = $_SESSION['DolMessage']; + unset($_SESSION['DolMessage']); +} + +// Security check +if ($user->socid) { + $action = ''; + $socid = $user->socid; +} +if ($user->socid) + $socid = $user->socid; + +// Get parameters +$sortfield = GETPOST("sortfield", 'alpha'); +$sortorder = GETPOST("sortorder", 'alpha'); +$page = GETPOST("page", 'int'); +if (empty($page) || $page == -1) { $page = 0; } +$offset = $conf->liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortorder) + $sortorder = "ASC"; +if (!$sortfield) + $sortfield = "name"; + +$object = new Account($db); +if ($id > 0 || ! empty($ref)) $object->fetch($id, $ref); + +$result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', ''); + + +/* + * Actions + */ + +if (!empty($num)) +{ + $object->fetch_thirdparty(); + $upload_dir = $conf->bank->dir_output . "/".$id."/statement/" . dol_sanitizeFileName($num); +} +$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$num; +include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents"); +$helpurl = ""; +llxHeader('', $title, $helpurl); + +$form = new Form($db); + +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref)) { + $upload_dir = $conf->bank->dir_output . "/".$id."/statement/" . dol_sanitizeFileName($num); + + // Onglets + $head = account_statement_prepare_head($object, $num); + dol_fiche_head($head, 'document', $langs->trans("FinancialAccount"), -1, 'account'); + + + // Build file list + $filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', $sortfield, (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1); + $totalsize = 0; + foreach ($filearray as $key => $file) { + $totalsize+=$file['size']; + } + + $morehtmlref = ''; + + + $title=$langs->trans("AccountStatement").' '.$num.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); + print load_fiche_titre($title, '', 'title_bank.png'); + + + print '
'; + print '
'; + + print '
'; + print ''; + print ''; + print "
' . $langs->trans("NbOfAttachedFiles") . '' . count($filearray) . '
' . $langs->trans("TotalSizeOfAttachedFiles") . '' .dol_print_size($totalsize, 1, 1).'
\n"; + + print ''; + + dol_fiche_end(); + + + $modulepart = 'bank'; + $permission = $user->rights->banque->modifier; + $permtoedit = $user->rights->banque->modifier; + $param = '&id=' . $object->id.'&num='.$num; + $uri = '&num='.$num; + $relativepathwithnofile = $id."/statement/".$num."/"; + include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; + } + else { + dol_print_error($db); + } +} +else { + Header('Location: index.php'); + exit; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 7dede991eca..d10374e4c8d 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -41,7 +41,7 @@ $ref=GETPOST('ref'); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :'')); $fieldtype = (! empty($ref) ? 'ref' :'rowid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype); $year_start=GETPOST('year_start'); @@ -183,7 +183,7 @@ dol_fiche_end(); print load_fiche_titre('', $link, ''); print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table -print ''; +print '
'; print ''; for ($annee = $year_start ; $annee <= $year_end ; $annee++) @@ -202,7 +202,6 @@ print ''; for ($mois = 1 ; $mois < 13 ; $mois++) { - print ''; print ""; for ($annee = $year_start ; $annee <= $year_end ; $annee++) @@ -263,7 +262,7 @@ else { dol_print_error($db); } -print '
'.$langs->trans("Month").'
".dol_print_date(dol_mktime(1, 1, 1, $mois, 1, 2000), "%B")."
'; +print '
'; print '"; print ''; @@ -307,7 +306,7 @@ else $log="graph.php: min=".$min." max=".$max; dol_syslog($log); -// CRED PART + // CRED PART // Chargement du tableau des années $tblyear[0] = array(); $tblyear[1] = array(); @@ -394,7 +393,7 @@ else unset($tblyear[1]); unset($tblyear[2]); -// DEDBT PART + // DEDBT PART // Chargement du tableau des années $tblyear[0] = array(); $tblyear[1] = array(); diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index cd964c7f4f4..0912dfaba0a 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -66,24 +66,24 @@ $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :'')); $fieldtype = (! empty($ref) ? 'ref' :'rowid'); if ($fielvalue) { - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype); } else { - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque'); } -$description=GETPOST("description", 'alpha'); $dateop = dol_mktime(12, 0, 0, GETPOST("opmonth", 'int'), GETPOST("opday", 'int'), GETPOST("opyear", 'int')); -$debit=GETPOST("debit", 'alpha'); -$credit=GETPOST("credit", 'alpha'); +$search_debit=GETPOST("search_debit", 'alpha'); +$search_credit=GETPOST("search_credit", 'alpha'); $search_type=GETPOST("search_type", 'alpha'); $search_account=GETPOST("search_account", 'int')?GETPOST("search_account", 'int'):GETPOST("account", 'int'); $search_accountancy_code=GETPOST('search_accountancy_code', 'alpha')?GETPOST('search_accountancy_code', 'alpha'):GETPOST('accountancy_code', 'alpha'); $search_bid=GETPOST("search_bid", "int")?GETPOST("search_bid", "int"):GETPOST("bid", "int"); $search_ref=GETPOST('search_ref', 'alpha'); +$search_description=GETPOST("search_description", 'alpha'); $search_dt_start = dol_mktime(0, 0, 0, GETPOST('search_start_dtmonth', 'int'), GETPOST('search_start_dtday', 'int'), GETPOST('search_start_dtyear', 'int')); $search_dt_end = dol_mktime(0, 0, 0, GETPOST('search_end_dtmonth', 'int'), GETPOST('search_end_dtday', 'int'), GETPOST('search_end_dtyear', 'int')); $search_dv_start = dol_mktime(0, 0, 0, GETPOST('search_start_dvmonth', 'int'), GETPOST('search_start_dvday', 'int'), GETPOST('search_start_dvyear', 'int')); @@ -142,7 +142,7 @@ $search_array_options=$extrafields->getOptionalsFromPost('banktransaction', '', $arrayfields=array( 'b.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'description'=>array('label'=>$langs->trans("Description"), 'checked'=>1), + 'b.label'=>array('label'=>$langs->trans("Description"), 'checked'=>1), 'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1), 'b.datev'=>array('label'=>$langs->trans("DateValueShort"), 'checked'=>1), 'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1), @@ -157,13 +157,16 @@ $arrayfields=array( 'b.conciliated'=>array('label'=>$langs->trans("Conciliated"), 'enabled'=> $object->rappro, 'checked'=>($action == 'reconcile'?1:0), 'position'=>1020), ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); @@ -186,13 +189,13 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_dt_end=''; $search_dv_start=''; $search_dv_end=''; - $description=""; $search_type=""; - $debit=""; - $credit=""; + $search_debit=""; + $search_credit=""; $search_bid=""; $search_ref=""; $search_req_nb=''; + $search_description=''; $search_thirdparty=''; $search_num_releve=''; $search_conciliated=''; @@ -206,8 +209,8 @@ if (empty($reshook)) { $objectclass='Account'; $objectlabel='BankTransaction'; - $permtoread = $user->rights->banque->lire; - $permtodelete = $user->rights->banque->supprimer; + $permissiontoread = $user->rights->banque->lire; + $permissiontodelete = $user->rights->banque->supprimer; $uploaddir = $conf->bank->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -263,6 +266,7 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' if ($offset) $param.='&offset='.urlencode($offset); if ($search_thirdparty) $param.='&search_thirdparty='.urlencode($search_thirdparty); if ($search_num_releve) $param.='&search_num_releve='.urlencode($search_num_releve); + if ($search_description) $param.='&search_description='.urlencode($search_description); if ($search_start_dt) $param.='&search_start_dt='.urlencode($search_start_dt); if ($search_end_dt) $param.='&search_end_dt='.urlencode($search_end_dt); if ($search_start_dv) $param.='&search_start_dv='.urlencode($search_start_dv); @@ -393,11 +397,11 @@ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($lim if ($id > 0) $param.='&id='.urlencode($id); if (!empty($ref)) $param.='&ref='.urlencode($ref); if (!empty($search_ref)) $param.='&search_ref='.urlencode($search_ref); -if (!empty($description)) $param.='&description='.urlencode($description); +if (!empty($search_description)) $param.='&search_description='.urlencode($search_description); if (!empty($search_type)) $param.='&type='.urlencode($search_type); if (!empty($search_thirdparty)) $param.='&search_thirdparty='.urlencode($search_thirdparty); -if (!empty($debit)) $param.='&debit='.urlencode($debit); -if (!empty($credit)) $param.='&credit='.urlencode($credit); +if (!empty($search_debit)) $param.='&search_debit='.urlencode($search_debit); +if (!empty($search_credit)) $param.='&search_credit='.urlencode($search_credit); if (!empty($search_account)) $param.='&search_account='.urlencode($search_account); if (!empty($search_num_releve)) $param.='&search_num_releve='.urlencode($search_num_releve); if ($search_conciliated != '' && $search_conciliated != '-1') $param.='&search_conciliated='.urlencode($search_conciliated); @@ -472,7 +476,9 @@ $sql.= " ba.rowid as bankid, ba.ref as bankref,"; $sql.= " bu.url_id,"; $sql.= " s.nom, s.name_alias, s.client, s.fournisseur, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -498,14 +504,36 @@ if ($search_req_nb) $sql.= natural_search("b.num_chq", $search_req_nb); if ($search_num_releve) $sql.= natural_search("b.num_releve", $search_num_releve); if ($search_conciliated != '' && $search_conciliated != '-1') $sql.= " AND b.rappro = ".$search_conciliated; if ($search_thirdparty) $sql.= natural_search("s.nom", $search_thirdparty); -if ($description) $sql.= natural_search("b.label", $description); // Warning some text are just translation keys, not translated strings +if ($search_description) +{ + $search_description_to_use = $search_description; + $arrayoffixedlabels=array( + 'payment_salary', + 'CustomerInvoicePayment', 'CustomerInvoicePaymentBack', + 'SupplierInvoicePayment', 'SupplierInvoicePaymentBack', + 'DonationPayment', + 'ExpenseReportPayment', + 'SocialContributionPayment', + 'SubscriptionPayment', + 'WithdrawalPayment' + ); + foreach($arrayoffixedlabels as $keyforlabel) + { + $translatedlabel = $langs->transnoentitiesnoconv($keyforlabel); + if (preg_match('/'.$search_description.'/i', $translatedlabel)) + { + $search_description_to_use.="|".$keyforlabel; + } + } + $sql.= natural_search("b.label", $search_description_to_use); // Warning some text are just translation keys, not translated strings +} if ($search_bid > 0) $sql.= " AND b.rowid=l.lineid AND l.fk_categ=".$search_bid; if (! empty($search_type)) $sql.= " AND b.fk_type = '".$db->escape($search_type)."' "; // Search criteria amount -$debit = price2num(str_replace('-', '', $debit)); -$credit = price2num(str_replace('-', '', $credit)); -if ($debit) $sql.= natural_search('- b.amount', $debit, 1); -if ($credit) $sql.= natural_search('b.amount', $credit, 1); +$search_debit = price2num(str_replace('-', '', $search_debit)); +$search_credit = price2num(str_replace('-', '', $search_credit)); +if ($search_debit) $sql.= natural_search('- b.amount', $search_debit, 1); +if ($search_credit) $sql.= natural_search('b.amount', $search_credit, 1); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -662,7 +690,7 @@ if ($resql) { print load_fiche_titre($langs->trans("AddBankRecordLong"), '', ''); - print '
'.$langs->trans("CurrentBalance")."'.price($balance).'
'; + print '
'; print ''; print ''; @@ -853,10 +881,10 @@ if ($resql) print ''; print ''; } - if (! empty($arrayfields['description']['checked'])) + if (! empty($arrayfields['b.label']['checked'])) { print ''; } if (! empty($arrayfields['b.dateo']['checked'])) @@ -891,13 +919,13 @@ if ($resql) if (! empty($arrayfields['b.debit']['checked'])) { print ''; } if (! empty($arrayfields['b.credit']['checked'])) { print ''; } if (! empty($arrayfields['balancebefore']['checked'])) @@ -937,7 +965,7 @@ if ($resql) // Fields title print ''; if (! empty($arrayfields['b.rowid']['checked'])) print_liste_field_titre($arrayfields['b.rowid']['label'], $_SERVER['PHP_SELF'], 'b.rowid', '', $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['description']['checked'])) print_liste_field_titre($arrayfields['description']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); + if (! empty($arrayfields['b.label']['checked'])) print_liste_field_titre($arrayfields['b.label']['label'], $_SERVER['PHP_SELF'], 'b.label', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['b.dateo']['checked'])) print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, '', $sortfield, $sortorder, "center "); if (! empty($arrayfields['b.datev']['checked'])) print_liste_field_titre($arrayfields['b.datev']['label'], $_SERVER['PHP_SELF'], 'b.datev,b.dateo,b.rowid', '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['type']['checked'])) print_liste_field_titre($arrayfields['type']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="center"', $sortfield, $sortorder); @@ -1037,9 +1065,10 @@ if ($resql) } } // Extra fields - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + $element = 'banktransaction'; + if (is_array($extrafields->attributes[$element]['label']) && count($extrafields->attributes[$element]['label'])) { - foreach($extrafields->attribute_label as $key => $val) + foreach($extrafields->attributes[$element]['label'] as $key => $val) { if (! empty($arrayfields["ef.".$key]['checked'])) { @@ -1056,6 +1085,7 @@ if ($resql) if ($tmpnbfieldbeforebalance) { print ''; } @@ -1081,6 +1111,7 @@ if ($resql) '; print ''; print ''; print ''; } @@ -1142,7 +1173,7 @@ if ($resql) } // Description - if (! empty($arrayfields['description']['checked'])) + if (! empty($arrayfields['b.label']['checked'])) { print "\n"; + print '\n"; if (! $i) $totalarray['nbfield']++; } // Date value if (! empty($arrayfields['b.datev']['checked'])) { - print '\n"; - if (! $i) $totalarray['nbfield']++; + print '\n"; + if (! $i) $totalarray['nbfield']++; } // Payment type @@ -1328,7 +1355,7 @@ if ($resql) if ($labeltype == 'SOLD') print ' '; //$langs->trans("InitialBankBalance"); else print $labeltype; print "\n"; - if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['nbfield']++; } // Num cheque @@ -1504,7 +1531,6 @@ if ($resql) print ' '.img_warning($langs->trans("ReconciliationLate")); } } - print ' '; if ($user->rights->banque->modifier) { print 'rowid.'&id='.$objp->bankid.'&page='.$page.'">'; @@ -1557,6 +1583,14 @@ if ($resql) print ''; } + // If no record found + if ($num == 0) + { + $colspan=1; + foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; } + print ''; + } + print "
'.$langs->trans("Description").''; - //print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print '
'; + print ' '; print ''; + print ' '; print '
"; @@ -1252,19 +1283,15 @@ if ($resql) } elseif ($links[$key]['type']=='company') { - } elseif ($links[$key]['type']=='user') { - } elseif ($links[$key]['type']=='member') { - } elseif ($links[$key]['type']=='sc') { - } else { @@ -1291,33 +1318,33 @@ if ($resql) // Date ope if (! empty($arrayfields['b.dateo']['checked'])) { - print ''; - print ''.dol_print_date($db->jdate($objp->do), "day").""; - print ' '; - print ''; - print ''; - print img_edit_remove() . " "; - print ''; - print img_edit_add() .""; - print ''; - print "'; + print ''.dol_print_date($db->jdate($objp->do), "day").""; + print ' '; + print ''; + print ''; + print img_edit_remove() . " "; + print ''; + print img_edit_add() .""; + print ''; + print "'; - print ''.dol_print_date($db->jdate($objp->dv), "day").""; - print ' '; - print ''; - print ''; - print img_edit_remove() . " "; - print ''; - print img_edit_add() .""; - print ''; - print "'; + print ''.dol_print_date($db->jdate($objp->dv), "day").""; + print ' '; + print ''; + print ''; + print img_edit_remove() . " "; + print ''; + print img_edit_add() .""; + print ''; + print "
'.$langs->trans("NoRecordFound").'
"; print "
"; @@ -1568,12 +1602,6 @@ else dol_print_error($db); } -// If no data to display after a search -if ($_POST["action"] == "search" && ! $num) -{ - print '
'.$langs->trans("NoRecordFound").'
'; -} - // End of page llxFooter(); $db->close(); diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 41275ec2a40..967227f9e89 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque'); @@ -46,7 +46,7 @@ llxHeader(); // List movements bu category for bank transactions print load_fiche_titre($langs->trans("BankTransactionByCategories"), '', 'title_bank.png'); -print ''; +print '
'; print ""; print ''; print ''; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index fd5a2b42723..4e58684b876 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -47,12 +47,9 @@ $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); // Security check -if (isset($_GET["id"]) || isset($_GET["ref"])) -{ - $id = isset($_GET["id"])?GETPOST("id"):(isset($_GET["ref"])?GETPOST("ref"):''); -} -$fieldid = isset($_GET["ref"])?'ref':'rowid'; -if ($user->societe_id) $socid=$user->societe_id; +$id = GETPOST("id", 'int') ? GETPOST("id", 'int'): GETPOST('ref', 'alpha'); +$fieldid = GETPOSTISSET("ref") ? 'ref' : 'rowid'; + $result=restrictedArea($user, 'banque', $id, 'bank_account&bank_account', '', '', $fieldid); $object = new Account($db); @@ -79,12 +76,12 @@ if ($action == 'add') // Create account $object = new Account($db); - $object->ref = dol_sanitizeFileName(trim($_POST["ref"])); - $object->label = trim($_POST["label"]); - $object->courant = $_POST["type"]; - $object->clos = $_POST["clos"]; - $object->rappro = (isset($_POST["norappro"]) && $_POST["norappro"])?0:1; - $object->url = $_POST["url"]; + $object->ref = dol_string_nospecial(trim(GETPOST('ref', 'alpha'))); + $object->label = trim(GETPOST("label", 'alphanohtml')); + $object->courant = $_POST["type"]; + $object->clos = $_POST["clos"]; + $object->rappro = (GETPOST("norappro", 'alpha') ? 0 : 1); + $object->url = trim(GETPOST("url", 'alpha')); $object->bank = trim($_POST["bank"]); $object->code_banque = trim($_POST["code_banque"]); @@ -93,27 +90,34 @@ if ($action == 'add') $object->cle_rib = trim($_POST["cle_rib"]); $object->bic = trim($_POST["bic"]); $object->iban = trim($_POST["iban"]); - $object->domiciliation = trim($_POST["domiciliation"]); + $object->domiciliation = trim(GETPOST("domiciliation", "nohtml")); - $object->proprio = trim($_POST["proprio"]); - $object->owner_address = trim($_POST["owner_address"]); + $object->proprio = trim(GETPOST("proprio", 'alphanohtml')); + $object->owner_address = trim(GETPOST("owner_address", 'nohtml')); - $account_number = GETPOST('account_number', 'alpha'); - if (empty($account_number) || $account_number == '-1') { $object->account_number = ''; } else { $object->account_number = $account_number; } + $account_number = GETPOST('account_number', 'alphanohtml'); + if (empty($account_number) || $account_number == '-1') + { + $object->account_number = ''; + } + else + { + $object->account_number = $account_number; + } $fk_accountancy_journal = GETPOST('fk_accountancy_journal', 'int'); if ($fk_accountancy_journal <= 0) { $object->fk_accountancy_journal = ''; } else { $object->fk_accountancy_journal = $fk_accountancy_journal; } $object->solde = $_POST["solde"]; - $object->date_solde = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $object->date_solde = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST('reday', 'int'), GETPOST("reyear", 'int')); $object->currency_code = trim($_POST["account_currency_code"]); - $object->state_id = $_POST["account_state_id"]; - $object->country_id = $_POST["account_country_id"]; + $object->state_id = GETPOST("account_state_id", 'int'); + $object->country_id = GETPOST("account_country_id", 'int'); $object->min_allowed = GETPOST("account_min_allowed", 'int'); $object->min_desired = GETPOST("account_min_desired", 'int'); - $object->comment = trim(GETPOST("account_comment")); + $object->comment = trim(GETPOST("account_comment", 'none')); $object->fk_user_author = $user->id; @@ -176,14 +180,14 @@ if ($action == 'update') // Update account $object = new Account($db); - $object->fetch(GETPOST("id")); + $object->fetch(GETPOST("id", 'int')); - $object->ref = dol_string_nospecial(trim($_POST["ref"])); - $object->label = trim($_POST["label"]); + $object->ref = dol_string_nospecial(trim(GETPOST('ref', 'alpha'))); + $object->label = trim(GETPOST("label", 'alphanohtml')); $object->courant = $_POST["type"]; $object->clos = $_POST["clos"]; - $object->rappro = (isset($_POST["norappro"]) && $_POST["norappro"])?0:1; - $object->url = trim($_POST["url"]); + $object->rappro = (GETPOST("norappro", 'alpha') ? 0 : 1); + $object->url = trim(GETPOST("url", 'alpha')); $object->bank = trim($_POST["bank"]); $object->code_banque = trim($_POST["code_banque"]); @@ -192,10 +196,10 @@ if ($action == 'update') $object->cle_rib = trim($_POST["cle_rib"]); $object->bic = trim($_POST["bic"]); $object->iban = trim($_POST["iban"]); - $object->domiciliation = trim($_POST["domiciliation"]); + $object->domiciliation = trim(GETPOST("domiciliation", "nohtml")); - $object->proprio = trim($_POST["proprio"]); - $object->owner_address = trim($_POST["owner_address"]); + $object->proprio = trim(GETPOST("proprio", 'alphanohtml')); + $object->owner_address = trim(GETPOST("owner_address", 'nohtml')); $account_number = GETPOST('account_number', 'alpha'); if (empty($account_number) || $account_number == '-1') @@ -211,12 +215,12 @@ if ($action == 'update') $object->currency_code = trim($_POST["account_currency_code"]); - $object->state_id = $_POST["account_state_id"]; - $object->country_id = $_POST["account_country_id"]; + $object->state_id = GETPOST("account_state_id", 'int'); + $object->country_id = GETPOST("account_country_id", 'int'); $object->min_allowed = GETPOST("account_min_allowed", 'int'); $object->min_desired = GETPOST("account_min_desired", 'int'); - $object->comment = trim(GETPOST("account_comment")); + $object->comment = trim(GETPOST("account_comment", 'none')); if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($object->account_number)) { @@ -289,7 +293,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights-> } else { - setEventMessages($account->error, $account->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action=''; } } @@ -342,7 +346,7 @@ if ($action == 'create') dol_fiche_head(''); - print '
'.$langs->trans("Rubrique").''.$langs->trans("Nb").'
'; + print '
'; // Ref print ''; @@ -410,10 +414,15 @@ if ($action == 'create') { print '"; @@ -441,7 +450,7 @@ if ($action == 'create') print '
'; - print '
'.$langs->trans("Ref").'
'.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_ACCOUNT, '', 'parent', 64, 0, 1); + + $arrayselected = array(); $c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_ACCOUNT); - foreach($cats as $cat) { - $arrayselected[] = $cat->id; + if (is_array($cats)) + { + foreach($cats as $cat) { + $arrayselected[] = $cat->id; + } } print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); print "
'; + print '
'; // Sold print ''; @@ -463,7 +472,7 @@ if ($action == 'create') if ($_POST["type"] == Account::TYPE_SAVINGS || $_POST["type"] == Account::TYPE_CURRENT) { - print '
'.$langs->trans("InitialBankBalance").'
'; + print '
'; // If bank account print ''; @@ -523,7 +532,7 @@ if ($action == 'create') print '
'; } - print '
'.$langs->trans("BankName").'
'; + print '
'; // Accountancy code $fieldrequired=''; if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) $fieldrequired='fieldrequired '; @@ -625,9 +634,9 @@ else print ''; print ''; print ''; @@ -691,7 +700,6 @@ else if ($object->type == Account::TYPE_SAVINGS || $object->type == Account::TYPE_CURRENT) { - print '
'; print '
'.$langs->trans("Conciliable").''; $conciliate=$object->canBeConciliated(); - if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; - elseif ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; - else print ($object->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')')); + if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; + elseif ($conciliate == -3) print $langs->trans("No").' ('.$langs->trans("Closed").')'; + else print ($object->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')')); print '
'.$langs->trans("BalanceMinimalAllowed").'
'; @@ -825,7 +833,7 @@ else //print '
'; - print '
'; + print '
'; // Ref print ''; @@ -943,7 +951,7 @@ else //print '
'; - print '
'.$langs->trans("Ref").'
'; + print '
'; // Accountancy code $tdextra = ' class="titlefieldcreate"'; @@ -978,7 +986,7 @@ else //print '
'; - print '
'; + print '
'; // If bank account print ''; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index c4b127d02c9..377feaa0cae 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -59,10 +59,8 @@ if ($categid) { $bankcateg = new BankCateg($db); if ($bankcateg->fetch($categid) > 0) { - //Update category if (GETPOST('update') && $label) { - $bankcateg->label = $label; $bankcateg->update($user); } @@ -95,7 +93,7 @@ print ''; */ print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table -print '
'.$langs->trans("BankName").'
'; +print '
'; print ''; print ''; print "\n"; @@ -103,7 +101,6 @@ print "\n"; // Line to add category if ($action != 'edit') { - print ''; print ''; print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 4e72c6312e6..57cff121010 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -265,7 +265,6 @@ class Account extends CommonObject $string = ''; foreach ($this->getFieldsToShow() as $val) { - if ($val == 'BankCode') { $string .= $this->code_banque.' '; } elseif ($val == 'BankAccountNumber') { @@ -493,7 +492,6 @@ class Account extends CommonObject } if ($accline->insert() > 0) { - if ($categorie>0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class ("; $sql .= "lineid, fk_categ"; @@ -1084,38 +1082,27 @@ class Account extends CommonObject /** * Return label of given object status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; $langs->load('banks'); - if ($statut == self::STATUS_OPEN) { + if ($status == self::STATUS_OPEN) { $label = $langs->trans("StatusAccountOpened"); - $picto = img_picto($label, 'statut4'); + $labelshort = $langs->trans("StatusAccountOpened"); + $statusType = 'status4'; } else { $label = $langs->trans("StatusAccountClosed"); - $picto = img_picto($label, 'statut5'); + $labelshort = $langs->trans("StatusAccountClosed"); + $statusType = 'status5'; } - if ($mode == 2) { - return $picto.' '.$label; - } elseif ($mode == 3) { - return $picto; - } elseif ($mode == 4) { - return $picto.' '.$label; - } elseif ($mode == 5) { - return $label.' '.$picto; - } elseif ($mode == 6) { - return $label.' '.$picto; - } - - //There is no short mode for this label - return $label; + return dolGetStatus($label, $labelshort, '', $statusType, $mode); } @@ -1201,7 +1188,7 @@ class Account extends CommonObject // phpcs:enable global $conf, $langs; - if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe + if ($user->socid) return -1; // protection pour eviter appel par utilisateur externe $sql = "SELECT b.rowid, b.datev as datefin"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b,"; @@ -1257,7 +1244,7 @@ class Account extends CommonObject // phpcs:enable global $user; - if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe + if ($user->socid) return -1; // protection pour eviter appel par utilisateur externe $sql = "SELECT count(b.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b,"; @@ -1296,7 +1283,7 @@ class Account extends CommonObject global $db, $conf, $user; //Protection against external users - if ($user->societe_id) { + if ($user->socid) { return 0; } @@ -1373,10 +1360,10 @@ class Account extends CommonObject $linkstart = 'global->BANK_SHOW_ORDER_OPTION) + preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber', + $conf->global->BANK_SHOW_ORDER_OPTION) ); } } @@ -2320,11 +2307,11 @@ class AccountLine extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id statut * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -2332,33 +2319,33 @@ class AccountLine extends CommonObject /* if ($mode == 0) { - if ($statut==0) return $langs->trans("ActivityCeased"); - if ($statut==1) return $langs->trans("InActivity"); + if ($status==0) return $langs->trans("ActivityCeased"); + if ($status==1) return $langs->trans("InActivity"); } if ($mode == 1) { - if ($statut==0) return $langs->trans("ActivityCeased"); - if ($statut==1) return $langs->trans("InActivity"); + if ($status==0) return $langs->trans("ActivityCeased"); + if ($status==1) return $langs->trans("InActivity"); } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"').' '.$langs->trans("ActivityCeased"); - if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"').' '.$langs->trans("InActivity"); + if ($status==0) return img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"').' '.$langs->trans("ActivityCeased"); + if ($status==1) return img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"').' '.$langs->trans("InActivity"); } if ($mode == 3) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"'); - if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"'); + if ($status==0) return img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"'); + if ($status==1) return img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"'); } if ($mode == 4) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"').' '.$langs->trans("ActivityCeased"); - if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"').' '.$langs->trans("InActivity"); + if ($status==0) return img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"').' '.$langs->trans("ActivityCeased"); + if ($status==1) return img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"').' '.$langs->trans("InActivity"); } if ($mode == 5) { - if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"'); - if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"'); + if ($status==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut5', 'class="pictostatus"'); + if ($status==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4', 'class="pictostatus"'); }*/ } diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index ed94c8e4700..ca3acd59e42 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -523,46 +523,46 @@ class PaymentVarious extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } elseif ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } } diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 0d517a43fec..1a250a83b10 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -46,14 +46,12 @@ if (isset($_SESSION['DolMessage'])) { } // Security check -if ($user->societe_id) { +if ($user->socid) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } -if ($user->societe_id) - $socid = $user->societe_id; -$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', - $fieldtype); +if ($user->socid) + $socid = $user->socid; // Get parameters $sortfield = GETPOST("sortfield", 'alpha'); @@ -69,8 +67,10 @@ if (!$sortfield) $sortfield = "name"; $object = new Account($db); -if ($id) - $object->fetch($id); +if ($id > 0 || ! empty($ref)) $object->fetch($id, $ref); + +$result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', ''); + /* * Actions @@ -97,7 +97,6 @@ $form = new Form($db); if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref)) { - $upload_dir = $conf->bank->dir_output . '/' . $object->ref; // Onglets @@ -106,14 +105,14 @@ if ($id > 0 || !empty($ref)) { // Build file list - $filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', - $sortfield, - (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1); + $filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', $sortfield, (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1); $totalsize = 0; foreach ($filearray as $key => $file) { $totalsize+=$file['size']; } + $morehtmlref = ''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 4ad0fe0e261..15f6a1236d5 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -40,7 +40,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"])) $id = isset($_GET["account"])?$_GET["account"]:(isset($_GET["ref"])?$_GET["ref"]:''); } $fieldid = isset($_GET["ref"])?'ref':'rowid'; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque', $id, 'bank_account&bank_account', '', '', $fieldid); $account=GETPOST("account"); diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index 389cde747af..cdab5006ef9 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -53,7 +53,7 @@ $cancel=GETPOST('cancel', 'alpha'); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :'')); $fieldtype = (! empty($ref) ? 'ref' :'rowid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype); if (! $user->rights->banque->lire && ! $user->rights->banque->consolidate) accessforbidden(); @@ -314,7 +314,7 @@ if ($result) print '
'; print '
'; - print '
'.$langs->trans("Ref").''.$langs->trans("Label").'
 
'; + print '
'; $i++; @@ -639,7 +639,7 @@ if ($result) print '
'; - print '
'; + print '
'; print '"; if ($user->rights->banque->consolidate) diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 843b3b0e323..2244a73b02a 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018 Ferran Marcet @@ -50,7 +50,7 @@ $search_status=GETPOST('search_status')?GETPOST('search_status', 'alpha'):'opene $optioncss = GETPOST('optioncss', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; if (! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Dictionary with list of banks accounting account allowed to manager of chart account if (! $allowed) $result=restrictedArea($user, 'banque'); @@ -73,7 +73,7 @@ $hookmanager->initHooks(array('bankaccountlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('bank_account'); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -98,13 +98,16 @@ $arrayfields=array( 'balance'=>array('label'=>$langs->trans("Balance"), 'checked'=>1, 'position'=>1010), ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); /* @@ -144,7 +147,9 @@ $accounts = array(); $sql = "SELECT b.rowid, b.label, b.courant, b.rappro, b.account_number, b.fk_accountancy_journal, b.currency_code, b.datec as date_creation, b.tms as date_update"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -454,7 +459,7 @@ foreach ($accounts as $key=>$type) if (! empty($arrayfields['b.account_number']['checked'])) { print ''; if (! $i) $totalarray['nbfield']++; } @@ -551,8 +563,8 @@ foreach ($accounts as $key=>$type) print ''.price($solde, 0, $langs, 0, -1, -1, $objecttmp->currency_code).''; print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalbalancefield']=$totalarray['nbfield']; - $totalarray['totalbalance'] += $solde; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='balance'; + $totalarray['val']['balance'] += $solde; } // Action column @@ -582,22 +594,10 @@ if (! $found) } // Show total line -if (isset($totalarray['totalbalancefield']) && $lastcurrencycode != 'various') // If there is several currency, $lastcurrencycode is set to 'various' before +if ($lastcurrencycode != 'various') // If there is several currency, $lastcurrencycode is set to 'various' before { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalbalancefield'] == $i) print ''; - else print ''; - } - print ''; + // Show total line + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; } print '
'.$langs->trans("Conciliation")."'; - if (! empty($conf->accounting->enabled)) + if (! empty($conf->accounting->enabled) && ! empty($objecttmp->account_number)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objecttmp->account_number, 1); @@ -472,7 +477,7 @@ foreach ($accounts as $key=>$type) if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) { print ''; - if (! empty($conf->accounting->enabled)) + if (! empty($conf->accounting->enabled) && ! empty($objecttmp->fk_accountancy_journal)) { $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($objecttmp->fk_accountancy_journal); @@ -505,11 +510,18 @@ foreach ($accounts as $key=>$type) if ($result<0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); } else { - print $result->nbtodo; - if ($result->nbtodolate) print '   ('.$result->nbtodolate.img_warning($langs->trans("Late")).')'; + print ''.$result->nbtodo.''; + if ($result->nbtodolate) { + print ''; + print ' '.$result->nbtodolate; + print ''; + } } } - else print $langs->trans("FeatureDisabled"); + else + { + print ''.$langs->trans("FeatureDisabled").''; + } print '
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalbalance'], 0, $langs, 0, -1, -1, $lastcurrencycode).'
'; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index cca8f6ea9ef..d267f55f640 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2017 Patrick Delcroix + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -57,7 +58,7 @@ $newbankreceipt=GETPOST('newbankreceipt', 'alpha'); // Security check $fieldid = (! empty($ref)?$ref:$id); $fieldname = isset($ref)?'ref':'rowid'; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque', $fieldid, 'bank_account', '', '', $fieldname); if ($user->rights->banque->consolidate && $action == 'dvnext' && ! empty($dvid)) @@ -268,8 +269,9 @@ if (empty($numref)) print ''; print ''; print ''; + print ''; - print ''; + print '
'; print ''; print ''; print ''; @@ -335,7 +337,7 @@ if (empty($numref)) print ''; @@ -359,7 +361,12 @@ else * Show list of bank statements */ - $mesprevnext=''; + // Onglets + $head=account_statement_prepare_head($object, $numref); + dol_fiche_head($head, 'statement', $langs->trans("FinancialAccount"), 0, 'account'); + + + $mesprevnext=''; $mesprevnext.='
'.$langs->trans("Ref").''.$langs->trans("InitialBankBalance").''; if ($user->rights->banque->consolidate && $action != 'editbankreceipt') { - print 'numr.'">'.img_edit().''; + print 'numr.'">'.img_edit().''; } print '
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index eeea2b72ce5..7ca62b67ab8 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -42,7 +42,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"])) $id = isset($_GET["account"])?$_GET["account"]:(isset($_GET["ref"])?$_GET["ref"]:''); } $fieldid = isset($_GET["ref"])?'ref':'rowid'; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'banque', $id, 'bank_account&bank_account', '', '', $fieldid); @@ -258,7 +258,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) { $socialcontribstatic->ref=$obj->ref; $socialcontribstatic->id=$obj->objid; - $socialcontribstatic->lib=$obj->type; + $socialcontribstatic->label=$obj->type; $ref = $socialcontribstatic->getNomUrl(1, 24); $totalpayment = -1*$socialcontribstatic->getSommePaiement(); // Payment already done @@ -322,7 +322,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) print ''; print "
'.$langs->trans("TransferFrom").''.$langs->trans("TransferTo").''.$langs->trans("Date").''.$langs->trans("Description").''.$langs->trans("Amount").'
"; - print ""; + print ""; } else { diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 9260ee3f1f9..9066d0ef581 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -57,7 +57,7 @@ $category_transaction = GETPOST("category_transaction", 'alpha'); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'banque', '', '', ''); $object = new PaymentVarious($db); @@ -267,7 +267,7 @@ if ($action == 'create') dol_fiche_head('', ''); - print ''; + print '
'; // Date payment print '
'; @@ -427,19 +427,20 @@ if ($id) $morehtmlref.=$langs->trans('Project') . ' '; if ($user->rights->banque->modifier) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); @@ -458,7 +459,7 @@ if ($id) print '
'; print '
'; - print ''; + print '
'; // Label print ''; diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index a196540d484..7070946e2c7 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -39,7 +39,7 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'banque', '', '', ''); // Get parameters @@ -92,19 +92,20 @@ if ($object->id) $morehtmlref.=$langs->trans('Project') . ' : '; if ($user->rights->banque->modifier && 0) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index 4cc64bb830e..7498872881d 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -35,7 +35,7 @@ $action=GETPOST('action', 'aZ09'); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'banque', '', '', ''); /* @@ -61,19 +61,20 @@ if (! empty($conf->projet->enabled)) $morehtmlref.=$langs->trans('Project') . ' : '; if ($user->rights->banque->modifier && 0) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 6c15c40ecaa..d73d6d8a391 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -35,7 +35,7 @@ $langs->loadLangs(array("compta","banks","bills","accountancy")); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'banque', '', '', ''); $optioncss = GETPOST('optioncss', 'alpha'); @@ -256,15 +256,19 @@ if ($result) // Ref print "\n"; + if (! $i) $totalarray['nbfield']++; // Label payment print "\n"; + if (! $i) $totalarray['nbfield']++; // Date payment print '\n"; + if (! $i) $totalarray['nbfield']++; // Type print ''; + if (! $i) $totalarray['nbfield']++; // Account if (! empty($conf->banque->enabled)) @@ -289,6 +293,7 @@ if ($result) } else print ' '; print ''; + if (! $i) $totalarray['nbfield']++; } // Accounting account @@ -297,6 +302,7 @@ if ($result) $accountingaccount->fetch('', $obj->accountancy_code, 1); print ''; + if (! $i) $totalarray['nbfield']++; } // Debit @@ -304,8 +310,10 @@ if ($result) if ($obj->sens == 0) { print price($obj->amount); - $totalarray['totaldeb'] += $obj->amount; + $totalarray['val']['total_deb'] += $obj->amount; } + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='total_deb'; print ""; // Credit @@ -313,8 +321,10 @@ if ($result) if ($obj->sens == 1) { print price($obj->amount); - $totalarray['totalcred'] += $obj->amount; + $totalarray['val']['total_cred'] += $obj->amount; } + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='total_cred'; print ""; print ""; @@ -326,12 +336,8 @@ if ($result) if (! empty($conf->banque->enabled)) $colspan++; if (! empty($conf->accounting->enabled)) $colspan++; - print ''; - print ''; - print '"; - print '"; - print ''; - print ''; + // Show total line + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; print "
'.$langs->trans("Label").''.$object->label.'
".$variousstatic->getNomUrl(1)."".dol_trunc($obj->label, 40)."'.dol_print_date($db->jdate($obj->datep), 'day')."'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''.$accountingaccount->getNomUrl(0, 1, 1, '', 1).'
'.$langs->trans("Total").''.price($totalarray['totaldeb'])."'.price($totalarray['totalcred'])."
"; print '
'; diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index aef5c0573f9..602cd9142cf 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -318,6 +318,7 @@ if ($action=="create" || $action=="start") print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register'); print '
'; + print ''; if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') { print ''; @@ -326,7 +327,7 @@ if ($action=="create" || $action=="start") { print ''; } - print ''; + print '
'; print ''; print ''; print ''; @@ -406,7 +407,7 @@ if ($action=="create" || $action=="start") print '
'; - print '
'.$langs->trans("Module").''.$langs->trans("CashDesk").' ID
'; + print '
'; print ''; print ''; diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 6b767bc3949..7a40d6638ee 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -90,9 +90,9 @@ if (! $sortorder) $sortorder="ASC"; // Security check $socid=0; -if ($user->societe_id > 0) // Protection if external user +if ($user->socid > 0) // Protection if external user { - //$socid = $user->societe_id; + //$socid = $user->socid; accessforbidden(); } //$result = restrictedArea($user, 'monmodule', $id, ''); @@ -168,8 +168,8 @@ if (empty($reshook)) // Mass actions $objectclass='CashControl'; $objectlabel='CashControl'; - $permtoread = ($user->rights->cashdesk->use || $user->rights->takepos->use); - $permtodelete = ($user->rights->cashdesk->use || $user->rights->takepos->use); + $permissiontoread = ($user->rights->cashdesk->use || $user->rights->takepos->use); + $permissiontodelete = ($user->rights->cashdesk->use || $user->rights->takepos->use); //$uploaddir = ''; //include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -322,7 +322,7 @@ $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->monmodule->delete) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +//if ($user->rights->monmodule->delete) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); @@ -336,13 +336,9 @@ print ''; print ''; print ''; -$newcardbutton=''; -//if ($user->rights->monmodule->creer) - //{ -$newcardbutton=''.$langs->trans('New').''; -$newcardbutton.= ''; -$newcardbutton.= ''; -//} +$permforcashfence = 1; + +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit); @@ -389,12 +385,18 @@ print '
'; foreach($object->fields as $key => $val) { - $cssforfield=''; - if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; - if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right'; - if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; - if (! empty($arrayfields['t.'.$key]['checked'])) print ''; + $cssforfield=(empty($val['css'])?'':$val['css']); + if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print ''; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -416,15 +418,15 @@ print ''."\n"; print ''; foreach($object->fields as $key => $val) { - $cssforfield=''; - if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; - if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right'; - if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; - if (! empty($arrayfields['t.'.$key]['checked'])) - { - print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n"; - } + $cssforfield=(empty($val['css'])?'':$val['css']); + if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n"; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -467,25 +469,21 @@ while ($i < min($num, $limit)) print ''; foreach($object->fields as $key => $val) { - $cssforfield=''; - if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; - elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + $cssforfield=(empty($val['css'])?'':$val['css']); + if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; - if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; - elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; + if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right'; + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield.=($cssforfield?' ':'').'right'; if (! empty($arrayfields['t.'.$key]['checked'])) { - print ''; - print $object->showOutputField($val, $key, $obj->$key, ''); + print ''; + if ($key == 'status') print $object->getLibStatut(5); + elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), ''); + else print $object->showOutputField($val, $key, $obj->$key, ''); print ''; if (! $i) $totalarray['nbfield']++; if (! empty($val['isameasure'])) @@ -518,26 +516,8 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['pos'])) -{ - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 87db81bf98d..00d77987d08 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -87,7 +87,13 @@ class CashControl extends CommonObject public $cheque; public $card; public $date_valid; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $date_modification; const STATUS_DRAFT = 0; @@ -311,47 +317,20 @@ class CashControl extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelstatus)) + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); - $this->labelstatus[0] = $langs->trans('Draft'); - $this->labelstatus[1] = $langs->trans('Closed'); + $this->labelStatus[0] = $langs->trans('Draft'); + $this->labelStatus[1] = $langs->trans('Closed'); + $this->labelStatusShort[0] = $langs->trans('Draft'); + $this->labelStatusShort[1] = $langs->trans('Closed'); } - if ($mode == 0) - { - return $this->labelstatus[$status]; - } - elseif ($mode == 1) - { - return $this->labelstatus[$status]; - } - elseif ($mode == 2) - { - if ($status == 1) return img_picto($this->labelstatus[$status], 'statut6', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut0', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - } - elseif ($mode == 3) - { - if ($status == 1) return img_picto($this->labelstatus[$status], 'statut6', '', false, 0, 0, '', 'valignmiddle'); - elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut0', '', false, 0, 0, '', 'valignmiddle'); - } - elseif ($mode == 4) - { - if ($status == 1) return img_picto($this->labelstatus[$status], 'statut6', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut0', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status]; - } - elseif ($mode == 5) - { - if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut6', '', false, 0, 0, '', 'valignmiddle'); - elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut0', '', false, 0, 0, '', 'valignmiddle'); - } - elseif ($mode == 6) - { - if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut6', '', false, 0, 0, '', 'valignmiddle'); - elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut0', '', false, 0, 0, '', 'valignmiddle'); - } + $statusType = 'status0'; + if ($status == self::STATUS_VALIDATED) $statusType = 'status6'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } /** diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 8af3495afc8..2a2477fce5e 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -216,22 +216,22 @@ if ($resql) if ($objp->amount < 0) { print price($objp->amount * -1); - $totalarray['totaldeb'] += $objp->amount; + $totalarray['val']['totaldebfield'] += $objp->amount; } print "\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totaldebfield']=$totalarray['nbfield']; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totaldebfield'; // Credit print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalcredfield']=$totalarray['nbfield']; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalcredfield'; print ""; @@ -239,24 +239,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totaldebfield']) || isset($totalarray['totalcredfield'])) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totaldebfield'] == $i) print ''; - elseif ($totalarray['totalcredfield'] == $i) print ''; - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; print "
'; + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + else print ''; + print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
'; if ($objp->amount > 0) { print price($objp->amount); - $totalarray['totalcred'] += $objp->amount; + $totalarray['val']['totalcredfield'] += $objp->amount; } print "
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price(-1 * $totalarray['totaldeb']).''.price($totalarray['totalcred']).'
"; diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 01cda8871b5..bd333110e51 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -45,7 +45,7 @@ $hookmanager->initHooks(array('specialexpensesindex')); $langs->loadLangs(array('compta', 'bills')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax|salaries', '', '', 'charges|'); $mode=GETPOST("mode", 'alpha'); @@ -125,7 +125,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print load_fiche_titre($langs->trans("SocialContributionsPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); } - print ''; + print '
'; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder); @@ -138,7 +138,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder); print "\n"; - $sql = "SELECT c.id, c.libelle as lib,"; + $sql = "SELECT c.id, c.libelle as label,"; $sql.= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,"; $sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment, pc.fk_bank,"; $sql.= " pct.code as payment_code,"; @@ -185,12 +185,12 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) // Label print ''; // Type - print ''; + print ''; // Expected to pay print ''; // Ref payment @@ -281,7 +281,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $num = $db->num_rows($result); $i = 0; $total = 0 ; - print '
'; $socialcontrib->id=$obj->rowid; - $socialcontrib->ref=$obj->libelle; - $socialcontrib->lib=$obj->libelle; + $socialcontrib->ref=$obj->label; + $socialcontrib->label=$obj->label; print $socialcontrib->getNomUrl(1, '20'); print ''.$obj->lib.''.$obj->label.''.price($obj->total).'
'; + print '
'; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder); @@ -414,7 +414,7 @@ while($j<$numlt) $num = $db->num_rows($result); $i = 0; $total = 0 ; - print '
'; + print '
'; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder); @@ -495,7 +495,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) $num = $db->num_rows($result); $i = 0; $total = 0 ; - print '
'; + print '
'; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "s.dateep", "", $param, 'width="140px"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, '', $sortfield, $sortorder); diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index b7652587826..8cfeeda613e 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -30,10 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $action=GETPOST('action', 'aZ09'); // Secrutiy check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } if (! $user->rights->facture->lire) @@ -141,7 +141,7 @@ if ($resql) print ''; - print '
'; + print '
'; print ''; print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "", 'valign="center"', $sortfield, $sortorder); diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index adb5a74425c..488a5a86cf7 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -40,7 +40,7 @@ $langs->load("trips"); // Security check $id = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'deplacement', $id, ''); $action = GETPOST('action', 'alpha'); @@ -250,7 +250,7 @@ if ($action == 'create') print ''; print ''; - print '
'; + print '
'; print ""; print ''; // Private note - if (empty($user->societe_id)) + if (empty($user->socid)) { print ''; print ''; @@ -339,7 +339,7 @@ elseif ($id) print ''; print ''; - print '
'.$langs->trans("Type").''; @@ -287,7 +287,7 @@ if ($action == 'create') print '
'.$langs->trans('NotePrivate').'
'; + print '
'; // Ref print ""; @@ -385,7 +385,7 @@ elseif ($id) print ""; // Private note - if (empty($user->societe_id)) + if (empty($user->socid)) { print ''; print '
'.$langs->trans("NotePrivate").''; @@ -415,9 +415,9 @@ elseif ($id) } else { - /* - * Confirm delete trip - */ + /* + * Confirm delete trip + */ if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteTrip"), $langs->trans("ConfirmDeleteTrip"), "confirm_delete"); @@ -426,7 +426,7 @@ elseif ($id) $soc = new Societe($db); if ($object->socid) $soc->fetch($object->socid); - print ''; + print '
'; $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index de32cb9c3eb..0601c62fd80 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -89,11 +89,11 @@ class Deplacement extends CommonObject public $statuts=array(); public $statuts_short=array(); - /** - * Constructor - * - * @param DoliDB $db Database handler - */ + /** + * Constructor + * + * @param DoliDB $db Database handler + */ public function __construct($db) { $this->db = $db; @@ -249,13 +249,13 @@ class Deplacement extends CommonObject } } - /** - * Load an object from database - * - * @param int $id Id of record to load - * @param string $ref Ref of record - * @return int <0 if KO, >0 if OK - */ + /** + * Load an object from database + * + * @param int $id Id of record to load + * @param string $ref Ref of record + * @return int <0 if KO, >0 if OK + */ public function fetch($id, $ref = '') { $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet as fk_project, extraparams"; @@ -293,12 +293,12 @@ class Deplacement extends CommonObject } } - /** - * Delete record - * - * @param int $id Id of record to delete - * @return int <0 if KO, >0 if OK - */ + /** + * Delete record + * + * @param int $id Id of record to delete + * @return int <0 if KO, >0 if OK + */ public function delete($id) { $this->db->begin(); @@ -336,46 +336,46 @@ class Deplacement extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } elseif ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } } @@ -413,9 +413,9 @@ class Deplacement extends CommonObject */ public function listOfTypes($active = 1) { - global $langs; + global $langs; - $ret=array(); + $ret=array(); $sql = "SELECT id, code, label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees"; diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 3f2faa267ea..96c8013c18c 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -43,7 +43,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'deplacement', $id, ''); diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 0208f9da89f..fde600aff8f 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -32,7 +32,7 @@ $langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'deplacement', '', ''); $sortfield = GETPOST("sortfield", 'alpha'); @@ -97,7 +97,7 @@ print '
'; // Statistics -print '
'; +print '
'; print ''; print ''; print "\n"; @@ -143,11 +143,11 @@ $langs->load("boxes"); $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; -if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE u.rowid = d.fk_user"; $sql.= " AND d.entity = ".$conf->entity; if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',', $childids).')'; -if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; +if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND d.fk_soc = ".$socid; $sql.= $db->order("d.tms", "DESC"); $sql.= $db->plimit($max, 0); @@ -160,7 +160,7 @@ if ($result) $i = 0; - print '
'.$langs->trans("Statistics").'
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/compta/deplacement/info.php b/htdocs/compta/deplacement/info.php index a0accd11a87..28d1d8e68da 100644 --- a/htdocs/compta/deplacement/info.php +++ b/htdocs/compta/deplacement/info.php @@ -32,7 +32,7 @@ $langs->load("trips"); // Security check $id = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'deplacement', $id, ''); @@ -47,15 +47,15 @@ if ($id) $object = new Deplacement($db); $object->fetch($id); $object->info($id); - + $head = trip_prepare_head($object); - + dol_fiche_head($head, 'info', $langs->trans("TripCard"), 0, 'trip'); print '
'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''.$langs->trans("FeesKilometersOrAmout").'
'; dol_print_object_info($object); print '
'; - + print ''; } diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 9b5b2b7d9c9..3f92e9127da 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -36,7 +36,7 @@ $langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'deplacement', '', ''); $search_ref=GETPOST('search_ref', 'int'); @@ -120,7 +120,7 @@ if ($resql) $i = 0; print ''."\n"; - print ''; + print '
'; print ""; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", "&socid=$socid", '', $sortfield, $sortorder); print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "d.type", "", "&socid=$socid", '', $sortfield, $sortorder); diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 54e1cd1524e..d313224cf53 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -38,12 +38,12 @@ $socid=GETPOST('socid', 'int'); if ($socid < 0) $socid=0; $id = GETPOST('id', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'deplacement', $id, ''); // Other security check @@ -162,7 +162,7 @@ if (! $mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -228,7 +228,7 @@ print '
'; // Show filter box print ''; print ''; -print '
'; +print '
'; print ''; // Company print ''; print ''; } diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php index e023354952a..f3ed2a91f6f 100644 --- a/htdocs/core/tpl/commonfields_edit.tpl.php +++ b/htdocs/core/tpl/commonfields_edit.tpl.php @@ -55,8 +55,8 @@ foreach($object->fields as $key => $val) elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOSTISSET($key)?GETPOST($key, 'none'):$object->$key; else $value = GETPOSTISSET($key)?GETPOST($key, 'alpha'):$object->$key; //var_dump($val.' '.$key.' '.$value); - if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0); - else print $object->showInputField($val, $key, $value, '', '', '', 0); + if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0, $object->table_element); + else print $object->showInputField($val, $key, $value, '', '', '', 0, $object->table_element); print ''; print ''; } diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index eb93e41827d..821881314d3 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -67,7 +67,7 @@ $userstatic=new User($db); + ?>
trans("NatureOfContact"); ?>
trans("ThirdParty"); ?>
@@ -81,14 +81,13 @@ if ($permission) { if (empty($hideaddcontactforuser)) { - - ?> + ?> " /> - '; ?> + '; ?>
trans("Users"); ?>
global->MAIN_INFO_SOCIETE_NOM; ?>
select_dolusers($user->id, 'userid', 0, (! empty($userAlreadySelected)?$userAlreadySelected:null), 0, null, null, 0, 56, '', 0, '', 'minwidth200imp'); ?>
@@ -102,20 +101,19 @@ if ($permission) {
">
- + ?> " /> - '; ?> + '; ?>
trans("ThirdPartyContacts"); ?>
socid; ?> @@ -143,7 +141,7 @@ if ($permission) {
- @@ -157,22 +155,21 @@ if ($permission) {
 
- element == 'shipping'|| $object->element == 'reception') && is_object($objectsrc)) $tmpobject=$objectsrc; - $tmpobject=$object; - if (($object->element == 'shipping'|| $object->element == 'reception') && is_object($objectsrc)) $tmpobject=$objectsrc; + $tab = $tmpobject->liste_contact(-1, $source); + $num=count($tab); - $tab = $tmpobject->liste_contact(-1, $source); - $num=count($tab); - - $i = 0; - while ($i < $num) { - $var = ! $var; - ?> + $i = 0; + while ($i < $num) { + $var = ! $var; + ?>
@@ -180,75 +177,68 @@ if ($permission) { trans("ThirdPartyContact"); ?>
- 0) - { - $companystatic->fetch($tab[$i]['socid']); - echo $companystatic->getNomUrl(1); - } - if ($tab[$i]['socid'] < 0) - { - echo $conf->global->MAIN_INFO_SOCIETE_NOM; - } - if (! $tab[$i]['socid']) - { - echo ' '; - } - ?> + 0) + { + $companystatic->fetch($tab[$i]['socid']); + echo $companystatic->getNomUrl(1); + } + if ($tab[$i]['socid'] < 0) + { + echo $conf->global->MAIN_INFO_SOCIETE_NOM; + } + if (! $tab[$i]['socid']) + { + echo ' '; + } + ?>
- fetch($tab[$i]['id']); - echo $userstatic->getNomUrl(-1, '', 0, 0, 0, 0, '', 'valignmiddle'); - } - if ($tab[$i]['source']=='external') - { - $contactstatic->fetch($tab[$i]['id']); - echo $contactstatic->getNomUrl(1, '', 0, '', 0, 0); - } - ?> + if ($tab[$i]['source']=='internal') + { + $userstatic->fetch($tab[$i]['id']); + echo $userstatic->getNomUrl(-1, '', 0, 0, 0, 0, '', 'valignmiddle'); + } + if ($tab[$i]['source']=='external') + { + $contactstatic->fetch($tab[$i]['id']); + echo $contactstatic->getNomUrl(1, '', 0, '', 0, 0); + } + ?>
- - +} - - - -initHooks(array('contacttpl')); - $parameters=array(); - $reshook=$hookmanager->executeHooks('formContactTpl', $parameters, $object, $action); - } -?> - +print "\n"; +print "\n"; +print "\n"; +if (is_object($hookmanager)) { + $hookmanager->initHooks(array('contacttpl')); + $parameters=array(); + $reshook=$hookmanager->executeHooks('formContactTpl', $parameters, $object, $action); +} +print "\n"; diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index 4392d817a66..692c9cf3494 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013 Cédric Salvador * Copyright (C) 2013-2014 Laurent Destailleur * Copyright (C) 2015 Marcos García + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -82,7 +83,7 @@ if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) // Show upload form (document and links) $formfile->form_attach_new_file( - $_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject)?'':'&withproject=1'), + $_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject)?'':'&withproject=1').(empty($uri)?'':$uri), '', 0, 0, @@ -117,6 +118,7 @@ $formfile->list_of_documents( ); print "
"; + //List of links -$formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'), $param); +$formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'), $param, $relativepathwithnofile); print "
"; diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 35aefb9f719..ca30eb5ae92 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -50,7 +50,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ $value = dol_eval($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key], 1); //var_dump($value); } - + print $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey); print ''; if (! $i) $totalarray['nbfield']++; diff --git a/htdocs/core/tpl/extrafields_list_search_title.tpl.php b/htdocs/core/tpl/extrafields_list_search_title.tpl.php index e8b1e396f1a..c6d3776cfe4 100644 --- a/htdocs/core/tpl/extrafields_list_search_title.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_title.tpl.php @@ -23,8 +23,15 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ $align=$extrafields->getAlignFlag($key); $sortonfield = $extrafieldsobjectprefix.$key; if (! empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key])) $sortonfield=''; - if ($extrafields->attributes[$extrafieldsobjectkey]['type'][$key] == 'separate') print '
'; - else print getTitleFieldOfList($extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($align?'align="'.$align.'" data-titlekey="'.$key.'"':'data-titlekey="'.$key.'"'), $sortfield, $sortorder)."\n"; + if ($extrafields->attributes[$extrafieldsobjectkey]['type'][$key] == 'separate') { + print ''; + } + else + { + $tooltip = empty($extrafields->attributes[$extrafieldsobjectkey]['help'][$key]) ? '' : $extrafields->attributes[$extrafieldsobjectkey]['help'][$key]; + + print getTitleFieldOfList($extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($align?'align="'.$align.'" data-titlekey="'.$key.'"':'data-titlekey="'.$key.'"'), $sortfield, $sortorder, '', 0, $tooltip)."\n"; + } } } } diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 6f52cbcab7a..6a61686e5cc 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -85,6 +85,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] else { $value = $object->array_options["options_" . $key]; + //var_dump($key.' - '.$value); } if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate') { @@ -170,7 +171,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] print ''; print ''; print ''; - print $extrafields->showInputField($key, $value, '', '', '', 0, $object->id); + print $extrafields->showInputField($key, $value, '', '', '', 0, $object->id, $object->table_element); print ''; @@ -178,7 +179,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] } else { - //print $key.'-'.$value.'-'.$object->table_element; + //var_dump($key.'-'.$value.'-'.$object->table_element); print $extrafields->showOutputField($key, $value, '', $object->table_element); } diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php new file mode 100644 index 00000000000..3cf5ded3989 --- /dev/null +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -0,0 +1,29 @@ + $valtotalizable) { + $totalarray['pos'][$valtotalizable['pos']] = $keytotalizable; + $totalarray['val'][$keytotalizable] = $valtotalizable['total']; + } +} +// Show total line +if (isset($totalarray['pos'])) +{ + print ''; + $i=0; + while ($i < $totalarray['nbfield']) + { + $i++; + if (! empty($totalarray['pos'][$i])) print ''; + else + { + if ($i == 1) + { + if ($num < $limit) print ''; + else print ''; + } + else print ''; + } + } + print ''; +} diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 2a0fe46dfdd..ba0c550debc 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -63,19 +63,17 @@ if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_ $colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1); $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' -?> - +print "\n"; -global->ADD_UNSPLASH_LOGIN_BACKGROUND)) { // For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random' -?> + ?> - + ?> global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>> - @@ -179,7 +177,7 @@ if ($captcha) { if (preg_match('/\?/', $php_self)) $php_self.='&time='.dol_print_date(dol_now(), 'dayhourlog'); else $php_self.='?time='.dol_print_date(dol_now(), 'dayhourlog'); // TODO: provide accessible captcha variants -?> + ?>
@@ -279,11 +277,11 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->fil // Show error message if defined if (! empty($_SESSION['dol_loginmesg'])) { -?> + ?> -global->MAIN_EASTER_EGG_COMMITSTRIP)) { + ?>
- @@ -362,7 +360,7 @@ if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AD_CLI { if (empty($conf->dol_use_jmobile)) { -?> + ?>

-
-
+ diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 14c65c9cbf1..c2be08aa5da 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -86,7 +86,7 @@ if ($module != 'product') { print ''."\n"; print ''."\n"; } -if (empty($user->societe_id)) { +if (empty($user->socid)) { print '
'."\n"; print '
'."\n"; print $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0); diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php index 31b592817fa..7f56cfbbf15 100644 --- a/htdocs/core/tpl/object_discounts.tpl.php +++ b/htdocs/core/tpl/object_discounts.tpl.php @@ -52,7 +52,6 @@ if($isNewObject) print ' ('.$addrelativediscount.')'; // Is there is commercial discount or down payment available ? if ($absolute_discount > 0) { - if ($cannotApplyDiscount || ! $isInvoice || $isNewObject || $object->statut > $objclassname::STATUS_DRAFT || $object->type == $objclassname::TYPE_CREDIT_NOTE || $object->type == $objclassname::TYPE_DEPOSIT) { $translationKey = ! empty($discount_type) ? 'HasAbsoluteDiscountFromSupplier' : 'CompanyHasAbsoluteDiscount'; $text = $langs->trans($translationKey, price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)).'.'; @@ -75,7 +74,6 @@ if ($absolute_discount > 0) { // Is there credit notes availables ? if ($absolute_creditnote > 0) { - // If validated, we show link "add credit note to payment" if ($cannotApplyDiscount || ! $isInvoice || $isNewObject || $object->statut != $objclassname::STATUS_VALIDATED || $object->type == $objclassname::TYPE_CREDIT_NOTE) { $translationKey = ! empty($discount_type) ? 'HasCreditNoteFromSupplier' : 'CompanyHasCreditNote'; diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 7f860586909..f58b6725f81 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -38,7 +38,6 @@ if (empty($object) || ! is_object($object)) { exit; } - $usemargins=0; if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element, array('facture','facturerec','propal','commande'))) { @@ -91,13 +90,11 @@ if (!empty($extrafields)) } } -?> - -\n"; $nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines); if ($nolinesbefore) { -?> + ?>
global->MAIN_VIEW_LINE_NUMBER)) { ?> @@ -108,9 +105,9 @@ if ($nolinesbefore) { element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines { - ?> + ?> - @@ -139,128 +136,127 @@ if ($nolinesbefore) { print ''; } if (! empty($usemargins)) - { - if (!empty($user->rights->margins->creer)) { - ?> - '; + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) echo ''; + if (! empty($conf->global->DISPLAY_MARK_RATES)) echo ''; } - else $colspan++; - - if ($conf->global->MARGIN_TYPE == "1") - echo $langs->trans('BuyingPrice'); - else - echo $langs->trans('CostPrice'); - echo ''; - if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARGIN_RATES)) echo ''; - if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARK_RATES)) echo ''; } ?> -global->MAIN_VIEW_LINE_NUMBER)) { - $coldisplay++; - echo ''; - } +$coldisplay=0; +// Adds a line numbering column +if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $coldisplay++; - ?> + echo ''; +} + +$coldisplay++; +?> '; - if (!empty($conf->variants->enabled)) { - echo '
'; - } - - echo '
'; - } - - // Editor wysiwyg - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $nbrows=ROWS_2; - $enabled=(! empty($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0); - if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $toolbarname='dolibarr_details'; - if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes'; - $doleditor=new DolEditor('dp_desc', GETPOST('dp_desc', 'none'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%'); - $doleditor->Create(); - - // Show autofill date for recurring invoices - if (! empty($conf->service->enabled) && $object->element == 'facturerec') - { - echo '

'; - echo $langs->trans('AutoFillDateFrom').' '; - echo $form->selectyesno('date_start_fill', $line->date_start_fill, 1); - echo ' - '; - echo $langs->trans('AutoFillDateTo').' '; - echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1); - echo '
'; - } - echo ''; - - if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines - { - $coldisplay++; - ?> - - - - +'; +$coldisplay++; +if ($seller->tva_assuj == "0") echo ''.vatrate(0, true); +else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1); +?> - multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { - $coldisplay++; +multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { + $coldisplay++; ?> - + - +$coldisplay++; +?> - global->PRODUCT_USE_UNITS) - { - $coldisplay++; - print ''; - } - $remise_percent = $buyer->remise_percent; - if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') - { - $remise_percent = $seller->remise_supplier_percent; - } +global->PRODUCT_USE_UNITS) +{ + $coldisplay++; + print ''; +} +$remise_percent = $buyer->remise_percent; +if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') +{ + $remise_percent = $seller->remise_supplier_percent; +} - $coldisplay++; - ?> +$coldisplay++; +?> - situation_cycle_ref) { - $coldisplay++; - print ''; - $coldisplay++; - print ''; - } +if ($this->situation_cycle_ref) { + $coldisplay++; + print ''; + $coldisplay++; + print ''; +} - if (! empty($usemargins)) - { - if (!empty($user->rights->margins->creer)) { - $coldisplay++; +if (! empty($usemargins)) +{ + if (!empty($user->rights->margins->creer)) { + $coldisplay++; ?> - + rights->margins->creer) + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) { - if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - { - echo ''; - $coldisplay++; - } - if (! empty($conf->global->DISPLAY_MARK_RATES)) - { - echo ''; - $coldisplay++; - } + echo ''; + $coldisplay++; + } + if (! empty($conf->global->DISPLAY_MARK_RATES)) + { + echo ''; + $coldisplay++; } } +} - $coldisplay+=$colspan; - ?> +$coldisplay+=$colspan; +?> @@ -519,37 +510,33 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da print 'jQuery("#date_endmin").val("'.$conf->global->MAIN_DEFAULT_DATE_END_MIN.'");'; } } - print '' - ?> - - -'; + print ''; + print "\n"; } -?> -'; } elseif (GETPOST('action') == 'confirm_delete' && GETPOST('confirm') == 'yes' && GETPOST('socid') > 0) { - // La suppression n'a pas été possible require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; $societe = new Societe($this->db); $societe->fetch(GETPOST('socid')); // On vérifie si il est utilisé if ((in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $societe->typent_id == 8) && $societe->isObjectUsed(GETPOST('socid'))) { - require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; $form = new Form($this->db); echo $form->formconfirm($_SERVER["PHP_SELF"] . "?socid=" . GETPOST('socid'), substr($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE"), 0, strlen($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE")) - 2), $langs->trans("DATAPOLICIES_POPUP_ANONYME_TEXTE"), 'anonymiser', '', '', 1); @@ -428,7 +424,6 @@ class ActionsDatapolicy $societe->fetch(GETPOST('socid')); if (!in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) && $societe->typent_id != 8) { - require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; $jsscript .= ''; - print '
'; - - print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -253,7 +253,7 @@ print ''; print '

'; print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -291,7 +291,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("Number").'
'; + +// contact name +print '' . "\n"; +print '' . "\n"; + +// Contact Country +print '' . "\n"; + +// Never send mass mailing +print '' . "\n"; + +// Contact Date Create +print '' . "\n"; + +// Contact update Create +print '' . "\n"; + +if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + // Customer Categories + print '' . "\n"; +} + +// Standard Extrafield feature +if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { + $elementype=Contact::$table_element; + // fetch optionals attributes and labels + dol_include_once('/core/class/extrafields.class.php'); + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label($elementype); + foreach($extrafields->attributes[$elementtype]['type'] as $key=>&$value) { + if($value == 'radio')$value = 'select'; + } + + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) { + print '' . "\n"; + } +} +print '' . "\n"; +print '' . "\n"; +print '' . "\n"; +print '
'; +print '\n"; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index 25772c08193..e4cceff10e0 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -41,7 +41,7 @@ $id=GETPOST('id', 'int'); $ref=GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'contrat', $id); $object = new Contrat($db); diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 3e5b9f55c98..00627eeb622 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -90,7 +90,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, // Security check $contratid = GETPOST('id', 'int'); -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'contrat', $contratid); if ($search_status != '') @@ -219,7 +219,9 @@ $sql.= " cd.subprice,"; //$sql.= " cd.date_c as date_creation,"; $sql.= " cd.tms as date_update"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -597,24 +599,18 @@ while ($i < min($num, $limit)) print ''; - $totalarray['totalht'] += $obj->total_ht; - if (! $i) { - $totalarray['displaytotalline']++; - $totalarray['nbfield']++; - $totalarray['totalhtfield']=$totalarray['nbfield']; - } + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cd.total_ht'; + $totalarray['val']['cd.total_ht'] += $obj->total_ht; } if (! empty($arrayfields['cd.total_tva']['checked'])) { print ''; - $totalarray['totalvat'] += $obj->total_tva; - if (! $i) { - $totalarray['nbfield']++; - $totalarray['totalvatfield']=$totalarray['nbfield']; - $totalarray['displaytotalline']++; - } + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cd.total_tva'; + $totalarray['val']['cd.total_tva'] += $obj->total_tva; } if (! empty($arrayfields['cd.tva_tx']['checked'])) { @@ -703,17 +699,18 @@ while ($i < min($num, $limit)) // Status if (! empty($arrayfields['status']['checked'])) { - print ''; - if (! $i) $totalarray['nbfield']++; + print ''; + if (! $i) $totalarray['nbfield']++; } // Action column print ''; - $i=0; - while ($i < $totalarray['nbfield']) { - $i++; - if ($i == 1) { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - else print ''; - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index bda12ea87cb..b52a6939882 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -23,11 +23,9 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - +print "\n"; - $objectlink) $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> + ?> + // Price of contract is not shown by default because a contract is a list of service with + // start and end date that change with time andd that may be different that the period of reference for price. + // So price of a contract does often means nothing. Prices is on the different invoices done on same contract. + if ($user->rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE)) + { + $totalcontrat = 0; + foreach ($objectlink->lines as $linecontrat) { + $totalcontrat = $totalcontrat + $linecontrat->total_ht; + $total = $total + $linecontrat->total_ht; + } + echo price($totalcontrat); + } ?> - + - + +print "\n"; diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 66428eea974..ae096f55633 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -18,7 +18,7 @@ /** * \file htdocs/core/actions_addupdatedelete.inc.php - * \brief Code for common actions cancel / add / update / delete / clone + * \brief Code for common actions cancel / add / update / update_extras / delete / deleteline / validate / cancel / reopen / clone */ @@ -30,8 +30,12 @@ // $backtopage may be defined // $triggermodname may be defined +if (! empty($permissionedit) && empty($permissiontoadd)) $permissiontoadd = $permissionedit; // For backward compatibility + if ($cancel) { + /*var_dump($cancel); + var_dump($backtopage);exit;*/ if (! empty($backtopage)) { header("Location: ".$backtopage); @@ -54,7 +58,7 @@ if ($action == 'add' && ! empty($permissiontoadd)) $value = dol_mktime(12, 0, 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); } elseif ($object->fields[$key]['type']=='datetime') { $value = dol_mktime(GETPOST($key.'hour'), GETPOST($key.'min'), 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); - } elseif ($object->fields[$key]['type']=='price') { + } elseif (in_array($object->fields[$key]['type'], array('price', 'real'))) { $value = price2num(GETPOST($key)); } else { $value = GETPOST($key, 'alpha'); @@ -80,7 +84,8 @@ if ($action == 'add' && ! empty($permissiontoadd)) if ($result > 0) { // Creation OK - $urltogo=$backtopage?str_replace('__ID__', $result, $backtopage):$backurlforlist; + $urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist; + $urltogo = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $urltogo); // New method to autoselect project after a New on another form object creation header("Location: ".$urltogo); exit; } @@ -105,7 +110,6 @@ if ($action == 'update' && ! empty($permissiontoadd)) { if (! GETPOSTISSET($key)) continue; // The field was not submited to be edited if (in_array($key, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat', 'fk_user_modif', 'import_key'))) continue; // Ignore special fields - // Set value to update if (in_array($object->fields[$key]['type'], array('text', 'html'))) { $value = GETPOST($key, 'none'); @@ -113,7 +117,7 @@ if ($action == 'update' && ! empty($permissiontoadd)) $value = dol_mktime(12, 0, 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); } elseif ($object->fields[$key]['type']=='datetime') { $value = dol_mktime(GETPOST($key.'hour'), GETPOST($key.'min'), 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); - } elseif ($object->fields[$key]['type']=='price') { + } elseif (in_array($object->fields[$key]['type'], array('price', 'real'))) { $value = price2num(GETPOST($key)); } else { $value = GETPOST($key, 'alpha'); @@ -231,6 +235,106 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && ! empty($permissiont } } +// Action validate object +if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) +{ + $result = $object->validate($user); + if ($result >= 0) + { + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model=$object->modelpdf; + $ret = $object->fetch($id); // Reload to get new records + + $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + } + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +// Action close object +if ($action == 'confirm_close' && $confirm == 'yes' && $permissiontoadd) +{ + $result = $object->cancel($user); + if ($result >= 0) + { + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model=$object->modelpdf; + $ret = $object->fetch($id); // Reload to get new records + + $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + } + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +// Action setdraft object +if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) +{ + $result = $object->setDraft($user); + if ($result >= 0) + { + // Nothing else done + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +// Action reopen object +if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) +{ + $result = $object->reopen($user); + if ($result >= 0) + { + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model=$object->modelpdf; + $ret = $object->fetch($id); // Reload to get new records + + $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + } + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } +} // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes' && ! empty($permissiontoadd)) diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 1daba09efe9..9b3b24eb41f 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -25,15 +25,15 @@ // $action must be defined // $id must be defined // $object must be defined and must have a method generateDocument(). -// $permissioncreate must be defined +// $permissiontoadd must be defined // $upload_dir must be defined (example $conf->projet->dir_output . "/";) // $hidedetails, $hidedesc, $hideref and $moreparams may have been set or not. +if (!empty($permissioncreate) && empty($permissiontoadd)) $permissiontoadd = $permissioncreate; // For backward compatibility // Build doc -if ($action == 'builddoc' && $permissioncreate) +if ($action == 'builddoc' && $permissiontoadd) { - if (is_numeric(GETPOST('model', 'alpha'))) { $error=$langs->trans("ErrorFieldRequired", $langs->transnoentities("Model")); @@ -58,12 +58,12 @@ if ($action == 'builddoc' && $permissioncreate) // Special case to force bank account //if (property_exists($object, 'fk_bank')) //{ - if (GETPOST('fk_bank', 'int')) { - // this field may come from an external module - $object->fk_bank = GETPOST('fk_bank', 'int'); - } elseif (! empty($object->fk_account)) { - $object->fk_bank = $object->fk_account; - } + if (GETPOST('fk_bank', 'int')) { + // this field may come from an external module + $object->fk_bank = GETPOST('fk_bank', 'int'); + } elseif (! empty($object->fk_account)) { + $object->fk_bank = $object->fk_account; + } //} $outputlangs = $langs; @@ -108,7 +108,7 @@ if ($action == 'builddoc' && $permissioncreate) } // Delete file in doc form -if ($action == 'remove_file' && $permissioncreate) +if ($action == 'remove_file' && $permissiontoadd) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/core/actions_comments.inc.php b/htdocs/core/actions_comments.inc.php index a84edb0150a..1c679c88825 100644 --- a/htdocs/core/actions_comments.inc.php +++ b/htdocs/core/actions_comments.inc.php @@ -57,6 +57,24 @@ if ($action == 'addcomment') } } } +if ($action === 'updatecomment') +{ + if ($comment->fetch($idcomment) >= 0) + { + $comment->description = GETPOST('comment_description', 'none'); + if ($comment->update($user) > 0) + { + setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); + header('Location: '.$varpage.'?id='.$id.($withproject?'&withproject=1#comment':'')); + exit; + } + else + { + setEventMessages($comment->error, $comment->errors, 'errors'); + $action=''; + } + } +} if ($action == 'deletecomment') { if ($comment->fetch($idcomment) >= 0) diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 760a54bc7b2..90c93f6177b 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -81,78 +81,79 @@ elseif (GETPOST('linkit', 'none') && ! empty($conf->global->MAIN_UPLOAD_DOC)) // Delete file/link if ($action == 'confirm_deletefile' && $confirm == 'yes') { - $urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). - if (GETPOST('section', 'alpha')) // For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir + $urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). + if (GETPOST('section', 'alpha')) { + // For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir + $file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile; + } + else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. + { + $urlfile=basename($urlfile); + $file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile; + if (! empty($upload_dirold)) $fileold = $upload_dirold . "/" . $urlfile; + } + $linkid = GETPOST('linkid', 'int'); + + if ($urlfile) { + // delete of a file + $dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine + $dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette (if file is an image) + + $ret = dol_delete_file($file, 0, 0, 0, (is_object($object)?$object:null)); + if (! empty($fileold)) dol_delete_file($fileold, 0, 0, 0, (is_object($object)?$object:null)); // Delete file using old path + + // Si elle existe, on efface la vignette + if (preg_match('/(\.jpg|\.jpeg|\.bmp|\.gif|\.png|\.tiff)$/i', $file, $regs)) { - $file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile; - } - else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. - { - $urlfile=basename($urlfile); - $file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile; - if (! empty($upload_dirold)) $fileold = $upload_dirold . "/" . $urlfile; - } - $linkid = GETPOST('linkid', 'int'); - - if ($urlfile) // delete of a file - { - $dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine - $dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette (if file is an image) - - $ret = dol_delete_file($file, 0, 0, 0, (is_object($object)?$object:null)); - if (! empty($fileold)) dol_delete_file($fileold, 0, 0, 0, (is_object($object)?$object:null)); // Delete file using old path - - // Si elle existe, on efface la vignette - if (preg_match('/(\.jpg|\.jpeg|\.bmp|\.gif|\.png|\.tiff)$/i', $file, $regs)) + $photo_vignette=basename(preg_replace('/'.$regs[0].'/i', '', $file).'_small'.$regs[0]); + if (file_exists(dol_osencode($dirthumb.$photo_vignette))) { - $photo_vignette=basename(preg_replace('/'.$regs[0].'/i', '', $file).'_small'.$regs[0]); - if (file_exists(dol_osencode($dirthumb.$photo_vignette))) - { - dol_delete_file($dirthumb.$photo_vignette); - } - - $photo_vignette=basename(preg_replace('/'.$regs[0].'/i', '', $file).'_mini'.$regs[0]); - if (file_exists(dol_osencode($dirthumb.$photo_vignette))) - { - dol_delete_file($dirthumb.$photo_vignette); - } + dol_delete_file($dirthumb.$photo_vignette); } - if ($ret) setEventMessages($langs->trans("FileWasRemoved", $urlfile), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors'); + $photo_vignette=basename(preg_replace('/'.$regs[0].'/i', '', $file).'_mini'.$regs[0]); + if (file_exists(dol_osencode($dirthumb.$photo_vignette))) + { + dol_delete_file($dirthumb.$photo_vignette); + } } - elseif ($linkid) // delete of external link - { - require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; - $link = new Link($db); - $link->fetch($linkid); - $res = $link->delete($user); - $langs->load('link'); - if ($res > 0) { - setEventMessages($langs->trans("LinkRemoved", $link->label), null, 'mesgs'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", $urlfile), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors'); + } + } + elseif ($linkid) // delete of external link + { + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; + $link = new Link($db); + $link->fetch($linkid); + $res = $link->delete($user); + + $langs->load('link'); + if ($res > 0) { + setEventMessages($langs->trans("LinkRemoved", $link->label), null, 'mesgs'); + } else { + if (count($link->errors)) { + setEventMessages('', $link->errors, 'errors'); } else { - if (count($link->errors)) { - setEventMessages('', $link->errors, 'errors'); - } else { - setEventMessages($langs->trans("ErrorFailedToDeleteLink", $link->label), null, 'errors'); - } + setEventMessages($langs->trans("ErrorFailedToDeleteLink", $link->label), null, 'errors'); } } + } - if (is_object($object) && $object->id > 0) - { - if ($backtopage) - { - header('Location: ' . $backtopage); - exit; - } - else - { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(GETPOST('section_dir', 'alpha')?'§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')):'').(!empty($withproject)?'&withproject=1':'')); - exit; - } + if (is_object($object) && $object->id > 0) { + if ($backtopage) { + header('Location: ' . $backtopage); + exit; } + else + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(GETPOST('section_dir', 'alpha')?'§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')):'').(!empty($withproject)?'&withproject=1':'')); + exit; + } + } } elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha')) { diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index add657a5aa8..d40ed042350 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -30,7 +30,7 @@ // $objectclass and $objectlabel must be defined // $parameters, $object, $action must be defined for the hook. -// $permtoread, $permtocreate and $permtodelete may be defined +// $permissiontoread, $permissiontoadd, $permissiontodelete, $permissiontoclose may be defined // $uploaddir may be defined (example to $conf->projet->dir_output."/";) // $toselect may be defined // $diroutputmassaction may be defined @@ -43,6 +43,11 @@ if (empty($objectclass) || empty($uploaddir)) exit; } +// For backward compatibility +if (! empty($permtoread) && empty($permissiontoread)) $permissiontoread = $permtoread; +if (! empty($permtocreate) && empty($permissiontoadd)) $permissiontoadd = $permtocreate; +if (! empty($permtodelete) && empty($permissiontodelete)) $permissiontoread = $permtodelete; + // Mass actions. Controls on number of lines checked. $maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS); @@ -71,7 +76,9 @@ if (! $error && $massaction == 'confirm_presend') $listofobjectid=array(); $listofobjectthirdparties=array(); + $listofobjectcontacts = array(); $listofobjectref=array(); + $contactidtosend=array(); $attachedfilesThirdpartyObj=array(); $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); @@ -97,11 +104,21 @@ if (! $error && $massaction == 'confirm_presend') if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; if (empty($thirdpartyid)) $thirdpartyid=0; - $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; - $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; - } - } - } + if ($objectclass == 'Facture') { + $tmparraycontact = array(); + $tmparraycontact = $objecttmp->liste_contact(-1, 'external', 0, 'BILLING'); + if (is_array($tmparraycontact) && count($tmparraycontact) > 0) { + foreach ($tmparraycontact as $data_email) { + $listofobjectcontacts[$toselectid][$data_email['id']] = $data_email['email']; + } + } + } + + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; + } + } + } // Check mandatory parameters if (GETPOST('fromtype', 'alpha') === 'user' && empty($user->email)) @@ -248,6 +265,21 @@ if (! $error && $massaction == 'confirm_presend') $fuser->fetch($objectobj->fk_user); $sendto = $fuser->email; } + elseif ($objectobj->element == 'facture' && !empty($listofobjectcontacts[$objectid])) + { + $emails_to_sends = array(); + $objectobj->fetch_thirdparty(); + $contactidtosend=array(); + foreach ($listofobjectcontacts[$objectid] as $contactemailid => $contactemailemail) { + $emails_to_sends[] = $objectobj->thirdparty->contact_get_property($contactemailid, 'email'); + if (!in_array($contactemailid, $contactidtosend)) { + $contactidtosend[] = $contactemailid; + } + } + if (count($emails_to_sends) > 0) { + $sendto = implode(',', $emails_to_sends); + } + } else { $objectobj->fetch_thirdparty(); @@ -498,8 +530,8 @@ if (! $error && $massaction == 'confirm_presend') } $actionmsg2=''; - // Initialisation donnees - $objectobj2->sendtoid = 0; + // Initialisation donnees + $objectobj2->sendtoid = (empty($contactidtosend)?0:$contactidtosend); $objectobj2->actionmsg = $actionmsg; // Long text $objectobj2->actionmsg2 = $actionmsg2; // Short text $objectobj2->fk_element = $objid2; @@ -792,7 +824,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders // Builddoc $donotredirect = 1; $upload_dir = $conf->facture->dir_output; - $permissioncreate=$user->rights->facture->creer; + $permissiontoadd=$user->rights->facture->creer; // Call action to build doc $savobject = $object; @@ -851,7 +883,6 @@ if ($massaction == 'confirm_createbills') // Create bills from orders if (!$error && $massaction == 'cancelorders') { - $db->begin(); $nbok = 0; @@ -860,7 +891,6 @@ if (!$error && $massaction == 'cancelorders') $orders = GETPOST('toselect', 'array'); foreach ($orders as $id_order) { - $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) continue; @@ -899,7 +929,7 @@ if (!$error && $massaction == 'cancelorders') } -if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_search')) +if (! $error && $massaction == "builddoc" && $permissiontoread && ! GETPOST('button_search')) { if (empty($diroutputmassaction)) { @@ -1060,7 +1090,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } else { - setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); } } } @@ -1080,7 +1110,7 @@ if ($action == 'remove_file') } // Validate records -if (! $error && $massaction == 'validate' && $permtocreate) +if (! $error && $massaction == 'validate' && $permissiontoadd) { $objecttmp=new $objectclass($db); @@ -1145,8 +1175,9 @@ if (! $error && $massaction == 'validate' && $permtocreate) //var_dump($listofobjectthirdparties);exit; } } + // Closed records -if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { +if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissiontoclose) { $db->begin(); $objecttmp = new $objectclass($db); @@ -1181,7 +1212,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo } } // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) -if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) +if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) { $db->begin(); @@ -1247,7 +1278,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == // Generate document foreach object according to model linked to object // @TODO : propose model selection -if (! $error && $massaction == 'generate_doc' && $permtoread) +if (! $error && $massaction == 'generate_doc' && $permissiontoread) { $db->begin(); diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index ffc1d7bda95..9c87e6ebe36 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -481,7 +481,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $mesg='
'; if ($mailfile->error) { - $mesg.=$langs->trans('ErrorFailedToSendMail', $from, $sendto); + $mesg.=$langs->transnoentities('ErrorFailedToSendMail', dol_escape_htmltag($from), dol_escape_htmltag($sendto)); $mesg.='
'.$mailfile->error; } else diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index f1f42266735..b369550dda2 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -104,7 +104,7 @@ if (empty($url)) $langs->loadLangs(array("ecm","companies","other")); // Security check -if ($user->societe_id > 0) $socid = $user->societe_id; +if ($user->socid > 0) $socid = $user->socid; //print 'xxx'.$upload_dir; @@ -155,8 +155,8 @@ $type='directory'; // This test if file exists should be useless. We keep it to find bug more easily if (! dol_is_dir($upload_dir)) { -// dol_mkdir($upload_dir); -/* $langs->load("install"); + //dol_mkdir($upload_dir); + /*$langs->load("install"); dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); exit;*/ } diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 5a99a3966e8..3445dd4f6ee 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -217,7 +217,6 @@ if (empty($conf->use_javascript_ajax) || ! empty($conf->global->MAIN_ECM_DISABLE $oldvallevel=0; foreach($sqltree as $key => $val) { - $ecmdirstatic->id=$val['id']; $ecmdirstatic->ref=$val['label']; diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index d37374e45a5..200c6208896 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -73,7 +73,7 @@ if ($boxorder && $zone != '' && $userid > 0) $langs->load("boxes"); if (! GETPOST('closing')) { - setEventMessages($langs->trans("BoxAdded"), null); + setEventMessages($langs->trans("BoxAdded"), null); } } } diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index dd994823a4b..346b17e3288 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -1,6 +1,7 @@ * Copyright (C) 2017 Juanjo Menent + * Copyright (C) 2019 Frédéric France * * 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 @@ -16,6 +17,7 @@ * along with this program. If not, see . */ +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); @@ -88,7 +90,6 @@ if ($time >= $_SESSION['auto_check_events_not_before']) $resql = $db->query($sql); if ($resql) { - $actionmod = new ActionComm($db); while ($obj = $db->fetch_object($resql)) diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php index e812e8b9a3c..0d662b6a0bd 100644 --- a/htdocs/core/ajax/objectonoff.php +++ b/htdocs/core/ajax/objectonoff.php @@ -39,8 +39,8 @@ $element=GETPOST('element', 'alpha'); $object = new GenericObject($db); // Security check -if (! empty($user->societe_id)) - $socid = $user->societe_id; +if (! empty($user->socid)) + $socid = $user->socid; diff --git a/htdocs/core/ajax/pingresult.php b/htdocs/core/ajax/pingresult.php index 9de6e53a0f5..eec1c9f0aca 100644 --- a/htdocs/core/ajax/pingresult.php +++ b/htdocs/core/ajax/pingresult.php @@ -36,8 +36,8 @@ $hash_algo=GETPOST('hash_algo', 'alpha'); // Security check -if (! empty($user->societe_id)) - $socid = $user->societe_id; +if (! empty($user->socid)) + $socid = $user->socid; $now = dol_now(); diff --git a/htdocs/core/ajax/price.php b/htdocs/core/ajax/price.php index a5f879cd15f..518e0ccebee 100644 --- a/htdocs/core/ajax/price.php +++ b/htdocs/core/ajax/price.php @@ -48,13 +48,11 @@ if (! empty($output) && isset($amount) && isset($tva_tx)) if (is_numeric($amount) && $amount != '') { if ($output == 'price_ttc') { - $price = price2num($amount * (1 + ($tva_tx/100)), 'MU'); $return['price_ht'] = $amount; $return['price_ttc'] = (isset($price) && $price != '' ? price($price) : ''); } elseif ($output == 'price_ht') { - $price = price2num($amount / (1 + ($tva_tx/100)), 'MU'); $return['price_ht'] = (isset($price) && $price != '' ? price($price) : ''); $return['price_ttc'] = ($tva_tx == 0 ? $price : $amount); diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index e3fc73cb106..df9f70da1df 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -131,7 +131,6 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) } else { - } $db->close(); diff --git a/htdocs/core/boxes/box_accountancy_last_manual_entries.php b/htdocs/core/boxes/box_accountancy_last_manual_entries.php index 2c788b66b71..474280d17a7 100644 --- a/htdocs/core/boxes/box_accountancy_last_manual_entries.php +++ b/htdocs/core/boxes/box_accountancy_last_manual_entries.php @@ -133,7 +133,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($amount, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_accountancy_suspense_account.php b/htdocs/core/boxes/box_accountancy_suspense_account.php index 9740de82fbc..86971e1e042 100644 --- a/htdocs/core/boxes/box_accountancy_suspense_account.php +++ b/htdocs/core/boxes/box_accountancy_suspense_account.php @@ -74,7 +74,7 @@ class box_accountancy_suspense_account extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; - $bookkeepingstatic = new BookKeeping($this->db); + //$bookkeepingstatic = new BookKeeping($this->db); $this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount")); @@ -103,19 +103,19 @@ class box_accountancy_suspense_account extends ModeleBoxes $this->info_box_contents[0][1] = array( 'td' => 'class="right"', - 'text' => '' . $nbSuspenseAccount . '', + 'text' => '' . $nbSuspenseAccount . '', 'asis' => 1 ); } else { $this->info_box_contents[0][0] = array( - 'td' => 'class="nohover opacitymedium left"', - 'text' => $langs->trans("SuspenseAccountNotDefined") + 'td' => 'class="nohover"', + 'text' => ''.$langs->trans("SuspenseAccountNotDefined").'' ); } } else { $this->info_box_contents[0][0] = array( - 'td' => 'class="nohover opacitymedium left"', - 'text' => $langs->trans("ReadPermissionNotAllowed") + 'td' => 'class="nohover"', + 'text' => ''.$langs->trans("ReadPermissionNotAllowed").'' ); } } diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index af86e73ce2c..c104384434d 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -90,13 +90,13 @@ class box_actions extends ModeleBoxes $sql.= ", s.rowid as socid"; $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm AS ta, ".MAIN_DB_PREFIX."actioncomm AS a"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql.= " WHERE a.fk_action = ta.id"; $sql.= " AND a.entity = ".$conf->entity; $sql.= " AND a.percent >= 0 AND a.percent < 100"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; if (! $user->rights->agenda->allactions->read) $sql.= " AND (a.fk_user_author = ".$user->id . " OR a.fk_user_action = ".$user->id . " OR a.fk_user_done = ".$user->id . ")"; $sql.= " ORDER BY a.datec DESC"; $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 2069642e263..4864bcad371 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -84,7 +84,7 @@ class box_activity extends ModeleBoxes $totalnb = 0; $line = 0; $cachetime = 3600; - $fileid = '-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'-r'.($user->rights->societe->client->voir?'1':'0').'.cache'; + $fileid = '-e'.$conf->entity.'-u'.$user->id.'-s'.$user->socid.'-r'.($user->rights->societe->client->voir?'1':'0').'.cache'; $now = dol_now(); $nbofperiod=3; @@ -113,12 +113,12 @@ class box_activity extends ModeleBoxes { $sql = "SELECT p.fk_statut, SUM(p.total) as Mnttot, COUNT(*) as nb"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ")"; $sql.= " WHERE p.entity IN (".getEntity('propal').")"; $sql.= " AND p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " AND p.datep >= '".$this->db->idate($tmpdate)."'"; $sql.= " AND p.date_cloture IS NULL"; // just unclosed $sql.= " GROUP BY p.fk_statut"; @@ -173,7 +173,7 @@ class box_activity extends ModeleBoxes $totalnb += $data[$j]->nb; $this->info_box_contents[$line][3] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency), ); $this->info_box_contents[$line][4] = array( @@ -200,15 +200,14 @@ class box_activity extends ModeleBoxes $data = array(); if ($refresh) { - $sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ")"; $sql.= " WHERE c.entity = ".$conf->entity; $sql.= " AND c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " AND c.date_commande >= '".$this->db->idate($tmpdate)."'"; $sql.= " GROUP BY c.fk_statut"; $sql.= " ORDER BY c.fk_statut DESC"; @@ -256,7 +255,7 @@ class box_activity extends ModeleBoxes $totalnb += $data[$j]->nb; $this->info_box_contents[$line][3] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency), ); $this->info_box_contents[$line][4] = array( @@ -287,11 +286,11 @@ class box_activity extends ModeleBoxes { $sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ")"; $sql.= " WHERE f.entity IN (".getEntity('invoice').')'; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND f.datef >= '".$this->db->idate($tmpdate)."' AND f.paye=1"; $sql.= " GROUP BY f.fk_statut"; @@ -340,7 +339,7 @@ class box_activity extends ModeleBoxes ); $this->info_box_contents[$line][3] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency) ); @@ -422,7 +421,7 @@ class box_activity extends ModeleBoxes ); $totalnb += $data[$j]->nb; $this->info_box_contents[$line][3] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency), ); $this->info_box_contents[$line][4] = array( diff --git a/htdocs/core/boxes/box_boms.php b/htdocs/core/boxes/box_boms.php new file mode 100644 index 00000000000..8f27ff739e0 --- /dev/null +++ b/htdocs/core/boxes/box_boms.php @@ -0,0 +1,182 @@ + + * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France + * + * 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 . + */ + +/** + * \file htdocs/core/boxes/box_boms.php + * \ingroup bom + * \brief Widget for latest modified BOM + */ + +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; + + +/** + * Class to manage the box to show last orders + */ +class box_boms extends ModeleBoxes +{ + public $boxcode="lastboms"; + public $boximg="object_bom"; + public $boxlabel="BoxTitleLatestModifiedBoms"; + public $depends = array("bom"); + + /** + * @var DoliDB Database handler. + */ + public $db; + + public $param; + + public $info_box_head = array(); + public $info_box_contents = array(); + + + /** + * Constructor + * + * @param DoliDB $db Database handler + * @param string $param More parameters + */ + public function __construct($db, $param) + { + global $user; + + $this->db = $db; + + $this->hidden = ! ($user->rights->bom->read); + } + + /** + * Load data for box to show them later + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $user, $langs, $conf; + + $this->max = $max; + + include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + + $bomstatic = new Bom($this->db); + $productstatic = new Product($this->db); + $userstatic = new User($this->db); + + $this->info_box_head = array('text' => $langs->trans("BoxTitleLatestModifiedBoms", $max)); + + if ($user->rights->bom->read) + { + $sql = "SELECT p.ref as product_ref"; + $sql.= ", c.rowid"; + $sql.= ", c.date_creation"; + $sql.= ", c.tms"; + $sql.= ", c.ref"; + $sql.= ", c.status"; + $sql.= ", c.fk_user_valid"; + $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; + $sql.= ", ".MAIN_DB_PREFIX."bom_bom as c"; + $sql.= " WHERE c.fk_product = p.rowid"; + $sql.= " AND c.entity = ".$conf->entity; + $sql.= " ORDER BY c.tms DESC, c.ref DESC"; + $sql.= " ".$this->db->plimit($max, 0); + + $result = $this->db->query($sql); + if ($result) { + $num = $this->db->num_rows($result); + + $line = 0; + + while ($line < $num) { + $objp = $this->db->fetch_object($result); + $datem=$this->db->jdate($objp->tms); + $bomstatic->id = $objp->rowid; + $bomstatic->ref = $objp->ref; + $bomstatic->id = $objp->socid; + $bomstatic->status = $objp->status; + $productstatic->ref = $objp->product_ref; + + $this->info_box_contents[$line][] = array( + 'td' => 'class="nowraponall"', + 'text' => $bomstatic->getNomUrl(1), + 'asis' => 1, + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', + 'text' => $productstatic->getNomUrl(1), + 'asis' => 1, + ); + + if (! empty($conf->global->BOM_BOX_LAST_BOMS_SHOW_VALIDATE_USER)) { + if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid); + $this->info_box_contents[$line][] = array( + 'td' => 'class="right"', + 'text' => (($objp->fk_user_valid > 0)?$userstatic->getNomUrl(1):''), + 'asis' => 1, + ); + } + + $this->info_box_contents[$line][] = array( + 'td' => 'class="right"', + 'text' => dol_print_date($datem, 'day'), + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'class="right" width="18"', + 'text' => $bomstatic->LibStatut($objp->status, 3), + ); + + $line++; + } + + if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedOrders")); + + $this->db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => '', + 'maxlength'=>500, + 'text' => ($this->db->error().' sql='.$sql), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="nohover opacitymedium left"', + 'text' => $langs->trans("ReadPermissionNotAllowed") + ); + } + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @return string + */ + public function showBox($head = null, $contents = null, $nooutput = 0) + { + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 185f581b5c5..feb7564cdaf 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -97,11 +97,11 @@ class box_clients extends ModeleBoxes $sql.= ", s.email"; $sql.= ", s.datec, s.tms, s.status"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.client IN (1, 3)"; $sql.= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) $sql.= " AND s.rowid = $user->societe_id"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.= " AND s.rowid = $user->socid"; $sql.= " ORDER BY s.tms DESC"; $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 00e3d54386c..c8a050ea1d4 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -21,7 +21,7 @@ /** * \file htdocs/core/boxes/box_commandes.php * \ingroup commande - * \brief Module de generation de l'affichage de la box commandes + * \brief Widget for latest sale orders */ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; @@ -102,12 +102,12 @@ class box_commandes extends ModeleBoxes $sql.= ", c.total_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; $sql.= " AND c.entity = ".$conf->entity; if (! empty($conf->global->ORDER_BOX_LAST_ORDERS_VALIDATED_ONLY)) $sql.=" AND c.fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.= " AND s.rowid = ".$user->socid; if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_commande DESC, c.ref DESC "; else $sql.= " ORDER BY c.tms DESC, c.ref DESC "; $sql.= $this->db->plimit($max, 0); @@ -135,7 +135,7 @@ class box_commandes extends ModeleBoxes $societestatic->logo = $objp->logo; $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $commandestatic->getNomUrl(1), 'asis' => 1, ); @@ -147,7 +147,7 @@ class box_commandes extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 02ed249d3b6..00f5722076c 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -64,7 +64,7 @@ class box_comptes extends ModeleBoxes // disable module for such cases $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); - if (! in_array('banque', $listofmodulesforexternal) && ! empty($user->societe_id)) $this->enabled=0; // disabled for external users + if (! in_array('banque', $listofmodulesforexternal) && ! empty($user->socid)) $this->enabled=0; // disabled for external users $this->hidden = ! ($user->rights->banque->lire); } @@ -154,7 +154,7 @@ class box_comptes extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="liste_total right"', + 'td' => 'class="liste_total right nowraponall"', 'text' => price($solde, 0, $langs, 0, -1, -1, $key) ); $line++; diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 82db6c9f240..9140b9b9d43 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -86,12 +86,14 @@ class box_contacts extends ModeleBoxes $sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile, sp.email as spemail"; $sql.= ", s.nom as socname, s.name_alias, s.email as semail"; $sql.= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur"; + $sql.= ", co.label as country, co.code as country_code"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON sp.fk_pays = co.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE sp.entity IN (".getEntity('socpeople').")"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND sp.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) $sql.= " AND sp.fk_soc = ".$user->societe_id; + if (! $user->rights->societe->client->voir && ! $user->socid) $sql.= " AND sp.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.= " AND sp.fk_soc = ".$user->socid; $sql.= " ORDER BY sp.tms DESC"; $sql.= $this->db->plimit($max, 0); @@ -121,6 +123,8 @@ class box_contacts extends ModeleBoxes $contactstatic->address = $objp->address; $contactstatic->zip = $objp->zip; $contactstatic->town = $objp->town; + $contactstatic->country = $objp->country; + $contactstatic->country_code = $objp->country_code; $societestatic->id = $objp->fk_soc; $societestatic->name = $objp->socname; @@ -132,13 +136,13 @@ class box_contacts extends ModeleBoxes $societestatic->fournisseur = $objp->fournisseur; $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $contactstatic->getNomUrl(1), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => ($objp->fk_soc > 0 ? $societestatic->getNomUrl(1) : ''), 'asis' => 1, ); @@ -160,7 +164,8 @@ class box_contacts extends ModeleBoxes if ($num==0) $this->info_box_contents[$line][0] = array( 'td' => 'class="center"', - 'text'=>$langs->trans("NoRecordedContacts"), + 'text'=> ''.$langs->trans("NoRecordedContacts").'', + 'asis'=> 1 ); $this->db->free($result); diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 0d155f158e9..36a4f5416f9 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -87,11 +87,11 @@ class box_contracts extends ModeleBoxes $sql.= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture"; $sql.= ", c.ref_customer, c.ref_supplier"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; $sql.= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_contrat DESC, c.ref DESC "; else $sql.= " ORDER BY c.tms DESC, c.ref DESC "; $sql.= $this->db->plimit($max, 0); @@ -136,7 +136,7 @@ class box_contracts extends ModeleBoxes // if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); } $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $contractstatic->getNomUrl(1), 'text2'=> $late, 'asis'=>1 diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 09841f4a4a8..65724f5fa4b 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -97,12 +97,12 @@ class box_factures extends ModeleBoxes $sql.= ", s.rowid as socid, s.nom as name, s.code_client, s.email, s.tva_intra, s.code_compta, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6"; $sql.= ", f.date_lim_reglement as datelimite"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ")"; $sql.= " WHERE f.fk_soc = s.rowid"; $sql.= " AND f.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY f.datef DESC, f.ref DESC "; else $sql.= " ORDER BY f.tms DESC, f.ref DESC "; $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 46e2da3ab62..9eb836fe1e2 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -99,11 +99,11 @@ class box_factures_fourn extends ModeleBoxes $sql.= ' f.date_lim_reglement as datelimite, f.tms, f.type'; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE f.fk_soc = s.rowid"; $sql.= " AND f.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY f.datef DESC, f.ref DESC "; else $sql.= " ORDER BY f.tms DESC, f.ref DESC "; $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index 0a6c7e904a3..d4cb4143463 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -91,13 +91,13 @@ class box_factures_fourn_imp extends ModeleBoxes $sql.= " f.paye, f.fk_statut, f.type"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ",".MAIN_DB_PREFIX."facture_fourn as f"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE f.fk_soc = s.rowid"; $sql.= " AND f.entity = ".$conf->entity; $sql.= " AND f.paye=0"; $sql.= " AND fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " ORDER BY datelimite DESC, f.ref_supplier DESC "; $sql.= $this->db->plimit($max, 0); @@ -145,13 +145,13 @@ class box_factures_fourn_imp extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $thirdpartytmp->getNomUrl(1, '', 40), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 494950927a9..bb6eb95b32f 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015 Frederic France + * Copyright (C) 2015-2019 Frederic France * * 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 @@ -82,6 +82,8 @@ class box_factures_imp extends ModeleBoxes $facturestatic = new Facture($this->db); $societestatic = new Societe($this->db); + $langs->load("bills"); + $this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpaidCustomerBills", $max)); if ($user->rights->facture->lire) @@ -98,15 +100,15 @@ class box_factures_imp extends ModeleBoxes $sql.= " f.paye, f.fk_statut, f.rowid as facid"; $sql.= ", sum(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture "; $sql.= " WHERE f.fk_soc = s.rowid"; $sql.= " AND f.entity IN (".getEntity('invoice').")"; $sql.= " AND f.paye = 0"; $sql.= " AND fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " GROUP BY s.nom, s.rowid, s.code_client, s.logo, f.ref, f.date_lim_reglement,"; $sql.= " f.type, f.amount, f.datef, f.total, f.tva, f.total_ttc, f.paye, f.fk_statut, f.rowid"; //$sql.= " ORDER BY f.datef DESC, f.ref DESC "; @@ -148,20 +150,20 @@ class box_factures_imp extends ModeleBoxes } $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $facturestatic->getNomUrl(1), 'text2'=> $late, 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $societestatic->getNomUrl(1, '', 44), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index a646d6556ba..a81b0cf3b86 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -92,8 +92,8 @@ class box_ficheinter extends ModeleBoxes $sql.= ", ".MAIN_DB_PREFIX."fichinter as f"; $sql.= " WHERE f.fk_soc = s.rowid "; $sql.= " AND f.entity = ".$conf->entity; - if (! $user->rights->societe->client->voir && !$user->societe_id) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (! $user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " ORDER BY f.tms DESC"; $sql.= $this->db->plimit($max, 0); @@ -120,13 +120,13 @@ class box_ficheinter extends ModeleBoxes $companystatic->email = $objp->semail; $this->info_box_contents[$i][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $ficheinterstatic->getNomUrl(1), 'asis' => 1, ); $this->info_box_contents[$i][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $companystatic->getNomUrl(1), 'asis' => 1, ); @@ -138,7 +138,7 @@ class box_ficheinter extends ModeleBoxes $this->info_box_contents[$i][] = array( 'td' => 'class="nowrap right"', - 'text' => $ficheinterstatic->getLibStatut(6), + 'text' => $ficheinterstatic->getLibStatut(3), 'asis' => 1, ); diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 6369b25987a..5f26351affe 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -88,11 +88,11 @@ class box_fournisseurs extends ModeleBoxes $sql.= " s.code_fournisseur, s.email as semail,"; $sql.= " s.logo"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fournisseur = 1"; $sql.= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " ORDER BY s.tms DESC "; $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 2aef770a9d5..ee9dc5352c1 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -88,7 +88,6 @@ class box_goodcustomers extends ModeleBoxes if ($user->rights->societe->lire) { - $sql = "SELECT s.rowid, s.nom as name, s.logo, s.code_client, s.code_fournisseur, s.client, s.fournisseur, s.tms as datem, s.status as status,"; $sql.= " count(*) as nbfact, sum(". $this->db->ifsql('f.paye=1', '1', '0').") as nbfactpaye"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index ba0e24ddaab..91ec36fd500 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -92,7 +92,7 @@ class box_graph_invoices_permonth extends ModeleBoxes $dir=''; // We don't need a path because image file will not be saved into disk $prefix=''; $socid=0; - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user if ($user->rights->facture->lire) @@ -135,7 +135,8 @@ class box_graph_invoices_permonth extends ModeleBoxes $data1 = $stats->getNbByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."invoicesnbinyear-".$endyear.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$endyear.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$endyear.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$endyear.'.png'; $px1 = new DolGraph(); @@ -180,7 +181,8 @@ class box_graph_invoices_permonth extends ModeleBoxes $data2 = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."invoicesamountinyear-".$endyear.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$endyear.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$endyear.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$endyear.'.png'; $px2 = new DolGraph(); diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 4393e9db790..9be3a986fa9 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -91,7 +91,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $dir=''; // We don't need a path because image file will not be saved into disk $prefix=''; $socid=0; - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user if ($user->rights->fournisseur->facture->lire) @@ -132,7 +132,8 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $data1 = $stats->getNbByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."invoicessuppliernbinyear-".$year.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$year.'.png'; $px1 = new DolGraph(); @@ -143,7 +144,8 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $px1->SetData($data1); unset($data1); - $i=$startyear;$legend=array(); + $i=$startyear; + $legend=array(); while ($i <= $endyear) { if ($startmonth != 1) @@ -177,7 +179,8 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $data2 = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."invoicessupplieramountinyear-".$year.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$year.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$year.'.png'; $px2 = new DolGraph(); diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 6e5bf253832..5ea1bb9f764 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -92,7 +92,7 @@ class box_graph_orders_permonth extends ModeleBoxes $dir=''; // We don't need a path because image file will not be saved into disk $prefix=''; $socid=0; - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user if ($user->rights->commande->lire) @@ -135,7 +135,8 @@ class box_graph_orders_permonth extends ModeleBoxes $data1 = $stats->getNbByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."ordersnbinyear-".$endyear.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$endyear.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$endyear.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$endyear.'.png'; $px1 = new DolGraph(); @@ -144,7 +145,8 @@ class box_graph_orders_permonth extends ModeleBoxes { $px1->SetData($data1); unset($data1); - $i=$startyear;$legend=array(); + $i=$startyear; + $legend=array(); while ($i <= $endyear) { if ($startmonth != 1) @@ -178,7 +180,8 @@ class box_graph_orders_permonth extends ModeleBoxes $data2 = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."ordersamountinyear-".$endyear.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$endyear.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$endyear.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$endyear.'.png'; $px2 = new DolGraph(); diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 443f374346d..fba42b42eba 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -91,7 +91,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $dir=''; // We don't need a path because image file will not be saved into disk $prefix=''; $socid=0; - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user if ($user->rights->fournisseur->commande->lire) @@ -134,7 +134,8 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $data1 = $stats->getNbByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."orderssuppliernbinyear-".$endyear.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$endyear.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$endyear.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssuppliernbinyear-'.$endyear.'.png'; $px1 = new DolGraph(); @@ -143,7 +144,8 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes { $px1->SetData($data1); unset($data1); - $i=$startyear;$legend=array(); + $i=$startyear; + $legend=array(); while ($i <= $endyear) { if ($startmonth != 1) @@ -177,7 +179,8 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $data2 = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09')==$refreshaction?-1:(3600*24)), ($WIDTH<300?2:0), $startmonth); $filenamenb = $dir."/".$prefix."orderssupplieramountinyear-".$endyear.".png"; - if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$endyear.'.png'; + // default value for customer mode + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$endyear.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssupplieramountinyear-'.$endyear.'.png'; $px2 = new DolGraph(); diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 332f92b7ace..7bcc85aa47f 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -128,7 +128,7 @@ class box_graph_product_distribution extends ModeleBoxes ); - $socid=empty($user->societe_id)?0:$user->societe_id; + $socid=empty($user->socid)?0:$user->socid; $userid=0; // No filter on user creation $WIDTH=($nbofgraph >= 2 || ! empty($conf->dol_optimize_smallscreen))?'160':'320'; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index a06c5d8ff83..150e9517c8a 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -94,7 +94,7 @@ class box_graph_propales_permonth extends ModeleBoxes $dir=''; // We don't need a path because image file will not be saved into disk $prefix=''; $socid=0; - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; if (! $user->rights->societe->client->voir || $socid) $prefix.='private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user if ($user->rights->propale->lire) diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index 87d7e0f7d50..18c2ebfe340 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -47,7 +47,7 @@ class box_last_modified_ticket extends ModeleBoxes /** * Constructor - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler * @param string $param More parameters */ public function __construct($db, $param = '') @@ -71,7 +71,7 @@ class box_last_modified_ticket extends ModeleBoxes $this->max = $max; - dol_include_once("/ticket/class/ticket.class.php"); + require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; $text = $langs->trans("BoxLastModifiedTicketDescription", $max); $this->info_box_head = array( @@ -87,7 +87,7 @@ class box_last_modified_ticket extends ModeleBoxes if ($user->rights->ticket->read) { $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; $sql.= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; - $sql.= ", s.nom as company_name"; + $sql.= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."ticket as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code=t.category_code"; @@ -96,9 +96,9 @@ class box_last_modified_ticket extends ModeleBoxes $sql.= " WHERE t.entity = ".$conf->entity; // $sql.= " AND e.rowid = er.fk_event"; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) { - $sql.= " AND t.fk_soc= ".$user->societe_id; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) { + $sql.= " AND t.fk_soc= ".$user->socid; } $sql.= " ORDER BY t.tms DESC, t.rowid DESC "; @@ -107,7 +107,6 @@ class box_last_modified_ticket extends ModeleBoxes $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - $now=gmmktime(); $i = 0; @@ -119,40 +118,47 @@ class box_last_modified_ticket extends ModeleBoxes $late = ''; $ticket = new Ticket($this->db); + $ticket->id = $objp->id; + $ticket->track_id = $objp->track_id; + $ticket->ref = $objp->ref; + $ticket->fk_statut = $objp->fk_statut; + $ticket->subject = $objp->subject; + if ($objp->fk_soc > 0) { + $thirdparty = new Societe($this->db); + $thirdparty->id = $objp->fk_soc; + $thirdparty->email = $objp->socemail; + $thirdparty->client = $objp->client; + $thirdparty->fournisseur = $objp->fournisseur; + $thirdparty->name = $objp->company_name; + $link = $thirdparty->getNomUrl(1); + } else { + $link = dol_print_email($objp->origin_email); + } $r=0; - // Picto + // Ticket $this->info_box_contents[$i][0] = array( - 'td' => 'class="left" width="16"', - 'logo' => $this->boximg, - 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), - ); - $r++; - - // Id - $this->info_box_contents[$i][$r] = array( - 'td' => 'class="left"', - 'text' => $objp->ref, - 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), + 'td' => 'class="nowraponall"', + 'text' => $ticket->getNomUrl(1), + 'asis' => 1, ); $r++; // Subject $this->info_box_contents[$i][$r] = array( - 'td' => 'class="left"', + 'td' => 'class="nowrap"', 'text' => $objp->subject, // Some event have no ref - 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), + 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id, ); $r++; // Customer $this->info_box_contents[$i][$r] = array( - 'td' => 'class="left"', - 'logo' => ($objp->fk_soc>0?'company':''), - 'text' => ($objp->company_name?$objp->company_name:$objp->origin_email), - 'url' => ($objp->fk_soc>0?DOL_URL_ROOT."/comm/card.php?socid=".$objp->fk_soc:'') + 'td' => 'class="tdoverflowmax150 maxwidth300onsmartphone"', + 'text' => $link, + 'asis' => 1, ); $r++; @@ -160,16 +166,14 @@ class box_last_modified_ticket extends ModeleBoxes // Date creation $this->info_box_contents[$i][$r] = array( 'td' => 'class="right"', - 'text' => dol_print_date($this->db->idate($objp->datec), 'dayhour') + 'text' => dol_print_date($datec, 'dayhour') ); $r++; // Statut - $ticketstat = new Ticket($this->db); - $ticketstat->fk_statut = $objp->fk_statut; $this->info_box_contents[$i][$r] = array( - 'td' => 'class="right"', - 'text' => $ticketstat->getLibStatut(3) + 'td' => 'class="right nowraponall"', + 'text' => $ticket->getLibStatut(3) ); $r++; diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index 5469efd8fc5..4a0842139d6 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -1,7 +1,8 @@ - * 2016 Christophe Battarel + * Copyright (C) 2013-2016 Jean-François FERRY + * Copyright (C) 2016 Christophe Battarel + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -46,7 +47,7 @@ class box_last_ticket extends ModeleBoxes /** * Constructor - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler * @param string $param More parameters */ public function __construct($db, $param = '') @@ -70,7 +71,7 @@ class box_last_ticket extends ModeleBoxes $this->max = $max; - dol_include_once("/ticket/class/ticket.class.php"); + require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; $text = $langs->trans("BoxLastTicketDescription", $max); $this->info_box_head = array( @@ -86,7 +87,7 @@ class box_last_ticket extends ModeleBoxes if ($user->rights->ticket->read) { $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; $sql .= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; - $sql .= ", s.nom as company_name"; + $sql .= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur"; $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_type as type ON type.code=t.type_code"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_category as category ON category.code=t.category_code"; @@ -95,9 +96,9 @@ class box_last_ticket extends ModeleBoxes $sql .= " WHERE t.entity = " . $conf->entity; // $sql.= " AND e.rowid = er.fk_event"; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) { - $sql .= " AND t.fk_soc= " . $user->societe_id; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " WHERE s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) { + $sql .= " AND t.fk_soc= " . $user->socid; } //$sql.= " AND t.fk_statut > 9"; @@ -108,7 +109,6 @@ class box_last_ticket extends ModeleBoxes $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - $now = gmmktime(); $i = 0; @@ -120,55 +120,60 @@ class box_last_ticket extends ModeleBoxes $late = ''; $ticket = new Ticket($this->db); + $ticket->id = $objp->id; + $ticket->track_id = $objp->track_id; + $ticket->ref = $objp->ref; + $ticket->fk_statut = $objp->fk_statut; + $ticket->subject = $objp->subject; + if ($objp->fk_soc > 0) { + $thirdparty = new Societe($this->db); + $thirdparty->id = $objp->fk_soc; + $thirdparty->email = $objp->socemail; + $thirdparty->client = $objp->client; + $thirdparty->fournisseur = $objp->fournisseur; + $thirdparty->name = $objp->company_name; + $link = $thirdparty->getNomUrl(1); + } else { + $link = dol_print_email($objp->origin_email); + } $r = 0; - // Picto - $this->info_box_contents[$i][0] = array( - 'td' => 'class="left" width="16"', - 'logo' => $this->boximg, - 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), - ); - $r++; - - // Id + // Ticket $this->info_box_contents[$i][$r] = array( - 'td' => 'class="left"', - 'text' => $objp->ref, - 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), + 'td' => 'class="nowraponall"', + 'text' => $ticket->getNomUrl(1), + 'asis' => 1 ); $r++; // Subject $this->info_box_contents[$i][$r] = array( - 'td' => 'class="left"', + 'td' => '', 'text' => $objp->subject, // Some event have no ref - 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), + 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=" . $objp->track_id, ); $r++; // Customer $this->info_box_contents[$i][$r] = array( - 'td' => 'class="left"', - 'logo' => ($objp->fk_soc > 0 ? 'company' : ''), - 'text' => ($objp->company_name ? $objp->company_name : $objp->origin_email), - 'url' => ($objp->fk_soc > 0 ? DOL_URL_ROOT . "/comm/card.php?socid=" . $objp->fk_soc : ''), + 'td' => '', + 'text' => $link, + 'asis' => 1, ); $r++; // Date creation $this->info_box_contents[$i][$r] = array( 'td' => 'class="right"', - 'text' => dol_print_date($this->db->idate($objp->datec), 'dayhour'), + 'text' => dol_print_date($datec, 'dayhour'), ); $r++; // Statut - $ticketstat = new Ticket($this->db); - $ticketstat->fk_statut = $objp->fk_statut; $this->info_box_contents[$i][$r] = array( - 'td' => 'class="right"', - 'text' => $ticketstat->getLibStatut(3), + 'td' => 'class="right nowraponall"', + 'text' => $ticket->getLibStatut(3), ); $r++; diff --git a/htdocs/core/boxes/box_lastlogin.php b/htdocs/core/boxes/box_lastlogin.php index 970619ee7ac..7a6c74e216c 100644 --- a/htdocs/core/boxes/box_lastlogin.php +++ b/htdocs/core/boxes/box_lastlogin.php @@ -78,11 +78,11 @@ class box_lastlogin extends ModeleBoxes $line=0; $this->info_box_contents[$line][0] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $langs->trans("User"), ); $this->info_box_contents[$line][1] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $user->getNomUrl(-1), 'asis' => 1 ); diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 1e4588f05cf..242f26e5d60 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -63,7 +63,7 @@ class box_members extends ModeleBoxes // disable module for such cases $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); - if (! in_array('adherent', $listofmodulesforexternal) && ! empty($user->societe_id)) $this->enabled=0; // disabled for external users + if (! in_array('adherent', $listofmodulesforexternal) && ! empty($user->socid)) $this->enabled=0; // disabled for external users $this->hidden = ! ($user->rights->adherent->lire); } @@ -124,13 +124,13 @@ class box_members extends ModeleBoxes } $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $memberstatic->getNomUrl(1), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $memberstatic->company, 'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid, ); diff --git a/htdocs/core/boxes/box_mos.php b/htdocs/core/boxes/box_mos.php new file mode 100644 index 00000000000..949f63776f6 --- /dev/null +++ b/htdocs/core/boxes/box_mos.php @@ -0,0 +1,182 @@ + + * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France + * + * 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 . + */ + +/** + * \file htdocs/core/boxes/box_mos.php + * \ingroup mrp + * \brief Widget for latest modified MOs + */ + +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; + + +/** + * Class to manage the box to show last orders + */ +class box_mos extends ModeleBoxes +{ + public $boxcode="lastmos"; + public $boximg="object_mrp"; + public $boxlabel="BoxTitleLatestModifiedMos"; + public $depends = array("mrp"); + + /** + * @var DoliDB Database handler. + */ + public $db; + + public $param; + + public $info_box_head = array(); + public $info_box_contents = array(); + + + /** + * Constructor + * + * @param DoliDB $db Database handler + * @param string $param More parameters + */ + public function __construct($db, $param) + { + global $user; + + $this->db = $db; + + $this->hidden = ! ($user->rights->bom->read); + } + + /** + * Load data for box to show them later + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $user, $langs, $conf; + + $this->max = $max; + + include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + + $mostatic = new Mo($this->db); + $productstatic = new Product($this->db); + $userstatic = new User($this->db); + + $this->info_box_head = array('text' => $langs->trans("BoxTitleLatestModifiedMos", $max)); + + if ($user->rights->mrp->read) + { + $sql = "SELECT p.ref as product_ref"; + $sql.= ", c.rowid"; + $sql.= ", c.date_creation"; + $sql.= ", c.tms"; + $sql.= ", c.ref"; + $sql.= ", c.status"; + //$sql.= ", c.fk_user_valid"; + $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; + $sql.= ", ".MAIN_DB_PREFIX."mrp_mo as c"; + $sql.= " WHERE c.fk_product = p.rowid"; + $sql.= " AND c.entity = ".$conf->entity; + $sql.= " ORDER BY c.tms DESC, c.ref DESC"; + $sql.= " ".$this->db->plimit($max, 0); + + $result = $this->db->query($sql); + if ($result) { + $num = $this->db->num_rows($result); + + $line = 0; + + while ($line < $num) { + $objp = $this->db->fetch_object($result); + $datem=$this->db->jdate($objp->tms); + $mostatic->id = $objp->rowid; + $mostatic->ref = $objp->ref; + $mostatic->id = $objp->socid; + $mostatic->status = $objp->status; + $productstatic->ref = $objp->product_ref; + + $this->info_box_contents[$line][] = array( + 'td' => 'class="nowraponall"', + 'text' => $mostatic->getNomUrl(1), + 'asis' => 1, + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', + 'text' => $productstatic->getNomUrl(1), + 'asis' => 1, + ); + + if (! empty($conf->global->MRP_BOX_LAST_MOS_SHOW_VALIDATE_USER)) { + if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid); + $this->info_box_contents[$line][] = array( + 'td' => 'class="right"', + 'text' => (($objp->fk_user_valid > 0)?$userstatic->getNomUrl(1):''), + 'asis' => 1, + ); + } + + $this->info_box_contents[$line][] = array( + 'td' => 'class="right"', + 'text' => dol_print_date($datem, 'day'), + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'class="right" width="18"', + 'text' => $mostatic->LibStatut($objp->status, 3), + ); + + $line++; + } + + if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedOrders")); + + $this->db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => '', + 'maxlength'=>500, + 'text' => ($this->db->error().' sql='.$sql), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="nohover opacitymedium left"', + 'text' => $langs->trans("ReadPermissionNotAllowed") + ); + } + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @return string + */ + public function showBox($head = null, $contents = null, $nooutput = 0) + { + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index a66b775155c..5cccd24ad6a 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -63,7 +63,7 @@ class box_produits extends ModeleBoxes $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); $tmpentry=array('enabled'=>(! empty($conf->product->enabled) || ! empty($conf->service->enabled)), 'perms'=>(! empty($user->rights->produit->lire) || ! empty($user->rights->service->lire)), 'module'=>'product|service'); - $showmode=isVisibleToUserType(($user->societe_id > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); + $showmode=isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); $this->hidden = ($showmode != 1); } @@ -144,7 +144,8 @@ class box_produits extends ModeleBoxes 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', 'text' => $objp->label, ); - + $price = ''; + $price_base_type = ''; if (empty($conf->dynamicprices->enabled) || empty($objp->fk_price_expression)) { $price_base_type=$langs->trans($objp->price_base_type); $price=($objp->price_base_type == 'HT')?price($objp->price):$price=price($objp->price_ttc); diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 22509a6c9a2..3c674cd32c0 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -65,7 +65,7 @@ class box_produits_alerte_stock extends ModeleBoxes $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); $tmpentry=array('enabled'=>((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && ! empty($conf->stock->enabled)), 'perms'=>($user->rights->stock->lire), 'module'=>'product|service|stock'); - $showmode=isVisibleToUserType(($user->societe_id > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); + $showmode=isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); $this->hidden = ($showmode != 1); } diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 09efa019191..edd6c89054d 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -85,12 +85,11 @@ class box_project extends ModeleBoxes // list the summary of the orders if ($user->rights->projet->lire) { - include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $projectstatic = new Project($this->db); $socid=0; - //if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. + //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. // Get list of project id allowed to user (in a string list separated by coma) $projectsListId=''; @@ -124,7 +123,7 @@ class box_project extends ModeleBoxes ); $this->info_box_contents[$i][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth200onsmartphone"', 'text' => $objp->title, ); diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 0ba1b1565f8..3cbd9f45514 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015 Frederic France + * Copyright (C) 2015-2019 Frederic France * * 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 @@ -84,15 +84,15 @@ class box_propales extends ModeleBoxes if ($user->rights->propale->lire) { - $sql = "SELECT s.nom as name, s.rowid as socid, s.code_client, s.logo,"; + $sql = "SELECT s.nom as name, s.rowid as socid, s.code_client, s.logo, s.email,"; $sql.= " p.rowid, p.ref, p.fk_statut, p.datep as dp, p.datec, p.fin_validite, p.date_cloture, p.total_ht, p.tva as total_tva, p.total as total_ttc, p.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE p.fk_soc = s.rowid"; $sql.= " AND p.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY p.datep DESC, p.ref DESC "; else $sql.= " ORDER BY p.tms DESC, p.ref DESC "; $sql.= $this->db->plimit($max, 0); @@ -121,6 +121,7 @@ class box_propales extends ModeleBoxes $societestatic->name = $objp->name; $societestatic->code_client = $objp->code_client; $societestatic->logo = $objp->logo; + $societestatic->email = $objp->email; $late = ''; if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->propal->cloture->warning_delay)) { @@ -128,7 +129,7 @@ class box_propales extends ModeleBoxes } $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $propalstatic->getNomUrl(1), 'text2'=> $late, 'asis' => 1, diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index b489247e0b1..9d6a10b6225 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -94,11 +94,11 @@ class box_prospect extends ModeleBoxes $sql.= ", s.logo"; $sql.= ", s.fk_stcomm, s.datec, s.tms, s.status"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.client IN (2, 3)"; $sql.= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= " ORDER BY s.tms DESC"; $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index f080403aba3..dbb26408b6f 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -96,10 +96,10 @@ class box_services_contracts extends ModeleBoxes $sql.= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= ")"; $sql.= " WHERE c.entity = ".$conf->entity; - if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if($user->socid) $sql.= " AND s.rowid = ".$user->socid; $sql.= $this->db->order("c.tms", "DESC"); $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index b56674adaa0..582b5101aa1 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -87,12 +87,12 @@ class box_services_expired extends ModeleBoxes $sql.= " s.nom as name, s.rowid as socid, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,"; $sql.= " MIN(cd.date_fin_validite) as date_line, COUNT(cd.rowid) as nb_services"; $sql.= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe s, ".MAIN_DB_PREFIX."contratdet as cd"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE cd.statut = 4 AND cd.date_fin_validite <= '".$this->db->idate($now)."'"; $sql.= " AND c.entity = ".$conf->entity; $sql.= " AND c.fk_soc=s.rowid AND cd.fk_contrat=c.rowid AND c.statut > 0"; - if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.=' AND c.fk_soc = '.$user->socid; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " GROUP BY c.rowid, c.ref, c.statut, c.date_contrat, c.ref_customer, c.ref_supplier, s.nom, s.rowid"; $sql.= " ORDER BY date_line ASC"; $sql.= $this->db->plimit($max, 0); @@ -133,7 +133,7 @@ class box_services_expired extends ModeleBoxes if (($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late=img_warning($langs->trans("Late")); $this->info_box_contents[$i][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $contract->getNomUrl(1), 'asis' => 1 ); @@ -145,7 +145,7 @@ class box_services_expired extends ModeleBoxes ); $this->info_box_contents[$i][] = array( - 'td' => 'class="center"', + 'td' => 'class="center nowraponall"', 'text' => dol_print_date($dateline, 'day'), 'text2'=> $late, ); diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 42c1b7464b9..881e17f73ec 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -93,11 +93,11 @@ class box_supplier_orders extends ModeleBoxes $sql.= " c.fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; $sql.= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.= " AND s.rowid = ".$user->socid; if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_commande DESC, c.ref DESC "; else $sql.= " ORDER BY c.tms DESC, c.ref DESC "; $sql.= $this->db->plimit($max, 0); @@ -124,19 +124,19 @@ class box_supplier_orders extends ModeleBoxes $thirdpartytmp->logo = $objp->logo; $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $supplierorderstatic->getNomUrl(1), 'asis' => 1 ); $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $thirdpartytmp->getNomUrl(1, 'supplier'), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right nowrap"', + 'td' => 'class="right nowraponall"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php index 326a9297ce8..416dc7f2f2a 100644 --- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php +++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php @@ -130,19 +130,19 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes $thirdpartytmp->logo = $objp->logo; $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $supplierorderstatic->getNomUrl(1), 'asis' => 1 ); $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $thirdpartytmp->getNomUrl(1, 'supplier'), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right nowrap"', + 'td' => 'class="right nowraponall"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index 59b31086db5..1039ea74385 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -119,22 +119,28 @@ class box_task extends ModeleBoxes // list the summary of the orders if ($user->rights->projet->lire) { $boxcontent.= '
'."\n"; - $boxcontent.= '
'."\n"; + $boxcontent.= '
'."\n"; $boxcontent.= '
boxcode.'">'."\n"; $boxcontent.= ''."\n"; $selectArray = array('all' => $langs->trans("NoFilter"), 'im_task_contact' => $langs->trans("WhichIamLinkedTo"), 'im_project_contact' => $langs->trans("WhichIamLinkedToProject")); $boxcontent.= $form->selectArray($cookie_name, $selectArray, $filterValue); - $boxcontent.= ''; + $boxcontent.= ''; $boxcontent.= ''."\n"; $boxcontent.= '
'."\n"; $boxcontent.= ''; - + // set cookie by js + $boxcontent.=''; + $this->info_box_contents[0][] = array( + 'tr'=>'class="nohover showiffilter'.$this->boxcode.' hideobject"', + 'td' => 'class="nohover"', + 'textnoformat' => $boxcontent, + ); $sql = "SELECT pt.rowid, pt.ref, pt.fk_projet, pt.fk_task_parent, pt.datec, pt.dateo, pt.datee, pt.datev, pt.label, pt.description, pt.duration_effective, pt.planned_workload, pt.progress"; @@ -163,11 +169,10 @@ class box_task extends ModeleBoxes $sql.= $this->db->plimit($max, 0); $result = $this->db->query($sql); - $i = 0; + $i = 1; if ($result) { $num = $this->db->num_rows($result); while ($objp = $this->db->fetch_object($result)) { - $taskstatic->id=$objp->rowid; $taskstatic->ref=$objp->ref; $taskstatic->label=$objp->label; @@ -183,24 +188,18 @@ class box_task extends ModeleBoxes $label = $projectstatic->getNomUrl(1).' '.$taskstatic->getNomUrl(1).' '.dol_htmlentities($taskstatic->label); - $boxcontent.= getTaskProgressView($taskstatic, $label, true, false, true); + $boxcontent = getTaskProgressView($taskstatic, $label, true, false, false); + $this->info_box_contents[$i][] = array( + 'td' => '', + 'text' => $boxcontent, + ); $i++; } } else { dol_print_error($this->db); } } - - // set cookie by js - if(empty($i)){ - $boxcontent.=''; - } - - $this->info_box_contents[0][] = array( - 'td' => '', - 'text' => $boxcontent, - ); } /** diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index d445c2f27c0..f5399cd9eea 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -216,7 +216,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box $cachetime = 900; // 900 : 15mn $cachedir = DOL_DATA_ROOT.'/boxes/temp'; - $fileid = get_class($this).'id-'.$this->box_id.'-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'.cache'; + $fileid = get_class($this).'id-'.$this->box_id.'-e'.$conf->entity.'-u'.$user->id.'-s'.$user->socid.'.cache'; $filename = '/box-'.$fileid; $refresh = dol_cache_refresh($cachedir, $filename, $cachetime); $out = ''; @@ -301,6 +301,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box $textwithnotags=preg_replace('/<([^>]+)>/i', '', $text); $text2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:''; $text2withnotags=preg_replace('/<([^>]+)>/i', '', $text2); + $textnoformat=isset($contents[$i][$j]['textnoformat'])?$contents[$i][$j]['textnoformat']:''; //$out.= "xxx $textwithnotags y"; if (empty($contents[$i][$j]['tooltip'])) $contents[$i][$j]['tooltip']=""; @@ -332,13 +333,13 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength']; if ($maxlength) $textwithnotags=dol_trunc($textwithnotags, $maxlength); - if (preg_match('/^msgishtml) { - // Similar code to forge a text from html is also in CMailFile.class.php + // Similar code to forge a text from html is also in smtps.class.php $strContentAltText = preg_replace("/]*>/", " ", $strContent); $strContentAltText = html_entity_decode(strip_tags($strContentAltText)); - $strContentAltText = rtrim(wordwrap($strContentAltText, 75, empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)?"\r\n":"\n")); + $strContentAltText = trim(wordwrap($strContentAltText, 75, empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)?"\r\n":"\n")); // Check if html header already in message, if not complete the message $strContent = $this->checkIfHTML($strContent); @@ -1392,7 +1392,6 @@ class CMailFile $i=0; foreach ($matches[1] as $full) { - if (preg_match('/file=([A-Za-z0-9_\-\/]+[\.]?[A-Za-z0-9]+)?$/i', $full, $regs)) // If xxx is 'file=aaa' { $img = $regs[1]; diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 60a5d9519a4..a02f00fbac9 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -112,7 +112,6 @@ class CSMSFile if (empty($conf->global->MAIN_DISABLE_ALL_SMS)) { - // Action according to choosed sending method if ($conf->global->MAIN_SMS_SENDMODE == 'ovh') // Backward compatibility @deprecated { diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 37e8270d449..cfdb09c527e 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -54,12 +54,12 @@ class Canvas public $control; // Initialized by getCanvas with controller instance - /** - * Constructor - * - * @param DoliDB $db Database handler - * @param string $actiontype Action type ('create', 'view', 'edit', 'list') - */ + /** + * Constructor + * + * @param DoliDB $db Database handler + * @param string $actiontype Action type ('create', 'view', 'edit', 'list') + */ public function __construct($db, $actiontype = 'view') { $this->db = $db; diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 2386b7fbad2..0934d85b3e7 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -163,22 +163,24 @@ class Ccountry // extends CommonObject /** * Load object in memory from database * - * @param int $id Id object - * @param string $code Code + * @param int $id Id object + * @param string $code Code + * @param string $code_iso Code ISO * @return int >0 if OK, 0 if not found, <0 if KO */ - public function fetch($id, $code = '') + public function fetch($id, $code = '', $code_iso = '') { global $langs; $sql = "SELECT"; - $sql.= " t.rowid,"; - $sql.= " t.code,"; - $sql.= " t.code_iso,"; - $sql.= " t.label,"; - $sql.= " t.active"; + $sql.= " t.rowid,"; + $sql.= " t.code,"; + $sql.= " t.code_iso,"; + $sql.= " t.label,"; + $sql.= " t.active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_country as t"; - if ($id) $sql.= " WHERE t.rowid = ".$id; + if ($id) $sql.= " WHERE t.rowid = ".$id; elseif ($code) $sql.= " WHERE t.code = '".$this->db->escape($code)."'"; + elseif ($code_iso) $sql.= " WHERE t.code_iso = '".$this->db->escape($code_iso)."'"; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); @@ -334,4 +336,20 @@ class Ccountry // extends CommonObject return 1; } } + + /** + * Return a link to the object card (with optionaly the picto) + * + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to ('nolink', ...) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $langs; + return $langs->trans($this->label); + } } diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 3f4b486f547..18c20b0b07c 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -62,6 +62,11 @@ class Comment extends CommonObject */ public $fk_user_author; + /** + * @var int ID + */ + public $fk_user_modif; + /** * @var int Entity */ @@ -94,17 +99,18 @@ class Comment extends CommonObject */ public function create($user, $notrigger = 0) { - global $conf, $langs; + global $user; $error=0; // Insert request - $sql = "INSERT INTO ".MAIN_DB_PREFIX."comment ("; + $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element." ("; $sql.= "description"; $sql.= ", datec"; $sql.= ", fk_element"; $sql.= ", element_type"; $sql.= ", fk_user_author"; + $sql.= ", fk_user_modif"; $sql.= ", entity"; $sql.= ", import_key"; $sql.= ") VALUES ("; @@ -113,6 +119,7 @@ class Comment extends CommonObject $sql.= ", '".(isset($this->fk_element)?$this->fk_element:"null")."'"; $sql.= ", '".$this->db->escape($this->element_type)."'"; $sql.= ", '".(isset($this->fk_user_author)?$this->fk_user_author:"null")."'"; + $sql.= ", ".$user->id.""; $sql.= ", ".(!empty($this->entity)?$this->entity:'1'); $sql.= ", ".(!empty($this->import_key)?"'".$this->db->escape($this->import_key)."'":"null"); $sql.= ")"; @@ -128,7 +135,7 @@ class Comment extends CommonObject if (! $error) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_comment"); + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); if (! $notrigger) { @@ -177,9 +184,10 @@ class Comment extends CommonObject $sql.= " c.fk_element,"; $sql.= " c.element_type,"; $sql.= " c.fk_user_author,"; + $sql.= " c.fk_user_modif,"; $sql.= " c.entity,"; $sql.= " c.import_key"; - $sql.= " FROM ".MAIN_DB_PREFIX."comment as c"; + $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as c"; $sql.= " WHERE c.rowid = ".$id; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); @@ -196,8 +204,9 @@ class Comment extends CommonObject $this->description = $obj->description; $this->element_type = $obj->element_type; $this->datec = $this->db->jdate($obj->datec); - $this->tms = $obj->tms; + $this->tms = $this->db->jdate($obj->tms); $this->fk_user_author = $obj->fk_user_author; + $this->fk_user_modif = $obj->fk_user_modif; $this->fk_element = $obj->fk_element; $this->entity = $obj->entity; $this->import_key = $obj->import_key; @@ -225,22 +234,21 @@ class Comment extends CommonObject */ public function update(User $user, $notrigger = 0) { - global $conf, $langs; + global $user; $error=0; // Clean parameters if (isset($this->fk_element)) $this->fk_project=(int) trim($this->fk_element); - if (isset($this->fk_user_author)) $this->fk_user_author=(int) trim($this->fk_user_author); if (isset($this->description)) $this->description=trim($this->description); // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_comment SET"; + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; $sql.= " description=".(isset($this->description)?"'".$this->db->escape($this->description)."'":"null").","; $sql.= " datec=".($this->datec!=''?"'".$this->db->idate($this->datec)."'":'null').","; $sql.= " fk_element=".(isset($this->fk_element)?$this->fk_element:"null").","; $sql.= " element_type='".$this->db->escape($this->element_type)."',"; - $sql.= " fk_user_author=".(isset($this->fk_user_author)?$this->fk_user_author:"null").","; + $sql.= " fk_user_modif=".$user->id.","; $sql.= " entity=".(!empty($this->entity)?$this->entity:'1').","; $sql.= " import_key=".(!empty($this->import_key)?"'".$this->db->escape($this->import_key)."'":"null"); $sql.= " WHERE rowid=".$this->id; @@ -297,7 +305,7 @@ class Comment extends CommonObject $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."comment"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; $sql.= " WHERE rowid=".$this->id; $resql = $this->db->query($sql); @@ -345,7 +353,7 @@ class Comment extends CommonObject if(!empty($element_type) && !empty($fk_element)) { $sql = "SELECT"; $sql.= " c.rowid"; - $sql.= " FROM ".MAIN_DB_PREFIX."comment as c"; + $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as c"; $sql.= " WHERE c.fk_element = ".$fk_element; $sql.= " AND c.element_type = '".$db->escape($element_type)."'"; $sql.= " AND c.entity = ".$conf->entity; diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 74253a19f51..6a9bc0c9f29 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -63,7 +63,7 @@ abstract class CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Define array with couple subtitution key => subtitution value + * Define array with couple substitution key => substitution value * * @param User $user User * @param Translate $outputlangs Language object for output @@ -101,7 +101,7 @@ abstract class CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Define array with couple subtitution key => subtitution value + * Define array with couple substitution key => substitution value * * @param Societe $mysoc Object thirdparty * @param Translate $outputlangs Language object for output @@ -161,7 +161,7 @@ abstract class CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Define array with couple subtitution key => subtitution value + * Define array with couple substitution key => substitution value * * @param Societe $object Object * @param Translate $outputlangs Language object for output @@ -224,15 +224,15 @@ abstract class CommonDocGenerator $extrafields->fetch_name_optionals_label($object->table_element, true); $object->fetch_optionals(); - foreach($extrafields->attribute_label as $key=>$label) + foreach($extrafields->attributes[$object->table_element]['label'] as $key=>$label) { - if($extrafields->attribute_type[$key] == 'price') + if($extrafields->attributes[$object->table_element]['type'][$key] == 'price') { $object->array_options['options_'.$key] = price($object->array_options['options_'.$key], 0, $outputlangs, 0, 0, -1, $conf->currency); } - elseif($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') + elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { - $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; + $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; } $array_thirdparty = array_merge($array_thirdparty, array ('company_options_'.$key => $object->array_options ['options_' . $key])); } @@ -242,7 +242,7 @@ abstract class CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Define array with couple subtitution key => subtitution value + * Define array with couple substitution key => substitution value * * @param Contact $object contact * @param Translate $outputlangs object for output @@ -298,15 +298,15 @@ abstract class CommonDocGenerator $extrafields->fetch_name_optionals_label($object->table_element, true); $object->fetch_optionals(); - foreach($extrafields->attribute_label as $key => $label) + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $label) { - if ($extrafields->attribute_type[$key] == 'price') + if ($extrafields->attributes[$object->table_element]['type'][$key] == 'price') { $object->array_options['options_' . $key] = price($object->array_options ['options_' . $key], 0, $outputlangs, 0, 0, - 1, $conf->currency); } - elseif($extrafields->attribute_type[$key] == 'select' || $extrafields->attribute_type[$key] == 'checkbox') + elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { - $object->array_options['options_' . $key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_' . $key]]; + $object->array_options['options_' . $key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_' . $key]]; } $array_contact = array_merge($array_contact, array($array_key.'_options_' . $key => $object->array_options['options_'. $key])); } @@ -316,7 +316,7 @@ abstract class CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Define array with couple subtitution key => subtitution value + * Define array with couple substitution key => substitution value * * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code @@ -445,7 +445,7 @@ abstract class CommonDocGenerator $array_key.'_already_payed_all_locale'=>price(price2num($already_payed_all, 'MT'), 0, $outputlangs), $array_key.'_already_payed_all'=> price2num($already_payed_all, 'MT'), - // Remain to pay with all know infrmation (except open direct debit requests) + // Remain to pay with all know information (except open direct debit requests) $array_key.'_remain_to_pay_locale'=>price(price2num($object->total_ttc - $remain_to_pay, 'MT'), 0, $outputlangs), $array_key.'_remain_to_pay'=>price2num($object->total_ttc - $remain_to_pay, 'MT') ); @@ -479,7 +479,7 @@ abstract class CommonDocGenerator $totalUp = 0; foreach ($object->lines as $line) { - // $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward comaptibility + // $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward compatibility if (empty($resarray[$array_key.'_total_vat_'.$line->tva_tx])) $resarray[$array_key.'_total_vat_'.$line->tva_tx]=0; $resarray[$array_key.'_total_vat_'.$line->tva_tx]+=$line->total_tva; $resarray[$array_key.'_total_vat_locale_'.$line->tva_tx]=price($resarray[$array_key.'_total_vat_'.$line->tva_tx]); @@ -585,7 +585,7 @@ abstract class CommonDocGenerator { $resarray['line_unit']=$outputlangs->trans($line->getLabelOfUnit('long')); $resarray['line_unit_short']=$outputlangs->trans($line->getLabelOfUnit('short')); - } + } // Retrieve extrafields $extrafieldkey=$line->element; @@ -595,7 +595,30 @@ abstract class CommonDocGenerator $extrafields->fetch_name_optionals_label($extrafieldkey, true); $line->fetch_optionals(); - $resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs); + $resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs); + + // Check if the current line belongs to a supplier order + if (get_class($line) == 'CommandeFournisseurLigne') + { + // Add the product supplier extrafields to the substitutions + $extrafields->fetch_name_optionals_label("product_fournisseur_price"); + $extralabels=$extrafields->attributes["product_fournisseur_price"]['label']; + $columns = ""; + foreach ($extralabels as $key => $value) + $columns .= "$key, "; + + if ($columns != "") + { + $columns = substr($columns, 0, strlen($columns) - 2); + $resql = $this->db->query("SELECT $columns FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields AS ex INNER JOIN " . MAIN_DB_PREFIX . "product_fournisseur_price AS f ON ex.fk_object = f.rowid WHERE f.ref_fourn = '" . $line->ref_supplier . "'"); + if ($this->db->num_rows($resql) > 0) { + $resql = $this->db->fetch_object($resql); + + foreach ($extralabels as $key => $value) + $resarray['line_product_supplier_'.$key] = $resql->{$key}; + } + } + } // Load product data optional fields to the line -> enables to use "line_options_{extrafield}" if (isset($line->fk_product) && $line->fk_product > 0) @@ -643,11 +666,11 @@ abstract class CommonDocGenerator $array_key.'_tracking_number'=>$object->tracking_number, $array_key.'_tracking_url'=>$object->tracking_url, $array_key.'_shipping_method'=>$object->listmeths[0]['libelle'], - $array_key.'_weight'=>$object->trueWeight.' '.measuring_units_string($object->weight_units, 'weight'), - $array_key.'_width'=>$object->trueWidth.' '.measuring_units_string($object->width_units, 'size'), - $array_key.'_height'=>$object->trueHeight.' '.measuring_units_string($object->height_units, 'size'), - $array_key.'_depth'=>$object->trueDepth.' '.measuring_units_string($object->depth_units, 'size'), - $array_key.'_size'=>$calculatedVolume.' '.measuring_units_string(0, 'volume'), + $array_key.'_weight'=>$object->trueWeight.' '.measuringUnitString(0, 'weight', $object->weight_units), + $array_key.'_width'=>$object->trueWidth.' '.measuringUnitString(0, 'size', $object->width_units), + $array_key.'_height'=>$object->trueHeight.' '.measuringUnitString(0, 'size', $object->height_units), + $array_key.'_depth'=>$object->trueDepth.' '.measuringUnitString(0, 'size', $object->depth_units), + $array_key.'_size'=>$calculatedVolume.' '.measuringUnitString(0, 'volume'), ); // Add vat by rates @@ -701,10 +724,10 @@ abstract class CommonDocGenerator 'line_price_ht'=>price($line->total_ht), 'line_price_ttc'=>price($line->total_ttc), 'line_price_vat'=>price($line->total_tva), - 'line_weight'=>empty($line->weight) ? '' : $line->weight*$line->qty_shipped.' '.measuring_units_string($line->weight_units, 'weight'), - 'line_length'=>empty($line->length) ? '' : $line->length*$line->qty_shipped.' '.measuring_units_string($line->length_units, 'size'), - 'line_surface'=>empty($line->surface) ? '' : $line->surface*$line->qty_shipped.' '.measuring_units_string($line->surface_units, 'surface'), - 'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuring_units_string($line->volume_units, 'volume'), + 'line_weight'=>empty($line->weight) ? '' : $line->weight*$line->qty_shipped.' '.measuringUnitString(0, 'weight', $line->weight_units), + 'line_length'=>empty($line->length) ? '' : $line->length*$line->qty_shipped.' '.measuringUnitString(0, 'size', $line->length_units), + 'line_surface'=>empty($line->surface) ? '' : $line->surface*$line->qty_shipped.' '.measuringUnitString(0, 'surface', $line->surface_units), + 'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuringUnitString(0, 'volume', $line->volume_units), ); // Retrieve extrafields @@ -723,7 +746,7 @@ abstract class CommonDocGenerator // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Define array with couple subtitution key => subtitution value + * Define array with couple substitution key => substitution value * * @param Object $object Dolibarr Object * @param Translate $outputlangs Language object for output @@ -765,30 +788,30 @@ abstract class CommonDocGenerator { // phpcs:enable global $conf; - foreach($extrafields->attribute_label as $key=>$label) + foreach($extrafields->attributes[$object->table_element]['label'] as $key=>$label) { - if($extrafields->attribute_type[$key] == 'price') + if($extrafields->attributes[$object->table_element]['type'][$key] == 'price') { $object->array_options['options_'.$key] = price2num($object->array_options['options_'.$key]); $object->array_options['options_'.$key.'_currency'] = price($object->array_options['options_'.$key], 0, $outputlangs, 0, 0, -1, $conf->currency); //Add value to store price with currency $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); } - elseif($extrafields->attribute_type[$key] == 'select') + elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'select') { - $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; + $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; } - elseif($extrafields->attribute_type[$key] == 'checkbox') { + elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { $valArray=explode(',', $object->array_options['options_'.$key]); $output=array(); - foreach($extrafields->attribute_param[$key]['options'] as $keyopt=>$valopt) { + foreach($extrafields->attributes[$object->table_element]['param'][$key]['options'] as $keyopt=>$valopt) { if (in_array($keyopt, $valArray)) { $output[]=$valopt; } } $object->array_options['options_'.$key] = implode(', ', $output); } - elseif($extrafields->attribute_type[$key] == 'date') + elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'date') { if (strlen($object->array_options['options_'.$key])>0) { @@ -806,7 +829,7 @@ abstract class CommonDocGenerator $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - elseif($extrafields->attribute_type[$key] == 'datetime') + elseif($extrafields->attributes[$object->table_element]['label'][$key] == 'datetime') { $datetime = $object->array_options['options_'.$key]; $object->array_options['options_'.$key] = ($datetime!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key], 'dayhour'):''); // using company output language @@ -815,12 +838,12 @@ abstract class CommonDocGenerator $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - elseif($extrafields->attribute_type[$key] == 'link') + elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'link') { $id = $object->array_options['options_'.$key]; if ($id != "") { - $param = $extrafields->attribute_param[$key]; + $param = $extrafields->attributes[$object->table_element]['param'][$key]; $param_list=array_keys($param['options']); // $param_list='ObjectName:classPath' $InfoFieldList = explode(":", $param_list[0]); $classname=$InfoFieldList[0]; @@ -868,7 +891,7 @@ abstract class CommonDocGenerator /** - * uasort callback function to Sort colums fields + * uasort callback function to Sort columns fields * * @param array $a PDF lines array fields configs * @param array $b PDF lines array fields configs @@ -907,7 +930,7 @@ abstract class CommonDocGenerator // Positionning $curX = $this->page_largeur-$this->marge_droite; // start from right - // Array witdh + // Array width $arrayWidth = $this->page_largeur-$this->marge_droite-$this->marge_gauche; // Count flexible column @@ -915,10 +938,10 @@ abstract class CommonDocGenerator $countFlexCol = 0; foreach ($this->cols as $colKey =>& $colDef) { - if(!$this->getColumnStatus($colKey)) continue; // continue if desable + if(!$this->getColumnStatus($colKey)) continue; // continue if disabled if(!empty($colDef['scale'])){ - // In case of column widht is defined by percentage + // In case of column width is defined by percentage $colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100); } @@ -1103,7 +1126,6 @@ abstract class CommonDocGenerator global $hookmanager; foreach ($this->cols as $colKey => $colDef) { - $parameters = array( 'colKey' => $colKey, 'pdf' => $pdf, diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index eb53e327e93..b6381ccc7ca 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -154,7 +154,7 @@ abstract class CommonInvoice extends CommonObject if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') { // TODO - return 0; + return 0; } require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; @@ -219,9 +219,9 @@ abstract class CommonInvoice extends CommonObject } /** - * Renvoie tableau des ids de facture avoir issus de la facture + * Returns array of credit note ids from the invoice * - * @return array Tableau d'id de factures avoirs + * @return array Array of credit note ids */ public function getListIdAvoirFromInvoice() { @@ -251,10 +251,10 @@ abstract class CommonInvoice extends CommonObject } /** - * Renvoie l'id de la facture qui la remplace + * Returns the id of the invoice that replaces it * - * @param string $option filtre sur statut ('', 'validated', ...) - * @return int <0 si KO, 0 si aucune facture ne remplace, id facture sinon + * @param string $option status filter ('', 'validated', ...) + * @return int <0 si KO, 0 if no invoice replaces it, id of invoice otherwise */ public function getIdReplacingInvoice($option = '') { @@ -264,10 +264,10 @@ abstract class CommonInvoice extends CommonObject $sql.= ' AND type < 2'; if ($option == 'validated') $sql.= ' AND fk_statut = 1'; // PROTECTION BAD DATA - // Au cas ou base corrompue et qu'il y a une facture de remplacement validee - // et une autre non, on donne priorite a la validee. - // Ne devrait pas arriver (sauf si acces concurrentiel et que 2 personnes - // ont cree en meme temps une facture de remplacement pour la meme facture) + // In case the database is corrupted and there is a valid replectement invoice + // and another no, priority is given to the valid one. + // Should not happen (unless concurrent access and 2 people have created a + // replacement invoice for the same invoice at the same time) $sql.= ' ORDER BY fk_statut DESC'; $resql=$this->db->query($sql); @@ -276,12 +276,12 @@ abstract class CommonInvoice extends CommonObject $obj = $this->db->fetch_object($resql); if ($obj) { - // Si il y en a + // If there is any return $obj->rowid; } else { - // Si aucune facture ne remplace + // If no invoice replaces it return 0; } } @@ -496,27 +496,27 @@ abstract class CommonInvoice extends CommonObject $prefix='Short'; if (! $paye){ if ($status == 0) { - $labelstatut = $langs->trans('BillStatusDraft'); - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusDraft'); + $labelStatus = $langs->trans('BillStatusDraft'); + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusDraft'); } elseif (($status == 3 || $status == 2) && $alreadypaid <= 0) { - $labelstatut = $langs->trans('BillStatusClosedUnpaid'); - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid'); + $labelStatus = $langs->trans('BillStatusClosedUnpaid'); + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid'); $statusType='status5'; } elseif (($status == 3 || $status == 2) && $alreadypaid > 0) { - $labelstatut = $langs->trans('BillStatusClosedPaidPartially'); - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially'); + $labelStatus = $langs->trans('BillStatusClosedPaidPartially'); + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially'); $statusType='status9'; } elseif ($alreadypaid <= 0) { - $labelstatut = $langs->trans('BillStatusNotPaid'); - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusNotPaid'); + $labelStatus = $langs->trans('BillStatusNotPaid'); + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusNotPaid'); $statusType='status1'; } else { - $labelstatut = $langs->trans('BillStatusStarted'); - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusStarted'); + $labelStatus = $langs->trans('BillStatusStarted'); + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusStarted'); $statusType='status3'; } } @@ -525,27 +525,26 @@ abstract class CommonInvoice extends CommonObject $statusType='status6'; if ($type == self::TYPE_CREDIT_NOTE){ - $labelstatut = $langs->trans('BillStatusPaidBackOrConverted'); // credit note - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); // credit note + $labelStatus = $langs->trans('BillStatusPaidBackOrConverted'); // credit note + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); // credit note } elseif ($type == self::TYPE_DEPOSIT){ - $labelstatut = $langs->trans('BillStatusConverted'); // deposit invoice - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusConverted'); // deposit invoice + $labelStatus = $langs->trans('BillStatusConverted'); // deposit invoice + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusConverted'); // deposit invoice } else{ - $labelstatut = $langs->trans('BillStatusPaid'); - $labelstatutShort = $langs->trans('Bill'.$prefix.'StatusPaid'); + $labelStatus = $langs->trans('BillStatusPaid'); + $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusPaid'); } } - - return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode); + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoi une date limite de reglement de facture en fonction des - * conditions de reglements de la facture et date de facturation. + * Returns an invoice payment deadline based on the invoice settlement + * conditions and billing date. * * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. * @return integer Date limite de reglement si ok, <0 si ko @@ -589,14 +588,14 @@ abstract class CommonInvoice extends CommonObject /* Definition de la date limite */ - // 0 : ajout du nombre de jours + // 0 : adding the number of days if ($cdr_type == 0) { $datelim = $this->date + ($cdr_nbjour * 3600 * 24); $datelim += ($cdr_decalage * 3600 * 24); } - // 1 : application de la regle "fin de mois" + // 1 : application of the "end of the month" rule elseif ($cdr_type == 1) { $datelim = $this->date + ($cdr_nbjour * 3600 * 24); @@ -612,13 +611,13 @@ abstract class CommonInvoice extends CommonObject { $mois += 1; } - // On se deplace au debut du mois suivant, et on retire un jour + // We move at the beginning of the next month, and we take a day off $datelim=dol_mktime(12, 0, 0, $mois, 1, $annee); $datelim -= (3600 * 24); $datelim += ($cdr_decalage * 3600 * 24); } - // 2 : application de la règle, le N du mois courant ou suivant + // 2 : application of the rule, the N of the current or next month elseif ($cdr_type == 2 && !empty($cdr_decalage)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -733,7 +732,7 @@ abstract class CommonInvoiceLine extends CommonObjectLine public $total_ttc; /** - * Liste d'options cumulables: + * List of cumulative options: * Bit 0: 0 si TVA normal - 1 si TVA NPR * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) * @var int diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bc1e93314ec..913a87dd7f9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -12,7 +12,7 @@ * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017-2019 Nicolas ZABOURI * Copyright (C) 2017 Rui Strecht - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2018 Josep Lluís Amador * * This program is free software; you can redistribute it and/or modify @@ -421,7 +421,12 @@ abstract class CommonObject public $civility_id; // Dates - public $date_creation; // Date creation + /** + * @var integer|string date_creation + */ + public $date_creation; + + public $date_validation; // Date validation public $date_modification; // Date last change (tms field) @@ -687,16 +692,23 @@ abstract class CommonObject $out.='
'; if (! empty($conf->socialnetworks->enabled)) { - if ($this->skype) $out.=dol_print_socialnetworks($this->skype, $this->id, $object->id, 'skype'); - $outdone++; - if ($this->jabberid) $out.=dol_print_socialnetworks($this->jabberid, $this->id, $object->id, 'jabber'); - $outdone++; - if ($this->twitter) $out.=dol_print_socialnetworks($this->twitter, $this->id, $object->id, 'twitter'); - $outdone++; - if ($this->facebook) $out.=dol_print_socialnetworks($this->facebook, $this->id, $object->id, 'facebook'); - $outdone++; - if ($this->linkedin) $out.=dol_print_socialnetworks($this->linkedin, $this->id, $object->id, 'linkedin'); - $outdone++; + if (is_array($this->socialnetworks) && count($this->socialnetworks)>0) { + foreach ($this->socialnetworks as $key => $value) { + $out.=dol_print_socialnetworks($value, $this->id, $object->id, $key); + $outdone++; + } + } else { + if ($this->skype) $out.=dol_print_socialnetworks($this->skype, $this->id, $object->id, 'skype'); + $outdone++; + if ($this->jabberid) $out.=dol_print_socialnetworks($this->jabberid, $this->id, $object->id, 'jabber'); + $outdone++; + if ($this->twitter) $out.=dol_print_socialnetworks($this->twitter, $this->id, $object->id, 'twitter'); + $outdone++; + if ($this->facebook) $out.=dol_print_socialnetworks($this->facebook, $this->id, $object->id, 'facebook'); + $outdone++; + if ($this->linkedin) $out.=dol_print_socialnetworks($this->linkedin, $this->id, $object->id, 'linkedin'); + $outdone++; + } } $out.='
'; @@ -878,7 +890,6 @@ abstract class CommonObject } if(!$already_added) { - $this->db->begin(); // Insert into database @@ -1058,13 +1069,13 @@ abstract class CommonObject /** * Get array of all contacts for an object * - * @param int $statut Status of links to get (-1=all) + * @param int $status Status of links to get (-1=all) * @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user) * @param int $list 0:Return array contains all properties, 1:Return array contains just id * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @return array|int Array of contacts, -1 if error */ - public function liste_contact($statut = -1, $source = 'external', $list = 0, $code = '') + public function liste_contact($status = -1, $source = 'external', $list = 0, $code = '') { // phpcs:enable global $langs; @@ -1087,7 +1098,7 @@ abstract class CommonObject if ($source == 'internal') $sql.= " AND tc.source = 'internal'"; if ($source == 'external' || $source == 'thirdparty') $sql.= " AND tc.source = 'external'"; $sql.= " AND tc.active=1"; - if ($statut >= 0) $sql.= " AND ec.statut = '".$statut."'"; + if ($status >= 0) $sql.= " AND ec.statut = ".$status; $sql.=" ORDER BY t.lastname ASC"; dol_syslog(get_class($this)."::liste_contact", LOG_DEBUG); @@ -1742,7 +1753,7 @@ abstract class CommonObject // Security on socid $socid = 0; - if ($user->societe_id > 0) $socid = $user->societe_id; + if ($user->socid > 0) $socid = $user->socid; // this->ismultientitymanaged contains // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -1883,13 +1894,19 @@ abstract class CommonObject } $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - if ($this->table_element == 'actioncomm') + if (! empty($this->fields['fk_project'])) // Common case + { + if ($projectid) $sql.= ' SET fk_project = '.$projectid; + else $sql.= ' SET fk_project = NULL'; + $sql.= ' WHERE rowid = '.$this->id; + } + elseif ($this->table_element == 'actioncomm') // Special case for actioncomm { if ($projectid) $sql.= ' SET fk_project = '.$projectid; else $sql.= ' SET fk_project = NULL'; $sql.= ' WHERE id = '.$this->id; } - else + else // Special case for old architecture objects { if ($projectid) $sql.= ' SET fk_projet = '.$projectid; else $sql.= ' SET fk_projet = NULL'; @@ -2572,8 +2589,7 @@ abstract class CommonObject public function updateRangOfLine($rowid, $rang) { $fieldposition = 'rang'; // @TODO Rename 'rang' into 'position' - if (in_array($this->table_element_line, array('ecm_files', 'emailcollector_emailcollectoraction'))) $fieldposition = 'position'; - if (in_array($this->table_element_line, array('bom_bomline'))) $fieldposition = 'position'; + if (in_array($this->table_element_line, array('bom_bomline', 'ecm_files', 'emailcollector_emailcollectoraction'))) $fieldposition = 'position'; $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET '.$fieldposition.' = '.$rang; $sql.= ' WHERE rowid = '.$rowid; @@ -2879,11 +2895,11 @@ abstract class CommonObject $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_PROPOSAL"; elseif ($this->element == 'commande' || $this->element == 'order') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_ORDER"; - elseif ($this->element == 'facture') + elseif ($this->element == 'facture' || $this->element == 'invoice') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_INVOICE"; - elseif ($this->element == 'facture_fourn') + elseif ($this->element == 'facture_fourn' || $this->element == 'supplier_invoice') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_INVOICE"; - elseif ($this->element == 'order_supplier') + elseif ($this->element == 'order_supplier' || $this->element == 'supplier_order') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_ORDER"; elseif ($this->element == 'supplier_proposal') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_PROPOSAL"; @@ -3819,17 +3835,18 @@ abstract class CommonObject $totalWeight += $weight * $qty * $trueWeightUnit; } else { - if ($weight_units == 99) { - // conversion 1 Pound = 0.45359237 KG - $trueWeightUnit = 0.45359237; - $totalWeight += $weight * $qty * $trueWeightUnit; - } elseif ($weight_units == 98) { - // conversion 1 Ounce = 0.0283495 KG - $trueWeightUnit = 0.0283495; - $totalWeight += $weight * $qty * $trueWeightUnit; - } - else + if ($weight_units == 99) { + // conversion 1 Pound = 0.45359237 KG + $trueWeightUnit = 0.45359237; + $totalWeight += $weight * $qty * $trueWeightUnit; + } elseif ($weight_units == 98) { + // conversion 1 Ounce = 0.0283495 KG + $trueWeightUnit = 0.0283495; + $totalWeight += $weight * $qty * $trueWeightUnit; + } + else { $totalWeight += $weight * $qty; // This may be wrong if we mix different units + } } if ($volume_units < 50) // >50 means a standard unit (power of 10 of official unit), > 50 means an exotic unit (like inch) { @@ -4600,259 +4617,258 @@ abstract class CommonObject */ protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null) { - global $conf, $langs, $user, $hookmanager; + global $conf, $langs, $user, $hookmanager, $action; $srctemplatepath=''; $parameters = array('modelspath'=>$modelspath,'modele'=>$modele,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'hidedesc'=>$hidedesc,'hideref'=>$hideref, 'moreparams'=>$moreparams); $reshook = $hookmanager->executeHooks('commonGenerateDocument', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if(empty($reshook)) + if (empty($reshook)) { - dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null')); + dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null')); - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); + // Increase limit for PDF build + $err=error_reporting(); + error_reporting(0); + @set_time_limit(120); + error_reporting($err); - // If selected model is a filename template (then $modele="modelname" or "modelname:filename") - $tmp=explode(':', $modele, 2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + // If selected model is a filename template (then $modele="modelname" or "modelname:filename") + $tmp=explode(':', $modele, 2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels, $conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - if (in_array(get_class($this), array('Adherent'))) $file = $prefix."_".$modele.".class.php"; // Member module use prefix_module.class.php - else $file = $prefix."_".$modele.".modules.php"; + // Search template files + $file=''; + $classname=''; + $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels, $conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + if (in_array(get_class($this), array('Adherent'))) $file = $prefix."_".$modele.".class.php"; // Member module use prefix_module.class.php + else $file = $prefix."_".$modele.".modules.php"; - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir.$modelspath.$file, 0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir.$modelspath.$file, 0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } - // If generator was found - if ($filefound) - { - global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. + // If generator was found + if ($filefound) + { + global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. - require_once $file; + require_once $file; - $obj = new $classname($this->db); + $obj = new $classname($this->db); - // If generator is ODT, we must have srctemplatepath defined, if not we set it. - if ($obj->type == 'odt' && empty($srctemplatepath)) - { - $varfortemplatedir=$obj->scandir; - if ($varfortemplatedir && ! empty($conf->global->$varfortemplatedir)) - { - $dirtoscan=$conf->global->$varfortemplatedir; + // If generator is ODT, we must have srctemplatepath defined, if not we set it. + if ($obj->type == 'odt' && empty($srctemplatepath)) + { + $varfortemplatedir=$obj->scandir; + if ($varfortemplatedir && ! empty($conf->global->$varfortemplatedir)) + { + $dirtoscan=$conf->global->$varfortemplatedir; - $listoffiles=array(); + $listoffiles=array(); - // Now we add first model found in directories scanned - $listofdir=explode(',', $dirtoscan); - foreach($listofdir as $key => $tmpdir) - { - $tmpdir=trim($tmpdir); - $tmpdir=preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); - if (! $tmpdir) { unset($listofdir[$key]); continue; } - if (is_dir($tmpdir)) - { - $tmpfiles=dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0); - if (count($tmpfiles)) $listoffiles=array_merge($listoffiles, $tmpfiles); - } - } + // Now we add first model found in directories scanned + $listofdir=explode(',', $dirtoscan); + foreach($listofdir as $key => $tmpdir) + { + $tmpdir=trim($tmpdir); + $tmpdir=preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); + if (! $tmpdir) { unset($listofdir[$key]); continue; } + if (is_dir($tmpdir)) + { + $tmpfiles=dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0); + if (count($tmpfiles)) $listoffiles=array_merge($listoffiles, $tmpfiles); + } + } - if (count($listoffiles)) - { - foreach($listoffiles as $record) - { - $srctemplatepath=$record['fullname']; - break; - } - } - } + if (count($listoffiles)) + { + foreach($listoffiles as $record) + { + $srctemplatepath=$record['fullname']; + break; + } + } + } - if (empty($srctemplatepath)) - { - $this->error='ErrorGenerationAskedForOdtTemplateWithSrcFileNotDefined'; - return -1; - } - } + if (empty($srctemplatepath)) + { + $this->error='ErrorGenerationAskedForOdtTemplateWithSrcFileNotDefined'; + return -1; + } + } - if ($obj->type == 'odt' && ! empty($srctemplatepath)) - { - if (! dol_is_file($srctemplatepath)) - { - $this->error='ErrorGenerationAskedForOdtTemplateWithSrcFileNotFound'; - return -1; - } - } + if ($obj->type == 'odt' && ! empty($srctemplatepath)) + { + if (! dol_is_file($srctemplatepath)) + { + $this->error='ErrorGenerationAskedForOdtTemplateWithSrcFileNotFound'; + return -1; + } + } - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; - if (in_array(get_class($this), array('Adherent'))) - { - $arrayofrecords = array(); // The write_file of templates of adherent class need this var - $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, $moreparams); - } - else - { - $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $moreparams); - } - // After call of write_file $obj->result['fullpath'] is set with generated file. It will be used to update the ECM database index. + if (in_array(get_class($this), array('Adherent'))) + { + $arrayofrecords = array(); // The write_file of templates of adherent class need this var + $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, $moreparams); + } + else + { + $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $moreparams); + } + // After call of write_file $obj->result['fullpath'] is set with generated file. It will be used to update the ECM database index. - if ($resultwritefile > 0) - { - $outputlangs->charset_output=$sav_charset_output; + if ($resultwritefile > 0) + { + $outputlangs->charset_output=$sav_charset_output; - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); - // Index file in database - if (! empty($obj->result['fullpath'])) - { - $destfull = $obj->result['fullpath']; - $upload_dir = dirname($destfull); - $destfile = basename($destfull); - $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir); + // Index file in database + if (! empty($obj->result['fullpath'])) + { + $destfull = $obj->result['fullpath']; + $upload_dir = dirname($destfull); + $destfile = basename($destfull); + $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir); - if (! preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) // If not a tmp dir - { - $filename = basename($destfile); - $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); - $rel_dir = preg_replace('/^[\\/]/', '', $rel_dir); + if (! preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) // If not a tmp dir + { + $filename = basename($destfile); + $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); + $rel_dir = preg_replace('/^[\\/]/', '', $rel_dir); - include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; - $ecmfile=new EcmFiles($this->db); - $result = $ecmfile->fetch(0, '', ($rel_dir?$rel_dir.'/':'').$filename); + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile=new EcmFiles($this->db); + $result = $ecmfile->fetch(0, '', ($rel_dir?$rel_dir.'/':'').$filename); - // Set the public "share" key - $setsharekey = false; - if ($this->element == 'propal') - { - $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok - if ($useonlinesignature) $setsharekey=true; - if (! empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; - } - if ($this->element == 'commande' && ! empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey=true; - } - if ($this->element == 'facture' && ! empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey=true; - } - if ($this->element == 'bank_account' && ! empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey=true; - } + // Set the public "share" key + $setsharekey = false; + if ($this->element == 'propal') + { + $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok + if ($useonlinesignature) $setsharekey=true; + if (! empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true; + } + if ($this->element == 'commande' && ! empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey=true; + } + if ($this->element == 'facture' && ! empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey=true; + } + if ($this->element == 'bank_account' && ! empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey=true; + } - if ($setsharekey) - { - if (empty($ecmfile->share)) // Because object not found or share not set yet - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $ecmfile->share = getRandomPassword(true); - } - } + if ($setsharekey) { + if (empty($ecmfile->share)) // Because object not found or share not set yet + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + $ecmfile->share = getRandomPassword(true); + } + } - if ($result > 0) - { - $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content - $ecmfile->fullpath_orig = ''; - $ecmfile->gen_or_uploaded = 'generated'; - $ecmfile->description = ''; // indexed content - $ecmfile->keyword = ''; // keyword content - $result = $ecmfile->update($user); - if ($result < 0) - { - setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); - } - } - else - { - $ecmfile->entity = $conf->entity; - $ecmfile->filepath = $rel_dir; - $ecmfile->filename = $filename; - $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content - $ecmfile->fullpath_orig = ''; - $ecmfile->gen_or_uploaded = 'generated'; - $ecmfile->description = ''; // indexed content - $ecmfile->keyword = ''; // keyword content - $ecmfile->src_object_type = $this->table_element; - $ecmfile->src_object_id = $this->id; + if ($result > 0) + { + $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content + $ecmfile->fullpath_orig = ''; + $ecmfile->gen_or_uploaded = 'generated'; + $ecmfile->description = ''; // indexed content + $ecmfile->keyword = ''; // keyword content + $result = $ecmfile->update($user); + if ($result < 0) { + setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); + } + } + else + { + $ecmfile->entity = $conf->entity; + $ecmfile->filepath = $rel_dir; + $ecmfile->filename = $filename; + $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content + $ecmfile->fullpath_orig = ''; + $ecmfile->gen_or_uploaded = 'generated'; + $ecmfile->description = ''; // indexed content + $ecmfile->keyword = ''; // keyword content + $ecmfile->src_object_type = $this->table_element; + $ecmfile->src_object_id = $this->id; - $result = $ecmfile->create($user); - if ($result < 0) - { - setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); - } - } + $result = $ecmfile->create($user); + if ($result < 0) { + setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); + } + } - /*$this->result['fullname']=$destfull; - $this->result['filepath']=$ecmfile->filepath; - $this->result['filename']=$ecmfile->filename;*/ - //var_dump($obj->update_main_doc_field);exit; + /*$this->result['fullname']=$destfull; + $this->result['filepath']=$ecmfile->filepath; + $this->result['filename']=$ecmfile->filename;*/ + //var_dump($obj->update_main_doc_field);exit; - // Update the last_main_doc field into main object (if documenent generator has property ->update_main_doc_field set) - $update_main_doc_field=0; - if (! empty($obj->update_main_doc_field)) $update_main_doc_field=1; - if ($update_main_doc_field && ! empty($this->table_element)) - { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; - $sql.= ' WHERE rowid = '.$this->id; + // Update the last_main_doc field into main object (if documenent generator has property ->update_main_doc_field set) + $update_main_doc_field=0; + if (! empty($obj->update_main_doc_field)) $update_main_doc_field=1; + if ($update_main_doc_field && ! empty($this->table_element)) + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; + $sql.= ' WHERE rowid = '.$this->id; - $resql = $this->db->query($sql); - if (! $resql) dol_print_error($this->db); - else - { - $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; - } - } - } - } - else - { - dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING); - } + $resql = $this->db->query($sql); + if (! $resql) { + dol_print_error($this->db); + } else { + $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; + } + } + } + } + else + { + dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING); + } - // Success in building document. We build meta file. - dol_meta_create($this); + // Success in building document. We build meta file. + dol_meta_create($this); - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors); - return -1; - } - } - else - { - $this->error=$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $file); - dol_print_error('', $this->error); - return -1; - } + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors); + return -1; + } + } + else + { + $this->error=$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $file); + dol_print_error('', $this->error); + return -1; + } } else return $reshook; } @@ -5558,16 +5574,20 @@ abstract class CommonObject $type=''; $param = array(); $param['options']=array(); - $size =$this->fields[$key]['size']; + $reg=array(); + $size = $this->fields[$key]['size']; // Because we work on extrafields - if(preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)){ - $param['options']=array($reg[1].':'.$reg[2]=>'N'); - $type ='link'; - } elseif(preg_match('/^link:(.*):(.*)/i', $val['type'], $reg)) { - $param['options']=array($reg[1].':'.$reg[2]=>'N'); + if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)){ + $param['options']=array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); + $type ='link'; + } elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)){ + $param['options']=array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type ='link'; + } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)){ + $param['options']=array($reg[2].':'.$reg[3] => 'N'); $type ='link'; } elseif(preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options']=array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4]=>'N'); + $param['options']=array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); $type ='sellist'; } elseif(preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) { $param['options']=array(); @@ -5616,7 +5636,7 @@ abstract class CommonObject { $morecss = 'minwidth100imp'; } - elseif ($type == 'datetime') + elseif ($type == 'datetime' || $type == 'link') { $morecss = 'minwidth200imp'; } @@ -5978,7 +5998,6 @@ abstract class CommonObject $sql = 'SELECT ' . $keyList; $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList[0]; if (! empty($InfoFieldList[4])) { - // can use SELECT request if (strpos($InfoFieldList[4], '$SEL$')!==false) { $InfoFieldList[4]=str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); @@ -6055,18 +6074,19 @@ abstract class CommonObject $labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18); } } - if (empty($labeltoshow)) + if (empty($labeltoshow)) { $labeltoshow = '(not defined)'; + } - if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) { - $data[$obj->rowid]=$labeltoshow; - } - - if (! empty($InfoFieldList[3]) && $parentField) { - $parent = $parentName . ':' . $obj->{$parentField}; - } - + if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) { $data[$obj->rowid]=$labeltoshow; + } + + if (! empty($InfoFieldList[3]) && $parentField) { + $parent = $parentName . ':' . $obj->{$parentField}; + } + + $data[$obj->rowid]=$labeltoshow; } $i ++; @@ -6081,16 +6101,26 @@ abstract class CommonObject } elseif ($type == 'link') { - $param_list=array_keys($param['options']); // $param_list='ObjectName:classPath' + $param_list=array_keys($param['options']); // $param_list='ObjectName:classPath[:AddCreateButtonOrNot[:Filter]]' + $param_list_array = explode(':', $param_list[0]); $showempty=(($required && $default != '')?0:1); - $out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty); - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) + + $out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, empty($val['disabled'])?0:1); + + if (! empty($param_list_array[2])) // If we set to add a create button { - list($class,$classfile)=explode(':', $param_list[0]); - if (file_exists(dol_buildpath(dirname(dirname($classfile)).'/card.php'))) $url_path=dol_buildpath(dirname(dirname($classfile)).'/card.php', 1); - else $url_path=dol_buildpath(dirname(dirname($classfile)).'/'.$class.'_card.php', 1); - $out.=''; - // TODO Add Javascript code to add input fields contents to new elements urls + if (! GETPOSTISSET('backtopage') && empty($val['disabled'])) // To avoid to open several infinitely the 'Create Object' button and to avoid to have button if field is protected by a "disabled". + { + list($class,$classfile)=explode(':', $param_list[0]); + if (file_exists(dol_buildpath(dirname(dirname($classfile)).'/card.php'))) $url_path=dol_buildpath(dirname(dirname($classfile)).'/card.php', 1); + else $url_path=dol_buildpath(dirname(dirname($classfile)).'/'.strtolower($class).'_card.php', 1); + $paramforthenewlink = ''; + $paramforthenewlink .= (GETPOSTISSET('action')?'&action='.GETPOST('action', 'aZ09'):''); + $paramforthenewlink .= (GETPOSTISSET('id')?'&id='.GETPOST('id', 'int'):''); + $paramforthenewlink .= '&fk_'.strtolower($class).'=--IDFORBACKTOPAGE--'; + // TODO Add Javascript code to add input fields already filled into $paramforthenewlink so we won't loose them when going back to main page + $out.=''; + } } } elseif ($type == 'password') @@ -6170,6 +6200,7 @@ abstract class CommonObject $label = $val['label']; $type = $val['type']; $size = $val['css']; + $reg = array(); // Convert var to be able to share same code than showOutputField of extrafields if (preg_match('/varchar\((\d+)\)/', $type, $reg)) @@ -6185,7 +6216,9 @@ abstract class CommonObject $computed=$val['computed']; $unique=$val['unique']; $required=$val['required']; - $param=$val['param']; + $param=array(); + $param['options']=array(); + if (is_array($val['arrayofkeyval'])) $param['options'] = $val['arrayofkeyval']; if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) { @@ -6271,18 +6304,12 @@ abstract class CommonObject $value=''; } } - elseif ($type == 'double') + elseif ($type == 'double' || $type == 'real') { if (!empty($value)) { $value=price($value); } } - elseif ($type == 'real') - { - if (!empty($value)) { - $value=price($value); - } - } elseif ($type == 'boolean') { $checked=''; @@ -6440,7 +6467,6 @@ abstract class CommonObject $value = ''; // value was used, so now we reste it to use it to build final output $toprint=array(); while ( $obj = $this->db->fetch_object($resql) ) { - // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|', $InfoFieldList[1]); if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) { @@ -6966,7 +6992,6 @@ abstract class CommonObject $viewfilename = $file; if ($size == 1 || $size == 'small') { // Format vignette - // Find name of thumb file $photo_vignette=basename(getImageFileNameForSize($dir.$file, '_small')); if (! dol_is_file($dirthumb.$photo_vignette)) $photo_vignette=''; @@ -7115,7 +7140,7 @@ abstract class CommonObject * Function test if type is array * * @param array $info content informations of field - * @return bool + * @return bool true if array */ protected function isArray($info) { @@ -7124,42 +7149,26 @@ abstract class CommonObject if(isset($info['type']) && $info['type']=='array') return true; else return false; } - else return false; - } - - /** - * Function test if type is null - * - * @param array $info content informations of field - * @return bool - */ - protected function isNull($info) - { - if(is_array($info)) - { - if(isset($info['type']) && $info['type']=='null') return true; - else return false; - } - else return false; + return false; } /** * Function test if type is date * * @param array $info content informations of field - * @return bool + * @return bool true if date */ public function isDate($info) { if(isset($info['type']) && ($info['type']=='date' || $info['type']=='datetime' || $info['type']=='timestamp')) return true; - else return false; + return false; } /** * Function test if type is integer * * @param array $info content informations of field - * @return bool + * @return bool true if integer */ public function isInt($info) { @@ -7175,7 +7184,7 @@ abstract class CommonObject * Function test if type is float * * @param array $info content informations of field - * @return bool + * @return bool true if float */ public function isFloat($info) { @@ -7184,14 +7193,14 @@ abstract class CommonObject if (isset($info['type']) && (preg_match('/^(double|real|price)/i', $info['type']))) return true; else return false; } - else return false; + return false; } /** * Function test if type is text * * @param array $info content informations of field - * @return bool + * @return bool true if type text */ public function isText($info) { @@ -7200,7 +7209,39 @@ abstract class CommonObject if(isset($info['type']) && $info['type']=='text') return true; else return false; } - else return false; + return false; + } + + /** + * Function test if field can be null + * + * @param array $info content informations of field + * @return bool true if it can be null + */ + protected function canBeNull($info) + { + if(is_array($info)) + { + if(isset($info['notnull']) && $info['notnull']!='1') return true; + else return false; + } + return true; + } + + /** + * Function test if field is forced to null if zero or empty + * + * @param array $info content informations of field + * @return bool true if forced to null + */ + protected function isForcedToNullIfZero($info) + { + if(is_array($info)) + { + if(isset($info['notnull']) && $info['notnull']=='-1') return true; + else return false; + } + return false; } /** @@ -7216,7 +7257,7 @@ abstract class CommonObject if(isset($info['index']) && $info['index']==true) return true; else return false; } - else return false; + return false; } /** @@ -7309,17 +7350,30 @@ abstract class CommonObject elseif($this->isInt($info)) { if ($field == 'rowid') $this->id = (int) $obj->{$field}; - else $this->{$field} = (int) $obj->{$field}; + else + { + if ($this->isForcedToNullIfZero($info)) + { + if (empty($obj->{$field})) $this->{$field} = null; + else $this->{$field} = (double) $obj->{$field}; + } + else + { + $this->{$field} = (int) $obj->{$field}; + } + } } elseif($this->isFloat($info)) { - $this->{$field} = (double) $obj->{$field}; - } - elseif($this->isNull($info)) - { - $val = $obj->{$field}; - // zero is not null - $this->{$field} = (is_null($val) || (empty($val) && $val!==0 && $val!=='0') ? null : $val); + if ($this->isForcedToNullIfZero($info)) + { + if (empty($obj->{$field})) $this->{$field} = null; + else $this->{$field} = (double) $obj->{$field}; + } + else + { + $this->{$field} = (double) $obj->{$field}; + } } else { @@ -7376,8 +7430,9 @@ abstract class CommonObject if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) $fieldvalues['date_creation']=$this->db->idate($now); if (array_key_exists('fk_user_creat', $fieldvalues) && ! ($fieldvalues['fk_user_creat'] > 0)) $fieldvalues['fk_user_creat']=$user->id; unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into insert. + if (array_key_exists('ref', $fieldvalues)) $fieldvalues['ref']=dol_string_nospecial($fieldvalues['ref']); // If field is a ref,we sanitize data - $keys=array(); + $keys = array(); $values = array(); foreach ($fieldvalues as $k => $v) { $keys[$k] = $k; @@ -7433,6 +7488,7 @@ abstract class CommonObject { $sql="UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE ref = '(PROV)' AND rowid = ".$this->id; $resqlupdate = $this->db->query($sql); + if ($resqlupdate===false) { $error++; @@ -7607,8 +7663,9 @@ abstract class CommonObject if (array_key_exists('fk_user_modif', $fieldvalues) && ! ($fieldvalues['fk_user_modif'] > 0)) $fieldvalues['fk_user_modif']=$user->id; unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into update. - $keys=array(); + $keys = array(); $values = array(); + $tmp = array(); foreach ($fieldvalues as $k => $v) { $keys[$k] = $k; $value = $this->fields[$k]; @@ -7834,6 +7891,57 @@ abstract class CommonObject } } + + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $status New status to set (often a constant like self::STATUS_XXX) + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @param string $triggercode Trigger code to use + * @return int <0 if KO, >0 if OK + */ + public function setStatusCommon($user, $status, $notrigger = 0, $triggercode = '') + { + $error=0; + + $this->db->begin(); + + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql.= " SET status = ".$status; + $sql.= " WHERE rowid = ".$this->id; + + if ($this->db->query($sql)) + { + if (! $error) + { + $this->oldcopy= clone $this; + } + + if (! $error && ! $notrigger) { + // Call trigger + $result=$this->call_trigger($triggercode, $user); + if ($result < 0) $error++; + } + + if (!$error) { + $this->status = $status; + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + else + { + $this->error=$this->db->error(); + $this->db->rollback(); + return -1; + } + } + + /** * Initialise object with example values * Id must be 0 if object instance is a specimen @@ -7927,7 +8035,8 @@ abstract class CommonObject if (! $this->db->query($sql)) { - $this->db->rollback();die($sql); + $this->error = $this->db->lasterror(); + $this->db->rollback(); return -1; } diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 6c6b14ee4e4..83450ee6462 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -182,16 +182,16 @@ abstract class CommonStickerGenerator for($i=$x1;$i<=$x2;$i+=$Pointilles+$Pointilles) { for($j=$i;$j<=($i+$Pointilles);$j++) { if($j<=($x2-1)) { - $pdf->Line($j, $y1, $j+1, $y1); // on trace le pointill? du haut, point par point - $pdf->Line($j, $y2, $j+1, $y2); // on trace le pointill? du bas, point par point + $pdf->Line($j, $y1, $j+1, $y1); // on trace le pointill? du haut, point par point + $pdf->Line($j, $y2, $j+1, $y2); // on trace le pointill? du bas, point par point } } } for($i=$y1;$i<=$y2;$i+=$Pointilles+$Pointilles) { for($j=$i;$j<=($i+$Pointilles);$j++) { if($j<=($y2-1)) { - $pdf->Line($x1, $j, $x1, $j+1); // on trace le pointill? du haut, point par point - $pdf->Line($x2, $j, $x2, $j+1); // on trace le pointill? du bas, point par point + $pdf->Line($x1, $j, $x1, $j+1); // on trace le pointill? du haut, point par point + $pdf->Line($x2, $j, $x2, $j+1); // on trace le pointill? du bas, point par point } } } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 535db40e0e4..9ba90d00e62 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -227,10 +227,7 @@ class Conf $filesList = explode(":", $this->global->LOCAL_CONSTS_FILES); foreach ($filesList as $file) { $file=dol_sanitizeFileName($file); - include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php"; - foreach ($file2bddconsts as $key=>$value) { - $this->global->$key=$value; - } + include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php"; // This file can run code like setting $this->global->XXX vars. } } @@ -356,6 +353,12 @@ class Conf $this->propal->dir_output=$rootfordata."/propale"; $this->propal->dir_temp=$rootfordata."/propale/temp"; + // For backward compatibility + $this->banque->multidir_output = array($this->entity => $rootfordata."/bank"); + $this->banque->multidir_temp = array($this->entity => $rootfordata."/bank/temp"); + $this->banque->dir_output=$rootfordata."/bank"; + $this->banque->dir_temp=$rootfordata."/bank/temp"; + // For medias storage $this->medias->multidir_output = array($this->entity => $rootfordata."/medias"); $this->medias->multidir_temp = array($this->entity => $rootfordata."/medias/temp"); @@ -442,7 +445,6 @@ class Conf // Set some default values //$this->global->MAIN_LIST_FILTER_ON_DAY=1; // On filter that show date, we must show input field for day before or after month - $this->global->MAIN_ACTIVATE_HTML5=1; $this->global->MAIN_MAIL_USE_MULTI_PART=1; // societe @@ -669,6 +671,8 @@ class Conf if (! isset($this->global->MAIN_EXTRAFIELDS_IN_ONE_TD)) $this->global->MAIN_EXTRAFIELDS_IN_ONE_TD = 1; + if (! isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0; + if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567'; diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 19588333fcb..cc87a791c0d 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -392,10 +392,10 @@ class CoreObject extends CommonObject */ public function setDate($field, $date) { - if (empty($date)) - { - $this->{$field} = 0; - } + if (empty($date)) + { + $this->{$field} = 0; + } else { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index 5048e74b711..c790d89e407 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -252,7 +252,7 @@ class Ctyperesource $sql .= $this->db->order($sortfield, $sortorder); } if (!empty($limit)) { - $sql .= ' ' . $this->db->plimit($limit, $offset); + $sql .= ' ' . $this->db->plimit($limit, $offset); } $resql = $this->db->query($sql); diff --git a/htdocs/core/class/cunits.class.php b/htdocs/core/class/cunits.class.php index 1837f82a2a4..e37849ff99a 100644 --- a/htdocs/core/class/cunits.class.php +++ b/htdocs/core/class/cunits.class.php @@ -234,8 +234,6 @@ class CUnits // extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); - $records=array(); - $sql = 'SELECT'; $sql.= " t.rowid,"; $sql.= " t.code,"; @@ -249,8 +247,8 @@ class CUnits // extends CommonObject $sqlwhere = array(); if (count($filter) > 0) { foreach ($filter as $key => $value) { - if ($key=='t.rowid' || $key=='t.active') { - $sqlwhere[] = $key . '='. $value; + if ($key=='t.rowid' || $key=='t.active' || $key=='t.scale') { + $sqlwhere[] = $key . '='. (int) $value; } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; @@ -273,6 +271,7 @@ class CUnits // extends CommonObject if (!empty($limit)) { $sql .= ' ' . $this->db->plimit($limit, $offset); } + $resql = $this->db->query($sql); if ($resql) { $this->records=array(); diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index e03aa8c6992..71c0566f352 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -91,13 +91,15 @@ class DiscountAbsolute public $fk_facture; /** - * @var int ID credit note having caused the discount + * @var int ID credit note or deposit used to create the discount */ public $fk_facture_source; + public $ref_facture_source; // Ref credit note or deposit used to create the discount + public $type_facture_source; - public $ref_facture_source; // Ref credit note having caused the discount - - public $ref_invoice_supplier_source; + public $fk_invoice_supplier_source; + public $ref_invoice_supplier_source; // Ref credit note or deposit used to create the discount + public $type_invoice_supplier_source; /** * Constructor @@ -135,11 +137,12 @@ class DiscountAbsolute $sql.= " sr.multicurrency_amount_ht, sr.multicurrency_amount_tva, sr.multicurrency_amount_ttc,"; $sql.= " sr.fk_facture_line, sr.fk_facture, sr.fk_facture_source, sr.fk_invoice_supplier_line, sr.fk_invoice_supplier, sr.fk_invoice_supplier_source, sr.description,"; $sql.= " sr.datec,"; - $sql.= " f.ref as ref_facture_source, fsup.ref as ref_invoice_supplier_source"; + $sql.= " f.ref as ref_facture_source, f.type as type_facture_source,"; + $sql.= " fsup.ref as ref_invoice_supplier_source, fsup.type as type_invoice_supplier_source"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as sr"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON sr.fk_facture_source = f.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fsup ON sr.fk_invoice_supplier_source = fsup.rowid"; - $sql.= " WHERE sr.entity IN (".getEntity('invoice').")"; + $sql.= " WHERE sr.entity IN (".getEntity('invoice').")"; if ($rowid) $sql.= " AND sr.rowid=".$rowid; if ($fk_facture_source) $sql.= " AND sr.fk_facture_source=".$fk_facture_source; if ($fk_invoice_supplier_source) $sql.= " AND sr.fk_invoice_supplier_source=".$fk_invoice_supplier_source; @@ -168,12 +171,14 @@ class DiscountAbsolute $this->fk_user = $obj->fk_user; $this->fk_facture_line = $obj->fk_facture_line; $this->fk_facture = $obj->fk_facture; - $this->fk_facture_source = $obj->fk_facture_source; // Id avoir source - $this->ref_facture_source = $obj->ref_facture_source; // Ref avoir source + $this->fk_facture_source = $obj->fk_facture_source; // Id credit note or deposit source + $this->ref_facture_source = $obj->ref_facture_source; // Ref credit note or deposit source + $this->type_facture_source = $obj->type_facture_source; // Type credit note or deposit source $this->fk_invoice_supplier_line = $obj->fk_invoice_supplier_line; $this->fk_invoice_supplier = $obj->fk_invoice_supplier; - $this->fk_invoice_supplier_source = $obj->fk_invoice_supplier_source; // Id avoir source - $this->ref_invoice_supplier_source = $obj->ref_invoice_supplier_source; // Ref avoir source + $this->fk_invoice_supplier_source = $obj->fk_invoice_supplier_source; // Id credit note or deposit source + $this->ref_invoice_supplier_source = $obj->ref_invoice_supplier_source; // Ref credit note or deposit source + $this->type_invoice_supplier_source = $obj->type_invoice_supplier_source; // Type credit note or deposit source $this->description = $obj->description; $this->datec = $this->db->jdate($obj->datec); @@ -369,7 +374,6 @@ class DiscountAbsolute } } elseif($this->fk_invoice_supplier_source) { - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; $sql.=" set paye=0, fk_statut=1"; $sql.=" WHERE (type = 2 or type = 3) AND rowid=".$this->fk_invoice_supplier_source; @@ -689,7 +693,7 @@ class DiscountAbsolute if ($option == 'invoice') { $facid=! empty($this->discount_type)?$this->fk_invoice_supplier_source:$this->fk_facture_source; $link=! empty($this->discount_type)?'/fourn/facture/card.php':'/compta/facture/card.php'; - $label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source; + $label=$langs->trans("ShowSourceInvoice").': '.$this->ref_facture_source; $link = ''; $linkend=''; $ref=! empty($this->discount_type)?$this->ref_invoice_supplier_source:$this->ref_facture_source; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index cc6172e441a..a0879160727 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -157,7 +157,7 @@ class DolEditor $fullpage=false; if (isset($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT)) { - $disallowAnyContent=empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed or all + $disallowAnyContent=empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed or all } $found=0; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 07554671497..461867041eb 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -944,9 +944,9 @@ class DolGraph if (! empty($this->title)) $this->stringtoshow.='
'.$this->title.'
'; if (! empty($this->shownographyet)) { - $this->stringtoshow.='
'; - $this->stringtoshow.='
'.$langs->trans("NotEnoughDataYet").'
'; - return; + $this->stringtoshow.='
'; + $this->stringtoshow.='
'.$langs->trans("NotEnoughDataYet").'
'; + return; } $this->stringtoshow.='
'."\n"; diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 61f02e0fa83..1d445614981 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -1,6 +1,5 @@ +/* Copyright (C) 2015-2019 Frédéric France * * 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 @@ -38,67 +37,83 @@ * Underline with double line * Emphasized text * Print in white on black - * Print barcode - * Print barcode customer id * Ticket print width of 57mm * Cut ticket completely * Cut ticket partially * Open cash drawer * Activate buzzer - * - * Code which can be placed everywhere + * Print barcode * Print QR Code - * Print date AAAA-MM-DD - * Print date and time AAAA-MM-DD HH:MM:SS - * Print Year - * Print month in letters (example : november) - * Print month number - * Print day number - * Print day number - * Print table number (for restaurant, bar...) - * Print number of cutlery (for restaurant) - * Print payment method * Print logo stored on printer. Example : 32|32 * Print logo stored on printer. Must be followed by logo code. For old printers. - * Print order lines - * Print order total tax - * Print order local tax - * Print order total - * Print order number - * Print order number after validation - * Print customer firstname - * Print customer name - * Print customer mail - * Print customer phone - * Print customer mobile - * Print customer skype - * Print customer VAT number - * Print customer account balance - * Print vendor name - * Print vendor firstname - * Print vendor mail - * Print customer points - * Print number of points for this order + * Print object lines + * Print object total tax + * Print object local tax + * Print object total + * Print payment method * - * Conditional code at line start (if�then Print) - * Print the line IF a customer is affected to the order - * Print the line IF a vendor is affected to the order + * Code which can be placed everywhere + * Replaced by date AAAA-MM-DD + * Replaced by date and time AAAA-MM-DD HH:MM:SS + * Replaced by Year + * Replaced by month in letters (example : november) + * Replaced by month number + * Replaced by day number + * Replaced by day number + * Replaced by table number (for restaurant, bar...) + * Replaced by number of cutlery (for restaurant) + * Replaced by object id + * Replaced by object ref + * Replaced by customer firstname + * Replaced by customer name + * Replaced by customer mail + * Replaced by customer phone + * Replaced by customer mobile + * Replaced by customer skype + * Replaced by customer VAT number + * Replaced by customer account balance + * Replaced by mysoc name + * Replaced by mysoc address + * Replaced by mysoc zip + * Replaced by mysoc town + * Replaced by mysoc country + * Replaced by mysoc idprof1 + * Replaced by mysoc idprof2 + * Replaced by mysoc idprof3 + * Replaced by mysoc idprof4 + * Replaced by mysoc idprof5 + * Replaced by mysoc idprof6 + * Replaced by vendor name + * Replaced by vendor firstname + * Replaced by vendor mail + * Replaced by customer points + * Replaced by number of points for this object + * + * Conditional code at line start (if then Print) + * Print the line IF a customer is affected to the object + * Print the line IF a vendor is affected to the object * Print the line IF Happy Hour - * Print the line IF order is validated + * Print the line IF object is validated * Print the line IF customer points > 0 - * Print the line IF points of the order > 0 + * Print the line IF points of the object > 0 * Print the line IF customer has vat number * Print the line IF customer balance > 0 * */ -require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php'; +require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/autoload.php'; +use Mike42\Escpos\PrintConnectors\FilePrintConnector; +use Mike42\Escpos\PrintConnectors\NetworkPrintConnector; +use Mike42\Escpos\PrintConnectors\WindowsPrintConnector; +use Mike42\Escpos\CapabilityProfile; +use Mike42\Escpos\Printer; +use Mike42\Escpos\EscposImage; /** * Class to manage Receipt Printers */ -class dolReceiptPrinter extends Escpos +class dolReceiptPrinter extends Printer { const CONNECTOR_DUMMY = 1; const CONNECTOR_FILE_PRINT = 2; @@ -111,6 +126,9 @@ class dolReceiptPrinter extends Escpos */ public $db; + /* + * @var string[] array of tags + */ public $tags; public $printer; public $template; @@ -125,8 +143,6 @@ class dolReceiptPrinter extends Escpos */ public $errors = array(); - - /** * Constructor * @@ -136,6 +152,8 @@ class dolReceiptPrinter extends Escpos { $this->db=$db; $this->tags = array( + 'dol_line_feed', + 'dol_line_feed_reverse', 'dol_align_left', 'dol_align_center', 'dol_align_right', @@ -156,51 +174,65 @@ class dolReceiptPrinter extends Escpos '/dol_emphasized', 'dol_switch_colors', '/dol_switch_colors', - 'dol_print_barcode', - 'dol_print_barcode_customer_id', 'dol_set_print_width_57', 'dol_cut_paper_full', 'dol_cut_paper_partial', 'dol_open_drawer', - 'dol_activate_buzzer', + //'dol_activate_buzzer', + 'dol_print_text', 'dol_print_qrcode', - 'dol_print_date', - 'dol_print_date_time', - 'dol_print_year', - 'dol_print_month_letters', - 'dol_print_month', - 'dol_print_day', - 'dol_print_day_letters', - 'dol_print_table', - 'dol_print_cutlery', + 'dol_print_barcode', + 'dol_value_date', + 'dol_value_date_time', + 'dol_value_year', + 'dol_value_month_letters', + 'dol_value_month', + 'dol_value_day', + 'dol_value_day_letters', + 'dol_value_table', + 'dol_value_cutlery', 'dol_print_payment', 'dol_print_logo', 'dol_print_logo_old', - 'dol_print_order_lines', - 'dol_print_order_tax', - 'dol_print_order_local_tax', - 'dol_print_order_total', - 'dol_print_order_number', - 'dol_print_order_number_unique', - 'dol_print_customer_firstname', - 'dol_print_customer_lastname', - 'dol_print_customer_mail', - 'dol_print_customer_phone', - 'dol_print_customer_mobile', - 'dol_print_customer_skype', - 'dol_print_customer_tax_number', - 'dol_print_customer_account_balance', - 'dol_print_vendor_lastname', - 'dol_print_vendor_firstname', - 'dol_print_vendor_mail', - 'dol_print_customer_points', - 'dol_print_order_points', + 'dol_value_object_id', + 'dol_value_object_ref', + 'dol_print_object_lines', + 'dol_print_object_tax', + 'dol_print_object_local_tax', + 'dol_print_object_total', + 'dol_print_object_number', + 'dol_value_customer_firstname', + 'dol_value_customer_lastname', + 'dol_value_customer_mail', + 'dol_value_customer_phone', + 'dol_value_customer_mobile', + 'dol_value_customer_skype', + 'dol_value_customer_tax_number', + 'dol_value_customer_account_balance', + 'dol_value_mysoc_name', + 'dol_value_mysoc_address', + 'dol_value_mysoc_zip', + 'dol_value_mysoc_town', + 'dol_value_mysoc_country', + 'dol_value_mysoc_idprof1', + 'dol_value_mysoc_idprof2', + 'dol_value_mysoc_idprof3', + 'dol_value_mysoc_idprof4', + 'dol_value_mysoc_idprof5', + 'dol_value_mysoc_idprof6', + 'dol_value_mysoc_tva_intra', + 'dol_value_mysoc_capital', + 'dol_value_vendor_lastname', + 'dol_value_vendor_firstname', + 'dol_value_vendor_mail', + 'dol_value_customer_points', + 'dol_value_object_points', 'dol_print_if_customer', 'dol_print_if_vendor', 'dol_print_if_happy_hour', - 'dol_print_if_num_order_unique', + 'dol_print_if_num_object_unique', 'dol_print_if_customer_points', - 'dol_print_if_order_points', + 'dol_print_if_object_points', 'dol_print_if_customer_tax_number', 'dol_print_if_customer_account_balance_positive', ); @@ -319,7 +351,7 @@ class dolReceiptPrinter extends Escpos 1 => $langs->trans('CONNECTOR_DUMMY'), 2 => $langs->trans('CONNECTOR_FILE_PRINT'), 3 => $langs->trans('CONNECTOR_NETWORK_PRINT'), - 4 => $langs->trans('CONNECTOR_WINDOWS_PRINT') + 4 => $langs->trans('CONNECTOR_WINDOWS_PRINT'), ); $this->resprint = Form::selectarray($htmlname, $options, $selected); @@ -344,7 +376,7 @@ class dolReceiptPrinter extends Escpos 1 => $langs->trans('PROFILE_SIMPLE'), 2 => $langs->trans('PROFILE_EPOSTEP'), 3 => $langs->trans('PROFILE_P822D'), - 4 => $langs->trans('PROFILE_STAR') + 4 => $langs->trans('PROFILE_STAR'), ); $this->profileresprint = Form::selectarray($htmlname, $options, $selected); @@ -424,6 +456,29 @@ class dolReceiptPrinter extends Escpos return $error; } + /** + * Function to add a printer template in db + * + * @param string $name Template name + * @param int $template Template + * @return int 0 if OK; >0 if KO + */ + public function addTemplate($name, $template) + { + global $conf; + $error = 0; + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'printer_receipt_template'; + $sql.= ' (name, template, entity) VALUES ("'.$this->db->escape($name).'"'; + $sql.= ', "'.$this->db->escape($template).'", '.$conf->entity.')'; + $resql = $this->db->query($sql); + if (! $resql) { + $error++; + $this->errors[] = $this->db->lasterror; + } + return $error; + } + + /** * Function to Update a printer template in db * @@ -459,16 +514,18 @@ class dolReceiptPrinter extends Escpos { global $conf; $error = 0; - $img = new EscposImage(DOL_DOCUMENT_ROOT .'/theme/common/dolibarr_logo_bw.png'); + $img = EscposImage::load(DOL_DOCUMENT_ROOT .'/theme/common/dolibarr_logo_bw.png'); + //$this->profile = CapabilityProfile::load("TM-T88IV"); $ret = $this->initPrinter($printerid); if ($ret>0) { setEventMessages($this->error, $this->errors, 'errors'); } else { try { - $this->printer->graphics($img); + $this->printer->bitImage($img); $this->printer->text("Hello World!\n"); - $testStr = "Testing 123"; - $this->printer->qrCode($testStr); + $testStr = "1234567890"; + $this->printer->barcode($testStr); + //$this->printer->qrcode($testStr, Printer::QR_ECLEVEL_M, 5, Printer::QR_MODEL_1); $this->printer->text("Most simple example\n"); $this->printer->feed(); $this->printer->cut(); @@ -492,34 +549,48 @@ class dolReceiptPrinter extends Escpos */ public function sendToPrinter($object, $templateid, $printerid) { - global $conf; + global $conf, $mysoc, $langs; $error = 0; $ret = $this->loadTemplate($templateid); - // tags a remplacer par leur valeur avant de parser - $this->template = str_replace('', $object->id, $this->template); - $this->template = str_replace('', $object->customer_firstname, $this->template); - $this->template = str_replace('', $object->customer_lastname, $this->template); - $this->template = str_replace('', $object->customer_mail, $this->template); - $this->template = str_replace('', $object->customer_phone, $this->template); - $this->template = str_replace('', $object->customer_mobile, $this->template); - $this->template = str_replace('', $object->customer_skype, $this->template); - $this->template = str_replace('', $object->customer_tax_number, $this->template); - $this->template = str_replace('', $object->customer_account_balance, $this->template); - $this->template = str_replace('', $object->customer_points, $this->template); - $this->template = str_replace('', $object->order_points, $this->template); - $this->template = str_replace('', $object->vendor_firstname, $this->template); - $this->template = str_replace('', $object->vendor_lastname, $this->template); - $this->template = str_replace('', $object->vendor_mail, $this->template); - $this->template = str_replace('', $object->date, $this->template); - $this->template = str_replace('', $object->date_time, $this->template); - $this->template = str_replace('', $object->date_time, $this->template); - $this->template = str_replace('', $object->date_time, $this->template); - $this->template = str_replace('', $object->date_time, $this->template); - $this->template = str_replace('', $object->date_time, $this->template); - $this->template = str_replace('', $object->date_time, $this->template); - $this->template = str_replace('', $object->table, $this->template); - $this->template = str_replace('', $object->cutlery, $this->template); + // tags a remplacer par leur valeur avant de parser (dol_value_xxx) + $this->template = str_replace('', $object->id, $this->template); + $this->template = str_replace('', $object->ref, $this->template); + $this->template = str_replace('', $object->points, $this->template); + $this->template = str_replace('', $object->customer_firstname, $this->template); + $this->template = str_replace('', $object->customer_lastname, $this->template); + $this->template = str_replace('', $object->customer_mail, $this->template); + $this->template = str_replace('', $object->customer_phone, $this->template); + $this->template = str_replace('', $object->customer_mobile, $this->template); + $this->template = str_replace('', $object->customer_skype, $this->template); + $this->template = str_replace('', $object->customer_tax_number, $this->template); + $this->template = str_replace('', $object->customer_account_balance, $this->template); + $this->template = str_replace('', $object->customer_points, $this->template); + $this->template = str_replace('', $mysoc->name, $this->template); + $this->template = str_replace('', $mysoc->address, $this->template); + $this->template = str_replace('', $mysoc->zip, $this->template); + $this->template = str_replace('', $mysoc->town, $this->template); + $this->template = str_replace('', $mysoc->country, $this->template); + $this->template = str_replace('', $mysoc->idprof1, $this->template); + $this->template = str_replace('', $mysoc->idprof2, $this->template); + $this->template = str_replace('', $mysoc->idprof3, $this->template); + $this->template = str_replace('', $mysoc->idprof4, $this->template); + $this->template = str_replace('', $mysoc->idprof5, $this->template); + $this->template = str_replace('', $mysoc->idprof6, $this->template); + $this->template = str_replace('', $mysoc->tva_intra, $this->template); + $this->template = str_replace('', $mysoc->capital, $this->template); + $this->template = str_replace('', $object->vendor_firstname, $this->template); + $this->template = str_replace('', $object->vendor_lastname, $this->template); + $this->template = str_replace('', $object->vendor_mail, $this->template); + $this->template = str_replace('', $object->date, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->table, $this->template); + $this->template = str_replace('', $object->cutlery, $this->template); // parse template $p = xml_parser_create(); @@ -529,78 +600,119 @@ class dolReceiptPrinter extends Escpos //print '
'.print_r($vals, true).'
'; // print ticket $level = 0; - $html = '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/card-rec.php similarity index 92% rename from htdocs/compta/facture/fiche-rec.php rename to htdocs/compta/facture/card-rec.php index 713d5e9554d..e13693e7411 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -25,7 +25,7 @@ */ /** - * \file htdocs/compta/facture/fiche-rec.php + * \file htdocs/compta/facture/card-rec.php * \ingroup facture * \brief Page to show predefined invoice */ @@ -58,7 +58,7 @@ $contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'invoice $id=(GETPOST('facid', 'int')?GETPOST('facid', 'int'):GETPOST('id', 'int')); $lineid=GETPOST('lineid', 'int'); $ref=GETPOST('ref', 'alpha'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $objecttype = 'facture_rec'; if ($action == "create" || $action == "add") $objecttype = ''; $result = restrictedArea($user, 'facture', $id, $objecttype); @@ -146,15 +146,15 @@ if (empty($reshook)) // Mass actions /*$objectclass='MyObject'; $objectlabel='MyObject'; - $permtoread = $user->rights->mymodule->read; - $permtodelete = $user->rights->mymodule->delete; + $permissiontoread = $user->rights->mymodule->read; + $permissiontodelete = $user->rights->mymodule->delete; $uploaddir = $conf->mymodule->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/ // Create predefined invoice if ($action == 'add') { - if (! GETPOST('titre')) + if (! GETPOST('titre', 'nohtml')) { setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Title")), null, 'errors'); $action = "create"; @@ -162,15 +162,15 @@ if (empty($reshook)) } $frequency=GETPOST('frequency', 'int'); - $reyear=GETPOST('reyear'); - $remonth=GETPOST('remonth'); - $reday=GETPOST('reday'); - $rehour=GETPOST('rehour'); - $remin=GETPOST('remin'); + $reyear=GETPOST('reyear', 'int'); + $remonth=GETPOST('remonth', 'int'); + $reday=GETPOST('reday', 'int'); + $rehour=GETPOST('rehour', 'int'); + $remin=GETPOST('remin', 'int'); $nb_gen_max=GETPOST('nb_gen_max', 'int'); //if (empty($nb_gen_max)) $nb_gen_max =0; - if (GETPOST('frequency')) + if (GETPOST('frequency', 'int')) { if (empty($reyear) || empty($remonth) || empty($reday)) { @@ -188,12 +188,12 @@ if (empty($reshook)) if (! $error) { - $object->titre = GETPOST('titre', 'alpha'); // deprecated - $object->title = GETPOST('titre', 'alpha'); + $object->titre = GETPOST('titre', 'nohtml'); // deprecated + $object->title = GETPOST('titre', 'nohtml'); $object->note_private = GETPOST('note_private', 'none'); $object->note_public = GETPOST('note_public', 'none'); $object->modelpdf = GETPOST('modelpdf', 'alpha'); - $object->usenewprice = GETPOST('usenewprice'); + $object->usenewprice = GETPOST('usenewprice', 'alpha'); $object->frequency = $frequency; $object->unit_frequency = GETPOST('unit_frequency', 'alpha'); @@ -387,6 +387,15 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } + // Multicurrency Code + elseif ($action == 'setmulticurrencycode' && $usercancreate) { + $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); + } + + // Multicurrency rate + elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); + } // Delete line if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer) @@ -990,7 +999,7 @@ if ($action == 'create') if (! empty($conf->projet->enabled)) $rowspan++; if ($object->fk_account > 0) $rowspan++; - print ''; + print '
'; $object->fetch_thirdparty(); @@ -1039,7 +1048,7 @@ if ($action == 'create') print $doleditor->Create(1); // Private note - if (empty($user->societe_id)) + if (empty($user->socid)) { print ''; print '"; -print_liste_field_titre( + print_liste_field_titre( $langs->trans("Product"), $_SERVER["PHP_SELF"], "ref", @@ -340,7 +336,7 @@ print_liste_field_titre( $sortfield, $sortorder ); -print_liste_field_titre( + print_liste_field_titre( $langs->trans('Quantity'), $_SERVER["PHP_SELF"], "qty", @@ -350,7 +346,7 @@ print_liste_field_titre( $sortfield, $sortorder ); -print_liste_field_titre( + print_liste_field_titre( $langs->trans("Percentage"), $_SERVER["PHP_SELF"], "qty", @@ -360,7 +356,7 @@ print_liste_field_titre( $sortfield, $sortorder ); -print_liste_field_titre( + print_liste_field_titre( $langs->trans('AmountHT'), $_SERVER["PHP_SELF"], "amount", @@ -370,7 +366,7 @@ print_liste_field_titre( $sortfield, $sortorder ); -print_liste_field_titre( + print_liste_field_titre( $langs->trans("AmountTTC"), $_SERVER["PHP_SELF"], "amount_ttc", @@ -380,7 +376,7 @@ print_liste_field_titre( $sortfield, $sortorder ); -print_liste_field_titre( + print_liste_field_titre( $langs->trans("Percentage"), $_SERVER["PHP_SELF"], "amount_ttc", @@ -394,7 +390,6 @@ print_liste_field_titre( if (count($name)) { foreach($name as $key=>$value) { - print ''; // Product diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 671a69319cc..286e6aeb29a 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -35,7 +35,7 @@ $langs->load("accountancy"); $socid = GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) $socid = $user->societe_id; +if ($user->socid > 0) $socid = $user->socid; if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user, 'compta', '', '', 'resultat'); if (! empty($conf->accounting->enabled)) $result=restrictedArea($user, 'accounting', '', '', 'comptarapport'); @@ -170,13 +170,9 @@ elseif ($modecompta=="RECETTES-DEPENSES") } elseif ($modecompta=="BOOKKEEPING") { - - } elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { - - } $period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().''.img_next().''; @@ -378,7 +374,6 @@ if (count($amount)) { $i = 0; foreach($arrayforsort as $key => $value) { - print ''; // Third party diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index c3e21b54e4c..68f9e0d9f99 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -57,7 +57,7 @@ if (GETPOST('subcat', 'alpha') === 'yes') { } // Security check -if ($user->societe_id > 0) $socid = $user->societe_id; +if ($user->socid > 0) $socid = $user->socid; if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user, 'compta', '', '', 'resultat'); if (! empty($conf->accounting->enabled)) $result=restrictedArea($user, 'accounting', '', '', 'comptarapport'); @@ -196,13 +196,9 @@ elseif ($modecompta=="RECETTES-DEPENSES") } elseif ($modecompta=="BOOKKEEPING") { - - } elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { - - } $period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().''.img_next().''; @@ -539,7 +535,6 @@ if (count($amount)) { } foreach($arrayforsort as $key=>$value) { - print ''; // Third party diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index cf1f49ae1a8..ac3e800e6e4 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -98,7 +98,7 @@ if (! empty($conf->accounting->enabled)) $modecompta='BOOKKEEPING'; if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta", 'alpha'); // Security check -if ($user->societe_id > 0) $socid = $user->societe_id; +if ($user->socid > 0) $socid = $user->socid; if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user, 'compta', '', '', 'resultat'); if (! empty($conf->accounting->enabled)) $result=restrictedArea($user, 'accounting', '', '', 'comptarapport'); @@ -172,7 +172,7 @@ if ($modecompta == 'CREANCES-DETTES') if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2,5)"; else $sql.= " AND f.type IN (0,1,2,3,5)"; $sql.= " AND f.entity IN (".getEntity('invoice').")"; -if ($socid) $sql.= " AND f.fk_soc = ".$socid; + if ($socid) $sql.= " AND f.fk_soc = ".$socid; } elseif ($modecompta=="RECETTES-DEPENSES") { @@ -187,7 +187,7 @@ elseif ($modecompta=="RECETTES-DEPENSES") $sql.= " WHERE p.rowid = pf.fk_paiement"; $sql.= " AND pf.fk_facture = f.rowid"; $sql.= " AND f.entity IN (".getEntity('invoice').")"; -if ($socid) $sql.= " AND f.fk_soc = ".$socid; + if ($socid) $sql.= " AND f.fk_soc = ".$socid; } elseif ($modecompta=="BOOKKEEPING") { diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index e58fa66acaf..e084dd4fab6 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -40,7 +40,7 @@ if (empty($refund)) $refund=0; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); $object = new Tva($db); @@ -252,7 +252,7 @@ if ($action == 'create') dol_fiche_head(); - print '
'; @@ -1102,7 +1111,7 @@ if ($action == 'create') dol_fiche_head(null, '', '', 0); - print ''; + print '
'; // Frequency + unit print '
'.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')).""; @@ -1242,19 +1251,20 @@ else $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->facture->creer) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); @@ -1275,7 +1285,7 @@ else print '
'; print '
'; - print ''; + print '
'; print '"; @@ -1345,6 +1355,54 @@ else } print ''; + // Multicurrency + if (! empty($conf->multicurrency->enabled)) + { + // Multicurrency code + print ''; + print ''; + + // Multicurrency rate + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) + { + print ''; + print ''; + } + } + // Help of substitution key $dateexample=dol_now(); if (! empty($object->frequency) && ! empty($object->date_when)) $dateexample=$object->date_when; @@ -1456,7 +1514,7 @@ else $title = $langs->trans("Recurrence"); //print load_fiche_titre($title, '', 'calendar'); - print '
'.$langs->trans("Author").''.$author->getFullName($langs)."
'; + print ''; + if ($usercancreate && $action != 'editmulticurrencycode' && ! empty($object->brouillon)) { + print ''; + } + print '
'; + print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + $htmlname = (($usercancreate && $action == 'editmulticurrencycode')?'multicurrency_code':'none'); + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, $htmlname); + print '
'; + print ''; + if ($usercancreate && $action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { + print ''; + } + print '
'; + print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { + if($action == 'actualizemulticurrencyrate') { + list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); + } + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, ($usercancreate?'multicurrency_tx':'none'), $object->multicurrency_code); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); + if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { + print '
        '; + print ''.$langs->trans("ActualizeCurrency").''; + print '
'; + } + } + print '
'; + print '
'; print ''; @@ -1700,11 +1758,11 @@ else { if (empty($object->suspended)) { - print ''; + print ''; } else { - print ''; + print ''; } } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 9467cebde59..10f54e538a2 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -14,7 +14,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014-2019 Ferran Marcet * Copyright (C) 2015-2016 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -130,7 +130,7 @@ $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatede // Security check $fieldid = (! empty($ref) ? 'ref' : 'rowid'); -if ($user->societe_id) $socid = $user->societe_id; +if ($user->socid) $socid = $user->socid; $isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft); @@ -278,8 +278,11 @@ if (empty($reshook)) $action = ''; } } else { - // Si non avoir, le signe doit etre positif - if (empty($conf->global->FACTURE_ENABLE_NEGATIVE) && $object->total_ht < 0) { + // If not a credit note, amount with tax must be positive or nul. + // Note that amount excluding tax can be negative because you can have a invoice of 100 with vat of 20 that + // consumes a credit note of 100 with vat 0 (total with tax is 0 but without tax is -20). + // For some cases, credit notes can have a vat of 0 (for example when selling goods in France). + if (empty($conf->global->FACTURE_ENABLE_NEGATIVE) && $object->total_ttc < 0) { setEventMessages($langs->trans("ErrorInvoiceOfThisTypeMustBePositive"), null, 'errors'); $action = ''; } @@ -806,14 +809,16 @@ if (empty($reshook)) // Total credit note and deposit $total_creditnote_and_deposit = 0; - $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; - $sql .= " re.description, re.fk_facture_source"; - $sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re"; - $sql .= " WHERE fk_facture = " . $object->id; - $resql = $db->query($sql); - if (!empty($resql)) { - while ($obj = $db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc; - } else dol_print_error($db); + $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; + $sql .= " re.description, re.fk_facture_source"; + $sql .= " FROM " . MAIN_DB_PREFIX . "societe_remise_except as re"; + $sql .= " WHERE fk_facture = " . $object->id; + $resql = $db->query($sql); + if (!empty($resql)) { + while ($obj = $db->fetch_object($resql)) { + $total_creditnote_and_deposit += $obj->amount_ttc; + } + } else dol_print_error($db); $discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc; $discount->amount_tva = 0; @@ -1146,7 +1151,7 @@ if (empty($reshook)) } // Standard invoice or Deposit invoice, created from a Predefined template invoice - if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec') > 0) + if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec', 'int') > 0) { $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($dateinvoice)) @@ -1513,7 +1518,7 @@ if (empty($reshook)) $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); - $result = $object->addline( + $result = $object->addline( $desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $localtax1_tx, $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, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, @@ -1656,6 +1661,7 @@ if (empty($reshook)) $object->date_pointoftax = $date_pointoftax; $object->note_public = trim(GETPOST('note_public', 'none')); $object->note = trim(GETPOST('note', 'none')); + $object->note_private = trim(GETPOST('note', 'none')); $object->ref_client = GETPOST('ref_client', 'alpha'); $object->ref_int = GETPOST('ref_int', 'alpha'); $object->modelpdf = GETPOST('model', 'alpha'); @@ -1822,7 +1828,6 @@ if (empty($reshook)) } if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { - $ret = $object->fetch($id); if ($ret < 0) { dol_print_error($db, $object->error); @@ -2327,7 +2332,6 @@ if (empty($reshook)) // Change each progression persent on each lines foreach($object->lines as $line) { - // no traitement for special product if ($line->product_type == 9 ) continue; @@ -2485,7 +2489,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->facture->multidir_output[$object->entity]; - $permissioncreate=$usercancreate; + $permissiontoadd=$usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -2565,6 +2569,7 @@ $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); $formmargin = new FormMargin($db); +$soc = new Societe($db); $paymentstatic=new Paiement($db); $bankaccountstatic = new Account($db); if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } @@ -2575,7 +2580,6 @@ $title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('Card'); $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; llxHeader('', $title, $helpurl); - // Mode creation if ($action == 'create') @@ -2585,7 +2589,6 @@ if ($action == 'create') print load_fiche_titre($langs->trans('NewBill'), '', 'invoicing'); - $soc = new Societe($db); if ($socid > 0) $res = $soc->fetch($socid); @@ -2597,18 +2600,19 @@ if ($action == 'create') { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; + $regs = array(); if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { - $element = $regs [1]; - $subelement = $regs [2]; + $element = $reg[1]; + $subelement = $regs[2]; } if ($element == 'project') { $projectid = $originid; - if (!$cond_reglement_id) { + if (empty($cond_reglement_id)) { $cond_reglement_id = $soc->cond_reglement_id; } - if (!$mode_reglement_id) { + if (empty($mode_reglement_id)) { $mode_reglement_id = $soc->mode_reglement_id; } if (!$remise_percent) { @@ -2725,7 +2729,7 @@ if ($action == 'create') $text.=' '.$langs->trans("ToCreateARecurringInvoiceGene", $langs->transnoentitiesnoconv("MenuFinancial"), $langs->transnoentitiesnoconv("BillsCustomers"), $langs->transnoentitiesnoconv("ListOfTemplates")); if (empty($conf->global->INVOICE_DISABLE_AUTOMATIC_RECURRING_INVOICE)) { - $text.=' '.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name')); + $text.=' '.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name')); } print info_admin($text, 0, 0, 0).'
'; } @@ -2744,15 +2748,23 @@ if ($action == 'create') dol_fiche_head(''); - print '
'.$title.'
'; + print '
'; // Ref print ''; - // Thirdparty - print ''; - if ($soc->id > 0 && ! GETPOST('fac_rec', 'alpha')) + $exampletemplateinvoice=new FactureRec($db); + $invoice_predefined = new FactureRec($db); + if (empty($origin) && empty($originid) && GETPOST('fac_rec', 'int') > 0) { + $invoice_predefined->fetch(GETPOST('fac_rec', 'int')); + } + + // Thirdparty + if ($soc->id > 0 && (! GETPOST('fac_rec', 'int') || ! empty($invoice_predefined->frequency))) + { + // If thirdparty known and not a predefined invoiced without a recurring rule + print ''; print ''; + print '' . "\n"; } else { + print ''; print ''; + print '' . "\n"; } - print '' . "\n"; - $exampletemplateinvoice=new FactureRec($db); - - // Overwrite value if creation of invoice is from a predefined invoice + // Overwrite some values if creation of invoice is from a predefined invoice if (empty($origin) && empty($originid) && GETPOST('fac_rec', 'int') > 0) { - $invoice_predefined = new FactureRec($db); $invoice_predefined->fetch(GETPOST('fac_rec', 'int')); $dateinvoice = $invoice_predefined->date_when; // To use next gen date by default later @@ -2808,6 +2819,9 @@ if ($action == 'create') $note_public = $invoice_predefined->note_public; $note_private = $invoice_predefined->note_private; + if (! empty($invoice_predefined->multicurrency_code)) $currency_code = $invoice_predefined->multicurrency_code; + if (! empty($invoice_predefined->multicurrency_tx)) $currency_tx = $invoice_predefined->multicurrency_tx; + $sql = 'SELECT r.rowid, r.titre as title, r.total_ttc'; $sql .= ' FROM ' . MAIN_DB_PREFIX . 'facture_rec as r'; $sql .= ' WHERE r.fk_soc = ' . $invoice_predefined->socid; @@ -2821,16 +2835,17 @@ if ($action == 'create') if ($num > 0) { print '
' . $langs->trans('Ref') . '' . $langs->trans('Draft') . '
' . $langs->trans('Customer') . '
' . $langs->trans('Customer') . ''; print $soc->getNomUrl(1); print ''; @@ -2768,9 +2780,11 @@ if ($action == 'create') } print ')'; print '
' . $langs->trans('Customer') . ''; print $form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); // Option to reload page to retrieve customer informations. Note, this clear other input @@ -2787,17 +2801,14 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").''; + if (! GETPOST('fac_rec', 'int')) print ' '.$langs->trans("AddThirdParty").''; print '
' . $langs->trans('CreateFromRepeatableInvoice') . ''; - print ''; + print 'id > 0) $text .= ' disabled'; $text .= '>'; if ($options) { @@ -3046,7 +3067,7 @@ if ($action == 'create') print '
'; $tmp='global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp.=' disabled'; + if ((! $optionsav && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) || $invoice_predefined->id > 0) $tmp.=' disabled'; $tmp.= '> '; // Show credit note options only if we checked credit note print ''."\n"; - } + print ' '."\n"; + } print load_fiche_titre($langs->trans("DoPayment")); print "
\n"; @@ -200,12 +199,12 @@ if ($action == 'create') dol_fiche_head('', ''); - print ''; + print '
'; print ''; - print '\n"; + print '\n"; print '\n"; - print '\n"; + print '\n"; /*print '\n"; print '';*/ @@ -261,7 +260,7 @@ if ($action == 'create') $num = 1; $i = 0; - print '
'.$langs->trans("Ref").''.$chid.'
'.$langs->trans("Type")."".$charge->type_libelle."
'.$langs->trans("Type")."".$charge->type_label."
'.$langs->trans("Period")."".dol_print_date($charge->periode, 'day')."
'.$langs->trans("Label").''.$charge->lib."
'.$langs->trans("Label").''.$charge->label."
'.$langs->trans("DateDue")."".dol_print_date($charge->date_ech,'day')."
'.$langs->trans("Amount")."".price($charge->amount,0,$outputlangs,1,-1,-1,$conf->currency).'
'; + print '
'; print ''; //print ''; print ''; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 605f5cec3bc..5dfd029747b 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -39,7 +39,7 @@ $langs->loadLangs(array('bills', 'banks', 'companies')); $id=GETPOST("id", 'int'); $action=GETPOST('action', 'aZ09'); $confirm=GETPOST('confirm'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; // TODO ajouter regle pour restreindre acces paiement //$result = restrictedArea($user, 'facture', $id,''); @@ -169,7 +169,7 @@ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'id', ''); print '
'; print '
'; -print '
'.$langs->trans("SocialContribution").''.$langs->trans("DateDue").'
'; +print '
'; // Ref /*print ''; @@ -221,7 +221,7 @@ dol_fiche_end(); */ $disable_delete = 0; -$sql = 'SELECT f.rowid as scid, f.libelle, f.paye, f.amount as sc_amount, pf.amount, pc.libelle as sc_type'; +$sql = 'SELECT f.rowid as scid, f.libelle as label, f.paye, f.amount as sc_amount, pf.amount, pc.libelle as sc_type'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiementcharge as pf,'.MAIN_DB_PREFIX.'chargesociales as f, '.MAIN_DB_PREFIX.'c_chargesociales as pc'; $sql.= ' WHERE pf.fk_charge = f.rowid AND f.fk_type = pc.id'; $sql.= ' AND f.entity = '.$conf->entity; @@ -235,7 +235,7 @@ if ($resql) $i = 0; $total = 0; - print '
'.$langs->trans('Ref').'
'; + print '
'; print ''; print ''; print ''; @@ -259,11 +259,11 @@ if ($resql) print "\n"; // Type print '\n"; // Label - print ''; + print ''; // Expected to pay print ''; // Status @@ -299,7 +299,7 @@ print '
'; /* if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { - if ($user->societe_id == 0 && $object->statut == 0 && $_GET['action'] == '') + if ($user->socid == 0 && $object->statut == 0 && $_GET['action'] == '') { if ($user->rights->facture->paiement) { diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index ecea96b7a09..eb18618ab62 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('banks', 'categories', 'widthdrawals')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index ea5a4e8d07c..0008a948c16 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -37,7 +37,7 @@ if (!$user->rights->prelevement->bons->lire) accessforbidden(); // Security check -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); // Get supervariables $action = GETPOST('action', 'alpha'); @@ -177,7 +177,7 @@ if ($id > 0 || $ref) print '
'; print '
'; - print '
'.$langs->trans('SocialContribution').''.$langs->trans('Type').''; - print $socialcontrib->type_libelle; + print $socialcontrib->type_label; /*print $socialcontrib->type;*/ print "'.$objp->libelle.''.$objp->label.''.price($objp->sc_amount).'
'; + print '
'; //print ''; print ''; @@ -214,7 +214,7 @@ if ($id > 0 || $ref) print '
'; print '
'; - print '
'.$langs->trans("Ref").''.$object->getNomUrl(1).'
'.$langs->trans("Date").''.dol_print_date($object->datec, 'day').'
'; + print '
'; $acc = new Account($db); $result=$acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); @@ -262,7 +262,7 @@ if ($id > 0 || $ref) print ''; print ''; print ''; - print '
'; + print '
'; print ''; print ''; print ''; -/* print '';*/ @@ -286,7 +286,7 @@ if ($id > 0 || $ref) print ''; print ''; print ''; - print '
'.$langs->trans("NotifyTransmision").'
'.$langs->trans("TransData").''; @@ -271,7 +271,7 @@ if ($id > 0 || $ref) print '
'.$langs->trans("TransMetod").''; print $form->selectarray("methode", $object->methodes_trans); print '
'.$langs->trans("File").''; + /*print '
'.$langs->trans("File").''; print ''; print '
'; print '
'; + print '
'; print ''; print ''; print '
'.$langs->trans("NotifyCredit").'
'.$langs->trans('CreditDate').''; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index b31782d64d1..f1c3f70c53a 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -69,7 +69,7 @@ class BonPrelevement extends CommonObject public $total; public $fetched; public $statut; // 0-Wait, 1-Trans, 2-Done - public $labelstatut=array(); + public $labelStatus=array(); public $invoice_in_error=array(); public $thirdparty_in_error=array(); @@ -441,7 +441,6 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { - $langs->load('withdrawals'); $subject = $langs->trans("InfoCreditSubject", $this->ref); $message = $langs->trans("InfoCreditMessage", $this->ref, dol_print_date($date, 'dayhour')); @@ -618,7 +617,6 @@ class BonPrelevement extends CommonObject } else { - dol_syslog(get_class($this)."::set_infotrans Ouverture transaction SQL impossible", LOG_CRIT); return -2; } @@ -1688,7 +1686,7 @@ class BonPrelevement extends CommonObject $XML_DEBITOR =''; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; - // $XML_DEBITOR .=' '.('AS-'.dol_trunc($row_ref,20).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters + // $XML_DEBITOR .=' '.('AS-'.dol_trunc($row_ref,20).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters $XML_DEBITOR .=' '.(($conf->global->PRELEVEMENT_END_TO_END != "" ) ? $conf->global->PRELEVEMENT_END_TO_END : ('AS-'.dol_trunc($row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.round($row_somme, 2).''.$CrLf; @@ -1720,8 +1718,8 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; - // $XML_DEBITOR .=' '.($row_ref.'/'.$Rowing.'/'.$Rum).''.$CrLf; - // $XML_DEBITOR .=' '.dol_trunc($row_ref, 135).''.$CrLf; // 140 max + // $XML_DEBITOR .=' '.($row_ref.'/'.$Rowing.'/'.$Rum).''.$CrLf; + // $XML_DEBITOR .=' '.dol_trunc($row_ref, 135).''.$CrLf; // 140 max $XML_DEBITOR .=' '.(($conf->global->PRELEVEMENT_USTRD != "" ) ? $conf->global->PRELEVEMENT_USTRD : dol_trunc($row_ref, 135) ).''.$CrLf; // 140 max $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; @@ -1889,15 +1887,15 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$this->emetteur_bic.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; -/* $XML_SEPA_INFO .= ' '.$CrLf; + /* $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$this->raison_sociale.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.''.$CrLf; $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; -*/ $XML_SEPA_INFO .= ' SLEV'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf;*/ + $XML_SEPA_INFO .= ' SLEV'.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -1997,55 +1995,55 @@ class BonPrelevement extends CommonObject /** * Return status label for a status * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelstatut)) + if (empty($this->labelStatus)) { global $langs; $langs->load("withdrawals"); - $this->labelstatut[0]=$langs->trans("StatusWaiting"); - $this->labelstatut[1]=$langs->trans("StatusTrans"); - $this->labelstatut[2]=$langs->trans("StatusCredited"); + $this->labelStatus[0]=$langs->trans("StatusWaiting"); + $this->labelStatus[1]=$langs->trans("StatusTrans"); + $this->labelStatus[2]=$langs->trans("StatusCredited"); } if ($mode == 0 || $mode == 1) { - return $this->labelstatut[$statut]; + return $this->labelStatus[$status]; } elseif ($mode == 2) { - if ($statut==0) return img_picto($this->labelstatut[$statut], 'statut1').' '.$this->labelstatut[$statut]; - elseif ($statut==1) return img_picto($this->labelstatut[$statut], 'statut3').' '.$this->labelstatut[$statut]; - elseif ($statut==2) return img_picto($this->labelstatut[$statut], 'statut6').' '.$this->labelstatut[$statut]; + if ($status==0) return img_picto($this->labelStatus[$status], 'statut1').' '.$this->labelStatus[$status]; + elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3').' '.$this->labelStatus[$status]; + elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6').' '.$this->labelStatus[$status]; } elseif ($mode == 3) { - if ($statut==0) return img_picto($this->labelstatut[$statut], 'statut1'); - elseif ($statut==1) return img_picto($this->labelstatut[$statut], 'statut3'); - elseif ($statut==2) return img_picto($this->labelstatut[$statut], 'statut6'); + if ($status==0) return img_picto($this->labelStatus[$status], 'statut1'); + elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3'); + elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($this->labelstatut[$statut], 'statut1').' '.$this->labelstatut[$statut]; - elseif ($statut==1) return img_picto($this->labelstatut[$statut], 'statut3').' '.$this->labelstatut[$statut]; - elseif ($statut==2) return img_picto($this->labelstatut[$statut], 'statut6').' '.$this->labelstatut[$statut]; + if ($status==0) return img_picto($this->labelStatus[$status], 'statut1').' '.$this->labelStatus[$status]; + elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3').' '.$this->labelStatus[$status]; + elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6').' '.$this->labelStatus[$status]; } elseif ($mode == 5) { - if ($statut==0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut1'); - elseif ($statut==1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut3'); - elseif ($statut==2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut6'); + if ($status==0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut1'); + elseif ($status==1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut3'); + elseif ($status==2) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut6'); } elseif ($mode == 6) { - if ($statut==0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut1'); - elseif ($statut==1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut3'); - elseif ($statut==2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut6'); + if ($status==0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut1'); + elseif ($status==1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut3'); + elseif ($status==2) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut6'); } } } diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 3b0f61b17a0..467351e3110 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -132,36 +132,36 @@ class LignePrelevement /** * Return status label for a status * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut1').' '.$langs->trans($this->statuts[$statut]); // Waiting - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); // Credited - elseif ($statut==3) return img_picto($langs->trans($this->statuts[$statut]), 'statut8').' '.$langs->trans($this->statuts[$statut]); // Refused + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); // Waiting + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); // Credited + elseif ($status==3) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); // Refused } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - elseif ($statut==3) return img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut1'); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6'); + elseif ($status==3) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); } elseif ($mode == 3) { - if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - elseif ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut1'); + elseif ($status==2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6'); + elseif ($status==3) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); } } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 61db16c505c..625fc0ce04f 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies', 'bills')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); // Get supervariables @@ -142,7 +142,7 @@ if ($nb < 0 || $nb1 < 0 || $nb11 < 0) { dol_print_error($bprev->error); } -print ''; +print '
'; print ''; print '
'.$langs->trans("NbOfInvoiceToWithdraw").''; @@ -161,6 +161,7 @@ print ''; if ($mesg) print $mesg; print "
\n"; + print ''; print ''; if ($nb) { @@ -193,6 +194,7 @@ else } print "\n"; + print "
\n"; print '
'; @@ -245,7 +247,7 @@ if ($resql) print_barre_liste($langs->trans("InvoiceWaitingWithdraw"), $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit); - print ''; + print '
'; print ''; print ''; print ''; @@ -299,7 +301,10 @@ if ($resql) $i++; } } - else print ''; + else + { + print ''; + } print "
'.$langs->trans("Invoice").''.$langs->trans("ThirdParty").'
'.$langs->trans("None").'
'.$langs->trans("None").'
"; print ""; print "
\n"; @@ -332,7 +337,7 @@ if ($result) $i = 0; print"\n\n"; - print ''; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 4ea74e83b4f..67d4fcbc078 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -36,7 +36,7 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid', 'int'); $status = GETPOST('status', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectlist'; // To manage different context of search @@ -153,7 +153,7 @@ print ''; print ''; -print '
'.$langs->trans("Ref").''.$langs->trans("Date").''.$langs->trans("Amount").'
'; +print '
'; print ''; print_liste_field_titre("Bill", $_SERVER["PHP_SELF"]); diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index fbc36418222..aa47b3184ce 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories', 'companies', 'withdrawals', 'bills')); // Securite acces client -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); // Get supervariables $prev_id = GETPOST('id', 'int'); @@ -79,7 +79,7 @@ if ($prev_id > 0 || $ref) print '
'; print '
'; - print '
'; + print '
'; //print ''; print ''; @@ -111,7 +111,7 @@ if ($prev_id > 0 || $ref) print '
'; print '
'; - print '
'.$langs->trans("Ref").''.$object->getNomUrl(1).'
'.$langs->trans("Date").''.dol_print_date($object->datec, 'day').'
'; + print '
'; $acc = new Account($db); $result=$acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); @@ -201,7 +201,7 @@ if ($result) print"\n\n"; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'; + print '
'; print ''; print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 24aa2f9bcb9..ca5cb77432b 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array("banks","categories",'withdrawals','bills')); // Securite acces client -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); // Get supervariables $prev_id = GETPOST('id', 'int'); @@ -112,7 +112,7 @@ if ($prev_id > 0 || $ref) print '
'; print '
'; - print '
'; + print '
'; $acc = new Account($db); $result=$acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); @@ -223,7 +223,7 @@ if ($resql) } else { - print ''; + print ''; } if ($num > 0) diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index c8914b41f26..1b351371958 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array("banks","categories",'withdrawals','bills')); // Security check -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); // Get supervariables $prev_id = GETPOST('id', 'int'); @@ -109,7 +109,7 @@ if ($prev_id > 0 || $ref) print '
'; print '
'; - print '
'.$langs->trans("None").'
'.$langs->trans("None").'
'; + print '
'; $acc = new Account($db); $result=$acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 80d7abb4f0a..936fbebcf6e 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -38,7 +38,7 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', ''); @@ -71,8 +71,8 @@ $thirdpartystatic=new Societe($db); $invoicestatic=new Facture($db); $bprev = new BonPrelevement($db); - -print '
'; +print '
'; +print '
'; print ''; print ''; @@ -85,7 +85,7 @@ print ''; print ''; print '
'.$langs->trans("Statistics").'
'.$langs->trans("NbOfInvoiceToWithdraw").'
'.$langs->trans("AmountToWithdraw").''; print price($bprev->SommeAPrelever(), '', '', 1, -1, -1, 'auto'); -print '

'; +print '

'; @@ -116,7 +116,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; if ($num) @@ -162,7 +163,7 @@ if ($resql) { print ''; } - print "
'.$langs->trans("InvoiceWaitingWithdraw").' ('.$num.')
'.$langs->trans("NoInvoiceToWithdraw", $langs->transnoentitiesnoconv("StandingOrders")).'

"; + print "

"; } else { @@ -189,7 +190,8 @@ if ($result) $i = 0; print"\n\n"; - print ''; + print '
'; + print '
'; print ''; print ''; print ''; @@ -216,7 +218,7 @@ if ($result) print "\n"; $i++; } - print "
'.$langs->trans("LastWithdrawalReceipt", $limit).''.$langs->trans("Date").''.$langs->trans("Amount").'

"; + print "

"; $db->free($result); } else diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 41ac08b0fb2..fdea395e3e5 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadlangs(array('banks', 'categories', 'bills', 'withdrawals')); // Security check -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); // Get supervariables $action = GETPOST('action', 'alpha'); @@ -128,7 +128,7 @@ if ($id) dol_fiche_head($head, $hselected, $langs->trans("StandingOrder")); - print ''; + print '
'; print ''; @@ -182,7 +182,7 @@ if ($id) print ''; print ''; print ''; - print '
'.$langs->trans("WithdrawalsReceipts").''; print $bon->getNomUrl(1).'
'; + print '
'; print ''; print ''; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 2ffb8def303..c016f1e6c02 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -34,7 +34,7 @@ $langs->loadLangs(array('banks', 'withdrawals', 'companies', 'categories')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 6cde242ae93..4235f5d7fc3 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -35,7 +35,7 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); // Get supervariables diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 0dd5087869c..87257db6a9d 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); @@ -89,7 +89,7 @@ if ($resql) $i = 0; print"\n\n"; - print '
'.$langs->trans("WithdrawalRefused").'
'; + print '
'; print ''; print ''; print ''; @@ -182,7 +182,7 @@ if ($resql) $i = 0; print"\n\n"; - print '
'.$langs->trans("Status").''.$langs->trans("Number").'%'.$langs->trans("Amount").'%
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 52593c326bd..3956874e11c 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -35,7 +35,7 @@ if (! empty($conf->facture->enabled)) $langs->load("bills"); $id = GETPOST('id')?GETPOST('id', 'int'):GETPOST('socid', 'int'); // Security check -if ($user->societe_id) $id=$user->societe_id; +if ($user->socid) $id=$user->socid; $result = restrictedArea($user, 'societe', $id, '&societe'); $object = new Societe($db); @@ -96,7 +96,7 @@ if ($id > 0) $head = societe_prepare_head($object); dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company'); - dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom', '', '', 0, '', '', 1); + dol_banner_tab($object, 'socid', '', ($user->socid?0:1), 'rowid', 'nom', '', '', 0, '', '', 1); dol_fiche_end(); if (! empty($conf->facture->enabled) && $user->rights->facture->lire) @@ -104,7 +104,7 @@ if ($id > 0) // Invoice list print load_fiche_titre($langs->trans("CustomerPreview")); - print '
'.$langs->trans("Status").''.$langs->trans("Number").'%'.$langs->trans("Amount").'%
'; + print '
'; print ''; if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER["PHP_SELF"], "f.datef", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); print ''; @@ -226,7 +226,6 @@ if ($id > 0) if(empty($TData)) { print ''; } else { - // Sort array by date ASC to calucalte balance $TData = dol_sort_array($TData, 'datefieldforsort', 'ASC'); @@ -245,7 +244,6 @@ if ($id > 0) // Display array foreach($TData as $data) { - $html_class = ''; if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture']; elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement']; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 928776aa06e..e051be0773d 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -50,7 +50,7 @@ $showaccountdetail = GETPOST('showaccountdetail', 'aZ09')?GETPOST('showaccountde // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id > 0) $socid = $user->societe_id; +if ($user->socid > 0) $socid = $user->socid; if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user, 'compta', '', '', 'resultat'); if (! empty($conf->accounting->enabled)) $result=restrictedArea($user, 'accounting', '', '', 'comptarapport'); @@ -201,7 +201,7 @@ if ($date_endday) $param.='&date_endday='.$date_endday; if ($date_endmonth) $param.='&date_endmonth='.$date_endmonth; if ($date_endyear) $param.='&date_endyear='.$date_startyear; -print '
'.$langs->trans("Element").'
'.$langs->trans("NoInvoice").'
'; +print '
'; print ''; print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid', '', $param, '', $sortfield, $sortorder, 'width200 '); print_liste_field_titre(''); @@ -1132,11 +1132,11 @@ else while ($i < $num) { $obj = $db->fetch_object($result); - $amount += $obj->amount; - $total_ht += $obj->amount; - $total_ttc += $obj->amount; - $subtotal_ht += $obj->amount; - $subtotal_ttc += $obj->amount; + $amount += -$obj->amount; + $total_ht += -$obj->amount; + $total_ttc += -$obj->amount; + $subtotal_ht += -$obj->amount; + $subtotal_ttc += -$obj->amount; $i++; } diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 5efa036055f..33609f98997 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -98,7 +98,7 @@ $nbofyear = ($year_end - $year_start) + 1; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id > 0) $socid = $user->societe_id; +if ($user->socid > 0) $socid = $user->socid; if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user, 'compta', '', '', 'resultat'); if (! empty($conf->accounting->enabled)) $result=restrictedArea($user, 'accounting', '', '', 'comptarapport'); @@ -480,10 +480,10 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $obj = $db->fetch_object($result); if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0; - $encaiss[$obj->dm] += $obj->amount; + $encaiss[$obj->dm] += -$obj->amount; if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0; - $encaiss_ttc[$obj->dm] += $obj->amount; + $encaiss_ttc[$obj->dm] += -$obj->amount; $i++; } @@ -749,17 +749,17 @@ if (! empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco $sql.= " AND fk_statut in (1,2)"; if (! empty($date_start) && ! empty($date_end)) $sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == 'RECETTES-DEPENSES') { + } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."don as p"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; $sql.= " WHERE p.entity IN (".getEntity('donation').")"; $sql.= " AND fk_statut >= 2"; - if (! empty($date_start) && ! empty($date_end)) - $sql.= " AND pe.datep >= '".$db->idate($date_start)."' AND pe.datep <= '".$db->idate($date_end)."'"; - } + if (! empty($date_start) && ! empty($date_end)) { + $sql.= " AND pe.datep >= '".$db->idate($date_start)."' AND pe.datep <= '".$db->idate($date_end)."'"; + } + } $sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm"; diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 534c1a4f69b..9af5a559f5e 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -130,7 +130,7 @@ if (! empty($conf->accounting->enabled)) $modecompta='BOOKKEEPING'; if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta", 'alpha'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) accessforbidden(); if (! $user->rights->accounting->comptarapport->lire) accessforbidden(); @@ -256,7 +256,6 @@ elseif ($modecompta=="RECETTES-DEPENSES") } elseif ($modecompta=="BOOKKEEPING") { - // Get array of all report groups that are active $cats = $AccCat->getCats(); // WARNING: Computed groups must be after group they include diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 9fbf699d181..9ecc68316c5 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -49,7 +49,7 @@ $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); $object = new ChargeSociales($db); @@ -167,7 +167,7 @@ if ($action == 'add' && $user->rights->tax->charges->creer) else { $object->type = $actioncode; - $object->lib = GETPOST('label'); + $object->label = GETPOST('label', 'alpha'); $object->date_ech = $dateech; $object->periode = $dateperiod; $object->amount = $amount; @@ -242,12 +242,23 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char { $object->paye = 0; $object->id = $object->ref = null; - $object->lib = $langs->trans("CopyOf").' '.$object->lib; - if (GETPOST('clone_for_next_month') != '') - { - $object->date_ech = dol_time_plus_duree($object->date_ech, 1, 'm'); + if (GETPOST('clone_label', 'alphanohtml')) { + $object->label = GETPOST('clone_label', 'alphanohtml'); + } + else { + $object->label = $langs->trans("CopyOf").' '.$object->label; + } + + if (GETPOST('clone_for_next_month', 'int')) { $object->periode = dol_time_plus_duree($object->periode, 1, 'm'); + $object->date_ech = dol_time_plus_duree($object->date_ech, 1, 'm'); + } + else { + $newdateperiod = dol_mktime(0, 0, 0, GETPOST('clone_periodmonth', 'int'), GETPOST('clone_periodday', 'int'), GETPOST('clone_periodyear', 'int')); + $newdateech = dol_mktime(0, 0, 0, GETPOST('clone_date_echmonth', 'int'), GETPOST('clone_date_echday', 'int'), GETPOST('clone_date_echyear', 'int')); + if ($newdateperiod) $object->periode = $newdateperiod; + if ($newdateech) $object->date_ech = $newdateech; } if ($object->check()) @@ -306,7 +317,7 @@ if ($action == 'create') dol_fiche_head(); - print '
'; + print '
'; // Label print ""; @@ -414,21 +425,30 @@ if ($id > 0) // Clone confirmation if ($action === 'clone') { - $formclone=array( - array('type' => 'checkbox', 'name' => 'clone_for_next_month','label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1), - + $formquestion=array( + array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label), ); + if (! empty($conf->global->TAX_ADD_CLON_FOR_NEXT_MONTH_CHECKBOX)) + { + $formquestion[]=array('type' => 'checkbox', 'name' => 'clone_for_next_month', 'label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1); + } + else + { + $formquestion[]=array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), 'value' => -1); + $formquestion[]=array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("DateDue"), 'value' => -1); + } - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneTax', $object->ref), 'confirm_clone', $formclone, 'yes'); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneTax', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - // Confirmation de la suppression de la charge + if ($action == 'paid') { $text=$langs->trans('ConfirmPaySocialContribution'); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PaySocialContribution'), $text, "confirm_paid", '', '', 2); } + // Confirmation of the removal of the Social Contribution if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteSocialContribution'); @@ -445,8 +465,8 @@ if ($id > 0) $morehtmlref='
'; // Ref customer - $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); + $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); // Project if (! empty($conf->projet->enabled)) { @@ -454,19 +474,20 @@ if ($id > 0) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->tax->charges->creer) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); @@ -491,10 +512,10 @@ if ($id > 0) print '
'; print '
'; - print '
'; + print '
'; // Type - print '"; + print '"; print ""; // Period end date @@ -654,7 +675,6 @@ if ($id > 0) } else { - print ''; print ''; print ''; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index c5a882283c7..85643d084ff 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -55,16 +55,27 @@ class ChargeSociales extends CommonObject protected $table_ref_field = 'ref'; public $date_ech; - public $lib; + public $label; public $type; - public $type_libelle; + public $type_label; public $amount; public $paye; public $periode; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $date_modification; public $date_validation; + /** + * @deprecated Use label instead + */ + public $lib; + /** * @var int account ID */ @@ -106,7 +117,7 @@ class ChargeSociales extends CommonObject public function fetch($id, $ref = '') { $sql = "SELECT cs.rowid, cs.date_ech"; - $sql.= ", cs.libelle as lib, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode, cs.import_key"; + $sql.= ", cs.libelle as label, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode, cs.import_key"; $sql.= ", cs.fk_account, cs.fk_mode_reglement"; $sql.= ", c.libelle"; $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; @@ -128,9 +139,10 @@ class ChargeSociales extends CommonObject $this->id = $obj->rowid; $this->ref = $obj->rowid; $this->date_ech = $this->db->jdate($obj->date_ech); - $this->lib = $obj->lib; + $this->lib = $obj->label; + $this->label = $obj->label; $this->type = $obj->fk_type; - $this->type_libelle = $obj->libelle; + $this->type_label = $obj->libelle; $this->fk_account = $obj->fk_account; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; @@ -203,7 +215,7 @@ class ChargeSociales extends CommonObject $sql.= " VALUES (".$this->type; $sql.= ", ".($this->fk_account>0 ? $this->fk_account:'NULL'); $sql.= ", ".($this->mode_reglement_id>0 ? $this->mode_reglement_id:"NULL"); - $sql.= ", '".$this->db->escape($this->lib)."'"; + $sql.= ", '".$this->db->escape($this->label?$this->label:$this->lib)."'"; $sql.= ", '".$this->db->idate($this->date_ech)."'"; $sql.= ", '".$this->db->idate($this->periode)."'"; $sql.= ", '".price2num($newamount)."'"; @@ -323,7 +335,7 @@ class ChargeSociales extends CommonObject $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales"; - $sql.= " SET libelle='".$this->db->escape($this->lib)."'"; + $sql.= " SET libelle='".$this->db->escape($this->label?$this->label:$this->lib)."'"; $sql.= ", date_ech='".$this->db->idate($this->date_ech)."'"; $sql.= ", periode='".$this->db->idate($this->periode)."'"; $sql.= ", amount='".price2num($this->amount, 'MT')."'"; @@ -459,12 +471,12 @@ class ChargeSociales extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - public function LibStatut($statut, $mode = 0, $alreadypaid = -1) + public function LibStatut($status, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -474,38 +486,38 @@ class ChargeSociales extends CommonObject if ($mode == 0 || $mode == 1) { - if ($statut == 0) return $langs->trans("Unpaid"); - elseif ($statut == 1) return $langs->trans("Paid"); + if ($status == 0) return $langs->trans("Unpaid"); + elseif ($status == 1) return $langs->trans("Paid"); } elseif ($mode == 2) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 3) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 4) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 5) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 6) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } else return "Error, mode/status not found"; @@ -543,15 +555,15 @@ class ChargeSociales extends CommonObject } - if (empty($this->ref)) $this->ref=$this->lib; + if (empty($this->ref)) $this->ref=$this->label; $label = ''.$langs->trans("ShowSocialContribution").''; if (! empty($this->ref)) $label .= '
'.$langs->trans('Ref') . ': ' . $this->ref; - if (! empty($this->lib)) - $label .= '
'.$langs->trans('Label') . ': ' . $this->lib; - if (! empty($this->type_libelle)) - $label .= '
'.$langs->trans('Type') . ': ' . $this->type_libelle; + if (! empty($this->label)) + $label .= '
'.$langs->trans('Label') . ': ' . $this->label; + if (! empty($this->type_label)) + $label .= '
'.$langs->trans('Type') . ': ' . $this->type_label; $linkclose=''; if (empty($notooltip) && $user->rights->facture->lire) @@ -677,12 +689,12 @@ class ChargeSociales extends CommonObject $this->ref = 'SPECIMEN'; $this->specimen=1; $this->paye = 0; - $this->date = time(); + $this->date = dol_now(); $this->date_ech=$this->date+3600*24*30; $this->periode=$this->date+3600*24*30; $this->amount=100; - $this->lib = 0; + $this->label = 'Social contribution label'; $this->type = 1; - $this->type_libelle = 'Social contribution label'; + $this->type_label = 'Type of social contribution'; } } diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 6dd60c227b1..4fb2f27b53f 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -172,7 +172,6 @@ class PaymentSocialContribution extends CommonObject // If we want to closed payed invoices if ($closepaidcontrib) { - $contrib=new ChargeSociales($this->db); $contrib->fetch($contribid); $paiement = $contrib->getSommePaiement(); @@ -237,7 +236,7 @@ class PaymentSocialContribution extends CommonObject $sql.= " t.fk_bank,"; $sql.= " t.fk_user_creat,"; $sql.= " t.fk_user_modif,"; - $sql.= " pt.code as type_code, pt.libelle as type_libelle,"; + $sql.= " pt.code as type_code, pt.libelle as type_label,"; $sql.= ' b.fk_account'; $sql.= " FROM ".MAIN_DB_PREFIX."paiementcharge as t LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepaiement = pt.id"; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid'; @@ -268,7 +267,7 @@ class PaymentSocialContribution extends CommonObject $this->fk_user_modif = $obj->fk_user_modif; $this->type_code = $obj->type_code; - $this->type_libelle = $obj->type_libelle; + $this->type_label = $obj->type_label; $this->bank_account = $obj->fk_account; $this->bank_line = $obj->fk_bank; @@ -593,7 +592,7 @@ class PaymentSocialContribution extends CommonObject { $socialcontrib = new ChargeSociales($this->db); $socialcontrib->fetch($key); - $result=$acc->add_url_line($bank_line_id, $socialcontrib->id, DOL_URL_ROOT.'/compta/charges.php?id=', $socialcontrib->type_libelle.(($socialcontrib->lib && $socialcontrib->lib!=$socialcontrib->type_libelle)?' ('.$socialcontrib->lib.')':''), 'sc'); + $result=$acc->add_url_line($bank_line_id, $socialcontrib->id, DOL_URL_ROOT.'/compta/charges.php?id=', $socialcontrib->type_label.(($socialcontrib->lib && $socialcontrib->lib!=$socialcontrib->type_label)?' ('.$socialcontrib->lib.')':''), 'sc'); if ($result <= 0) dol_print_error($this->db); } } diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index b3fb1cf697b..4a714df8bae 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -47,7 +47,7 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); @@ -108,8 +108,8 @@ if ($object->id) $morehtmlref='
'; // Label of social contribution - $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); + $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); // Project if (! empty($conf->projet->enabled)) { diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php index 3d59e2b229c..e449f907bc8 100644 --- a/htdocs/compta/sociales/info.php +++ b/htdocs/compta/sociales/info.php @@ -39,7 +39,7 @@ $action=GETPOST('action', 'aZ09'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); $object = new ChargeSociales($db); @@ -79,8 +79,8 @@ dol_fiche_head($head, 'info', $langs->trans("SocialContribution"), -1, 'bill'); $morehtmlref='
'; // Label of social contribution -$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); -$morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); +$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); +$morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); // Project if (! empty($conf->projet->enabled)) { diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 56493f3bf7c..50d062612f8 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -42,7 +42,7 @@ $contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'sclist'; // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); $search_ref = GETPOST('search_ref', 'int'); @@ -110,8 +110,8 @@ $chargesociale_static=new ChargeSociales($db); llxHeader('', $langs->trans("SocialContributions")); $sql = "SELECT cs.rowid as id, cs.fk_type as type, "; -$sql.= " cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode,"; -$sql.= " c.libelle as type_lib,"; +$sql.= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode,"; +$sql.= " c.libelle as type_label,"; $sql.= " SUM(pc.amount) as alreadypayed"; $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; $sql.= " ".MAIN_DB_PREFIX."chargesociales as cs"; @@ -261,8 +261,8 @@ if ($resql) $chargesociale_static->id=$obj->id; $chargesociale_static->ref=$obj->id; - $chargesociale_static->lib=$obj->libelle; - $chargesociale_static->type_libelle=$obj->type_lib; + $chargesociale_static->label=$obj->label; + $chargesociale_static->type_label=$obj->type_label; print '
'; @@ -272,10 +272,10 @@ if ($resql) print ''; // Label - print ''; + print ''; // Type - print ''; + print ''; // Date end period print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; - $totalarray['totalttc'] += $obj->amount; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalttcfield'; + $totalarray['val']['totalttcfield'] += $obj->amount; // Due date print ''; @@ -307,20 +307,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalttcfield'])) - { - print ''; - if ($num < $limit && empty($offset)) print ''; - else print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; print '
'.$langs->trans("Type")."".$object->type_libelle."
'.$langs->trans("Type")."".$object->type_label."
'.$langs->trans("None").'
'.dol_trunc($obj->libelle, 42).''.dol_trunc($obj->label, 42).''.$obj->type_lib.''.$obj->type_label.''; @@ -292,8 +292,8 @@ if ($resql) // Amount print ''.price($obj->amount).''.dol_print_date($db->jdate($obj->date_ech), 'day').'
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalttc']).'
'; print ''; diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index caf11a6ea3b..6ccb76e95e5 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->loadLangs(array('compta', 'bills')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax|salaries', '', '', 'charges|'); $mode=GETPOST("mode", 'alpha'); @@ -114,7 +114,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print load_fiche_titre($langs->trans("SocialContributionsPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); } - print ''; + print '
'; print ''; print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder); @@ -126,8 +126,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder); print "\n"; - $sql = "SELECT c.id, c.libelle as lib,"; - $sql.= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,"; + $sql = "SELECT c.id, c.libelle as type_label,"; + $sql.= " cs.rowid, cs.libelle as label, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,"; $sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment,"; $sql.= " pct.code as payment_code"; $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; @@ -162,10 +162,12 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - print ''; - // Ref payment + $payment_sc_static->id=$obj->pid; $payment_sc_static->ref=$obj->pid; + + print ''; + // Ref payment print '\n"; // Date payment print ''; @@ -176,12 +178,12 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) // Label print ''; // Type - print ''; + print ''; // Date $date=$obj->periode; if (empty($date)) $date=$obj->date_ech; @@ -242,7 +244,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $num = $db->num_rows($result); $i = 0; $total = 0 ; - print '
'.$payment_sc_static->getNomUrl(1)."'.dol_print_date($db->jdate($obj->datep), 'day').''; $socialcontrib->id=$obj->rowid; - $socialcontrib->ref=$obj->libelle; - $socialcontrib->lib=$obj->libelle; + $socialcontrib->ref=$obj->rowid; + $socialcontrib->label=$obj->label; print $socialcontrib->getNomUrl(1, '20'); print ''.$obj->lib.''.$obj->type_label.'
'; + print '
'; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder); @@ -343,7 +345,7 @@ while($j<$numlt) $num = $db->num_rows($result); $i = 0; $total = 0 ; - print '
'; + print '
'; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder); @@ -424,7 +426,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) $num = $db->num_rows($result); $i = 0; $total = 0 ; - print '
'; + print '
'; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "s.dateep", "", $param, 'width="140px"', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, '', $sortfield, $sortorder); diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index 39ad71bf888..b43ccbacb38 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -107,7 +107,7 @@ if (empty($modetax)) $modetax=0; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); @@ -223,13 +223,9 @@ elseif ($modecompta=="RECETTES-DEPENSES") } elseif ($modecompta=="BOOKKEEPING") { - - } elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { - - } $period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().''.img_next().''; @@ -245,166 +241,163 @@ if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') } -if ($modecompta == 'CREANCES-DETTES') -{ +if ($modecompta == 'CREANCES-DETTES') { + print '
'; + print ''; + print ''; + print ''; + $i=0; + while($i < 12) { + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + print ''; + $i++; + } + print ''; -print '
' . $langs->trans("TurnoverbyVatrate") . '' . $langs->trans("ProductOrService") . '' . $langs->trans("Country") . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("TotalHT") . '
'; -print ''; -print ''; -print ''; -$i=0; -while($i < 12) -{ - $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; - print ''; - $i++; -} -print ''; + $sql = "SELECT fd.tva_tx AS vatrate,"; + $sql .= " fd.product_type AS product_type,"; + $sql .= " cc.label AS country,"; + for ($i = 1; $i <= 12; $i ++) { + $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; + } + $sql .= " SUM(fd.total_ht) as total"; + $sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; + $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; + $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid = f.fk_soc"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as cc ON cc.rowid = soc.fk_pays"; + $sql .= " WHERE f.datef >= '" . $db->idate($date_start) . "'"; + $sql .= " AND f.datef <= '" . $db->idate($date_end) . "'"; + $sql.= " AND f.fk_statut in (1,2)"; + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $sql.= " AND f.type IN (0,1,2,5)"; + } else { + $sql.= " AND f.type IN (0,1,2,3,5)"; + } + $sql .= " AND f.entity IN (" . getEntity('invoice', 0) . ")"; + $sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label "; -$sql = "SELECT fd.tva_tx AS vatrate,"; -$sql .= " fd.product_type AS product_type,"; -$sql .= " cc.label AS country,"; -for ($i = 1; $i <= 12; $i ++) { - $sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; -} -$sql .= " SUM(fd.total_ht) as total"; -$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; -$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; -$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid = f.fk_soc"; -$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as cc ON cc.rowid = soc.fk_pays"; -$sql .= " WHERE f.datef >= '" . $db->idate($date_start) . "'"; -$sql .= " AND f.datef <= '" . $db->idate($date_end) . "'"; -$sql.= " AND f.fk_statut in (1,2)"; -if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $sql.= " AND f.type IN (0,1,2,5)"; -} else { - $sql.= " AND f.type IN (0,1,2,3,5)"; -} -$sql .= " AND f.entity IN (" . getEntity('invoice', 0) . ")"; -$sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label "; - -dol_syslog("htdocs/compta/tva/index.php sql=" . $sql, LOG_DEBUG); -$resql = $db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); - $totalpermonth = array(); - while ( $obj = $db->fetch_object($resql)) { - print ''; - if ($obj->product_type == 0) { - print ''; - } else { - print ''; + dol_syslog("htdocs/compta/tva/index.php sql=" . $sql, LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $totalpermonth = array(); + while ( $obj = $db->fetch_object($resql)) { + print ''; + if ($obj->product_type == 0) { + print ''; + } else { + print ''; + } + print ''; + for($i = 0; $i < 12; $i++) { + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); + print ''; + $totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj; + } + print ''; + $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total; + print ''; } - print ''; + $db->free($resql); + + // Total + print ''; + print ''; + print ''; for($i = 0; $i < 12; $i++) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); if ($j > 12) $j -= 12; $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); - print ''; - $totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj; + print ''; } - print ''; - $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total; + print ''; print ''; + } else { + print $db->lasterror(); // Show last sql error } - $db->free($resql); - // Total - print ''; - print ''; - print ''; - for($i = 0; $i < 12; $i++) { + + print ''; + print ''; + print ''; + $i=0; + while($i < 12) + { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); if ($j > 12) $j -= 12; - $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); - print ''; + print ''; + $i++; } - print ''; - print ''; -} else { - print $db->lasterror(); // Show last sql error -} + print ''; + $sql2 = "SELECT ffd.tva_tx AS vatrate,"; + $sql2 .= " ffd.product_type AS product_type,"; + $sql2 .= " cc.label AS country,"; + for($i = 1; $i <= 12; $i ++) { + $sql2 .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; + } + $sql2 .= " SUM(ffd.total_ht) as total"; + $sql2 .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd"; + $sql2 .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn"; + $sql2 .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid = ff.fk_soc"; + $sql2 .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as cc ON cc.rowid = soc.fk_pays"; + $sql2 .= " WHERE ff.datef >= '" . $db->idate($date_start) . "'"; + $sql2 .= " AND ff.datef <= '" . $db->idate($date_end) . "'"; + $sql.= " AND ff.fk_statut in (1,2)"; + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $sql.= " AND ff.type IN (0,1,2,5)"; + } else { + $sql.= " AND ff.type IN (0,1,2,3,5)"; + } + $sql2 .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; + $sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label"; -print ''; -print ''; -print ''; -$i=0; -while($i < 12) -{ - $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; - print ''; - $i++; -} -print ''; - -$sql2 = "SELECT ffd.tva_tx AS vatrate,"; -$sql2 .= " ffd.product_type AS product_type,"; -$sql2 .= " cc.label AS country,"; -for($i = 1; $i <= 12; $i ++) { - $sql2 .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ","; -} -$sql2 .= " SUM(ffd.total_ht) as total"; -$sql2 .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd"; -$sql2 .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn"; -$sql2 .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid = ff.fk_soc"; -$sql2 .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as cc ON cc.rowid = soc.fk_pays"; -$sql2 .= " WHERE ff.datef >= '" . $db->idate($date_start) . "'"; -$sql2 .= " AND ff.datef <= '" . $db->idate($date_end) . "'"; -$sql.= " AND ff.fk_statut in (1,2)"; -if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $sql.= " AND ff.type IN (0,1,2,5)"; -} else { - $sql.= " AND ff.type IN (0,1,2,3,5)"; -} -$sql2 .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; -$sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label"; - -//print $sql2; -dol_syslog("htdocs/compta/tva/index.php sql=" . $sql, LOG_DEBUG); -$resql2 = $db->query($sql2); -if ($resql2) { - $num = $db->num_rows($resql2); - $totalpermonth = array(); - while ( $obj = $db->fetch_object($resql2)) { - print ''; - if ($obj->product_type == 0) { - print ''; - } else { - print ''; + //print $sql2; + dol_syslog("htdocs/compta/tva/index.php sql=" . $sql, LOG_DEBUG); + $resql2 = $db->query($sql2); + if ($resql2) { + $num = $db->num_rows($resql2); + $totalpermonth = array(); + while ( $obj = $db->fetch_object($resql2)) { + print ''; + if ($obj->product_type == 0) { + print ''; + } else { + print ''; + } + print ''; + for($i = 0; $i < 12; $i++) { + $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); + if ($j > 12) $j -= 12; + $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); + print ''; + $totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj; + } + print ''; + $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total; + print ''; } - print ''; + $db->free($resql2); + + // Total + print ''; + print ''; + print ''; for($i = 0; $i < 12; $i++) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); if ($j > 12) $j -= 12; $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); - print ''; - $totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj; + print ''; } - print ''; - $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total; + print ''; print ''; + } else { + print $db->lasterror(); // Show last sql error } - $db->free($resql2); - - // Total - print ''; - print ''; - print ''; - for($i = 0; $i < 12; $i++) { - $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; - $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); - print ''; - } - print ''; - print ''; -} else { - print $db->lasterror(); // Show last sql error -} -print "
' . $langs->trans("TurnoverbyVatrate") . '' . $langs->trans("ProductOrService") . '' . $langs->trans("Country") . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("TotalHT") . '
' . vatrate($obj->vatrate) . ''. $langs->trans("Product") . ''. $langs->trans("Service") . '
' . vatrate($obj->vatrate) . ''. $langs->trans("Product") . ''. $langs->trans("Service") . '' .$obj->country . '' . price($obj->$monthj) . '' . price($obj->total) . '
' .$obj->country . '
' . price($obj->$monthj) . '' . price($totalpermonth[$j]) . '' . price($obj->total) . '' . price($totalpermonth['total']) . '
' . $langs->trans("PurchasebyVatrate") . '' . $langs->trans("ProductOrService") . '' . $langs->trans("Country") . '' . price($totalpermonth[$j]) . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . price($totalpermonth['total']) . '
' . $langs->trans("TotalHT") . '
' . $langs->trans("PurchasebyVatrate") . '' . $langs->trans("ProductOrService") . '' . $langs->trans("Country") . '' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '' . $langs->trans("TotalHT") . '
' . vatrate($obj->vatrate) . ''. $langs->trans("Product") . ''. $langs->trans("Service") . '
' . vatrate($obj->vatrate) . ''. $langs->trans("Product") . ''. $langs->trans("Service") . '' . $obj->country . '' . price($obj->$monthj) . '' . price($obj->total) . '
' . $obj->country . '
' . price($obj->$monthj) . '' . price($totalpermonth[$j]) . '' . price($obj->total) . '' . price($totalpermonth['total']) . '
' . price($totalpermonth[$j]) . '' . price($totalpermonth['total']) . '
\n"; + print "
\n"; } else { // $modecompta != 'CREANCES-DETTES' // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index a0e15508748..138bff4a525 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -36,7 +36,7 @@ $langs->loadLangs(array("products","categories","errors",'accountancy')); // Security pack (data & check) $socid = GETPOST('socid', 'int'); -if ($user->societe_id > 0) $socid = $user->societe_id; +if ($user->socid > 0) $socid = $user->socid; if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user, 'compta', '', '', 'resultat'); if (! empty($conf->accounting->enabled)) $result=restrictedArea($user, 'accounting', '', '', 'comptarapport'); @@ -193,13 +193,9 @@ elseif ($modecompta=="RECETTES-DEPENSES") } elseif ($modecompta=="BOOKKEEPING") { - - } elseif ($modecompta=="BOOKKEEPINGCOLLECTED") { - - } $period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -244,7 +240,7 @@ if ($modecompta == 'CREANCES-DETTES') if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $sql.= " AND f.type IN (0,1,2,5)"; } else { - $sql.= " AND f.type IN (0,1,2,3,5)"; + $sql.= " AND f.type IN (0,1,2,3,5)"; } if ($date_start && $date_end) { $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; @@ -330,7 +326,7 @@ if ($modecompta == 'CREANCES-DETTES') // Array header print "
'; + print '
'; print ""; print '
'.$langs->trans("DatePayment").''; @@ -331,7 +331,7 @@ if ($id) print '
'; print '
'; - print ''; + print '
'; // Label //print ''; diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index e69e22f00d6..650e6e203e4 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -90,7 +90,7 @@ if (empty($modetax)) $modetax=0; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); @@ -566,7 +566,6 @@ if (! is_array($x_coll) || ! is_array($x_paye)) $subtot_paye_vat = 0; if ($min == 0 || ($min > 0 && $x_both[$thirdparty_id]['paye']['totalht'] > $min)) { - if (is_array($x_both[$thirdparty_id]['paye']['detail'])) { print ""; print '
'.$langs->trans("Label").''.$object->label.'
'; @@ -736,7 +735,7 @@ if (! is_array($x_coll) || ! is_array($x_paye)) // Total to pay print '

'; - print ''; + print '
'; $diff = $x_coll_sum - $x_paye_sum; print ''; print ''; diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index 46cd0e281a5..d3a5b60d7ba 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -48,7 +48,7 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', $id, 'vat', 'charges'); @@ -114,7 +114,7 @@ if ($object->id) $morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); $morehtmlref.=''; - $linkback = '' . $langs->trans("BackToList") . ''; + $linkback = '' . $langs->trans("BackToList") . ''; $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index d6019c1eef5..77c904512aa 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -76,7 +76,7 @@ if (empty($modetax)) $modetax=0; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); @@ -97,7 +97,7 @@ function pt($db, $sql, $date) $num = $db->num_rows($result); $i = 0; $total = 0; - print '
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'
'; + print '
'; print ''; print ''; @@ -243,7 +243,7 @@ print '
'; print load_fiche_titre($langs->trans("VATSummary"), '', ''); -print '
'.$date.'
'; +print '
'; print ''; print ''; print ''; @@ -576,7 +576,7 @@ if (! empty($conf->global->MAIN_FEATURES_LEVEL)) $result = $db->query($sql1); if ($result) { $obj = $db->fetch_object($result); - print '
'.$langs->trans("Year")." ".$y.''.$langs->trans("VATToPay").'
'; + print '
'; print ""; print ''; diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index 667cffd065b..6190a30f316 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -34,7 +34,7 @@ $action=GETPOST('action', 'aZ09'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); $object = new Tva($db); diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index cffa9152a92..c6584819934 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2011-2017 Alexandre Spangaro + * Copyright (C) 2011-2019 Alexandre Spangaro * * 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 @@ -36,13 +36,17 @@ $langs->loadLangs(array('compta', 'bills')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); $search_ref = GETPOST('search_ref', 'int'); $search_label = GETPOST('search_label', 'alpha'); -$search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'int'); +$search_dateend_start = dol_mktime(0, 0, 0, GETPOST('search_dateend_startmonth', 'int'), GETPOST('search_dateend_startday', 'int'), GETPOST('search_dateend_startyear', 'int')); +$search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth', 'int'), GETPOST('search_dateend_endday', 'int'), GETPOST('search_dateend_endyear', 'int')); +$search_datepayment_start = dol_mktime(0, 0, 0, GETPOST('search_datepayment_startmonth', 'int'), GETPOST('search_datepayment_startday', 'int'), GETPOST('search_datepayment_startyear', 'int')); +$search_datepayment_end = dol_mktime(23, 59, 59, GETPOST('search_datepayment_endmonth', 'int'), GETPOST('search_datepayment_endday', 'int'), GETPOST('search_datepayment_endyear', 'int')); +$search_amount = GETPOST('search_amount', 'alpha'); $month = GETPOST("month", "int"); $year = GETPOST("year", "int"); @@ -78,8 +82,12 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' { $search_ref=""; $search_label=""; - $search_amount=""; + $search_dateend_start=''; + $search_dateend_end=''; + $search_datepayment_start=''; + $search_datepayment_end=''; $search_account=''; + $search_amount=""; $year=""; $month=""; $typeid=""; @@ -104,11 +112,14 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON t.fk_typepayment = pst $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE t.entity IN (".getEntity('tax').")"; -if ($search_ref) $sql.= natural_search("t.rowid", $search_ref); -if ($search_label) $sql.= natural_search("t.label", $search_label); -if ($search_amount) $sql.= natural_search("t.amount", price2num(trim($search_amount)), 1); -if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account; -$sql.= dolSqlDateFilter('t.datev', 0, $month, $year); +if ($search_ref) $sql.= natural_search("t.rowid", $search_ref); +if ($search_label) $sql.= natural_search("t.label", $search_label); +if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account; +if ($search_amount) $sql.= natural_search("t.amount", price2num(trim($search_amount)), 1); +if ($search_dateend_start) $sql.= " AND t.datev >= '" . $db->idate($search_dateend_start) . "'"; +if ($search_dateend_end) $sql.= " AND t.datev <= '" . $db->idate($search_dateend_end) . "'"; +if ($search_datepayment_start) $sql.= " AND t.datep >= '" . $db->idate($search_datepayment_start) . "'"; +if ($search_datepayment_end) $sql.= " AND t.datep <= '" . $db->idate($search_datepayment_end) . "'"; if ($filtre) { $filtre=str_replace(":", "=", $filtre); $sql .= " AND ".$filtre; @@ -157,16 +168,32 @@ if ($result) print '
' . $langs->trans("VATDue") . '
'."\n"; print ''; + // Ref print ''; + // Label print ''; - print ''; - print ''; + // Date end period + print ''; // Account @@ -176,6 +203,7 @@ if ($result) $form->select_comptes($search_account, 'search_account', 0, '', 1); print ''; } + // Amount print ''; print '\n"; // Label print "\n"; - print '\n"; - print '\n"; + // Date end period + print '\n"; + // Date payment + print '\n"; // Type print $type; // Account @@ -243,7 +273,7 @@ if ($result) } // Amount $total = $total + $obj->amount; - print ""; + print '"; print ""; print "\n"; diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index bb9067d5a04..14636fb1e2f 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -91,7 +91,7 @@ if (empty($modetax)) $modetax=0; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); @@ -198,7 +198,7 @@ $vatexpensereport=$langs->trans("VATPaid"); // VAT Received and paid -print '
'; - print ''; - $syear = $year; - $formother->select_year($syear?$syear:-1, 'year', 1, 20, 5); - print ''; + print '
'; + print $langs->trans('From') . ' '; + print $form->selectDate($search_dateend_start?$search_dateend_start:-1, 'search_dateend_start', 0, 0, 1); + print '
'; + print '
'; + print $langs->trans('to') . ' '; + print $form->selectDate($search_dateend_end?$search_dateend_end:-1, 'search_dateend_end', 0, 0, 1); + print '
'; + // Date payment + print '
'; + print '
'; + print $langs->trans('From') . ' '; + print $form->selectDate($search_datepayment_start?$search_datepayment_start:-1, 'search_datepayment_start', 0, 0, 1); + print '
'; + print '
'; + print $langs->trans('to') . ' '; + print $form->selectDate($search_datepayment_end?$search_datepayment_end:-1, 'search_datepayment_end', 0, 0, 1); + print '
'; // Type - print '
'; + print ''; $form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16); print ''; $searchpicto=$form->showFilterAndCheckAddButtons(0); @@ -216,8 +244,10 @@ if ($result) print "".$tva_static->getNomUrl(1)."".dol_trunc($obj->label, 40)."'.dol_print_date($db->jdate($obj->datev), 'day')."'.dol_print_date($db->jdate($obj->datep), 'day')."'.dol_print_date($db->jdate($obj->datev), 'day')."'.dol_print_date($db->jdate($obj->datep), 'day')."".price($obj->amount)."'.price($obj->amount)." 
'; +print '
'; $y = $year_current; $total = 0; @@ -715,7 +715,7 @@ if (! is_array($x_coll) || ! is_array($x_paye)) // Total to pay print '

'; - print '
'; + print '
'; $diff = $x_coll_sum - $x_paye_sum; print ''; print ''; diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 30efcd28632..8ffc88d1a14 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -84,7 +84,7 @@ else $search_agenda_label=GETPOST('search_agenda_label'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index 921535bf20f..35772ee6f34 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -135,13 +135,15 @@ echo $this->control->tpl['ajax_selectcountry']; -control->tpl['contact_element'])) { ?> -control->tpl['contact_element'] as $element) { ?> - - - - - +control->tpl['contact_element'])) { + foreach ($this->control->tpl['contact_element'] as $element) { + print ''; + print ''; + print ''; + print ''; + } +} ?> diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index a9ccf9bff3d..8ab92047daa 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -24,17 +24,14 @@ if (empty($conf) || ! is_object($conf)) $contact = $GLOBALS['objcanvas']->control->object; -?> - -control->tpl['showhead']; ?> +print "\n"; +echo $this->control->tpl['showhead']; -control->tpl['error'], $this->control->tpl['errors']); -?> -control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; ?> -control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?> +if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; +if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'
'.$element['linked_element_label'].''.$element['linked_element_value'].'
trans("DolibarrLogin"); ?>
@@ -134,29 +131,27 @@ dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors'
-control->tpl['showend']; ?> +control->tpl['showend']; -societe_id)) { ?> -
+if (empty($user->socid)) { + print '
'; + if ($user->rights->societe->contact->creer) { + print ''.$langs->trans('Modify').''; + } -rights->societe->contact->creer) { ?> -">trans('Modify'); ?> - + if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { + print ''.$langs->trans("CreateDolibarrLogin").''; + } -control->tpl['user_id'] && $user->rights->user->user->creer) { ?> -">trans("CreateDolibarrLogin"); ?> - + if ($user->rights->societe->contact->supprimer) { + print ''.$langs->trans('Delete').''; + } -rights->societe->contact->supprimer) { ?> -">trans('Delete'); ?> - - -

-
'; +} echo $this->control->tpl['actionstodo']; echo $this->control->tpl['actionsdone']; -?> - +print "\n"; diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 4139176e84e..e4cf66b472a 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke @@ -62,6 +62,8 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); +$socialnetworks = getArrayOfSocialNetworks(); + // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $object->getCanvas($id); $objcanvas=null; @@ -74,7 +76,7 @@ if (! empty($canvas)) } // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -179,23 +181,32 @@ if (empty($reshook)) $object->socid = GETPOST("socid", 'int'); $object->lastname = GETPOST("lastname", 'alpha'); $object->firstname = GETPOST("firstname", 'alpha'); - $object->civility_id = GETPOST("civility_id", 'alpha'); + $object->civility_code = GETPOST("civility_code", 'alpha'); $object->poste = GETPOST("poste", 'alpha'); $object->address = GETPOST("address", 'alpha'); $object->zip = GETPOST("zipcode", 'alpha'); $object->town = GETPOST("town", 'alpha'); $object->country_id = GETPOST("country_id", 'int'); $object->state_id = GETPOST("state_id", 'int'); - $object->skype = GETPOST("skype", 'alpha'); - $object->twitter = GETPOST("twitter", 'alpha'); - $object->facebook = GETPOST("facebook", 'alpha'); - $object->linkedin = GETPOST("linkedin", 'alpha'); + //$object->jabberid = GETPOST("jabberid", 'alpha'); + //$object->skype = GETPOST("skype", 'alpha'); + //$object->twitter = GETPOST("twitter", 'alpha'); + //$object->facebook = GETPOST("facebook", 'alpha'); + //$object->linkedin = GETPOST("linkedin", 'alpha'); + $object->socialnetworks = array(); + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml')!='') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } $object->email = GETPOST("email", 'alpha'); + $object->no_email = GETPOST("no_email", "int"); $object->phone_pro = GETPOST("phone_pro", 'alpha'); $object->phone_perso = GETPOST("phone_perso", 'alpha'); $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); $object->fax = GETPOST("fax", 'alpha'); - $object->jabberid = GETPOST("jabberid", 'alpha'); $object->priv = GETPOST("priv", 'int'); $object->note_public = GETPOST("note_public", 'none'); $object->note_private = GETPOST("note_private", 'none'); @@ -230,6 +241,22 @@ if (empty($reshook)) // Categories association $contcats = GETPOST('contcats', 'array'); $object->setCategories($contcats); + + // Add mass emailing flag into table mailing_unsubscribe + if (GETPOST('no_email', 'int') && $object->email) + { + $sql="SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$db->escape($object->email)."'"; + $resql=$db->query($sql); + if ($resql) + { + $obj=$db->fetch_object($resql); + if (empty($obj->nb)) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$db->escape($object->email)."', ".$db->escape(getEntity('mailing', 0)).", '".$db->idate(dol_now())."')"; + $resql=$db->query($sql); + } + } + } } } @@ -250,6 +277,7 @@ if (empty($reshook)) if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) { $result=$object->fetch($id); + $object->oldcopy = clone $object; $object->old_lastname = GETPOST("old_lastname"); $object->old_firstname = GETPOST("old_firstname"); @@ -349,7 +377,7 @@ if (empty($reshook)) $object->socid = GETPOST("socid", 'int'); $object->lastname = GETPOST("lastname", 'alpha'); $object->firstname = GETPOST("firstname", 'alpha'); - $object->civility_id = GETPOST("civility_id", 'alpha'); + $object->civility_code = GETPOST("civility_code", 'alpha'); $object->poste = GETPOST("poste", 'alpha'); $object->address = GETPOST("address", 'alpha'); @@ -359,19 +387,27 @@ if (empty($reshook)) $object->country_id = GETPOST("country_id", 'int'); $object->email = GETPOST("email", 'alpha'); - $object->skype = GETPOST("skype", 'alpha'); - $object->twitter = GETPOST("twitter", 'alpha'); - $object->facebook = GETPOST("facebook", 'alpha'); - $object->linkedin = GETPOST("linkedin", 'alpha'); + $object->no_email = GETPOST("no_email", "int"); + //$object->jabberid = GETPOST("jabberid", 'alpha'); + //$object->skype = GETPOST("skype", 'alpha'); + //$object->twitter = GETPOST("twitter", 'alpha'); + //$object->facebook = GETPOST("facebook", 'alpha'); + //$object->linkedin = GETPOST("linkedin", 'alpha'); + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml')!='') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } $object->phone_pro = GETPOST("phone_pro", 'alpha'); $object->phone_perso = GETPOST("phone_perso", 'alpha'); $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); $object->fax = GETPOST("fax", 'alpha'); - $object->jabberid = GETPOST("jabberid", 'alpha'); $object->priv = GETPOST("priv", 'int'); $object->note_public = GETPOST("note_public", 'none'); - $object->note_private = GETPOST("note_private", 'none'); - $object->roles = GETPOST("roles", 'array'); + $object->note_private = GETPOST("note_private", 'none'); + $object->roles = GETPOST("roles", 'array'); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); @@ -386,6 +422,35 @@ if (empty($reshook)) $categories = GETPOST('contcats', 'array'); $object->setCategories($categories); + $no_email = GETPOST('no_email', 'int'); + + // Update mass emailing flag into table mailing_unsubscribe + if (GETPOSTISSET('no_email') && $object->email) + { + if ($no_email) + { + $sql="SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$db->escape($object->email)."'"; + $resql=$db->query($sql); + if ($resql) + { + $obj=$db->fetch_object($resql); + $noemail = $obj->nb; + if (empty($noemail)) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$db->escape($object->email)."', ".$db->escape(getEntity('mailing', 0)).", '".$db->idate(dol_now())."')"; + $resql=$db->query($sql); + } + } + } + else + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = '".$db->escape($object->email)."' AND entity = ".$db->escape(getEntity('mailing', 0)); + $resql=$db->query($sql); + } + + $object->no_email = $no_email; + } + $object->old_lastname=''; $object->old_firstname=''; $action = 'view'; @@ -545,7 +610,7 @@ else dol_fiche_head($head, 'card', '', 0, ''); - print ''; + print '
'; // Name print ''; @@ -573,8 +638,8 @@ else } // Civility - print ''; print ''; @@ -630,29 +695,31 @@ else print $formcompany->select_state(GETPOST("state_id", 'alpha')?GETPOST("state_id", 'alpha'):$object->state_id, $object->country_code, 'state_id'); } else - { + { print $countrynotdefined; } print ''; } - // Phone / Fax if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party - print ''; - print ''; - print ''; - print ''; - if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - print ''; - print ''; - print ''; - print ''; - // EMail + // Phone / Fax + print ''; + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + print ''; + if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - print ''; - print ''; + + // Email + print ''; + print ''; if (! empty($conf->mailing->enabled)) { $noemail = ''; @@ -677,39 +744,53 @@ else } print ''; - if (! empty($conf->socialnetworks->enabled)) - { - // Jabber - if (! empty($conf->global->SOCIALNETWORKS_JABBER)) - { - print ''; - print ''; - } - // Skype - if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - { - print ''; - print ''; - } - // Twitter - if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - { - print ''; - print ''; - } - // Facebook - if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - { - print ''; - print ''; - } - // LinkedIn - if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - { - print ''; - print ''; + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + print ''; + print ''; + print ''; + print ''; + } elseif (!empty($object->socialnetworks[$key])) { + print ''; + } } } + // if (! empty($conf->socialnetworks->enabled)) + // { + // // Jabber + // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) + // { + // print ''; + // print ''; + // } + // // Skype + // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) + // { + // print ''; + // print ''; + // } + // // Twitter + // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) + // { + // print ''; + // print ''; + // } + // // Facebook + // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) + // { + // print ''; + // print ''; + // } + // // LinkedIn + // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) + // { + // print ''; + // print ''; + // } + // } // Visibility print '
'; - print $formcompany->select_civility(GETPOST("civility", 'alpha')?GETPOST("civility", 'alpha'):$object->civility_code); + print '
'; + print $formcompany->select_civility(GETPOSTISSET("civility_code")?GETPOST("civility_code", 'alpha'):$object->civility_code, 'civility_code'); print '
phone_pro).'">phone_perso).'">
phone_mobile).'">fax).'">
'.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePro', 'phone_pro', '', $object, 0).''.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePerso', 'phone_perso', '', $object, 0).'
'.img_picto('', 'object_phoning_mobile').' '.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).''.img_picto('', 'object_phoning_fax').' '.$form->editfieldkey('Fax', 'fax', '', $object, 0).'
email).'">
'.img_picto('', 'object_email').' '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '').'
jabberid).'">
skype).'">
twitter).'">
facebook).'">
linkedin).'">
'; + print ''; + print '
jabberid).'">
skype).'">
twitter).'">
facebook).'">
linkedin).'">
'; @@ -750,7 +831,7 @@ else // Add personnal information print load_fiche_titre('
'.$langs->trans("PersonalInformations").'
', '', ''); - print ''; + print '
'; // Date To Birth print '
'; @@ -850,7 +931,7 @@ else dol_fiche_head($head, 'card', $title, 0, 'contact'); - print ''; + print '
'; // Ref/ID if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) @@ -881,8 +962,8 @@ else } // Civility - print ''; print ''; @@ -922,24 +1003,24 @@ else print ''; } // Phone - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // EMail - print ''; - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); @@ -948,7 +1029,7 @@ else } else { - print ''; + print ''; } print ''; @@ -974,43 +1055,57 @@ else } else { - print ''; + print ''; } print ''; - if (! empty($conf->socialnetworks->enabled)) - { - // Jabber ID - if (! empty($conf->global->SOCIALNETWORKS_JABBER)) - { - print ''; - print ''; - } - // Skype - if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - { - print ''; - print ''; - } - // Twitter - if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - { - print ''; - print ''; - } - // Facebook - if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - { - print ''; - print ''; - } - // LinkedIn - if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - { - print ''; - print ''; + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + print ''; + print ''; + print ''; + print ''; + } elseif (!empty($object->socialnetworks[$key])) { + print ''; + } } } + // if (! empty($conf->socialnetworks->enabled)) + // { + // // Jabber ID + // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) + // { + // print ''; + // print ''; + // } + // // Skype + // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) + // { + // print ''; + // print ''; + // } + // // Twitter + // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) + // { + // print ''; + // print ''; + // } + // // Facebook + // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) + // { + // print ''; + // print ''; + // } + // // LinkedIn + // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) + // { + // print ''; + // print ''; + // } + // } // Visibility print '
'; - print $formcompany->select_civility(isset($_POST["civility"])?GETPOST("civility"):$object->civility_code); + print '
'; + print $formcompany->select_civility(GETPOSTISSET("civility_code")?GETPOST("civility", "aZ09"):$object->civility_code, 'civility_code'); print '
'; } - print $formcompany->select_state($object->state_id, isset($_POST["country_id"])?GETPOST("country_id"):$object->country_id, 'state_id'); + print $formcompany->select_state(GETPOSTISSET('state_id')?GETPOST('state_id', 'alpha'):$object->state_id, $object->country_code, 'state_id'); print '
phone_pro).'">phone_perso).'">
'.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePro', 'phone_pro', GETPOST('phone_pro', 'alpha'), $object, 0).''.img_picto('', 'object_phoning').' '.$form->editfieldkey('PhonePerso', 'fax', GETPOST('phone_perso', 'alpha'), $object, 0).'
phone_mobile).'">fax).'">
'.img_picto('', 'object_phoning_mobile').' '.$form->editfieldkey('PhoneMobile', 'phone_mobile', GETPOST('phone_mobile', 'alpha'), $object, 0, 'string', '').''.img_picto('', 'object_phoning_fax').' '.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'
email).'">
'.img_picto('', 'object_email').' '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (! empty($conf->global->SOCIETE_EMAIL_MANDATORY))).' 
 
jabberid).'">
skype).'">
twitter).'">
facebook).'">
linkedin).'">
'; + print ''; + print '
jabberid).'">
skype).'">
twitter).'">
facebook).'">
linkedin).'">
'; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 560a6e2bc0d..f8a43d70494 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -80,27 +80,82 @@ class Contact extends CommonObject 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>1, 'position'=>1000), ); - public $civility_id; // In fact we store civility_code + public $civility_id; // In fact we store civility_code public $civility_code; public $civility; + + /** + * Address + * @var string + */ public $address; public $zip; public $town; public $state_id; // Id of department - public $state_code; // Code of department + public $state_code; // Code of department public $state; // Label of department public $poste; // Position public $socid; // fk_soc - public $statut; // 0=inactif, 1=actif + public $statut; // 0=inactif, 1=actif public $code; + + /** + * Email + * @var string + */ public $email; + + /** + * Unsuscribe all : 1 = contact has globaly unsubscribe of all mass emailings + * @var int + */ + public $no_email; + + /** + * @var array array of socialnetworks + */ + public $socialnetworks; + + /** + * Skype username + * @var string + * @deprecated + */ public $skype; - public $photo; + + /** + * Twitter username + * @var string + * @deprecated + */ + public $twitter; + + /** + * Facebook username + * @var string + * @deprecated + */ + public $facebook; + + /** + * Linkedin username + * @var string + * @deprecated + */ + public $linkedin; + + /** + * Jabber username + * @var string + * @deprecated + */ public $jabberid; + + public $photo; public $phone_pro; public $phone_perso; public $phone_mobile; @@ -122,6 +177,10 @@ class Contact extends CommonObject // END MODULEBUILDER PROPERTIES + /** + * Old copy + * @var Contact + */ public $oldcopy; // To contains a clone of this when we need to save old properties of object public $roles=array(); @@ -154,7 +213,7 @@ class Contact extends CommonObject $sql = "SELECT count(sp.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= ", ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -163,7 +222,7 @@ class Contact extends CommonObject } $sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element).')'; $sql.= " AND (sp.priv='0' OR (sp.priv='1' AND sp.fk_user_creat=".$user->id."))"; - if ($user->societe_id > 0) $sql.=" AND sp.fk_soc = ".$user->societe_id; + if ($user->socid > 0) $sql.=" AND sp.fk_soc = ".$user->socid; $resql=$this->db->query($sql); if ($resql) @@ -327,13 +386,13 @@ class Contact extends CommonObject $this->town=(empty($this->town)?'':$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->country_id); if (empty($this->statut)) $this->statut = 0; - + if (empty($this->civility_code) && ! is_numeric($this->civility_id)) $this->civility_code = $this->civility_id; // For backward compatibility $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET "; if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',"; elseif ($this->socid == -1) $sql .= " fk_soc=null,"; - $sql .= " civility='".$this->db->escape($this->civility_id)."'"; + $sql .= " civility='".$this->db->escape($this->civility_code)."'"; $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; $sql .= ", address='".$this->db->escape($this->address)."'"; @@ -344,10 +403,7 @@ class Contact extends CommonObject $sql .= ", poste='".$this->db->escape($this->poste)."'"; $sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", email='".$this->db->escape($this->email)."'"; - $sql .= ", skype='".$this->db->escape($this->skype)."'"; - $sql .= ", twitter='".$this->db->escape($this->twitter)."'"; - $sql .= ", facebook='".$this->db->escape($this->facebook)."'"; - $sql .= ", linkedin='".$this->db->escape($this->linkedin)."'"; + $sql .= ", socialnetworks = '".$this->db->escape(json_encode($this->socialnetworks))."'"; $sql .= ", photo='".$this->db->escape($this->photo)."'"; $sql .= ", birthday=".($this->birthday ? "'".$this->db->idate($this->birthday)."'" : "null"); $sql .= ", note_private = ".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null"); @@ -355,7 +411,6 @@ class Contact extends CommonObject $sql .= ", phone = ".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null"); $sql .= ", phone_perso = ".(isset($this->phone_perso)?"'".$this->db->escape($this->phone_perso)."'":"null"); $sql .= ", phone_mobile = ".(isset($this->phone_mobile)?"'".$this->db->escape($this->phone_mobile)."'":"null"); - $sql .= ", jabberid = ".(isset($this->jabberid)?"'".$this->db->escape($this->jabberid)."'":"null"); $sql .= ", priv = '".$this->db->escape($this->priv)."'"; $sql .= ", statut = ".$this->db->escape($this->statut); $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$this->db->escape($user->id)."'":"NULL"); @@ -394,6 +449,7 @@ class Contact extends CommonObject if (! $error && $this->user_id > 0) { + // If contact is linked to a user $tmpobj = new User($this->db); $tmpobj->fetch($this->user_id); $usermustbemodified = 0; @@ -437,29 +493,34 @@ class Contact extends CommonObject $tmpobj->email = $this->email; $usermustbemodified++; } - if ($tmpobj->skype != $this->skype) + if (!empty(array_diff($tmpobj->socialnetworks, $this->socialnetworks))) { - $tmpobj->skype = $this->skype; + $tmpobj->socialnetworks = $this->socialnetworks; $usermustbemodified++; } - if ($tmpobj->twitter != $this->twitter) - { - $tmpobj->twitter = $this->twitter; - $usermustbemodified++; - } - if ($tmpobj->facebook != $this->facebook) - { - $tmpobj->facebook = $this->facebook; - $usermustbemodified++; - } - if ($tmpobj->linkedin != $this->linkedin) - { - $tmpobj->linkedin = $this->linkedin; - $usermustbemodified++; - } + // if ($tmpobj->skype != $this->skype) + // { + // $tmpobj->skype = $this->skype; + // $usermustbemodified++; + // } + // if ($tmpobj->twitter != $this->twitter) + // { + // $tmpobj->twitter = $this->twitter; + // $usermustbemodified++; + // } + // if ($tmpobj->facebook != $this->facebook) + // { + // $tmpobj->facebook = $this->facebook; + // $usermustbemodified++; + // } + // if ($tmpobj->linkedin != $this->linkedin) + // { + // $tmpobj->linkedin = $this->linkedin; + // $usermustbemodified++; + // } if ($usermustbemodified) { - $result=$tmpobj->update($user, 0, 1, 1, 1); + $result = $tmpobj->update($user, 0, 1, 1, 1); if ($result < 0) { $error++; } } } @@ -628,7 +689,7 @@ class Contact extends CommonObject if ($this->birthday_alert) { //check existing - $sql_check = "SELECT * FROM ".MAIN_DB_PREFIX."user_alert WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id; + $sql_check = "SELECT rowid FROM ".MAIN_DB_PREFIX."user_alert WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id; $result_check = $this->db->query($sql_check); if (! $result_check || ($this->db->num_rows($result_check)<1)) { @@ -711,7 +772,8 @@ class Contact extends CommonObject $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement as state_id,"; $sql.= " c.birthday,"; - $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.skype, c.twitter, c.facebook, c.linkedin,"; + $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email,"; + $sql.= " c.socialnetworks,"; $sql.= " c.photo,"; $sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.canvas,"; $sql.= " c.import_key,"; @@ -780,11 +842,7 @@ class Contact extends CommonObject $this->phone_mobile = trim($obj->phone_mobile); $this->email = $obj->email; - $this->jabberid = $obj->jabberid; - $this->skype = $obj->skype; - $this->twitter = $obj->twitter; - $this->facebook = $obj->facebook; - $this->linkedin = $obj->linkedin; + $this->socialnetworks = (array) json_decode($obj->socialnetworks, true); $this->photo = $obj->photo; $this->priv = $obj->priv; $this->mail = $obj->email; @@ -1051,7 +1109,6 @@ class Contact extends CommonObject if (! $error) { - $this->db->commit(); return 1; } @@ -1161,11 +1218,11 @@ class Contact extends CommonObject //if ($this->civility_id) $label.= '
' . $langs->trans("Civility") . ': '.$this->civility_id; // TODO Translate cibilty_id code if (! empty($this->poste)) $label.= '
' . $langs->trans("Poste") . ': '.$this->poste; $label.= '
' . $langs->trans("EMail") . ': '.$this->email; - $phonelist=array(); - if ($this->phone_pro) $phonelist[]=$this->phone_pro; - if ($this->phone_mobile) $phonelist[]=$this->phone_mobile; - if ($this->phone_perso) $phonelist[]=$this->phone_perso; - $label.= '
' . $langs->trans("Phone") . ': '.join(', ', $phonelist); + $phonelist = array(); + if ($this->phone_pro) $phonelist[] = dol_print_phone($this->phone_pro, $this->country_code, $this->id, 0, '', ' ', 'phone'); + if ($this->phone_mobile) $phonelist[] = dol_print_phone($this->phone_mobile, $this->country_code, $this->id, 0, '', ' ', 'mobile'); + if ($this->phone_perso) $phonelist[] = dol_print_phone($this->phone_perso, $this->country_code, $this->id, 0, '', ' ', 'phone'); + $label.= '
' . $langs->trans("Phone") . ': '.implode(' ', $phonelist); $label.= '
' . $langs->trans("Address") . ': '.dol_format_address($this, 1, ' ', $langs); $url = DOL_URL_ROOT.'/contact/card.php?id='.$this->id; @@ -1254,45 +1311,35 @@ class Contact extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id statut * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { // phpcs:enable global $langs; - if ($mode == 0) - { - if ($statut==0 || $statut==5) return $langs->trans('Disabled'); - elseif ($statut==1 || $statut==4) return $langs->trans('Enabled'); - } - elseif ($mode == 1) - { - if ($statut==0 || $statut==5) return $langs->trans('Disabled'); - elseif ($statut==1 || $statut==4) return $langs->trans('Enabled'); - } - elseif ($mode == 2) - { - if ($statut==0 || $statut==5) return img_picto($langs->trans('Disabled'), 'statut5', 'class="pictostatus"').' '.$langs->trans('Disabled'); - elseif ($statut==1 || $statut==4) return img_picto($langs->trans('Enabled'), 'statut4', 'class="pictostatus"').' '.$langs->trans('Enabled'); - } - elseif ($mode == 3) - { - if ($statut==0 || $statut==5) return img_picto($langs->trans('Disabled'), 'statut5', 'class="pictostatus"'); - elseif ($statut==1 || $statut==4) return img_picto($langs->trans('Enabled'), 'statut4', 'class="pictostatus"'); - } - elseif ($mode == 4) - { - if ($statut==0) return img_picto($langs->trans('Disabled'), 'statut5', 'class="pictostatus"').' '.$langs->trans('Disabled'); - elseif ($statut==1 || $statut==4) return img_picto($langs->trans('Enabled'), 'statut4', 'class="pictostatus"').' '.$langs->trans('Enabled'); - } - elseif ($mode == 5) - { - if ($statut==0 || $statut==5) return ''.$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5', 'class="pictostatus"'); - elseif ($statut==1 || $statut==4) return ''.$langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4', 'class="pictostatus"'); - } + $labelStatus = array( + 0 => 'ActivityCeased', + 1 => 'InActivity', + 4 => 'InActivity', + 5 => 'ActivityCeased', + ); + $labelStatusShort = array( + 0 => 'ActivityCeased', + 1 => 'InActivity', + 4 => 'InActivity', + 5 => 'ActivityCeased', + ); + + $statusType = 'status4'; + if ($status==0 || $status==5) $statusType = 'status5'; + + $label = $langs->trans($labelStatus[$status]); + $labelshort = $langs->trans($labelStatusShort[$status]); + + return dolGetStatus($label, $labelshort, '', $statusType, $mode); } @@ -1300,14 +1347,14 @@ class Contact extends CommonObject /** * Return translated label of Public or Private * - * @param int $statut Type (0 = public, 1 = private) + * @param int $status Type (0 = public, 1 = private) * @return string Label translated */ - public function LibPubPriv($statut) + public function LibPubPriv($status) { // phpcs:enable global $langs; - if ($statut=='1') return $langs->trans('ContactPrivate'); + if ($status=='1') return $langs->trans('ContactPrivate'); else return $langs->trans('ContactPublic'); } @@ -1342,8 +1389,10 @@ class Contact extends CommonObject $this->country_code = 'FR'; $this->country = 'France'; $this->email = 'specimen@specimen.com'; - $this->skype = 'tom.hanson'; - + $this->skype = 'tom.hanson'; + $this->socialnetworks = array( + 'skype' => 'tom.hanson', + ); $this->phone_pro = '0909090901'; $this->phone_perso = '0909090902'; $this->phone_mobile = '0909090903'; @@ -1360,18 +1409,18 @@ class Contact extends CommonObject /** * Change status of a user * - * @param int $statut Status to set + * @param int $status Status to set * @return int <0 if KO, 0 if nothing is done, >0 if OK */ - public function setstatus($statut) + public function setstatus($status) { global $conf,$langs,$user; $error=0; // Check parameters - if ($this->statut == $statut) return 0; - else $this->statut = $statut; + if ($this->statut == $status) return 0; + else $this->statut = $status; $this->db->begin(); @@ -1514,8 +1563,8 @@ class Contact extends CommonObject /** * Get Contact roles for a thirdparty * - * @param string $element element type - * @return array|int + * @param string $element Element type + * @return array|int Array of contact roles or -1 * @throws Exception */ public function getContactRoles($element = '') diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index fa1117d5337..09e83c313c0 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -121,12 +121,12 @@ if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) } $morehtmlref.=''; -dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'rowid', 'nom', $morehtmlref); +dol_banner_tab($object, 'id', $linkback, ($user->socid?0:1), 'rowid', 'nom', $morehtmlref); print '
'; print '
'; -print ''; +print '
'; // Civility print '
'.$langs->trans("UserTitle").''; @@ -151,7 +151,7 @@ if ($object->thirdparty->fournisseur) if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']=$langs->transnoentitiesnoconv('SuppliersOrders'); // There no contact type for supplier proposals -// if ($conf->fournisseur->enabled && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); + // if ($conf->fournisseur->enabled && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); } print '
'; @@ -170,7 +170,7 @@ if ($type_element == 'fichinter') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; $documentstatic=new Fichinter($db); - $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, tc.libelle, '; + $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, tc.libelle as type_contact_label, '; $tables_from = MAIN_DB_PREFIX.'fichinterdet d'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'fichinter as f ON d.fk_fichinter=f.rowid'; $tables_from.= ' INNER JOIN '.MAIN_DB_PREFIX.'element_contact ec ON ec.element_id=f.rowid AND ec.fk_socpeople='.$object->id; @@ -183,7 +183,7 @@ elseif ($type_element == 'invoice') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $documentstatic=new Facture($db); - $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle, '; + $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, '; $tables_from = MAIN_DB_PREFIX.'facturedet d'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture as f ON d.fk_facture=f.rowid'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid'; @@ -198,7 +198,7 @@ elseif ($type_element == 'propal') { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $documentstatic=new Propal($db); - $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, tc.libelle, '; + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, '; $tables_from = MAIN_DB_PREFIX.'propaldet d'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'propal as c ON d.fk_propal=c.rowid'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid'; @@ -213,7 +213,7 @@ elseif ($type_element == 'order') { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $documentstatic=new Commande($db); - $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, tc.libelle, '; + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, '; $tables_from = MAIN_DB_PREFIX.'commandedet d'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande as c ON d.fk_commande=c.rowid'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid'; @@ -228,7 +228,7 @@ elseif ($type_element == 'supplier_invoice') { // Supplier : Show products from invoices. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $documentstatic=new FactureFournisseur($db); - $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle, '; + $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, '; $tables_from = MAIN_DB_PREFIX.'facture_fourn_det d'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn as f ON d.fk_facture_fourn=f.rowid'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid'; @@ -256,7 +256,7 @@ elseif ($type_element == 'supplier_order') { // Supplier : Show products from orders. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $documentstatic=new CommandeFournisseur($db); - $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, tc.libelle, '; + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, '; $tables_from = MAIN_DB_PREFIX.'commande_fournisseurdet d'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur as c ON d.fk_commande=c.rowid'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid'; @@ -272,7 +272,7 @@ elseif ($type_element == 'contract') require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $documentstatic=new Contrat($db); $documentstaticline=new ContratLigne($db); - $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, tc.libelle, '; + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, tc.libelle as type_contact_label, '; $tables_from = MAIN_DB_PREFIX.'contratdet d'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'contrat as c ON d.fk_contrat=c.rowid'; $tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid'; @@ -298,7 +298,7 @@ if (!empty($sql_select)) $sql.= " "; if ($type_element != 'fichinter') $sql.= ", p.ref as prod_ref, p.label as product_label"; $sql.= " FROM "/*.MAIN_DB_PREFIX."societe as s, "*/.$tables_from; -// if ($type_element != 'fichinter') $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid '; + // if ($type_element != 'fichinter') $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid '; $sql.= $where; $sql.= dolSqlDateFilter($dateprint, 0, $month, $year); if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'"; @@ -344,19 +344,19 @@ if ($sql_select) $num = $db->num_rows($resql); - $param="&socid=".$socid."&type_element=".$type_element; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + $param="&socid=".urlencode($socid)."&type_element=".urlencode($type_element); + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($sprod_fulldescr) $param.= "&sprod_fulldescr=".urlencode($sprod_fulldescr); if ($sref) $param.= "&sref=".urlencode($sref); - if ($month) $param.= "&month=".$month; - if ($year) $param.= "&year=".$year; - if ($optioncss != '') $param.='&optioncss='.$optioncss; + if ($month) $param.= "&month=".urlencode($month); + if ($year) $param.= "&year=".urlencode($year); + if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, '', 0, '', '', $limit); print '
'; - print ''."\n"; + print '
'."\n"; // Filters print ''; @@ -408,6 +408,7 @@ if ($sql_select) $documentstatic->statut=$objp->status; $documentstatic->status=$objp->status; $documentstatic->paye=$objp->paid; + $documentstatic->paid=$objp->paid; if (is_object($documentstaticline)) $documentstaticline->statut=$objp->status; @@ -524,7 +525,6 @@ if ($sql_select) else { if ($objp->fk_product > 0) { - echo $form->textwithtooltip($text, $description, 3, '', '', $i, 0, ''); // Show range @@ -536,7 +536,6 @@ if ($sql_select) print (! empty($objp->description) && $objp->description!=$objp->product_label)?'
'.dol_htmlentitiesbr($objp->description):''; } } else { - if (! empty($objp->label) || ! empty($objp->description)) { if ($type==1) $text = img_object($langs->trans('Service'), 'service'); @@ -575,8 +574,7 @@ if ($sql_select) */ print ''; - //print ''; - print ''; + print ''; // Type of contact label print ''; $total_qty+=$objp->prod_qty; @@ -607,7 +605,7 @@ if ($sql_select) } elseif (empty($type_element) || $type_element == -1) { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); - print '
'.$prodreftxt.''.$objp->libelle.''.$objp->type_contact_label.''.$objp->prod_qty.'
'."\n"; + print '
'."\n"; // Titles with sort buttons print ''; print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left '); @@ -623,7 +621,7 @@ if ($sql_select) } else { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); - print '
'."\n"; + print '
'."\n"; print ''; diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 6fb2803f715..8533cb13feb 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -51,7 +51,7 @@ if (! empty($canvas)) } // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission // Get parameters @@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 3cb46276d43..2546f5d19e4 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -34,7 +34,7 @@ $langs->load("companies"); // Security check $id = GETPOST("id", 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 826b5d3db39..cf2bf91bf99 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -36,7 +36,7 @@ $action=GETPOST('action', 'aZ09'); // Security check $id = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 1eed9497619..43c6c9c7f1d 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -41,6 +41,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "suppliers", "categories")); +$socialnetworks = getArrayOfSocialNetworks(); + $action=GETPOST('action', 'alpha'); $massaction=GETPOST('massaction', 'alpha'); $show_files=GETPOST('show_files', 'int'); @@ -52,7 +54,7 @@ $contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'contactl $id = GETPOST('id', 'int'); $contactid = GETPOST('id', 'int'); $ref = ''; // There is no ref for contacts -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contact', $contactid, ''); $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); @@ -71,10 +73,13 @@ $search_phone_mobile=GETPOST("search_phone_mobile", 'alpha'); $search_fax=GETPOST("search_fax", 'alpha'); $search_email=GETPOST("search_email", 'alpha'); $search_no_email=GETPOST("search_no_email", 'int'); -$search_skype=GETPOST("search_skype", 'alpha'); -$search_twitter=GETPOST("search_twitter", 'alpha'); -$search_facebook=GETPOST("search_facebook", 'alpha'); -$search_linkedin=GETPOST("search_linkedin", 'alpha'); +if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + $search_{$key} = GETPOST("search_".$key, 'alpha'); + } + } +} $search_priv=GETPOST("search_priv", 'alpha'); $search_categ=GETPOST("search_categ", 'int'); $search_categ_thirdparty=GETPOST("search_categ_thirdparty", 'int'); @@ -168,11 +173,6 @@ $arrayfields=array( 'p.fax'=>array('label'=>"Fax", 'checked'=>0), 'p.email'=>array('label'=>"EMail", 'checked'=>1), 'p.no_email'=>array('label'=>"No_Email", 'checked'=>0, 'enabled'=>(! empty($conf->mailing->enabled))), - 'p.skype'=>array('label'=>"Skype", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), - 'p.jabberid'=>array('label'=>"Jabber", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), - 'p.twitter'=>array('label'=>"Twitter", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), - 'p.facebook'=>array('label'=>"Facebook", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), - 'p.linkedin'=>array('label'=>"LinkedIn", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), 'p.thirdparty'=>array('label'=>"ThirdParty", 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)), 'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200), 'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500), @@ -180,16 +180,29 @@ $arrayfields=array( 'p.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), 'p.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100), ); -// Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) -{ - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } +if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + $arrayfields['p.'.$key] = array( + 'label' => $value['label'], + 'checked' => 0, + ); + } + } } +// Extra fields +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) +{ + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } +} +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + -$object=new Contact($db); if (($id > 0 || ! empty($ref)) && $action != 'add') { $result=$object->fetch($id, $ref); @@ -233,10 +246,13 @@ if (empty($reshook)) $search_fax=""; $search_email=""; $search_no_email=-1; - $search_skype=""; - $search_twitter=""; - $search_facebook=""; - $search_linkedin=""; + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + $search_{$key} = ""; + } + } + } $search_priv=""; $search_status=-1; $search_categ=''; @@ -251,8 +267,8 @@ if (empty($reshook)) // Mass actions $objectclass='Contact'; $objectlabel='Contact'; - $permtoread = $user->rights->societe->lire; - $permtodelete = $user->rights->societe->supprimer; + $permissiontoread = $user->rights->societe->lire; + $permissiontodelete = $user->rights->societe->supprimer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -272,11 +288,14 @@ $contactstatic=new Contact($db); $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); $sql = "SELECT s.rowid as socid, s.nom as name,"; -$sql.= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.no_email, p.skype,"; +$sql.= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.no_email,"; +$sql.= " p.socialnetworks,"; $sql.= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,"; -$sql.= " co.code as country_code"; +$sql.= " co.label as country, co.code as country_code"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -332,10 +351,14 @@ if (strlen($search_phone_perso)) $sql.= natural_search('p.phone_perso', $sear if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone_pro); if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile); if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax); -if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype); -if (strlen($search_twitter)) $sql.= natural_search('p.twitter', $search_twitter); -if (strlen($search_facebook)) $sql.= natural_search('p.facebook', $search_facebook); -if (strlen($search_linkedin)) $sql.= natural_search('p.linkedin', $search_linkedin); +if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active'] && strlen($search_{$key})) { + //$sql.= natural_search("p.socialnetworks->'$.".$key."'", $search_{$key}); + $sql.= ' AND p.socialnetworks LIKE \'%"'.$key.'":"'.$search_{$key}.'%\''; + } + } +} if (strlen($search_email)) $sql.= natural_search('p.email', $search_email); if (strlen($search_zip)) $sql.= natural_search("p.zip", $search_zip); if (strlen($search_town)) $sql.= natural_search("p.town", $search_town); @@ -636,35 +659,17 @@ if (! empty($arrayfields['p.no_email']['checked'])) print $form->selectarray('search_no_email', array('-1'=>'', '0'=>$langs->trans('No'), '1'=>$langs->trans('Yes')), $search_no_email); print ''; } -if (! empty($arrayfields['p.skype']['checked'])) -{ - print ''; -} -if (! empty($arrayfields['p.jabberid']['checked'])) -{ - print ''; -} -if (! empty($arrayfields['p.twitter']['checked'])) -{ - print ''; -} -if (! empty($arrayfields['p.facebook']['checked'])) -{ - print ''; -} -if (! empty($arrayfields['p.linkedin']['checked'])) -{ - print ''; +if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + if (! empty($arrayfields['p.'.$key]['checked'])) + { + print ''; + } + } + } } if (! empty($arrayfields['p.thirdparty']['checked'])) { @@ -675,9 +680,9 @@ if (! empty($arrayfields['p.thirdparty']['checked'])) if (! empty($arrayfields['p.priv']['checked'])) { print ''; + $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('search_priv', $selectarray, $search_priv, 1); + print ''; } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -738,11 +743,13 @@ if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($arrayfields['p.fax']['label'], $_SERVER["PHP_SELF"], "p.fax", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.no_email']['checked'])) print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center '); -if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($arrayfields['p.skype']['label'], $_SERVER["PHP_SELF"], "p.skype", $begin, $param, '', $sortfield, $sortorder); -if (! empty($arrayfields['p.jabberid']['checked'])) print_liste_field_titre($arrayfields['p.jabberid']['label'], $_SERVER["PHP_SELF"], "p.jabberid", $begin, $param, '', $sortfield, $sortorder); -if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field_titre($arrayfields['p.twitter']['label'], $_SERVER["PHP_SELF"], "p.twitter", $begin, $param, '', $sortfield, $sortorder); -if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'], $_SERVER["PHP_SELF"], "p.facebook", $begin, $param, '', $sortfield, $sortorder); -if (! empty($arrayfields['p.linkedin']['checked'])) print_liste_field_titre($arrayfields['p.linkedin']['label'], $_SERVER["PHP_SELF"], "p.linkedin", $begin, $param, '', $sortfield, $sortorder); +if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active'] && ! empty($arrayfields['p.'.$key]['checked'])) { + print_liste_field_titre($arrayfields['p.'.$key]['label'], $_SERVER["PHP_SELF"], "p.".$key, $begin, $param, '', $sortfield, $sortorder); + } + } +} if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, '', $sortfield, $sortorder, 'center '); // Extra fields @@ -779,7 +786,7 @@ while ($i < min($num, $limit)) $obj = $db->fetch_object($result); print ''; - + $arraysocialnetworks = (array) json_decode($obj->socialnetworks, true); $contactstatic->lastname=$obj->lastname; $contactstatic->firstname=''; $contactstatic->id=$obj->rowid; @@ -791,6 +798,9 @@ while ($i < min($num, $limit)) $contactstatic->phone_mobile=$obj->phone_mobile; $contactstatic->zip=$obj->zip; $contactstatic->town=$obj->town; + $contactstatic->socialnetworks = $arraysocialnetworks; + $contactstatic->country = $obj->country; + $contactstatic->country_code = $obj->country_code; // ID if (! empty($arrayfields['p.rowid']['checked'])) @@ -889,45 +899,23 @@ while ($i < min($num, $limit)) print ''; if (! $i) $totalarray['nbfield']++; } - // Skype - if (! empty($arrayfields['p.skype']['checked'])) - { - if (! empty($conf->socialnetworks->enabled)) { print ''; } - if (! $i) $totalarray['nbfield']++; + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active'] && ! empty($arrayfields['p.'.$key]['checked'])) { + print ''; + if (! $i) $totalarray['nbfield']++; + } + } } - // Jabber - if (! empty($arrayfields['p.jabberid']['checked'])) - { - if (! empty($conf->socialnetworks->enabled)) { print ''; } - if (! $i) $totalarray['nbfield']++; - } - // Twitter - if (! empty($arrayfields['p.twitter']['checked'])) - { - if (! empty($conf->socialnetworks->enabled)) { print ''; } - if (! $i) $totalarray['nbfield']++; - } - // Facebook - if (! empty($arrayfields['p.facebook']['checked'])) - { - if (! empty($conf->socialnetworks->enabled)) { print ''; } - if (! $i) $totalarray['nbfield']++; - } - // LinkedIn - if (! empty($arrayfields['p.linkedin']['checked'])) - { - if (! empty($conf->socialnetworks->enabled)) { print ''; } - if (! $i) $totalarray['nbfield']++; - } // Company if (! empty($arrayfields['p.thirdparty']['checked'])) { print ''; + print ''; if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['p.import_key']['checked'])) diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 72ee557c085..230211cca5e 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -36,7 +36,7 @@ $langs->load("companies"); // Security check $id = GETPOST('id', 'int'); -if ($user->societe_id) $id=$user->societe_id; +if ($user->socid) $id=$user->socid; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 3a09f294849..f3a93ebac33 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -35,7 +35,7 @@ $id = GETPOST('id', 'int'); $action = GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); @@ -149,7 +149,7 @@ if ($action == 'edit') dol_fiche_head($head, 'perso', $title, 0, 'contact'); - print '
'.$langs->trans("FeatureNotYetAvailable").'
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; - $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('search_priv', $selectarray, $search_priv, 1); - print '
'.yn($obj->no_email).''.dol_print_socialnetworks($obj->skype, $obj->rowid, $obj->socid, 'skype').''.dol_print_socialnetworks($arraysocialnetworks[$key], $obj->rowid, $obj->socid, $key).''.dol_print_socialnetworks($obj->jabberid, $obj->rowid, $obj->socid, 'jabberid').''.dol_print_socialnetworks($obj->twitter, $obj->rowid, $obj->socid, 'twitter').''.dol_print_socialnetworks($obj->facebook, $obj->rowid, $obj->socid, 'facebook').''.dol_print_socialnetworks($obj->linkedin, $obj->rowid, $obj->socid, 'linkedin').''; if ($obj->socid) { - $objsoc = new Societe($db); - $objsoc->fetch($obj->socid); - print $objsoc->getNomUrl(1); + $objsoc = new Societe($db); + $objsoc->fetch($obj->socid); + print $objsoc->getNomUrl(1); } else print ' '; @@ -967,7 +955,7 @@ while ($i < min($num, $limit)) // Status if (! empty($arrayfields['p.statut']['checked'])) { - print ''.$contactstatic->getLibStatut(3).''.$contactstatic->getLibStatut(5).'
'; + print '
'; // Ref print '
'.$langs->trans("Ref").''; @@ -319,7 +319,7 @@ else if ($action != 'edit') { // Barre d'actions - if ($user->societe_id == 0) + if ($user->socid == 0) { print '
'; diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index e96425a0dae..4eb794a3054 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -52,7 +52,7 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contrat', $id, ''); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -164,19 +164,20 @@ if ($id > 0) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->contrat->creer) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index bbefeb7eb4f..d1239087cfe 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -62,7 +62,7 @@ $datecontrat=''; $usehm=(! empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:0); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'contrat', $id); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -331,9 +331,8 @@ if (empty($reshook)) // Extrafields $array_options = array(); - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if - // trigger used - { + // For avoid conflicts if trigger used + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_options = $lines[$i]->array_options; } @@ -445,13 +444,13 @@ if (empty($reshook)) $error++; } - $date_start = dol_mktime(GETPOST('date_start' . $predef . 'hour'), GETPOST('date_start' . $predef . 'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start' . $predef . 'month'), GETPOST('date_start' . $predef . 'day'), GETPOST('date_start' . $predef . 'year')); - $date_end = dol_mktime(GETPOST('date_end' . $predef . 'hour'), GETPOST('date_end' . $predef . 'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end' . $predef . 'month'), GETPOST('date_end' . $predef . 'day'), GETPOST('date_end' . $predef . 'year')); - if (!empty($date_start) && !empty($date_end) && $date_start > $date_end) - { - setEventMessages($langs->trans("Error").': '.$langs->trans("DateStartPlanned").' > '.$langs->trans("DateEndPlanned"), null, 'errors'); - $error++; - } + $date_start = dol_mktime(GETPOST('date_start' . $predef . 'hour'), GETPOST('date_start' . $predef . 'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start' . $predef . 'month'), GETPOST('date_start' . $predef . 'day'), GETPOST('date_start' . $predef . 'year')); + $date_end = dol_mktime(GETPOST('date_end' . $predef . 'hour'), GETPOST('date_end' . $predef . 'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end' . $predef . 'month'), GETPOST('date_end' . $predef . 'day'), GETPOST('date_end' . $predef . 'year')); + if (!empty($date_start) && !empty($date_end) && $date_start > $date_end) + { + setEventMessages($langs->trans("Error").': '.$langs->trans("DateStartPlanned").' > '.$langs->trans("DateEndPlanned"), null, 'errors'); + $error++; + } // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -532,7 +531,7 @@ if (empty($reshook)) $pu_ht = price2num($pu_ttc / (1 + ($tmpvat/100)), 'MU'); } else - { + { $pu_ttc = price2num($pu_ht * (1 + ($tmpvat/100)), 'MU'); } } @@ -728,9 +727,9 @@ if (empty($reshook)) $objectline->pa_ht=$pa_ht; if ($fk_unit > 0) { - $objectline->fk_unit = GETPOST('unit'); + $objectline->fk_unit = GETPOST('unit'); } else { - $objectline->fk_unit = null; + $objectline->fk_unit = null; } // Extrafields @@ -893,7 +892,6 @@ if (empty($reshook)) { $cancelbutton = GETPOST('cancel', 'alpha'); if (!$cancelbutton) { - $object->oldcopy = dol_clone($object); $result = $object->setValueFrom('ref_supplier', GETPOST('ref_supplier', 'alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY'); @@ -1000,7 +998,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->contrat->dir_output; - $permissioncreate = $user->rights->contrat->creer; + $permissiontoadd = $user->rights->contrat->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails @@ -1173,7 +1171,7 @@ if ($action == 'create') dol_fiche_head(); - print ''; + print '
'; // Ref print ''; - if (empty($user->societe_id)) + if (empty($user->socid)) { print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) { - print ''; - } + //if (!empty($conf->multicurrency->enabled)) { + // print ''; + //} print ''; if ($conf->global->PRODUCT_USE_UNITS) print ''; print ''; @@ -1571,8 +1570,7 @@ else $objp = $db->fetch_object($result); - // - + // Line in view mode if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) { print ''; @@ -1608,21 +1606,21 @@ else { print '\n"; } - // TVA + // VAT print ''; // Price print '\n"; // Price multicurrency - if (!empty($conf->multicurrency->enabled)) { + /*if (!empty($conf->multicurrency->enabled)) { print ''; - } - // Quantite + }*/ + // Quantity print ''; // Unit if($conf->global->PRODUCT_USE_UNITS) print ''; - // Remise + // Discount if ($objp->remise_percent > 0) { print '\n"; @@ -1711,7 +1709,7 @@ else print $line->showOptionals($extrafields, 'view', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } } - // Ligne en mode update + // Line in mode update else { // Ligne carac @@ -1741,18 +1739,34 @@ else $doleditor->Create(); print ''; + + // VAT print ''; + + // Price print ''; + + // Price multicurrency + /*if (!empty($conf->multicurrency->enabled)) { + print ''; + }*/ + + // Quantity print ''; + + // Unit if ($conf->global->PRODUCT_USE_UNITS) { print ''; } + + // Discount print ''; + if (! empty($usemargins)) { print ''; print ''; print '
'.$langs->trans('Ref').''; @@ -1258,7 +1256,7 @@ if ($action == 'create') print $doleditor->Create(1); print '
'.$langs->trans("NotePrivate").''; $doleditor=new DolEditor('note_private', $note_private, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, '90%'); @@ -1420,19 +1418,20 @@ else $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->contrat->creer) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { if (! empty($object->fk_project)) { $proj = new Project($db); @@ -1559,9 +1558,9 @@ else print '
'.$langs->trans("ServiceNb", $cursorline).''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("PriceUHTCurrency").''.$langs->trans("PriceUHTCurrency").''.$langs->trans("Qty").''.$langs->trans("Unit").''.$langs->trans("ReductionShort").'
'.img_object($langs->trans("ShowProductOrService"), ($objp->product_type ? 'service' : 'product')).' '.dol_htmlentitiesbr($objp->description)."'; print vatrate($objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), '%', $objp->info_bits); print ''.($objp->subprice != '' ? price($objp->subprice) : '')."'.price($objp->multicurrency_subprice).''.$objp->qty.''.$langs->trans($object->lines[$cursorline-1]->getLabelOfUnit()).''.$objp->remise_percent."%'; print $form->load_tva("eltva_tx", $objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), $mysoc, $object->thirdparty, $objp->fk_product, $objp->info_bits, $objp->product_type, 0, 1); print ''.price($objp->multicurrency_subprice).''; print $form->selectUnits($objp->fk_unit, "unit"); print '%'; @@ -1876,7 +1890,7 @@ else print '
'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).''; - if ($user->societe_id == 0) + if ($user->socid == 0) { if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline') { @@ -2063,6 +2077,7 @@ else if ($action != 'editline') { $forcetoshowtitlelines=1; + if (empty($object->multicurrency_code)) $object->multicurrency_code = $conf->currency; // TODO Remove this when multicurrency supported on contracts // Add free products/services $object->formAddObjectLine(1, $mysoc, $soc); @@ -2083,7 +2098,7 @@ else * Buttons */ - if ($user->societe_id == 0) + if ($user->socid == 0) { print '
'; @@ -2239,7 +2254,7 @@ $db->close(); if (! empty($conf->margin->enabled) && $action == 'editline') { // TODO Why this ? To manage margin on contracts ? -?> + ?> - * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2015-2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -189,6 +189,12 @@ class Contrat extends CommonObject protected $lines_id_index_mapper=array(); + const STATUS_DRAFT = 0; + const STATUS_VALIDATED = 1; + const STATUS_CLOSED = 2; + + + /** * Constructor * @@ -221,7 +227,6 @@ class Contrat extends CommonObject $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/contract/"); // Load file with numbering class (if found) @@ -862,9 +867,9 @@ class Contrat extends CommonObject // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { - $line = new Product($this->db); - $line->fetch($objp->fk_product); - $line->getMultiLangs(); + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); } $this->lines[$pos] = $line; @@ -1412,7 +1417,6 @@ class Contrat extends CommonObject if ($this->statut >= 0) { - // Clean parameters $pu_ht=price2num($pu_ht); $pu_ttc=price2num($pu_ttc); @@ -1731,7 +1735,6 @@ class Contrat extends CommonObject $result=$this->update_statut($user); if ($result >= 0) { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options)>0) // For avoid conflicts if trigger used { $contractline = new ContratLigne($this->db); @@ -1872,8 +1875,8 @@ class Contrat extends CommonObject /** * Return label of a contract status * - * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length - * @return string Label + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto, 7=Same than 6 with fixed length + * @return string Label */ public function getLibStatut($mode) { @@ -1884,40 +1887,32 @@ class Contrat extends CommonObject /** * Renvoi label of a given contrat status * - * @param int $statut Status id - * @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length + * @param int $status Id status + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto, 7=Same than 6 with fixed length * @return string Label */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { // phpcs:enable global $langs; - $langs->load("contracts"); - if ($mode == 0) + + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { - if ($statut == 0) { return $langs->trans("ContractStatusDraft"); } - elseif ($statut == 1) { return $langs->trans("ContractStatusValidated"); } - elseif ($statut == 2) { return $langs->trans("ContractStatusClosed"); } + global $langs; + $langs->load("contracts"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('ContractStatusDraft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('ContractStatusValidated'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('ContractStatusClosed'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('ContractStatusDraft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('ContractStatusValidated'); + $this->labelStatusShort[self::STATUS_CLOSED] = $langs->trans('ContractStatusClosed'); } - elseif ($mode == 1) - { - if ($statut == 0) { return $langs->trans("ContractStatusDraft"); } - elseif ($statut == 1) { return $langs->trans("ContractStatusValidated"); } - elseif ($statut == 2) { return $langs->trans("ContractStatusClosed"); } - } - elseif ($mode == 2) - { - if ($statut == 0) { return img_picto($langs->trans('ContractStatusDraft'), 'statut0').' '.$langs->trans("ContractStatusDraft"); } - elseif ($statut == 1) { return img_picto($langs->trans('ContractStatusValidated'), 'statut4').' '.$langs->trans("ContractStatusValidated"); } - elseif ($statut == 2) { return img_picto($langs->trans('ContractStatusClosed'), 'statut6').' '.$langs->trans("ContractStatusClosed"); } - } - elseif ($mode == 3) - { - if ($statut == 0) { return img_picto($langs->trans('ContractStatusDraft'), 'statut0'); } - elseif ($statut == 1) { return img_picto($langs->trans('ContractStatusValidated'), 'statut4'); } - elseif ($statut == 2) { return img_picto($langs->trans('ContractStatusClosed'), 'statut6'); } - } - elseif ($mode == 4 || $mode == 6 || $mode == 7) + + $statusType = 'status'.$status; + if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + if ($status == self::STATUS_VALIDATED) $statusType = 'status6'; + + if ($mode == 4 || $mode == 6 || $mode == 7) { $text=''; if ($mode == 4) { @@ -1927,22 +1922,20 @@ class Contrat extends CommonObject $text.=':     '; $text.=''; } - $text.=($mode == 7?'
':''); - $text.=($mode != 7 || $this->nbofserviceswait > 0) ? ($this->nbofserviceswait.ContratLigne::LibStatut(0, 3, -1, 'class="paddingleft2 inline-block valigntextbottom"')).(($mode != 7 || $this->nbofservicesopened || $this->nbofservicesexpired || $this->nbofservicesclosed)?'   ':'') : ''; - $text.=($mode == 7?'
':''); - $text.=($mode != 7 || $this->nbofservicesopened > 0) ? ($this->nbofservicesopened.ContratLigne::LibStatut(4, 3, 0, 'class="paddingleft2 inline-block valigntextbottom"')).(($mode != 7 || $this->nbofservicesexpired || $this->nbofservicesclosed)?'   ':'') : ''; - $text.=($mode == 7?'
':''); - $text.=($mode != 7 || $this->nbofservicesexpired > 0) ? ($this->nbofservicesexpired.ContratLigne::LibStatut(4, 3, 1, 'class="paddingleft2 inline-block valigntextbottom"')).(($mode != 7 || $this->nbofservicesclosed)?'   ':'') : ''; - $text.=($mode == 7?'
':''); - $text.=($mode != 7 || $this->nbofservicesclosed > 0) ? ($this->nbofservicesclosed.ContratLigne::LibStatut(5, 3, -1, 'class="paddingleft2 inline-block valigntextbottom"')) : ''; - $text.=($mode == 7?'
':''); + $text.=($mode == 7?'':''); + $text.=($mode != 7 || $this->nbofserviceswait > 0) ? ($this->nbofserviceswait.ContratLigne::LibStatut(0, 3, -1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesopened || $this->nbofservicesexpired || $this->nbofservicesclosed)?'   ':'') : ''; + $text.=($mode == 7?'':''); + $text.=($mode != 7 || $this->nbofservicesopened > 0) ? ($this->nbofservicesopened.ContratLigne::LibStatut(4, 3, 0, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesexpired || $this->nbofservicesclosed)?'   ':'') : ''; + $text.=($mode == 7?'':''); + $text.=($mode != 7 || $this->nbofservicesexpired > 0) ? ($this->nbofservicesexpired.ContratLigne::LibStatut(4, 3, 1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesclosed)?'   ':'') : ''; + $text.=($mode == 7?'':''); + $text.=($mode != 7 || $this->nbofservicesclosed > 0) ? ($this->nbofservicesclosed.ContratLigne::LibStatut(5, 3, -1, 'class="marginleft2"')) : ''; + $text.=($mode == 7?'':''); return $text; } - elseif ($mode == 5) + else { - if ($statut == 0) { return $langs->trans("ContractStatusDraft").' '.img_picto($langs->trans('ContractStatusDraft'), 'statut0'); } - elseif ($statut == 1) { return $langs->trans("ContractStatusValidated").' '.img_picto($langs->trans('ContractStatusValidated'), 'statut4'); } - elseif ($statut == 2) { return $langs->trans("ContractStatusClosed").' '.img_picto($langs->trans('ContractStatusClosed'), 'statut6'); } + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } } @@ -2076,10 +2069,10 @@ class Contrat extends CommonObject /** * Return list of line rowid * - * @param int $statut Status of lines to get + * @param int $status Status of lines to get * @return array|int Array of line's rowid or <0 if error */ - public function array_detail($statut = -1) + public function array_detail($status = -1) { // phpcs:enable $tab=array(); @@ -2087,7 +2080,7 @@ class Contrat extends CommonObject $sql = "SELECT cd.rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd"; $sql.= " WHERE fk_contrat =".$this->id; - if ($statut >= 0) $sql.= " AND statut = '$statut'"; + if ($status >= 0) $sql.= " AND statut = ".$status; dol_syslog(get_class($this)."::array_detail()", LOG_DEBUG); $resql=$this->db->query($sql); @@ -2165,7 +2158,7 @@ class Contrat extends CommonObject $this->from = " FROM ".MAIN_DB_PREFIX."contrat as c"; $this->from.= ", ".MAIN_DB_PREFIX."contratdet as cd"; $this->from.= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $this->from.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $this->from.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if ($mode == 'inactive') { @@ -2196,8 +2189,8 @@ class Contrat extends CommonObject } $sql.= " AND c.fk_soc = s.rowid"; $sql.= " AND c.entity = ".$conf->entity; - if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.=" AND c.fk_soc = ".$user->socid; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; $resql=$this->db->query($sql); if ($resql) @@ -2268,7 +2261,7 @@ class Contrat extends CommonObject $sql = "SELECT count(c.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."contrat as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -2422,7 +2415,6 @@ class Contrat extends CommonObject $langs->load("contracts"); if (! dol_strlen($modele)) { - $modele = 'strato'; if ($this->modelpdf) { @@ -2732,65 +2724,34 @@ class ContratLigne extends CommonObjectLine /** * Return label of a contract line status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $expired 0=Not expired, 1=Expired, -1=Both or unknown * @param string $moreatt More attribute * @return string Libelle */ - public static function LibStatut($statut, $mode, $expired = -1, $moreatt = '') + public static function LibStatut($status, $mode, $expired = -1, $moreatt = '') { // phpcs:enable global $langs; $langs->load("contracts"); - if ($mode == 0) + + if ($status == self::STATUS_INITIAL) { $labelStatus = $langs->trans("ServiceStatusInitial"); $labelStatusShort = $langs->trans("ServiceStatusInitial"); } + elseif ($status == self::STATUS_OPEN && $expired == -1) { $labelStatus = $langs->trans("ServiceStatusRunning"); $labelStatusShort = $langs->trans("ServiceStatusRunning"); } + elseif ($status == self::STATUS_OPEN && $expired == 0) { $labelStatus = $langs->trans("ServiceStatusNotLate"); $labelStatusShort = $langs->trans("ServiceStatusNotLateShort"); } + elseif ($status == self::STATUS_OPEN && $expired == 1) { $labelStatus = $langs->trans("ServiceStatusLate"); $labelStatusShort = $langs->trans("ServiceStatusLateShort"); } + elseif ($status == self::STATUS_CLOSED) { $labelStatus = $langs->trans("ServiceStatusClosed"); $labelStatusShort = $langs->trans("ServiceStatusClosed"); } + + $statusType = 'status'.$status; + if ($status == self::STATUS_OPEN && $expired == 1) $statusType = 'status3'; + if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + + $params = array(); $reg = array(); + if (preg_match('/class="(.*)"/', $moreatt, $reg)) { - if ($statut == self::STATUS_INITIAL) { return $langs->trans("ServiceStatusInitial"); } - elseif ($statut == self::STATUS_OPEN && $expired == -1) { return $langs->trans("ServiceStatusRunning"); } - elseif ($statut == self::STATUS_OPEN && $expired == 0) { return $langs->trans("ServiceStatusNotLate"); } - elseif ($statut == self::STATUS_OPEN && $expired == 1) { return $langs->trans("ServiceStatusLate"); } - elseif ($statut == self::STATUS_CLOSED) { return $langs->trans("ServiceStatusClosed"); } - } - elseif ($mode == 1) - { - if ($statut == self::STATUS_INITIAL) { return $langs->trans("ServiceStatusInitial"); } - elseif ($statut == self::STATUS_OPEN && $expired == -1) { return $langs->trans("ServiceStatusRunning"); } - elseif ($statut == self::STATUS_OPEN && $expired == 0) { return $langs->trans("ServiceStatusNotLateShort"); } - elseif ($statut == self::STATUS_OPEN && $expired == 1) { return $langs->trans("ServiceStatusLateShort"); } - elseif ($statut == self::STATUS_CLOSED) { return $langs->trans("ServiceStatusClosed"); } - } - elseif ($mode == 2) - { - if ($statut == self::STATUS_INITIAL) { return img_picto($langs->trans('ServiceStatusInitial'), 'statut0').' '.$langs->trans("ServiceStatusInitial"); } - elseif ($statut == self::STATUS_OPEN && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'), 'statut4').' '.$langs->trans("ServiceStatusRunning"); } - elseif ($statut == self::STATUS_OPEN && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'), 'statut4').' '.$langs->trans("ServiceStatusNotLateShort"); } - elseif ($statut == self::STATUS_OPEN && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'), 'statut3').' '.$langs->trans("ServiceStatusLateShort"); } - elseif ($statut == self::STATUS_CLOSED) { return img_picto($langs->trans('ServiceStatusClosed'), 'statut6') .' '.$langs->trans("ServiceStatusClosed"); } - } - elseif ($mode == 3) - { - if ($statut == self::STATUS_INITIAL) { return img_picto($langs->trans('ServiceStatusInitial'), 'statut0', $moreatt); } - elseif ($statut == self::STATUS_OPEN && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'), 'statut4', $moreatt); } - elseif ($statut == self::STATUS_OPEN && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'), 'statut4', $moreatt); } - elseif ($statut == self::STATUS_OPEN && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'), 'statut3', $moreatt); } - elseif ($statut == self::STATUS_CLOSED) { return img_picto($langs->trans('ServiceStatusClosed'), 'statut6', $moreatt); } - } - elseif ($mode == 4) - { - if ($statut == self::STATUS_INITIAL) { return img_picto($langs->trans('ServiceStatusInitial'), 'statut0').' '.$langs->trans("ServiceStatusInitial"); } - elseif ($statut == self::STATUS_OPEN && $expired == -1) { return img_picto($langs->trans('ServiceStatusRunning'), 'statut4').' '.$langs->trans("ServiceStatusRunning"); } - elseif ($statut == self::STATUS_OPEN && $expired == 0) { return img_picto($langs->trans('ServiceStatusNotLate'), 'statut4').' '.$langs->trans("ServiceStatusNotLate"); } - elseif ($statut == self::STATUS_OPEN && $expired == 1) { return img_picto($langs->trans('ServiceStatusLate'), 'statut3').' '.$langs->trans("ServiceStatusLate"); } - elseif ($statut == self::STATUS_CLOSED) { return img_picto($langs->trans('ServiceStatusClosed'), 'statut6') .' '.$langs->trans("ServiceStatusClosed"); } - } - elseif ($mode == 5) - { - if ($statut == self::STATUS_INITIAL) { return $langs->trans("ServiceStatusInitial").' '.img_picto($langs->trans('ServiceStatusInitial'), 'statut0'); } - elseif ($statut == self::STATUS_OPEN && $expired == -1) { return $langs->trans("ServiceStatusRunning").' '.img_picto($langs->trans('ServiceStatusRunning'), 'statut4'); } - elseif ($statut == self::STATUS_OPEN && $expired == 0) { return $langs->trans("ServiceStatusNotLateShort").' '.img_picto($langs->trans('ServiceStatusNotLateShort'), 'statut4'); } - elseif ($statut == self::STATUS_OPEN && $expired == 1) { return $langs->trans("ServiceStatusLateShort").' '.img_picto($langs->trans('ServiceStatusLate'), 'statut3'); } - elseif ($statut == self::STATUS_CLOSED) { return $langs->trans("ServiceStatusClosed").' '.img_picto($langs->trans('ServiceStatusClosed'), 'statut6'); } + $params = array('badgeParams'=>array('css' => $reg[1])); } + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', $params); } /** diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 85247327dda..56a0c198db3 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -43,7 +43,7 @@ $id = GETPOST('id', 'int'); $ref=GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'contrat', $id); $object = new Contrat($db); diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 7fbc291839d..fceba285f47 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -46,11 +46,11 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { unset($_GET["action"]); $action=''; - $socid = $user->societe_id; + $socid = $user->socid; } $result = restrictedArea($user, 'contrat', $id); diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index a3add7c28df..4196b604bec 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -46,7 +46,7 @@ $statut=GETPOST('statut')?GETPOST('statut'):1; // Security check $socid=0; $id = GETPOST('id', 'int'); -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'contrat', $id); $staticcompany=new Societe($db); @@ -85,12 +85,14 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; - print ''; + + print '
'; + print '
'; print ''; print ''; print ''; print ''; - print "
'.$langs->trans("Search").'
'.$langs->trans("Contract").':
\n"; + print "
\n"; print "
"; } } @@ -114,7 +116,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX $sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; $sql.= " AND (cd.statut != 4 OR (cd.statut = 4 AND (cd.date_fin_validite is null or cd.date_fin_validite >= '".$db->idate($now)."')))"; $sql.= " AND c.entity IN (".getEntity('contract', 0).")"; -if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND c.fk_soc = '.$user->socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " GROUP BY cd.statut"; $resql = $db->query($sql); @@ -151,7 +153,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX $sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; $sql.= " AND (cd.statut = 4 AND cd.date_fin_validite < '".$db->idate($now)."')"; $sql.= " AND c.entity IN (".getEntity('contract', 0).")"; -if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND c.fk_soc = '.$user->socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " GROUP BY cd.statut"; $resql = $db->query($sql); @@ -183,8 +185,8 @@ else dol_print_error($db); } - -print ''; +print '
'; +print '
'; print ''."\n"; $listofstatus=array(0,4,4,5); $bool=false; foreach($listofstatus as $status) @@ -192,7 +194,6 @@ foreach($listofstatus as $status) $dataseries[]=array($staticcontratligne->LibStatut($status, 1, ($bool?1:0)),(isset($nb[$status.$bool])?(int) $nb[$status.$bool]:0)); if (empty($conf->use_javascript_ajax)) { - print ''; print ''; print ''; @@ -233,7 +234,7 @@ foreach($listofstatus as $status) //if ($totalinprocess != $total) //print ''; print ''; -print "
'.$langs->trans("Statistics").' - '.$langs->trans("Services").'
'.$staticcontratligne->LibStatut($status, 0, ($bool?1:0)).''.($nb[$status.$bool]?$nb[$status.$bool]:0).' '.$staticcontratligne->LibStatut($status, 3, ($bool?1:0)).'
'.$langs->trans("Total").' ('.$langs->trans("ServicesRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; +print "

"; // Draft contracts @@ -256,7 +257,8 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $num = $db->num_rows($resql); - print ''; + print '
'; + print '
'; print ''; print ''; if ($num) @@ -291,7 +293,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { print ''; } - print "
'.$langs->trans("DraftContracts").($num?' '.$num.'':'').'
'.$langs->trans("NoContracts").'

"; + print "

"; $db->free($resql); } else @@ -334,7 +336,8 @@ if ($result) $num = $db->num_rows($result); $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; @@ -369,7 +372,7 @@ if ($result) } $db->free($result); - print "
'.$langs->trans("LastContracts", 5).''.$langs->trans("DateModification").'
"; + print "
"; } else { @@ -401,7 +404,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ''; + print '
'; + print '
'; print ''; print "\n"; @@ -447,7 +451,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("LastModifiedServices", $max).'
"; + print "
"; } else { @@ -480,7 +484,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ''; + print '
'; + print '
'; print ''; print "\n"; @@ -525,7 +530,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("NotActivatedServices").' '.$num.'
"; + print "
"; } else { @@ -559,7 +564,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ''; + print '
'; + print '
'; print ''; print "\n"; @@ -604,7 +610,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("ListOfExpiredServices").' '.$num.'
"; + print "
"; } else { diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 5d8a9f8521a..f24105a93db 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -84,7 +84,7 @@ if (! $sortorder) $sortorder='DESC'; // Security check $id=GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'contrat', $id); $diroutputmassaction=$conf->contrat->dir_output . '/temp/massgeneration/'.$user->id; @@ -188,8 +188,8 @@ if (empty($reshook)) { $objectclass='Contrat'; $objectlabel='Contracts'; - $permtoread = $user->rights->contrat->lire; - $permtodelete = $user->rights->contrat->supprimer; + $permissiontoread = $user->rights->contrat->lire; + $permissiontodelete = $user->rights->contrat->supprimer; $uploaddir = $conf->contrat->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -218,7 +218,9 @@ $sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND $sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now - $conf->contrat->services->expires->warning_delay)."')", 1, 0).') as nb_late,'; $sql.= ' SUM('.$db->ifsql("cd.statut=5", 1, 0).') as nb_closed'; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -267,6 +269,7 @@ $sql.= " state.code_departement, state.nom"; // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); +} // Add where from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListGroupBy', $parameters); // Note that $action and $object may have been modified by hook @@ -588,10 +591,10 @@ if (! empty($arrayfields['lower_planned_end_date']['checked'])) { print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center '); } if (! empty($arrayfields['status']['checked'])) { - print_liste_field_titre($staticcontratligne->LibStatut(0, 3), '', '', '', '', 'width="16"'); - print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0), '', '', '', '', 'width="16"'); - print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1), '', '', '', '', 'width="16"'); - print_liste_field_titre($staticcontratligne->LibStatut(5, 3), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(0, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0, 'class="nochangebackground"'), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"'); } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "
'; print price($obj->total_ht); print ''; print price($obj->total_tva); print ''; - if ($obj->cstatut == 0) // If contract is draft, we say line is also draft - { - print $contractstatic->LibStatut(0, 5); - } - else - { - print $staticcontratligne->LibStatut($obj->statut, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now)?1:0); - } - print ''; + if ($obj->cstatut == 0) + { + // If contract is draft, we say line is also draft + print $contractstatic->LibStatut(0, 5); + } + else + { + print $staticcontratligne->LibStatut($obj->statut, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now)?1:0); + } + print ''; @@ -731,22 +728,7 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['displaytotalline'])) { - print '
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).'
trans("Contract"); ?> getNomUrl(1); ?> date_contrat, 'day'); ?> rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE)) - { - $totalcontrat = 0; - foreach ($objectlink->lines as $linecontrat) { - $totalcontrat = $totalcontrat + $linecontrat->total_ht; - $total = $total + $linecontrat->total_ht; - } - echo price($totalcontrat); - } ?> getLibStatut(7); ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
';
+        $nbcharactbyline = 48;
         $ret = $this->initPrinter($printerid);
         if ($ret>0) {
             setEventMessages($this->error, $this->errors, 'errors');
         } else {
             $nboflines = count($vals);
-            for ($line=0; $line < $nboflines; $line++) {
-                switch ($vals[$line]['tag']) {
+            for ($tplline=0; $tplline < $nboflines; $tplline++) {
+                //var_dump($vals[$tplline]['value']);
+                switch ($vals[$tplline]['tag']) {
+                    case 'DOL_PRINT_TEXT':
+                        $this->printer->text($vals[$tplline]['value']);
+                        break;
+                    case 'DOL_PRINT_OBJECT_LINES':
+                        foreach ($object->lines as $line) {
+                            //var_dump($line);
+                            $spacestoadd = $nbcharactbyline - strlen($line->ref)- strlen($line->qty) - 10 - 1;
+                            $spaces = str_repeat(' ', $spacestoadd);
+                            $this->printer->text($line->ref.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
+                            $this->printer->text(strip_tags(htmlspecialchars_decode($line->desc))."\n");
+                        }
+                        break;
+                    case 'DOL_PRINT_OBJECT_TAX':
+                        //var_dump($object);
+                        $vatarray = array();
+                        foreach ($object->lines as $line) {
+                            $vatarray[$line->tva_tx] += $line->total_tva;
+                        }
+                        foreach($vatarray as $vatkey => $vatvalue) {
+                             $spacestoadd = $nbcharactbyline - strlen($vatkey)- 12;
+                             $spaces = str_repeat(' ', $spacestoadd);
+                             $this->printer->text($spaces. $vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n");
+                        }
+                        break;
+                    case 'DOL_PRINT_OBJECT_TOTAL':
+                        $title = $langs->trans('TotalHT');
+                        $spacestoadd = $nbcharactbyline - strlen($title) - 10;
+                        $spaces = str_repeat(' ', $spacestoadd);
+                        $this->printer->text($title.$spaces.str_pad(price($object->total_ht), 10, ' ', STR_PAD_LEFT)."\n");
+                        $title = $langs->trans('TotalVAT');
+                        $spacestoadd = $nbcharactbyline - strlen($title) - 10;
+                        $spaces = str_repeat(' ', $spacestoadd);
+                        $this->printer->text($title.$spaces.str_pad(price($object->total_tva), 10, ' ', STR_PAD_LEFT)."\n");
+                        $title = $langs->trans('TotalTTC');
+                        $spacestoadd = $nbcharactbyline - strlen($title) - 10;
+                        $spaces = str_repeat(' ', $spacestoadd);
+                        $this->printer->text($title.$spaces.str_pad(price($object->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
+                        break;
+                    case 'DOL_LINE_FEED':
+                        $this->printer->feed();
+                        break;
+                    case 'DOL_LINE_FEED_REVERSE':
+                        $this->printer->feedReverse();
+                        break;
                     case 'DOL_ALIGN_CENTER':
-                        $this->printer->setJustification(Escpos::JUSTIFY_CENTER);
-                        $html.='
'; - $this->printer->text($vals[$line]['value']); + $this->printer->setJustification(Printer::JUSTIFY_CENTER); break; case 'DOL_ALIGN_RIGHT': - $this->printer->setJustification(Escpos::JUSTIFY_RIGHT); - $html.=''; + $this->printer->setJustification(Printer::JUSTIFY_RIGHT); break; case 'DOL_ALIGN_LEFT': - $this->printer->setJustification(Escpos::JUSTIFY_LEFT); - $html.=''; + $this->printer->setJustification(Printer::JUSTIFY_LEFT); break; case 'DOL_OPEN_DRAWER': $this->printer->pulse(); - $html.= ' ϟ'.nl2br($vals[$line]['value']); break; case 'DOL_ACTIVATE_BUZZER': //$this->printer->buzzer(); - $html.= ' ♫'.nl2br($vals[$line]['value']); break; case 'DOL_PRINT_BARCODE': - // $vals[$line]['value'] -> barcode($content, $type) - $this->printer->barcode($object->barcode); + // $vals[$tplline]['value'] -> barcode($content, $type) + // var_dump($vals[$tplline]['value']); + try { + $this->printer->barcode($vals[$tplline]['value']); + } catch (Exception $e) { + $this->errors[] = 'Invalid Barcode value: '.$vals[$tplline]['value']; + $error++; + } break; - case 'DOL_PRINT_BARCODE_CUSTOMER_ID': - // $vals[$line]['value'] -> barcode($content, $type) - $this->printer->barcode($object->customer_id); + case 'DOL_PRINT_LOGO': + $img = EscposImage::load(DOL_DATA_ROOT .'/mycompany/logos/'.$mysoc->logo); + $this->printer->graphics($img); + break; + case 'DOL_PRINT_LOGO_OLD': + $img = EscposImage::load(DOL_DATA_ROOT .'/mycompany/logos/'.$mysoc->logo); + $this->printer->bitImage($img); break; case 'DOL_PRINT_QRCODE': - // $vals[$line]['value'] -> qrCode($content, $ec, $size, $model) - $this->printer->qrcode($vals[$line]['value']); - $html.='QRCODE: '.$vals[$line]['value']; + // $vals[$tplline]['value'] -> qrCode($content, $ec, $size, $model) + $this->printer->qrcode($vals[$tplline]['value']); break; case 'DOL_CUT_PAPER_FULL': - $this->printer->cut(Escpos::CUT_FULL); - $html.= ' ✂'.nl2br($vals[$line]['value']); + $this->printer->cut(Printer::CUT_FULL); break; case 'DOL_CUT_PAPER_PARTIAL': - $this->printer->cut(Escpos::CUT_PARTIAL); - $html.= ' ✂'.nl2br($vals[$line]['value']); + $this->printer->cut(Printer::CUT_PARTIAL); break; case 'DOL_USE_FONT_A': - $this->printer->setFont(Escpos::FONT_A); - $this->printer->text($vals[$line]['value']); + $this->printer->setFont(Printer::FONT_A); break; case 'DOL_USE_FONT_B': - $this->printer->setFont(Escpos::FONT_B); - $this->printer->text($vals[$line]['value']); + $this->printer->setFont(Printer::FONT_B); break; case 'DOL_USE_FONT_C': - $this->printer->setFont(Escpos::FONT_C); - $this->printer->text($vals[$line]['value']); + $this->printer->setFont(Printer::FONT_C); break; default: - $this->printer->text($vals[$line]['value']); - $html.= nl2br($vals[$line]['value']); - $this->errors[] = 'UnknowTag: <'.strtolower($vals[$line]['tag']).'>'; + $this->printer->text($vals[$tplline]['tag']); + $this->printer->text($vals[$tplline]['value']); + $this->errors[] = 'UnknowTag: <'.strtolower($vals[$tplline]['tag']).'>'; $error++; break; } } - $html.= '
'; - print $html; // Close and print // uncomment next line to see content sent to printer //print '
'.print_r($this->connector, true).'
'; @@ -688,7 +800,7 @@ class dolReceiptPrinter extends Escpos $this->connector = 'CONNECTOR_UNKNOWN'; break; } - $this->printer = new Escpos($this->connector); + $this->printer = new Printer($this->connector, $this->profile); } catch (Exception $e) { $this->errors[] = $e->getMessage(); $error++; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 155050c6997..c4af5773885 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -105,7 +105,13 @@ class EmailSenderProfile extends CommonObject public $label; public $email; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $tms; //public $fk_user_creat; //public $fk_user_modif; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index e465742cfef..439bc1e030f 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -224,9 +224,10 @@ class ExtraFields * @param string $entity Entity of extrafields (for multicompany modules) * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not + * @param int $totalizable Is a measure. Must show a total on lists * @return int <=0 if KO, >0 if OK */ - public function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1') + public function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0) { if (empty($attrname)) return -1; if (empty($label)) return -1; @@ -243,7 +244,7 @@ class ExtraFields if ($result > 0 || $err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' || $type == 'separate') { // Add declaration of field into table - $result2=$this->create_label($attrname, $label, $type, $pos, $size, $elementtype, $unique, $required, $param, $alwayseditable, $perms, $list, $help, $default_value, $computed, $entity, $langfile, $enabled); + $result2=$this->create_label($attrname, $label, $type, $pos, $size, $elementtype, $unique, $required, $param, $alwayseditable, $perms, $list, $help, $default_value, $computed, $entity, $langfile, $enabled, $totalizable); $err2=$this->errno; if ($result2 > 0 || ($err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' && $err2 == 'DB_ERROR_RECORD_ALREADY_EXISTS')) { @@ -371,9 +372,10 @@ class ExtraFields * @param string $entity Entity of extrafields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not + * @param int $totalizable Is a measure. Must show a total on lists * @return int <=0 if KO, >0 if OK */ - private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = 0, $elementtype = 'member', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1') + private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = 0, $elementtype = 'member', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0) { // phpcs:enable global $conf,$user; @@ -424,7 +426,8 @@ class ExtraFields $sql.= " fk_user_modif,"; $sql.= " datec,"; $sql.= " enabled,"; - $sql.= " help"; + $sql.= " help,"; + $sql.= " totalizable"; $sql.= " )"; $sql.= " VALUES('".$attrname."',"; $sql.= " '".$this->db->escape($label)."',"; @@ -446,7 +449,8 @@ class ExtraFields $sql .= " " . (is_object($user) ? $user->id : 0). ","; $sql .= "'" . $this->db->idate(dol_now()) . "',"; $sql.= " ".($enabled?"'".$this->db->escape($enabled)."'":"1").","; - $sql.= " ".($help?"'".$this->db->escape($help)."'":"null"); + $sql.= " ".($help?"'".$this->db->escape($help)."'":"null").","; + $sql.= " ".($totalizable?'1':'0'); $sql.=')'; dol_syslog(get_class($this)."::create_label", LOG_DEBUG); @@ -1029,7 +1033,7 @@ class ExtraFields { $morecss = 'minwidth100imp'; } - elseif ($type == 'datetime') + elseif ($type == 'datetime' || $type == 'link') { $morecss = 'minwidth200imp'; } @@ -1404,7 +1408,6 @@ class ExtraFields $sql = 'SELECT ' . $keyList; $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList[0]; if (!empty($InfoFieldList[4])) { - // can use SELECT request if (strpos($InfoFieldList[4], '$SEL$') !== false) { $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); @@ -1574,9 +1577,9 @@ class ExtraFields if ($type == 'date') $out.=' (YYYY-MM-DD)'; elseif ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)'; */ - if (! empty($help)) { + if (! empty($help) && $keyprefix != 'search_options_') { $out .= $form->textwithpicto('', $help, 1, 'help', '', 0, 3); - } + } return $out; } @@ -1587,7 +1590,7 @@ class ExtraFields * @param string $key Key of attribute * @param string $value Value to show * @param string $moreparam To add more parameters on html input tag (only checkbox use html input for output rendering) - * @param string $extrafieldsobjectkey If defined (for example $object->table_element), use the new method to get extrafields data + * @param string $extrafieldsobjectkey If defined (for example $object->table_element), function uses the new method to get extrafields data * @return string Formated value */ public function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '') @@ -1612,6 +1615,7 @@ class ExtraFields } else // Old usage { + //dol_syslog("Warning: parameter 'extrafieldsobjectkey' is missing", LOG_WARNING); $label=$this->attribute_label[$key]; $type=$this->attribute_type[$key]; $size=$this->attribute_size[$key]; @@ -1813,7 +1817,6 @@ class ExtraFields $value = ''; // value was used, so now we reste it to use it to build final output $toprint=array(); while ( $obj = $this->db->fetch_object($resql) ) { - // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|', $InfoFieldList[1]); if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) { @@ -2090,6 +2093,7 @@ class ExtraFields else { $value_key=GETPOST("options_".$key); + if (in_array($key_type, array('link')) && $value_key == '-1') $value_key = ''; } $object->array_options["options_".$key]=$value_key; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 94dea68ed67..0eed1a56580 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -248,12 +248,12 @@ class Fiscalyear extends CommonObject } } - /** - * Delete record - * - * @param int $id Id of record to delete - * @return int <0 if KO, >0 if OK - */ + /** + * Delete record + * + * @param int $id Id of record to delete + * @return int <0 if KO, >0 if OK + */ public function delete($id) { $this->db->begin(); @@ -290,42 +290,42 @@ class Fiscalyear extends CommonObject /** * Give a label from a status * - * @param int $statut Id status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8'); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8'); } elseif ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8').' '.$langs->trans($this->statuts[$statut]); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d9442e43457..48fe598c198 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -227,14 +227,14 @@ class Form } elseif (preg_match('/^select;/', $typeofdata)) { - $arraydata=explode(',', preg_replace('/^select;/', '', $typeofdata)); - foreach($arraydata as $val) - { - $tmp=explode(':', $val); - $tmpkey=str_replace('|', ':', $tmp[0]); - $arraylist[$tmpkey]=$tmp[1]; - } - $ret.=$this->selectarray($htmlname, $arraylist, $value); + $arraydata=explode(',', preg_replace('/^select;/', '', $typeofdata)); + foreach($arraydata as $val) + { + $tmp=explode(':', $val); + $tmpkey=str_replace('|', ':', $tmp[0]); + $arraylist[$tmpkey]=$tmp[1]; + } + $ret.=$this->selectarray($htmlname, $arraylist, $value); } elseif (preg_match('/^ckeditor/', $typeofdata)) { @@ -1651,7 +1651,7 @@ class Form $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; } } - if (! empty($user->societe_id)) $sql.= " AND u.fk_soc = ".$user->societe_id; + if (! empty($user->socid)) $sql.= " AND u.fk_soc = ".$user->socid; if (is_array($exclude) && $excludeUsers) $sql.= " AND u.rowid NOT IN (".$excludeUsers.")"; if ($includeUsers) $sql.= " AND u.rowid IN (".$includeUsers.")"; if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $noactive) $sql.= " AND u.statut <> 0"; @@ -2416,16 +2416,18 @@ class Form // Units $outvalUnits = ''; - if ($conf->global->PRODUCT_USE_UNITS) { + if (! empty($conf->global->PRODUCT_USE_UNITS)) { if (!empty($objp->unit_short)) { $outvalUnits .= ' - ' . $objp->unit_short; } + } + if (! empty($conf->global->PRODUCT_SHOW_DIMENSIONS_IN_COMBO)) { if (!empty($objp->weight) && $objp->weight_units!==null) { $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); $outvalUnits .= ' - ' . $unitToShow; } if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units!==null) { - $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuring_units_string($objp->length_units, 'size'); + $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuringUnitString(0, 'size', $objp->length_units); $outvalUnits .= ' - ' . $unitToShow; } if (!empty($objp->surface) && $objp->surface_units!==null) { @@ -2436,17 +2438,17 @@ class Form $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); $outvalUnits .= ' - ' . $unitToShow; } - if ($outdurationvalue && $outdurationunit) { - $da = array( - 'h' => $langs->trans('Hour'), - 'd' => $langs->trans('Day'), - 'w' => $langs->trans('Week'), - 'm' => $langs->trans('Month'), - 'y' => $langs->trans('Year') - ); - if (isset($da[$outdurationunit])) { - $outvalUnits .= ' - ' . $outdurationvalue . ' ' . $langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); - } + } + if ($outdurationvalue && $outdurationunit) { + $da = array( + 'h' => $langs->trans('Hour'), + 'd' => $langs->trans('Day'), + 'w' => $langs->trans('Week'), + 'm' => $langs->trans('Month'), + 'y' => $langs->trans('Year') + ); + if (isset($da[$outdurationunit])) { + $outvalUnits .= ' - ' . $outdurationvalue . ' ' . $langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); } } @@ -2458,8 +2460,10 @@ class Form } if (! empty($conf->stock->enabled) && isset($objp->stock) && ($objp->fk_product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))) { - if ($objp->stock > 0) $opt.= ' class="product_line_stock_ok"'; - elseif ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; + if (! empty($user->rights->stock->lire)) { + if ($objp->stock > 0) $opt.= ' class="product_line_stock_ok"'; + elseif ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; + } } $opt.= '>'; $opt.= $objp->ref; @@ -2602,37 +2606,39 @@ class Form if (! empty($conf->stock->enabled) && isset($objp->stock) && ($objp->fk_product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))) { - $opt.= ' - '.$langs->trans("Stock").':'.$objp->stock; + if (! empty($user->rights->stock->lire)) { + $opt.= ' - '.$langs->trans("Stock").':'.$objp->stock; - if ($objp->stock > 0) { - $outval.= ' - '; - }elseif ($objp->stock <= 0) { - $outval.= ' - '; - } - $outval.= $langs->transnoentities("Stock").':'.$objp->stock; - $outval.= ''; - if (! empty($conf->global->STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO)) // Warning, this option may slow down combo list generation - { - $langs->load("stocks"); + if ($objp->stock > 0) { + $outval.= ' - '; + }elseif ($objp->stock <= 0) { + $outval.= ' - '; + } + $outval.= $langs->transnoentities("Stock").':'.$objp->stock; + $outval.= ''; + if (! empty($conf->global->STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO)) // Warning, this option may slow down combo list generation + { + $langs->load("stocks"); - $tmpproduct=new Product($this->db); - $tmpproduct->fetch($objp->rowid); - $tmpproduct->load_virtual_stock(); - $virtualstock = $tmpproduct->stock_theorique; + $tmpproduct=new Product($this->db); + $tmpproduct->fetch($objp->rowid); + $tmpproduct->load_virtual_stock(); + $virtualstock = $tmpproduct->stock_theorique; - $opt.= ' - '.$langs->trans("VirtualStock").':'.$virtualstock; + $opt.= ' - '.$langs->trans("VirtualStock").':'.$virtualstock; - $outval.=' - '.$langs->transnoentities("VirtualStock").':'; - if ($virtualstock > 0) { - $outval.= ' - '; - }elseif ($virtualstock <= 0) { - $outval.= ' - '; - } - $outval.=$virtualstock; - $outval.=''; + $outval.=' - '.$langs->transnoentities("VirtualStock").':'; + if ($virtualstock > 0) { + $outval.= ' - '; + }elseif ($virtualstock <= 0) { + $outval.= ' - '; + } + $outval.=$virtualstock; + $outval.=''; - unset($tmpproduct); - } + unset($tmpproduct); + } + } } $opt.= "\n"; @@ -2802,7 +2808,7 @@ class Form $outvalUnits .= ' - ' . $unitToShow; } if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units!==null) { - $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuring_units_string($objp->length_units, 'size'); + $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuringUnitString(0, 'size', $objp->length_units); $outvalUnits .= ' - ' . $unitToShow; } if (!empty($objp->surface) && $objp->surface_units!==null) { @@ -2827,15 +2833,6 @@ class Form } } - $opt = '\n"; @@ -3755,7 +3765,7 @@ class Form * * @param string $selected Id account pre-selected * @param string $htmlname Name of select zone - * @param int $statut Status of searched accounts (0=open, 1=closed, 2=both) + * @param int $status Status of searched accounts (0=open, 1=closed, 2=both) * @param string $filtre To filter list * @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @param string $moreattrib To add more attribute on select @@ -3763,7 +3773,7 @@ class Form * @param string $morecss More CSS * @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...) */ - public function select_comptes($selected = '', $htmlname = 'accountid', $statut = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0, $morecss = '') + public function select_comptes($selected = '', $htmlname = 'accountid', $status = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0, $morecss = '') { // phpcs:enable global $langs, $conf; @@ -3774,7 +3784,7 @@ class Form $sql = "SELECT rowid, label, bank, clos as status, currency_code"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " WHERE entity IN (".getEntity('bank_account').")"; - if ($statut != 2) $sql.= " AND clos = '".$statut."'"; + if ($status != 2) $sql.= " AND clos = ".(int) $status; if ($filtre) $sql.=" AND ".$filtre; $sql.= " ORDER BY label"; @@ -3805,7 +3815,7 @@ class Form } print trim($obj->label); if ($showcurrency) print ' ('.$obj->currency_code.')'; - if ($statut == 2 && $obj->status == 1) print ' ('.$langs->trans("Closed").')'; + if ($status == 2 && $obj->status == 1) print ' ('.$langs->trans("Closed").')'; print ''; $i++; } @@ -3813,7 +3823,7 @@ class Form } else { - if ($statut == 0) print ''.$langs->trans("NoActiveBankAccountDefined").''; + if ($status == 0) print ''.$langs->trans("NoActiveBankAccountDefined").''; else print ''.$langs->trans("NoBankAccountFound").''; } } @@ -3829,13 +3839,13 @@ class Form * * @param string $selected Id establishment pre-selected * @param string $htmlname Name of select zone - * @param int $statut Status of searched establishment (0=open, 1=closed, 2=both) + * @param int $status Status of searched establishment (0=open, 1=closed, 2=both) * @param string $filtre To filter list * @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @param string $moreattrib To add more attribute on select * @return int <0 if error, Num of establishment found if OK (0, 1, 2, ...) */ - public function selectEstablishments($selected = '', $htmlname = 'entity', $statut = 0, $filtre = '', $useempty = 0, $moreattrib = '') + public function selectEstablishments($selected = '', $htmlname = 'entity', $status = 0, $filtre = '', $useempty = 0, $moreattrib = '') { // phpcs:enable global $langs, $conf; @@ -3846,7 +3856,7 @@ class Form $sql = "SELECT rowid, name, fk_country, status, entity"; $sql.= " FROM ".MAIN_DB_PREFIX."establishment"; $sql.= " WHERE 1=1"; - if ($statut != 2) $sql.= " AND status = '".$statut."'"; + if ($status != 2) $sql.= " AND status = ".(int) $status; if ($filtre) $sql.=" AND ".$filtre; $sql.= " ORDER BY name"; @@ -3876,7 +3886,7 @@ class Form print ''; $i++; } @@ -3884,7 +3894,7 @@ class Form } else { - if ($statut == 0) print ''.$langs->trans("NoActiveEstablishmentDefined").''; + if ($status == 0) print ''.$langs->trans("NoActiveEstablishmentDefined").''; else print ''.$langs->trans("NoEstablishmentFound").''; } } @@ -3913,7 +3923,6 @@ class Form if ($nbaccountfound > 0) print ''; print ''; } else { - $langs->load('banks'); if ($selected) { @@ -4061,13 +4070,13 @@ class Form * @param array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , )) * type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', ... * @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0' - * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx - * @param int $height Force height of box + * @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx + * @param int $height Force height of box (0 = auto) * @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones. * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a
section. * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form */ - public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 210, $width = 500, $disableformtag = 0) + public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 0, $width = 500, $disableformtag = 0) { global $langs,$conf; global $useglobalvars; @@ -4081,6 +4090,14 @@ class Form $newselectedchoice=empty($selectedchoice)?"no":$selectedchoice; if ($conf->browser->layout == 'phone') $width='95%'; + // Set height automatically if not defined + if (empty($height)) { + $height = 210; + if (is_array($formquestion) && count($formquestion) > 2) { + $height += ((count($formquestion) - 2) * 24); + } + } + if (is_array($formquestion) && ! empty($formquestion)) { // First add hidden fields and value @@ -4096,7 +4113,7 @@ class Form } // Now add questions - $more.=''."\n"; + $more.='
'."\n"; if (! empty($formquestion['text'])) $more.='
'."\n"; foreach ($formquestion as $key => $input) { @@ -4108,52 +4125,52 @@ class Form if ($input['type'] == 'text') { - $more.=''.$input['label'].''."\n"; + $more.='
'.$input['label'].'
'."\n"; } elseif ($input['type'] == 'password') { - $more.=''.$input['label'].''."\n"; + $more.='
'.$input['label'].'
'."\n"; } elseif ($input['type'] == 'select') { - $more.=''; - if (! empty($input['label'])) $more.=$input['label'].''."\n"; + $more.=''."\n"; } elseif ($input['type'] == 'checkbox') { - $more.=''; - $more.=''.$input['label'].' '; - if ($i==0) $more.=''.$input['label'].''; - else $more.=' '; - $more.=''; - $more.=''."\n"; + $more.=''."\n"; $formquestion[] = array('name'=>$input['name'].'day'); $formquestion[] = array('name'=>$input['name'].'month'); $formquestion[] = array('name'=>$input['name'].'year'); @@ -4162,21 +4179,21 @@ class Form } elseif ($input['type'] == 'other') { - $more.=''; - if (! empty($input['label'])) $more.=$input['label'].''."\n"; + $more.=''."\n"; } elseif ($input['type'] == 'onecolumn') { - $more.=''."\n"; + $more.=''."\n"; } } } - $more.='
'.$formquestion['text'].'
'; + $more.='
'; + if (! empty($input['label'])) $more.=$input['label'].'
'; $more.=$this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss); - $more.='
'; + $more.='
'; + $more.='
'.$input['label'].'
'; $more.=' $selval) { - $more.='
'.$input['label'].''; + else $more.='
 
'; + $more.='
'.$input['label'].'
'; + $more.='
'.$input['label'].'
'; + $more.='
'; $more.=$this->selectDate($input['value'], $input['name'], 0, 0, 0, '', 1, 0); - $more.='
'; + $more.='
'; + if (! empty($input['label'])) $more.=$input['label'].'
'; $more.=$input['value']; - $more.='
'; + $more.='
'; $more.=$input['value']; - $more.='
'."\n"; + $more.=''."\n"; } // JQUI method dialog is broken with jmobile, we use standard HTML. @@ -5323,17 +5340,18 @@ class Form * @param int $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only * @param string $form_name Not used * @param int $d 1=Show days, month, years - * @param int $addnowlink Add a link "Now" + * @param int $addnowlink Add a link "Now", 1 with server time, 2 with local computer time * @param int $disabled Disable input fields * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field. - * @param datetime $adddateof Add a link "Date of invoice" using the following date. - * @param string $openinghours Specify hour strat and hour end for the select ex 8,20 + * @param datetime $adddateof Add a link "Date of invoice" using the following date. See also $labeladddateof for the label used. + * @param string $openinghours Specify hour start and hour end for the select ex 8,20 * @param int $stepminutes Specify step for minutes between 1 and 30 + * @param string $labeladddateof Label to use for the $adddateof parameter. * @return string Html for selectDate * @see form_date(), select_month(), select_year(), select_dayofweek() */ - public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1) + public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1, $labeladddateof = '') { global $conf,$langs; @@ -5449,9 +5467,9 @@ class Form dateFormat: '".$langs->trans("FormatDateShortJQueryInput")."', autoclose: true, todayHighlight: true,"; - if (! empty($conf->dol_use_jmobile)) - { - $retstring.=" + if (! empty($conf->dol_use_jmobile)) + { + $retstring.=" beforeShow: function (input, datePicker) { input.disabled = true; }, @@ -5459,16 +5477,16 @@ class Form this.disabled = false; }, "; - } - // Note: We don't need monthNames, monthNamesShort, dayNames, dayNamesShort, dayNamesMin, they are set globally on datepicker component in lib_head.js.php - if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS)) - { + } + // Note: We don't need monthNames, monthNamesShort, dayNames, dayNamesShort, dayNamesMin, they are set globally on datepicker component in lib_head.js.php + if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS)) + { $retstring.=" showOn: 'button', buttonImage: '".DOL_URL_ROOT."/theme/".$conf->theme."/img/object_calendarday.png', buttonImageOnly: true"; - } - $retstring.=" + } + $retstring.=" }) });"; $retstring.=""; } @@ -5605,12 +5623,32 @@ class Form { // Script which will be inserted in the onClick of the "Now" link $reset_scripts = ""; + if ($addnowlink==2) // local computer time + { + // pad add leading 0 on numbers + $reset_scripts.="Number.prototype.pad = function(size) { + var s = String(this); + while (s.length < (size || 2)) {s = '0' + s;} + return s; + }; + var d = new Date();"; + } // Generate the date part, depending on the use or not of the javascript calendar - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y').'\');'; + if($addnowlink==1) // server time expressed in user time setup + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; + } + elseif($addnowlink==2) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(d.toLocaleDateString(\''.str_replace('_', '-', $langs->defaultlang).'\'));'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(d.getDate().pad());'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(d.getMonth().pad());'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(d.getFullYear());'; + } /*if ($usecalendar == "eldy") { $base=DOL_URL_ROOT.'/core/'; @@ -5627,7 +5665,15 @@ class Form { if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; //$reset_scripts .= 'this.form.elements[\''.$prefix.'hour\'].value=formatDate(new Date(), \'HH\'); '; - $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H').'\');'; + if($addnowlink==1) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H', 'tzuser').'\');'; + } + elseif($addnowlink==2) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(d.getHours().pad());'; + } + if ($fullday) $reset_scripts .= ' } '; } // Update the minute part @@ -5635,7 +5681,14 @@ class Form { if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; //$reset_scripts .= 'this.form.elements[\''.$prefix.'min\'].value=formatDate(new Date(), \'mm\'); '; - $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M').'\');'; + if($addnowlink==1) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M', 'tzuser').'\');'; + } + elseif($addnowlink==2) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(d.getMinutes().pad());'; + } if ($fullday) $reset_scripts .= ' } '; } // If reset_scripts is not empty, print the link with the reset_scripts in the onClick @@ -5685,7 +5738,8 @@ class Form if ($conf->use_javascript_ajax && $adddateof) { $tmparray=dol_getdate($adddateof); - $retstring.=' -
'; if (in_array($key, array('statut'))){ print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0, 1),'1'=>$contactstatic->LibStatut(1, 1)), $search_status); - }elseif (in_array($key, array('role'))) { + } elseif (in_array($key, array('role'))) { print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles); } else { print ''; @@ -1090,7 +1090,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; if ($key == 'status' || $key == 'statut') $align.=($align?' ':'').'center'; if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($val['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n"; - if ($key == 'role') $align.=($align?' ':'').'center'; + if ($key == 'role') $align.=($align?' ':'').'left'; if (! empty($arrayfields['sc.'.$key]['checked'])) { print getTitleFieldOfList($arrayfields['sc.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 'sc.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n"; } @@ -1131,7 +1131,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') $contactstatic->phone_perso = $obj->phone_perso; $contactstatic->email = $obj->email; $contactstatic->web = $obj->web; - $contactstatic->skype = $obj->skype; + $contactstatic->socialnetworks = $obj->socialnetworks; $contactstatic->photo = $obj->photo; $country_code = getCountry($obj->country_id, 2); @@ -1561,7 +1561,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin $out.="\n"; $out.='
'; - $out.=''; + $out.='
'; $out.=''; if ($donetodo) @@ -1800,7 +1800,7 @@ function show_subsidiaries($conf, $langs, $db, $object) $socstatic = new Societe($db); print load_fiche_titre($langs->trans("Subsidiaries"), '', ''); - print "\n".'
'."\n"; + print "\n".'
'."\n"; print ''; print ''; diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 7e5096bb8c5..0082947d0c1 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -78,7 +78,7 @@ function contact_prepare_head(Contact $object) $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1); $head[$tab][0] = DOL_URL_ROOT.'/contact/note.php?id='.$object->id; $head[$tab][1] = $langs->trans("Note"); - if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.''; + if($nbNote > 0) $head[$tab][1].= ''.$nbNote.''; $head[$tab][2] = 'note'; $tab++; } @@ -90,7 +90,7 @@ function contact_prepare_head(Contact $object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$tab][0] = DOL_URL_ROOT.'/contact/document.php?id='.$object->id; $head[$tab][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ''.($nbFiles+$nbLinks).''; $head[$tab][2] = 'documents'; $tab++; diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index 73cd8e1748e..ec91a2dcc70 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -45,7 +45,7 @@ function contract_prepare_head(Contrat $object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/contrat/contact.php?id='.$object->id; $head[$h][1] = $langs->trans("ContactsAddresses"); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -63,7 +63,7 @@ function contract_prepare_head(Contrat $object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id; $head[$h][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -75,7 +75,7 @@ function contract_prepare_head(Contrat $object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 34e8ad083f0..2cffa7a2b9d 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -58,7 +58,7 @@ function show_skin($fuser, $edit = 0) $colspan=2; $thumbsbyrow=6; - print '
'.$langs->trans("Company").''.$langs->trans("Address").''.$langs->trans("Zip").'
'; + print '
'; $var=false; diff --git a/htdocs/core/lib/donation.lib.php b/htdocs/core/lib/donation.lib.php index d430c9ebd46..16d7d3d8a97 100644 --- a/htdocs/core/lib/donation.lib.php +++ b/htdocs/core/lib/donation.lib.php @@ -85,7 +85,7 @@ function donation_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/don/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -94,7 +94,7 @@ function donation_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/don/note.php?id='.$object->id; $head[$h][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; diff --git a/htdocs/core/lib/emailing.lib.php b/htdocs/core/lib/emailing.lib.php index 82c4d5c1ae4..59bb080d93e 100644 --- a/htdocs/core/lib/emailing.lib.php +++ b/htdocs/core/lib/emailing.lib.php @@ -43,7 +43,7 @@ function emailing_prepare_head(Mailing $object) { $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$object->id; $head[$h][1] = $langs->trans("MailRecipients"); - if ($object->nbemail > 0) $head[$h][1].= ' '.$object->nbemail.''; + if ($object->nbemail > 0) $head[$h][1].= ''.$object->nbemail.''; $head[$h][2] = 'targets'; $h++; } diff --git a/htdocs/core/lib/expedition.lib.php b/htdocs/core/lib/expedition.lib.php index 5625bc9c012..7c329940b2d 100644 --- a/htdocs/core/lib/expedition.lib.php +++ b/htdocs/core/lib/expedition.lib.php @@ -94,18 +94,18 @@ function expedition_admin_prepare_head() if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFields"); - $head[$h][2] = 'attributes_shipment'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributes_shipment'; + $h++; } if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsLines"); - $head[$h][2] = 'attributeslines_shipment'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'attributeslines_shipment'; + $h++; } if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index 02b736dd0cb..caef261b277 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -52,7 +52,7 @@ function expensereport_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/expensereport/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -63,7 +63,7 @@ function expensereport_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/expensereport/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index 6997cd5c028..d707063bbe8 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -51,7 +51,7 @@ function fichinter_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/fichinter/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('InterventionContact'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -83,7 +83,7 @@ function fichinter_prepare_head($object) $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=fichinter&element_id='.$object->id; $head[$h][1] = $langs->trans("Resources"); - if ($nbResource > 0) $head[$h][1].= ' '.$nbResource.''; + if ($nbResource > 0) $head[$h][1].= ''.$nbResource.''; $head[$h][2] = 'resource'; $h++; } @@ -95,7 +95,7 @@ function fichinter_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -107,7 +107,7 @@ function fichinter_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 1730d51383d..90c673e9e25 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -624,7 +624,7 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask if (empty($arrayreplacementisregex)) { - $content = make_substitutions($content, $arrayreplacement, null); + $content = make_substitutions($content, $arrayreplacement, null); } else { @@ -1044,8 +1044,8 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable $checkvirusarray=dolCheckVirus($src_file); if (count($checkvirusarray)) { - dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: errors='.join(',', $checkvirusarray), LOG_WARNING); - return 'ErrorFileIsInfectedWithAVirus: '.join(',', $checkvirusarray); + dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: errors='.join(',', $checkvirusarray), LOG_WARNING); + return 'ErrorFileIsInfectedWithAVirus: '.join(',', $checkvirusarray); } } @@ -1848,10 +1848,15 @@ function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '', $page = '' if (empty($fileoutput)) $fileoutput=$fileinput.".".$ext; $count = $image->getNumberImages(); - if (! dol_is_file($fileoutput) || is_writeable($fileoutput)) { - $ret = $image->writeImages($fileoutput, true); + try { + $ret = $image->writeImages($fileoutput, true); + } + catch(Exception $e) + { + dol_syslog($e->getMessage(), LOG_WARNING); + } } else { @@ -3067,13 +3072,14 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre { $filename = $path.$file['name']; $file_list['insignature'][] = $filename; + $expectedsize = (empty($file['size']) ? '' : $file['size']); $expectedmd5 = (string) $file; //if (preg_match('#'.$exclude.'#', $filename)) continue; if (!file_exists($pathref.'/'.$filename)) { - $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5); + $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize); } else { @@ -3085,7 +3091,7 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre } else { - if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'md5'=>(string) $md5_local); + if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize, 'md5'=>(string) $md5_local); $checksumconcat[] = $md5_local; } } diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index f11fb417769..9336d9b221f 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -48,7 +48,7 @@ function facturefourn_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/contact.php?facid='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -66,7 +66,7 @@ function facturefourn_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -78,7 +78,7 @@ function facturefourn_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -116,7 +116,7 @@ function ordersupplier_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -143,7 +143,7 @@ function ordersupplier_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id; $head[$h][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -155,7 +155,7 @@ function ordersupplier_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 589ec69b12a..740093ba801 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -45,9 +45,9 @@ include_once DOL_DOCUMENT_ROOT .'/core/lib/json.lib.php'; * * @param string $type Type of database (mysql, pgsql...) * @param string $host Address of database server - * @param string $user Nom de l'utilisateur autorise - * @param string $pass Mot de passe - * @param string $name Nom de la database + * @param string $user Authorized username + * @param string $pass Password + * @param string $name Name of database * @param int $port Port of database server * @return DoliDB A DoliDB instance */ @@ -144,7 +144,6 @@ function getBrowserInfo($user_agent) $tablet = $detectmobile->isTablet(); if ($detectmobile->isMobile()) { - $phone = 'unknown'; // If phone/smartphone, we set phone os name. @@ -465,36 +464,36 @@ function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $opti $maxloop=20; $loopnb=0; // Protection against infinite loop while (preg_match('/__([A-Z0-9]+_?[A-Z0-9]+)__/i', $out, $reg) && ($loopnb < $maxloop)) // Detect '__ABCDEF__' as key 'ABCDEF' and '__ABC_DEF__' as key 'ABC_DEF'. Detection is also correct when 2 vars are side by side. { - $loopnb++; $newout = ''; + $loopnb++; $newout = ''; - if ($reg[1] == 'DAY') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mday']; } - elseif ($reg[1] == 'MONTH') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mon']; } - elseif ($reg[1] == 'YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['year']; } - elseif ($reg[1] == 'PREVIOUS_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } - elseif ($reg[1] == 'PREVIOUS_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } - elseif ($reg[1] == 'PREVIOUS_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] - 1); } - elseif ($reg[1] == 'NEXT_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } - elseif ($reg[1] == 'NEXT_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } - elseif ($reg[1] == 'NEXT_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] + 1); } - elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID') - { - $newout = $mysoc->country_id; - } - elseif ($reg[1] == 'USER_ID' || $reg[1] == 'USERID') - { - $newout = $user->id; - } - elseif ($reg[1] == 'USER_SUPERVISOR_ID' || $reg[1] == 'SUPERVISOR_ID' || $reg[1] == 'SUPERVISORID') - { - $newout = $user->fk_user; - } - elseif ($reg[1] == 'ENTITY_ID' || $reg[1] == 'ENTITYID') - { - $newout = $conf->entity; - } - else $newout = ''; // Key not found, we replace with empty string - //var_dump('__'.$reg[1].'__ -> '.$newout); - $out = preg_replace('/__'.preg_quote($reg[1], '/').'__/', $newout, $out); + if ($reg[1] == 'DAY') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mday']; } + elseif ($reg[1] == 'MONTH') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mon']; } + elseif ($reg[1] == 'YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['year']; } + elseif ($reg[1] == 'PREVIOUS_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } + elseif ($reg[1] == 'PREVIOUS_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } + elseif ($reg[1] == 'PREVIOUS_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] - 1); } + elseif ($reg[1] == 'NEXT_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } + elseif ($reg[1] == 'NEXT_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } + elseif ($reg[1] == 'NEXT_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] + 1); } + elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID') + { + $newout = $mysoc->country_id; + } + elseif ($reg[1] == 'USER_ID' || $reg[1] == 'USERID') + { + $newout = $user->id; + } + elseif ($reg[1] == 'USER_SUPERVISOR_ID' || $reg[1] == 'SUPERVISOR_ID' || $reg[1] == 'SUPERVISORID') + { + $newout = $user->fk_user; + } + elseif ($reg[1] == 'ENTITY_ID' || $reg[1] == 'ENTITYID') + { + $newout = $conf->entity; + } + else $newout = ''; // Key not found, we replace with empty string + //var_dump('__'.$reg[1].'__ -> '.$newout); + $out = preg_replace('/__'.preg_quote($reg[1], '/').'__/', $newout, $out); } } @@ -877,7 +876,7 @@ function dol_string_unaccent($str) else { // See http://www.ascii-code.com/ -$string = strtr( + $string = strtr( $str, "\xC0\xC1\xC2\xC3\xC4\xC5\xC7 \xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1 @@ -1123,13 +1122,20 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab { global $conf, $langs, $hookmanager; - $out="\n".'
'."\n"; - - if ($morehtmlright) $out.='
'.$morehtmlright.'
'; // Output right area first so when space is missing, text is in front of tabs and not under. - // Show title $showtitle=1; if (! empty($conf->dol_optimize_smallscreen)) $showtitle=0; + + $out = "\n".''; + + if ((! empty($title) && $showtitle) || $morehtmlright || ! empty($links)) { + $out.= '
'."\n"; + } + + // Show right part + if ($morehtmlright) $out.='
'.$morehtmlright.'
'; // Output right area first so when space is missing, text is in front of tabs and not under. + + // Show title if (! empty($title) && $showtitle) { $limittitle=30; @@ -1139,6 +1145,8 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $out.=''; } + // Show tabs + // Define max of key (max may be higher than sizeof because of hole due to module disabling some tabs). $maxkey=-1; if (is_array($links) && ! empty($links)) @@ -1150,16 +1158,15 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab if (! empty($conf->dol_optimize_smallscreen)) $conf->global->MAIN_MAXTABS_IN_CARD=2; // Show tabs - $bactive=false; // if =0 we don't use the feature $limittoshow=(empty($conf->global->MAIN_MAXTABS_IN_CARD)?99:$conf->global->MAIN_MAXTABS_IN_CARD); $displaytab=0; $nbintab=0; - $popuptab=0; $outmore=''; + $popuptab=0; + $outmore=''; for ($i = 0 ; $i <= $maxkey ; $i++) { - if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) - { + if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) { // If active tab is already present if ($i >= $limittoshow) $limittoshow--; } @@ -1167,13 +1174,10 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab for ($i = 0 ; $i <= $maxkey ; $i++) { - if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) - { + if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) { $isactive=true; - $bactive=true; } - else - { + else { $isactive=false; } @@ -1259,7 +1263,9 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $out.=""; } - $out.="
\n"; + if ((! empty($title) && $showtitle) || $morehtmlright || ! empty($links)) { + $out.="
\n"; + } if (! $notab || $notab == -1 || $notab == -2) $out.="\n".'
'."\n"; @@ -1893,7 +1899,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang /** - * Return an array with locale date info. + * Return an array with locale date info. * PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows * WARNING: This function always use PHP server timezone to return locale informations !!! * Usage must be avoid. @@ -1985,63 +1991,55 @@ function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = false, $ if ($second< 0 || $second > 60) return ''; } - if (method_exists('DateTime', 'getTimestamp')) + if (empty($gm) || $gm === 'server') { - if (empty($gm) || $gm === 'server') - { - $default_timezone=@date_default_timezone_get(); // Example 'Europe/Berlin' + $default_timezone=@date_default_timezone_get(); // Example 'Europe/Berlin' + $localtz = new DateTimeZone($default_timezone); + } + elseif ($gm === 'user') + { + // We use dol_tz_string first because it is more reliable. + $default_timezone=(empty($_SESSION["dol_tz_string"])?@date_default_timezone_get():$_SESSION["dol_tz_string"]); // Example 'Europe/Berlin' + try { $localtz = new DateTimeZone($default_timezone); } - elseif ($gm === 'user') + catch(Exception $e) { - // We use dol_tz_string first because it is more reliable. - $default_timezone=(empty($_SESSION["dol_tz_string"])?@date_default_timezone_get():$_SESSION["dol_tz_string"]); // Example 'Europe/Berlin' - try { - $localtz = new DateTimeZone($default_timezone); - } - catch(Exception $e) - { - dol_syslog("Warning dol_tz_string contains an invalid value ".$_SESSION["dol_tz_string"], LOG_WARNING); - $default_timezone=@date_default_timezone_get(); - } + dol_syslog("Warning dol_tz_string contains an invalid value ".$_SESSION["dol_tz_string"], LOG_WARNING); + $default_timezone=@date_default_timezone_get(); } - elseif (strrpos($gm, "tz,") !== false) - { - $timezone=str_replace("tz,", "", $gm); // Example 'tz,Europe/Berlin' - try - { - $localtz = new DateTimeZone($timezone); - } - catch(Exception $e) - { - dol_syslog("Warning passed timezone contains an invalid value ".$timezone, LOG_WARNING); - } - } - - if (empty($localtz)) { - $localtz = new DateTimeZone('UTC'); - } - //var_dump($localtz); - //var_dump($year.'-'.$month.'-'.$day.'-'.$hour.'-'.$minute); - $dt = new DateTime(null, $localtz); - $dt->setDate((int) $year, (int) $month, (int) $day); - $dt->setTime((int) $hour, (int) $minute, (int) $second); - $date=$dt->getTimestamp(); // should include daylight saving time - //var_dump($date); - return $date; } - else + elseif (strrpos($gm, "tz,") !== false) { - dol_print_error('', 'PHP version must be 5.4+'); - return ''; + $timezone=str_replace("tz,", "", $gm); // Example 'tz,Europe/Berlin' + try + { + $localtz = new DateTimeZone($timezone); + } + catch(Exception $e) + { + dol_syslog("Warning passed timezone contains an invalid value ".$timezone, LOG_WARNING); + } } + + if (empty($localtz)) { + $localtz = new DateTimeZone('UTC'); + } + //var_dump($localtz); + //var_dump($year.'-'.$month.'-'.$day.'-'.$hour.'-'.$minute); + $dt = new DateTime(null, $localtz); + $dt->setDate((int) $year, (int) $month, (int) $day); + $dt->setTime((int) $hour, (int) $minute, (int) $second); + $date=$dt->getTimestamp(); // should include daylight saving time + //var_dump($date); + return $date; } /** - * Return date for now. In most cases, we use this function without parameters (that means GMT time). + * Return date for now. In most cases, we use this function without parameters (that means GMT time). * - * @param string $mode 'gmt' => we return GMT timestamp, + * @param string $mode 'gmt' => we return GMT timestamp, * 'tzserver' => we add the PHP server timezone * 'tzref' => we add the company timezone * 'tzuser' => we add the user timezone @@ -2200,6 +2198,32 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, return $rep; } +/** + * Get array of social network dictionary + * + * @return array Array of Social Networks Dictionary + */ +function getArrayOfSocialNetworks() +{ + global $conf, $db; + $sql = "SELECT rowid, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks"; + $sql.= " WHERE entity=".$conf->entity; + $socialnetworks = array(); + $resql = $db->query($sql); + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + $socialnetworks[$obj->code] = array( + 'rowid' => $obj->rowid, + 'label' => $obj->label, + 'url' => $obj->url, + 'icon' => $obj->icon, + 'active' => $obj->active, + ); + } + } + return $socialnetworks; +} + /** * Show social network link * @@ -2213,42 +2237,43 @@ function dol_print_socialnetworks($value, $cid, $socid, $type) { global $conf,$user,$langs; - $newskype=$value; + $htmllink=$value; if (empty($value)) return ' '; if (! empty($type)) { - $newskype ='
'; - $newskype.=img_picto($langs->trans(strtoupper($type)), $type.'.png', '', false, 0, 0, '', 'paddingright'); - $newskype.=$value; + $htmllink = '
'; + $htmllink .= img_picto($langs->trans(strtoupper($type)), $type.'.png', '', false, 0, 0, '', 'paddingright', 0); + $htmllink .= $value; if ($type == 'skype') { - $newskype.= ' '; - $newskype.=''; - $newskype.=''; - $newskype.=''; - $newskype.=''; - $newskype.=''; + $htmllink.= ' '; + $htmllink.=''; + $htmllink.=''; + $htmllink.=''; + $htmllink.=''; + $htmllink.=''; } if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create && $type=='skype') { - $addlink='AC_SKYPE'; $link=''; + $addlink='AC_SKYPE'; + $link=''; if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link=''.img_object($langs->trans("AddAction"), "calendar").''; - $newskype.=($link?' '.$link:''); + $htmllink.=($link?' '.$link:''); } - $newskype.='
'; + $htmllink.='
'; } else { $langs->load("errors"); - $newskype.=img_warning($langs->trans("ErrorBadSocialNetworkValue", $value)); + $htmllink.=img_warning($langs->trans("ErrorBadSocialNetworkValue", $value)); } - return $newskype; + return $htmllink; } /** @@ -2998,7 +3023,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF * @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip. * @param string $alt Force alt for bind people * @param string $morecss Add more class css on img tag (For example 'myclascss'). Work only if $moreatt is empty. - * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left maring on picto, 0 = No margin left. Works for fontawesome picto only. + * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only. * @return string Return img tag * @see img_object(), img_picto_common() */ @@ -3029,53 +3054,67 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) if (empty($srconly) && in_array($pictowithouttext, array( '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', - 'address', 'bank', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'edit', 'ellipsis-h', 'bookmark', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', - 'object_list','object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', - 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', - 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', + 'address', 'bank', 'bookmark', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'dolly', 'edit', 'ellipsis-h', + 'filter', 'file-code', 'grip', 'grip_title', 'list', 'listlight', 'note', + 'object_bookmark', 'object_list','object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', + 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'stats', + 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', 'globe', 'jabber','skype','twitter','facebook','linkedin', + 'instagram', 'snapchat', 'youtube', 'google-plus-g','whatsapp', 'chevron-left','chevron-right','chevron-down','chevron-top', 'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'project', 'hrm', 'members', 'ticket', 'generic', + 'error','warning', 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda' ) )) { + $fakey = $pictowithouttext; + $facolor = ''; $fasize = ''; $fa='fas'; - $fakey = $pictowithouttext; - $facolor = ''; $fasize = ''; + if (in_array($pictowithouttext, array('off', 'on', 'object_bookmark', 'bookmark'))) { + $fa='far'; + } + if (in_array($pictowithouttext, array('skype', 'twitter', 'facebook', 'linkedin', 'instagram','snapchat','youtube','google-plus-g','whatsapp'))) { + $fa='fab'; + } $arrayconvpictotofa = array( 'address'=> 'address-book', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'project'=>'sitemap', 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'generic'=>'folder-open', - 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'bookmark'=>'star', + 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'object_bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar', 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-fork', 'object_list'=>'list-alt','object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table', + 'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt' ); - - if ($pictowithouttext == 'switch_off') { + if ($pictowithouttext == 'error' || $pictowithouttext == 'warning') { + $facolor = ''; + $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; + $marginleftonlyshort = 0; + $morecss .= ($morecss ? ' ' : '').('picto'.$pictowithouttext); + } elseif ($pictowithouttext == 'switch_off') { $facolor = '#999'; - $fasize = '2em'; $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; } elseif ($pictowithouttext == 'switch_on') { $facolor = '#227722'; - $fasize = '2em'; $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; } elseif ($pictowithouttext == 'off') { $fakey = 'fa-square'; - $fa='far'; $fasize = '1.3em'; } elseif ($pictowithouttext == 'on') { $fakey = 'fa-check-square'; - $fa='far'; $fasize = '1.3em'; } elseif ($pictowithouttext == 'bank') { $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; $facolor = '#444'; } + elseif ($pictowithouttext == 'stats') { + $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; + $facolor = '#444'; + } elseif ($pictowithouttext == 'delete') { $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; $facolor = '#444'; @@ -3087,10 +3126,6 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ elseif ($pictowithouttext == 'grip_title' || $pictowithouttext == 'grip') { $fakey = 'fa-arrows-alt'; } - elseif ($pictowithouttext == 'bookmark') { - $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; - $fa='far'; - } elseif ($pictowithouttext == 'listlight') { $fakey = 'fa-download'; $facolor = '#999'; @@ -3121,12 +3156,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if (preg_match('/selected/', $pictowithouttext)) $facolor = '#888'; $marginleftonlyshort = 1; } - elseif ($pictowithouttext == 'sign-out') { + elseif ($pictowithouttext == 'sign-out') { $fakey = 'fa-sign-out-alt'; $marginleftonlyshort=0; } - elseif ($pictowithouttext == 'unlink') { - $fakey = 'fa-chain-broken'; + elseif ($pictowithouttext == 'unlink') { + $fakey = 'fa-unlink'; $facolor = '#555'; } elseif ($pictowithouttext == 'playdisabled') { @@ -3140,10 +3175,6 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ elseif ($pictowithouttext == 'jabber') { $fakey = 'fa-comment-o'; } - elseif (in_array($pictowithouttext, array('skype', 'twitter', 'facebook', 'linkedin'))) { - $fakey = 'fa-'.$pictowithouttext; - $fa = 'fab'; - } // Img for type of views elseif (in_array($pictowithouttext, array('object_list', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser'))) { $fakey = 'imgforviewmode fa-'.$arrayconvpictotofa[$pictowithouttext]; @@ -3152,14 +3183,15 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ elseif (! empty($arrayconvpictotofa[$pictowithouttext])) { $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; - $facolor = '#444'; + //$facolor = '#444'; $marginleftonlyshort=0; } else { $fakey = 'fa-'.$pictowithouttext; - $facolor = '#444'; + //$facolor = '#444'; $marginleftonlyshort=0; } + //this snippet only needed since function img_edit accepts only one additional parameter: no separate one for css only. //class/style need to be extracted to avoid duplicate class/style validation errors when $moreatt is added to the end of the attributes $reg=array(); @@ -3174,7 +3206,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $moreatt=trim($moreatt); $enabledisablehtml = ''; + $enabledisablehtml .= ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>'; if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $enabledisablehtml.= $titlealt; } @@ -3381,7 +3413,7 @@ function img_edit_remove($titlealt = 'default', $other = '') * Show logo editer/modifier fiche * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. - * @param integer $float Si il faut y mettre le style "float: right" + * @param integer $float If you have to put the style "float: right" * @param string $other Add more attributes on img * @return string Return tag img */ @@ -3398,7 +3430,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = '') * Show logo view card * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. - * @param integer $float Si il faut y mettre le style "float: right" + * @param integer $float If you have to put the style "float: right" * @param string $other Add more attributes on img * @return string Return tag img */ @@ -3510,7 +3542,7 @@ function img_warning($titlealt = 'default', $moreatt = '', $morecss = 'pictowarn if ($titlealt == 'default') $titlealt = $langs->trans('Warning'); //return '
'.img_picto($titlealt, 'warning_white.png', 'class="pictowarning valignmiddle"'.($moreatt ? ($moreatt == '1' ? ' style="float: right"' : ' '.$moreatt): '')).'
'; - return img_picto($titlealt, 'warning.png', 'class="valignmiddle'.($morecss?' '.$morecss:'').'"'.($moreatt ? ($moreatt == '1' ? ' style="float: right"' : ' '.$moreatt): '')); + return img_picto($titlealt, 'warning.png', 'class="'.$morecss.'"'.($moreatt ? ($moreatt == '1' ? ' style="float: right"' : ' '.$moreatt): '')); } /** @@ -3756,10 +3788,9 @@ function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss /** - * Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remontee des bugs. - * On doit appeler cette fonction quand une erreur technique bloquante est rencontree. - * Toutefois, il faut essayer de ne l'appeler qu'au sein de pages php, les classes devant - * renvoyer leur erreur par l'intermediaire de leur propriete "error". + * Displays error message system with all the information to facilitate the diagnosis and the escalation of the bugs. + * This function must be called when a blocking technical error is encountered. + * However, one must try to call it only within php pages, classes must return their error through their property "error". * * @param DoliDB $db Database handler * @param mixed $error String or array of errors strings to show @@ -3820,7 +3851,7 @@ function dol_print_error($db = '', $error = '', $errors = null) if (! empty($conf->modules)) { - $out.="".$langs->trans("Modules").": ".join(', ', $conf->modules)."
\n"; + $out.="".$langs->trans("Modules").": ".join(', ', $conf->modules)."
\n"; } if (is_object($db)) @@ -4115,9 +4146,9 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict if ($picto == 'setup') $picto='generic'; $return.= "\n"; - $return.= '
'; // maring bottom must be same than into print_barre_list - if ($picto) $return.= ''; - $return.= ''; $texte.= ''; @@ -82,17 +82,17 @@ class mod_facture_mercure extends ModeleNumRefFactures $texte.= ''; - // Parametrage du prefix des replacement + // Prefix setting of replacement invoices $texte.= ''; $texte.= ''; $texte.= ''; - // Parametrage du prefix des avoirs + // Prefix setting of credit note $texte.= ''; $texte.= ''; $texte.= ''; - // Parametrage du prefix des acomptes + // Prefix setting of deposit $texte.= ''; $texte.= ''; $texte.= ''; diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 0727e4df4e2..d5196867b67 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; /** * \class mod_facture_terre - * \brief Classe du modele de numerotation de reference de facture Terre + * \brief Class of numbering module Terre for invoices */ class mod_facture_terre extends ModeleNumRefFactures { @@ -189,7 +189,7 @@ class mod_facture_terre extends ModeleNumRefFactures if ($invoice->type == 2) $prefix=$this->prefixcreditnote; elseif ($invoice->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; - // D'abord on recupere la valeur max + // First we get the max value $posindice=8; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL $sql.= " FROM ".MAIN_DB_PREFIX."facture"; diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index a2bd576bdcd..ba65eeeca9c 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -23,13 +23,13 @@ /** * \file htdocs/core/modules/facture/modules_facture.php * \ingroup facture - * \brief Fichier contenant la classe mere de generation des factures en PDF - * et la classe mere de numerotation des factures + * \brief File that contains parent class for invoices models + * and parent class for invoices numbering models */ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Requis car utilise dans les classes qui heritent +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Required because used in classes that inherit /** @@ -66,7 +66,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator } /** - * Classe mere des modeles de numerotation des references de facture + * Parent class of invoice reference numbering templates */ abstract class ModeleNumRefFactures { diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 623f67ddd72..ff7bff51230 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -25,7 +25,7 @@ /** * \file htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php * \ingroup ficheinter - * \brief Fichier de la classe permettant de generer les fiches d'intervention au modele Soleil + * \brief File of Class to build interventions documents with model Soleil */ require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -142,7 +142,7 @@ class pdf_soleil extends ModelePDFFicheinter $this->option_condreg = 0; // Display payment terms $this->option_codeproduitservice = 0; // Display product-service code $this->option_multilang = 1; // Available in several languages - $this->option_draft_watermark = 1; //Support add of a watermark on drafts + $this->option_draft_watermark = 1; // Support add of a watermark on drafts // Get source company $this->emetteur=$mysoc; @@ -266,7 +266,7 @@ class pdf_soleil extends ModelePDFFicheinter $tab_height = 130; $tab_height_newpage = 150; - // Affiche notes + // Display notes $notetoshow=empty($object->note_public)?'':$object->note_public; if ($notetoshow) { @@ -394,7 +394,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) @@ -502,7 +502,7 @@ class pdf_soleil extends ModelePDFFicheinter $default_font_size = pdf_getPDFFontSize($outputlangs); -/* + /* $pdf->SetXY($this->marge_gauche, $tab_top); $pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0); $pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8); @@ -526,7 +526,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY); $pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also. -*/ + */ // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+1, 0, 0); // Rect takes a length in 3rd parameter and 4th parameter @@ -573,7 +573,7 @@ class pdf_soleil extends ModelePDFFicheinter pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FICHINTER_DRAFT_WATERMARK); } - //Prepare la suite + //Prepare next $pdf->SetTextColor(0, 0, 60); $pdf->SetFont('', 'B', $default_font_size + 3); diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 6ec78b1ac1a..4d8ea35e4d9 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -82,7 +82,7 @@ class mod_arctic extends ModeleNumRefFicheinter $tooltip.=$langs->trans("GenericMaskCodes4a", $langs->transnoentities("InterventionCard"), $langs->transnoentities("InterventionCard")); $tooltip.=$langs->trans("GenericMaskCodes5"); - // Parametrage du prefix + // Setting the prefix $texte.= ''; $texte.= ''; @@ -130,7 +130,7 @@ class mod_arctic extends ModeleNumRefFicheinter require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php'; - // On défini critere recherche compteur + // We define the search criteria of the counter $mask=$conf->global->FICHINTER_ARTIC_MASK; if (! $mask) diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 7defb2f6dad..dee02685bf6 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -53,6 +53,9 @@ class mod_holiday_immaculate extends ModelNumRefHolidays */ public $name='Immaculate'; + /** + * @var int Automatic numbering + */ public $code_auto=1; /** diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php index 1d290ce0909..1cd1274869f 100644 --- a/htdocs/core/modules/holiday/mod_holiday_madonna.php +++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php @@ -54,6 +54,9 @@ class mod_holiday_madonna extends ModelNumRefHolidays */ public $name='Madonna'; + /** + * @var int Automatic numbering + */ public $code_auto=1; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index de428900ba9..08ac267445d 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -217,9 +217,9 @@ class ImportCsv extends ModeleImports * @return int <0 if KO, >=0 if OK */ public function import_get_nb_of_lines($file) - { + { // phpcs:enable - return dol_count_nb_of_line($file); + return dol_count_nb_of_line($file); } @@ -381,6 +381,11 @@ class ImportCsv extends ModeleImports //dol_syslog("Table ".$tablename." check for entity into cache is ".$tablewithentity_cache[$tablename]); } + // array of fields to column index + $arrayfield = array(); + foreach($sort_array_match_file_to_database as $key => $val) { + $arrayfield[$val] = ($key-1); + } // Loop on each fields in the match array: $key = 1..n, $val=alias of field (s.nom) foreach($sort_array_match_file_to_database as $key => $val) @@ -485,6 +490,44 @@ class ImportCsv extends ModeleImports } } } + elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='fetchidfromcodeandlabel') + { + $isidorref='id'; + if (! is_numeric($newval) && $newval != '' && ! preg_match('/^id:/i', $newval)) $isidorref='ref'; + $newval=preg_replace('/^(id|ref):/i', '', $newval); + + if ($isidorref == 'ref') { + $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); + $class = $objimport->array_import_convertvalue[0][$val]['class']; + $method = $objimport->array_import_convertvalue[0][$val]['method']; + $codefromfield = $objimport->array_import_convertvalue[0][$val]['codefromfield']; + $code = $arrayrecord[$arrayfield[$codefromfield]]['val']; + if ($this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $code][$newval] != '') { + $newval = $this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $code][$newval]; + } else { + $resultload = dol_include_once($file); + if (empty($resultload)) { + dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method . ', code=' . $code); + break; + } + $classinstance = new $class($this->db); + // Try the fetch from code and ref + $param_array = array('', $newval, $code); + call_user_func_array(array($classinstance, $method), $param_array); + $this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $code][$newval] = $classinstance->id; + if ($classinstance->id > 0) // we found record + { + $newval = $classinstance->id; + } else { + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + $this->errors[$error]['type'] = 'FOREIGNKEY'; + $errorforthistable++; + $error++; + } + } + } + } elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='zeroifnull') { if (empty($newval)) $newval='0'; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index c4799ba557e..c5fcc1441e3 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -408,6 +408,11 @@ class ImportXlsx extends ModeleImports //dol_syslog("Table ".$tablename." check for entity into cache is ".$tablewithentity_cache[$tablename]); } + // array of fields to column index + $arrayfield = array(); + foreach($sort_array_match_file_to_database as $key => $val) { + $arrayfield[$val] = ($key-1); + } // Loop on each fields in the match array: $key = 1..n, $val=alias of field (s.nom) foreach($sort_array_match_file_to_database as $key => $val) @@ -512,6 +517,44 @@ class ImportXlsx extends ModeleImports } } } + elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='fetchidfromcodeandlabel') + { + $isidorref='id'; + if (! is_numeric($newval) && $newval != '' && ! preg_match('/^id:/i', $newval)) $isidorref='ref'; + $newval=preg_replace('/^(id|ref):/i', '', $newval); + + if ($isidorref == 'ref') { + $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); + $class = $objimport->array_import_convertvalue[0][$val]['class']; + $method = $objimport->array_import_convertvalue[0][$val]['method']; + $codefromfield = $objimport->array_import_convertvalue[0][$val]['codefromfield']; + $code = $arrayrecord[$arrayfield[$codefromfield]]['val']; + if ($this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $code][$newval] != '') { + $newval = $this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $code][$newval]; + } else { + $resultload = dol_include_once($file); + if (empty($resultload)) { + dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method . ', code=' . $code); + break; + } + $classinstance = new $class($this->db); + // Try the fetch from code and ref + $param_array = array('', $newval, $code); + call_user_func_array(array($classinstance, $method), $param_array); + $this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $code][$newval] = $classinstance->id; + if ($classinstance->id > 0) // we found record + { + $newval = $classinstance->id; + } else { + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + $this->errors[$error]['type'] = 'FOREIGNKEY'; + $errorforthistable++; + $error++; + } + } + } + } elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='zeroifnull') { if (empty($newval)) $newval='0'; diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index 581fca03f8b..558744d87e8 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -31,6 +31,10 @@ class mailing_advthirdparties extends MailingTargets public $require_admin=0; public $require_module=array("none"); // This module should not be displayed as Selector in mailling + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='company'; /** diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index aa951426a12..b3687e4f603 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -37,6 +37,10 @@ class mailing_contacts1 extends MailingTargets public $desc='Contacts of thirdparties (prospects, customers, suppliers...)'; public $require_module=array("societe"); // Module mailing actif si modules require_module actifs public $require_admin=0; // Module mailing actif pour user admin ou non + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='contact'; /** diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index a96457c2625..88af802ecfe 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -36,6 +36,10 @@ class mailing_example extends MailingTargets public $tooltip='MyTooltipLangKey'; public $require_module=array(); + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto=''; /** diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 670b831c25f..ae0dff89b76 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -40,6 +40,10 @@ class mailing_fraise extends MailingTargets public $require_admin=0; public $require_module=array('adherent'); + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='user'; /** @@ -129,7 +133,7 @@ class mailing_fraise extends MailingTargets $s.=' '; $s.=$langs->trans("Type").': '; $s.=' '; - $s.= $langs->trans('ProspectCustomer'); - $s.=': '; + $s.= ''; + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { + $s.= ''; + } + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) { + $s.= ''; + } + if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { + $s.= ''; + } + $s.= ''; - $s.=' '; + $s.= ' '; - $s.=$langs->trans("Status"); - $s.=': '; + $s.= $langs->trans("Status"); + $s.= ': '; return $s; } diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 75dc4b9499b..7e3b468fc6d 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -28,6 +28,10 @@ class mailing_thirdparties_services_expired extends MailingTargets public $require_admin=0; public $require_module=array('contrat'); + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='company'; /** diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index 4987c9ebc17..a69800230b1 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -35,6 +35,10 @@ class mailing_xinputfile extends MailingTargets public $desc='EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e public $require_module=array(); // Module mailing actif si modules require_module actifs public $require_admin=0; // Module mailing actif pour user admin ou non + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='generic'; public $tooltip='UseFormatFileEmailToTarget'; diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index 8d4ecf0b72e..7014f5f894d 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -35,6 +35,10 @@ class mailing_xinputuser extends MailingTargets public $desc='EMails input by user'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e public $require_module=array(); // Module mailing actif si modules require_module actifs public $require_admin=0; // Module mailing actif pour user admin ou non + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='generic'; public $tooltip='UseFormatInputEmailToTarget'; diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index a806cab111f..9997e68ca14 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -181,14 +181,6 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = ''; $r++; - $this->rights[$r][0] = 50430; - $this->rights[$r][1] = 'Define and close a fiscal year'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'fiscalyear'; - $this->rights[$r][5] = ''; - $r++; - $this->rights[$r][0] = 50401; $this->rights[$r][1] = 'Bind products and invoices with accounting accounts'; $this->rights[$r][2] = 'r'; @@ -197,16 +189,6 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = 'write'; $r++; - /* - $this->rights[$r][0] = 50402; - $this->rights[$r][1] = 'Make binding with products and invoices'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'ventilation'; - $this->rights[$r][5] = 'dispatch_advanced'; - $r++; - */ - $this->rights[$r][0] = 50411; $this->rights[$r][1] = 'Read operations in Ledger'; $this->rights[$r][2] = 'r'; @@ -255,6 +237,13 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = 'lire'; $r++; + $this->rights[$r][0] = 50430; + $this->rights[$r][1] = 'Manage fiscal periods, validate movements and close periods'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'fiscalyear'; + $this->rights[$r][5] = 'write'; + $r++; // Menus //------- diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php index 9502c4c0af8..714e15f0ee9 100644 --- a/htdocs/core/modules/modBom.class.php +++ b/htdocs/core/modules/modBom.class.php @@ -40,9 +40,9 @@ class modBom extends DolibarrModules */ public function __construct($db) { - global $langs,$conf; + global $langs,$conf; - $this->db = $db; + $this->db = $db; // Id for module (must be unique). // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). @@ -54,32 +54,32 @@ class modBom extends DolibarrModules // It is used to group modules by family in module setup page $this->family = "products"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = '90'; + $this->module_position = '60'; // Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); // Module label (no space allowed), used if translation string 'ModuleBomName' not found (Bom is name of module). $this->name = preg_replace('/^mod/i', '', get_class($this)); // Module description, used if translation string 'ModuleBomDesc' not found (Bom is name of module). - $this->description = "Bill of Materials (BOM) definitions for Manufacturing Resource Planning"; + $this->description = "Module to define your Bills Of Materials (BOM). Can be used for Manufacturing Resource Planning by the module Manufacturing Orders (MO)"; // Used only if file README.md and README-LL.md not found. $this->descriptionlong = "Bill of Materials definitions. They can be used to make Manufacturing Resource Planning"; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' $this->version = 'dolibarr'; - //Url to the file with your last numberversion of this module - //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; + //Url to the file with your last numberversion of this module + //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; // Key used in llx_const table to save module status enabled/disabled (where BILLOFMATERIALS 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. // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' - $this->picto='generic'; + $this->picto='bom'; // Define some features supported by module (triggers, login, substitutions, menus, css, etc...) $this->module_parts = array( - /* + /* 'triggers' => 1, // Set this to 1 if module has its own trigger directory (core/triggers) 'login' => 0, // Set this to 1 if module has its own login method file (core/login) 'substitutions' => 1, // Set this to 1 if module has its own substitution function file (core/substitutions) @@ -121,9 +121,9 @@ class modBom extends DolibarrModules // 1=>array('BILLOFMATERIALS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1) // ); $this->const = array( - 1=>array('BOM_ADDON_PDF', 'chaine', 'avalue', 'Name of PDF model of BOM', 0), - 2=>array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0), - 3=>array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/boms', '', 0) + 1=>array('BOM_ADDON_PDF', 'chaine', 'alpha', 'Name of PDF model of BOM', 0), + 2=>array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0), + 3=>array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/boms', '', 0) ); // Some keys to add into the overwriting translation tables @@ -140,13 +140,13 @@ class modBom extends DolibarrModules // Array to add new pages in new tabs - $this->tabs = array(); + $this->tabs = array(); // Example: // $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@bom:$user->rights->bom->read:/bom/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1 - // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@bom:$user->rights->othermodule->read:/bom/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. - // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname - // - // Where objecttype can be + // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@bom:$user->rights->othermodule->read:/bom/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. + // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname + // + // Where objecttype can be // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) // 'contact' to add a tab in contact view // 'contract' to add a tab in contract view @@ -168,9 +168,9 @@ class modBom extends DolibarrModules // 'user' to add a tab in user view - // Dictionaries + // Dictionaries $this->dictionaries=array(); - /* Example: + /* Example: $this->dictionaries=array( 'langs'=>'mylangfile@bom', 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor @@ -186,13 +186,11 @@ class modBom extends DolibarrModules */ - // Boxes/Widgets + // Boxes/Widgets // Add here list of php file(s) stored in bom/core/boxes that contains class to show a widget. - $this->boxes = array( - //0=>array('file'=>'bomwidget1.php@bom','note'=>'Widget provided by Bom','enabledbydefaulton'=>'Home'), - //1=>array('file'=>'bomwidget2.php@bom','note'=>'Widget provided by Bom'), - //2=>array('file'=>'bomwidget3.php@bom','note'=>'Widget provided by Bom') - ); + $this->boxes = array( + 0=>array('file' => 'box_boms.php', 'note' => '', 'enabledbydefaulton' => 'Home') + ); // Cronjobs (List of cron jobs entries to add when module is enabled) @@ -205,7 +203,7 @@ class modBom extends DolibarrModules // ); - // Permissions + // Permissions provided by this module $this->rights = array(); // Permission array used by this module $r=0; @@ -230,7 +228,7 @@ class modBom extends DolibarrModules $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->bom->level1->level2) - // Main menu entries + // Main menu entries to add $this->menu = array(); // List of menus to add $r=0; @@ -286,21 +284,26 @@ class modBom extends DolibarrModules $r=1; /* BEGIN MODULEBUILDER EXPORT BILLOFMATERIALS */ - /* - $langs->load("mrp@mrp"); + $langs->load("mrp"); $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='BomLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_label[$r]='BomAndBomLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bom'; - $keyforclass = 'Bom'; $keyforclassfile='/mymobule/class/bom.class.php'; $keyforelement='bom'; + $keyforclass = 'BOM'; $keyforclassfile='/bom/class/bom.class.php'; $keyforelement='bom'; include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforselect='bom'; $keyforaliasextra='extra'; $keyforelement='bom'; + $keyforclass = 'BOMLine'; $keyforclassfile='/bom/class/bom.class.php'; $keyforelement='bomline'; $keyforalias='tl'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + unset($this->export_fields_array[$r]['tl.fk_bom']); + $keyforselect ='bom_bom'; $keyforaliasextra='extra'; $keyforelement='bom'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + $keyforselect ='bom_bomline'; $keyforaliasextra='extraline'; $keyforelement='bomline'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + $this->export_dependencies_array[$r]=array('bomline'=>'tl.rowid'); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'bom as t'; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'bom_bom as t'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'bom_bomline as tl ON tl.fk_bom = t.rowid'; $this->export_sql_end[$r] .=' WHERE 1 = 1'; $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('bom').')'; - $r++; */ + $r++; /* END MODULEBUILDER EXPORT BILLOFMATERIALS */ } @@ -309,26 +312,54 @@ class modBom extends DolibarrModules * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ public function init($options = '') { + global $conf, $langs; + $result=$this->_load_tables('/bom/sql/'); if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') // Create extrafields - include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - + //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + //$extrafields = new ExtraFields($this->db); //$result1=$extrafields->addExtraField('myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->bom->enabled'); //$result2=$extrafields->addExtraField('myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->bom->enabled'); //$result3=$extrafields->addExtraField('myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->bom->enabled'); //$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mrp', '$conf->bom->enabled'); //$result5=$extrafields->addExtraField('myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->bom->enabled'); + + // Permissions + $this->remove($options); + $sql = array(); + // ODT template + $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/boms/template_bom.odt'; + $dirodt=DOL_DATA_ROOT.'/doctemplates/boms'; + $dest=$dirodt.'/template_bom.odt'; + + if (file_exists($src) && ! file_exists($dest)) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result=dol_copy($src, $dest, 0, 0); + if ($result < 0) + { + $langs->load("errors"); + $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest); + return 0; + } + } + + $sql = array( + //"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape('standard')."' AND type = 'bom' AND entity = ".$conf->entity, + //"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape('standard')."', 'bom', ".$conf->entity.")" + ); + return $this->_init($sql, $options); } diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index c04a4d6b346..d157e35a555 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -406,15 +406,30 @@ class modCategorie extends DolibarrModules $this->import_icon[$r]=$this->picto; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('ca'=>MAIN_DB_PREFIX.'categorie'); - $this->import_fields_array[$r]=array('ca.label'=>"Label*",'ca.type'=>"Type*",'ca.description'=>"Description"); - + $this->import_fields_array[$r]=array( + 'ca.label'=>"Label*",'ca.type'=>"Type*",'ca.description'=>"Description", + 'ca.fk_parent' => 'Parent' + ); $this->import_regex_array[$r]=array('ca.type'=>'^[0|1|2|3]'); + $this->import_convertvalue_array[$r] = array( + 'ca.fk_parent' => array( + 'rule' => 'fetchidfromcodeandlabel', + 'classfile' => '/categories/class/categorie.class.php', + 'class' => 'Categorie', + 'method' => 'fetch', + 'element' => 'category', + 'codefromfield' => 'ca.type' + ) + ); $typeexample=""; if ($conf->product->enabled) { $typeexample.=($typeexample?"/":"")."0=Product"; } if ($conf->fournisseur->enabled) { $typeexample.=($typeexample?"/":"")."1=Supplier"; } if ($conf->societe->enabled) { $typeexample.=($typeexample?"/":"")."2=Customer-Prospect"; } if ($conf->adherent->enabled) { $typeexample.=($typeexample?"/":"")."3=Member"; } - $this->import_examplevalues_array[$r]=array('ca.label'=>"Supplier Category",'ca.type'=>$typeexample,'ca.description'=>"Imported category"); + $this->import_examplevalues_array[$r] = array( + 'ca.label'=>"Supplier Category",'ca.type'=>$typeexample,'ca.description'=>"My Category description", + 'ca.fk_parent' => '0' + ); if (! empty($conf->product->enabled)) { diff --git a/htdocs/core/modules/modCollab.class.php b/htdocs/core/modules/modCollab.class.php index 9c1cde791b3..d30c8d274cd 100644 --- a/htdocs/core/modules/modCollab.class.php +++ b/htdocs/core/modules/modCollab.class.php @@ -62,7 +62,7 @@ class modCollab extends DolibarrModules // Config pages //------------- - $this->config_page_url = array('collab.php'); + $this->config_page_url = array(/*'collab.php'*/); // Dependancies //------------- @@ -109,17 +109,19 @@ class modCollab extends DolibarrModules // Main menu entries $r=0; - $this->menu[$r]=array( 'fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'type'=>'top', // This is a Left menu entry - 'titre'=>'Collab', - 'mainmenu'=>'collab', - 'url'=>'/collab/index.php', - 'langs'=>'collab', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->collab->enabled', // 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. - 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + $this->menu[$r]=array( + 'fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'type'=>'top', // This is a Left menu entry + 'titre'=>'Collab', + 'mainmenu'=>'collab', + 'url'=>'/collab/index.php', + 'langs'=>'collab', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>100, + 'enabled'=>'$conf->collab->enabled', // 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. + 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2 // 0=Menu for internal users, 1=external users, 2=both + ); $r++; } } diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index dbea2fe8d8a..fc8557497b8 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -35,11 +35,11 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; class modComptabilite extends DolibarrModules { - /** - * Constructor. Define names, constants, directories, boxes, permissions - * - * @param DoliDB $db Database handler - */ + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ public function __construct($db) { global $conf; @@ -72,11 +72,12 @@ class modComptabilite extends DolibarrModules $this->const = array(); // Data directories to create when module is enabled - $this->dirs = array("/comptabilite/temp", - "/comptabilite/rapport", - "/comptabilite/export", - "/comptabilite/bordereau" - ); + $this->dirs = array( + "/comptabilite/temp", + "/comptabilite/rapport", + "/comptabilite/export", + "/comptabilite/bordereau" + ); // Boxes $this->boxes = array(); diff --git a/htdocs/core/modules/modDataPolicy.class.php b/htdocs/core/modules/modDataPolicy.class.php index 488dccd9067..c5169c7f6d1 100644 --- a/htdocs/core/modules/modDataPolicy.class.php +++ b/htdocs/core/modules/modDataPolicy.class.php @@ -59,7 +59,7 @@ class modDataPolicy extends DolibarrModules { // It is used to group modules by family in module setup page $this->family = "technic"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = '81'; + $this->module_position = '78'; // Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); // Module label (no space allowed), used if translation string 'ModuledatapolicyName' not found (MyModue is name of module). diff --git a/htdocs/core/modules/modDav.class.php b/htdocs/core/modules/modDav.class.php index fb0da933df5..c4c38898566 100644 --- a/htdocs/core/modules/modDav.class.php +++ b/htdocs/core/modules/modDav.class.php @@ -255,28 +255,6 @@ class modDav extends DolibarrModules 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both END MODULEBUILDER LEFTMENU MYOBJECT */ - - - // Exports - $r=1; - - /* BEGIN MODULEBUILDER EXPORT MYOBJECT */ - /* - $langs->load("dav@dav"); - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='MyObjectLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_icon[$r]='myobject@dav'; - $keyforclass = 'MyObject'; $keyforclassfile='/mymobule/class/myobject.class.php'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforselect='myobject'; $keyforaliasextra='extra'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'myobject as t'; - $this->export_sql_end[$r] .=' WHERE 1 = 1'; - $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('myobject').')'; - $r++; */ - /* END MODULEBUILDER EXPORT MYOBJECT */ } /** diff --git a/htdocs/core/modules/modDocumentGeneration.class.php b/htdocs/core/modules/modDocumentGeneration.class.php index 8286bca9c82..78832122ff0 100644 --- a/htdocs/core/modules/modDocumentGeneration.class.php +++ b/htdocs/core/modules/modDocumentGeneration.class.php @@ -45,7 +45,7 @@ class modDocumentGeneration extends DolibarrModules $this->numero = 1520; $this->family = "technic"; - $this->module_position = '80'; + $this->module_position = '78'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "Direct mail document generation"; diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index bd11774eb21..1aefb52ea1c 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -32,10 +32,10 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; class modECM extends DolibarrModules { - /** - * Constructor. Define names, constants, directories, boxes, permissions - * - * @param DoliDB $db Database handler + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler */ public function __construct($db) { diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index 19ad3f512e5..3c8bbcb5aec 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -252,28 +252,6 @@ class modEmailCollector extends DolibarrModules 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both END MODULEBUILDER LEFTMENU MYOBJECT */ - - - // Exports - $r=1; - - /* BEGIN MODULEBUILDER EXPORT MYOBJECT */ - /* - $langs->load("dav@dav"); - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='MyObjectLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_icon[$r]='myobject@dav'; - $keyforclass = 'MyObject'; $keyforclassfile='/mymobule/class/myobject.class.php'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforselect='myobject'; $keyforaliasextra='extra'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'myobject as t'; - $this->export_sql_end[$r] .=' WHERE 1 = 1'; - $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('myobject').')'; - $r++; */ - /* END MODULEBUILDER EXPORT MYOBJECT */ } /** diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 152f2101893..68f4a3d5fba 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -298,11 +298,10 @@ class modExpedition extends DolibarrModules $this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object'; - if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) - { - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object'; + if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) { + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object'; } $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_expedition AND ed.fk_origin_line = cd.rowid'; $this->export_sql_end[$r] .=' AND c.entity IN ('.getEntity('expedition').')'; diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index 15474d154b9..4ed16dc69a3 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -182,20 +182,31 @@ class modExpenseReport extends DolibarrModules $this->export_permission[$r]=array(array("expensereport","export")); $this->export_fields_array[$r]=array( 'd.rowid'=>"TripId",'d.ref'=>'Ref','d.date_debut'=>'DateStart','d.date_fin'=>'DateEnd','d.date_create'=>'DateCreation','d.date_approve'=>'DateApprove', - 'd.total_ht'=>"TotalHT",'d.total_tva'=>'TotalVAT','d.total_ttc'=>'TotalTTC','d.note_private'=>'NotePrivate','d.note_public'=>'NotePublic', + 'd.total_ht'=>"TotalHT",'d.total_tva'=>'TotalVAT','d.total_ttc'=>'TotalTTC', + 'd.fk_statut'=>'Status','d.paid'=>'Paid', + 'd.note_private'=>'NotePrivate','d.note_public'=>'NotePublic','d.detail_cancel'=>'MOTIF_CANCEL','d.detail_refuse'=>'MOTIF_REFUS', 'u.lastname'=>'Lastname','u.firstname'=>'Firstname','u.login'=>"Login",'ed.rowid'=>'LineId','tf.code'=>'Type','ed.date'=>'Date','ed.tva_tx'=>'VATRate', - 'ed.total_ht'=>'TotalHT','ed.total_tva'=>'TotalVAT','ed.total_ttc'=>'TotalTTC','ed.comments'=>'Comment','p.rowid'=>'ProjectId','p.ref'=>'Ref' + 'ed.total_ht'=>'TotalHT','ed.total_tva'=>'TotalVAT','ed.total_ttc'=>'TotalTTC','ed.comments'=>'Comment','p.rowid'=>'ProjectId','p.ref'=>'Ref', + 'user_rib.iban_prefix' => 'IBAN', 'user_rib.bic' => 'BIC', 'user_rib.code_banque' => 'BankCode', 'user_rib.bank' => 'BankName', 'user_rib.proprio' => 'BankAccountOwner', + 'user_rib.owner_address' => 'BankAccountOwnerAddress' ); $this->export_TypeFields_array[$r]=array( 'd.rowid'=>"Numeric",'d.ref'=>'Text','d.date_debut'=>'Date','d.date_fin'=>'Date','d.date_create'=>'Date','d.date_approve'=>'Date', - 'd.total_ht'=>"Numeric",'d.total_tva'=>'Numeric','d.total_ttc'=>'Numeric','d.note_private'=>'Text','d.note_public'=>'Text', + 'd.total_ht'=>"Numeric",'d.total_tva'=>'Numeric','d.total_ttc'=>'Numeric', + 'd.fk_statut'=>"Numeric",'d.paid'=>'Numeric', + 'd.note_private'=>'Text','d.note_public'=>'Text','d.detail_cancel'=>'Text','d.detail_refuse'=>'Text', 'u.lastname'=>'Text','u.firstname'=>'Text','u.login'=>"Text",'ed.rowid'=>'Numeric','tf.code'=>'Code','ed.date'=>'Date','ed.tva_tx'=>'Numeric', - 'ed.total_ht'=>'Numeric','ed.total_tva'=>'Numeric','ed.total_ttc'=>'Numeric','ed.comments'=>'Text','p.rowid'=>'Numeric','p.ref'=>'Text' + 'ed.total_ht'=>'Numeric','ed.total_tva'=>'Numeric','ed.total_ttc'=>'Numeric','ed.comments'=>'Text','p.rowid'=>'Numeric','p.ref'=>'Text', + 'user_rib.iban_prefix' => 'Text', 'user_rib.bic' => 'Text', 'user_rib.code_banque' => 'Text', 'user_rib.bank' => 'Text', 'user_rib.proprio' => 'Text', + 'user_rib.owner_address' => 'Text' ); $this->export_entities_array[$r]=array( 'u.lastname'=>'user','u.firstname'=>'user','u.login'=>'user','ed.rowid'=>'expensereport_line','ed.date'=>'expensereport_line', 'ed.tva_tx'=>'expensereport_line','ed.total_ht'=>'expensereport_line','ed.total_tva'=>'expensereport_line','ed.total_ttc'=>'expensereport_line', - 'ed.comments'=>'expensereport_line','tf.code'=>'expensereport_line','p.project_ref'=>'expensereport_line','p.rowid'=>'project','p.ref'=>'project' + 'ed.comments'=>'expensereport_line','tf.code'=>'expensereport_line','p.project_ref'=>'expensereport_line','p.rowid'=>'project','p.ref'=>'project', + 'user_rib.iban_prefix' => 'user', 'user_rib.bic' => 'user', 'user_rib.code_banque' => 'user', 'user_rib.bank' => 'user', 'user_rib.proprio' => 'user', + 'user_rib.owner_address' => 'user' + ); $this->export_alias_array[$r]=array('d.rowid'=>"idtrip",'d.type'=>"type",'d.note_private'=>'note_private','d.note_public'=>'note_public','u.lastname'=>'name','u.firstname'=>'firstname','u.login'=>'login'); $this->export_dependencies_array[$r]=array('expensereport_line'=>'ed.rowid','type_fees'=>'tf.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them @@ -205,7 +216,8 @@ class modExpenseReport extends DolibarrModules $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'expensereport as d'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'expensereport_extrafields as extra on d.rowid = extra.fk_object,'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'expensereport_extrafields as extra on d.rowid = extra.fk_object'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user_rib as user_rib ON user_rib.fk_user = d.fk_user_author,'; $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'user as u,'; $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'expensereport_det as ed LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as tf ON ed.fk_c_type_fees = tf.id'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as p ON ed.fk_projet = p.rowid'; diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index b1b10f34ffb..01c80265e46 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -232,9 +232,9 @@ class modFacture extends DolibarrModules $this->export_fields_array[$r]['f.multicurrency_total_tva'] = 'MulticurrencyAmountVAT'; $this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; } - if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS_IN_EXPORT)) + if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS)) { - $this->export_fields_array[$r]['f.module_source']='POSModule'; + $this->export_fields_array[$r]['f.module_source']='Module'; $this->export_fields_array[$r]['f.pos_source']='POSTerminal'; } $this->export_TypeFields_array[$r] = array( @@ -248,7 +248,7 @@ class modFacture extends DolibarrModules 'fd.special_code'=>'Numeric', 'fd.product_type'=>"Numeric", 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', 'p.accountancy_code_sell'=>'Text' ); - if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS_IN_EXPORT)) + if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS)) { $this->export_TypeFields_array[$r]['f.module_source']='Text'; $this->export_TypeFields_array[$r]['f.pos_source']='Text'; @@ -314,7 +314,7 @@ class modFacture extends DolibarrModules $this->export_fields_array[$r]['f.multicurrency_total_tva'] = 'MulticurrencyAmountVAT'; $this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; } - if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS_IN_EXPORT)) + if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS)) { $this->export_fields_array[$r]['f.module_source']='POSModule'; $this->export_fields_array[$r]['f.pos_source']='POSTerminal'; @@ -328,7 +328,7 @@ class modFacture extends DolibarrModules 'pj.ref'=>'Text', 'p.amount'=>'Numeric', 'pf.amount'=>'Numeric', 'p.rowid'=>'Numeric', 'p.ref'=>'Text', 'p.title'=>'Text', 'p.datep'=>'Date', 'p.num_paiement'=>'Numeric', 'p.fk_bank'=>'Numeric', 'p.note'=>'Text', 'pt.code'=>'Text', 'pt.libelle'=>'text', 'ba.ref'=>'Text' ); - if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS_IN_EXPORT)) + if (! empty($conf->cashdesk->enabled) || ! empty($conf->takepos->enabled) || ! empty($conf->global->INVOICE_SHOW_POS)) { $this->export_fields_array[$r]['f.module_source']='POSModule'; $this->export_fields_array[$r]['f.pos_source']='POSTerminal'; diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index 269fc1d650a..0b2ac1a6136 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -164,7 +164,12 @@ class modFicheinter extends DolibarrModules 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone', 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation", - 'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote", 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'InterLineId', + 'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote"); + $keyforselect='fichinter'; $keyforelement='intervention'; $keyforaliasextra='extra'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + $this->export_fields_array[$r]+=array( + 'pj.ref'=>'ProjectRef','pj.title'=>'ProjectLabel', + 'fd.rowid'=>'InterLineId', 'fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc" ); //$this->export_TypeFields_array[$r]=array( @@ -175,24 +180,30 @@ class modFicheinter extends DolibarrModules // 'fd.total_ht'=>"Numeric" //); $this->export_TypeFields_array[$r]=array( - 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label','s.phone'=>'Text','s.siren'=>'Text', - 's.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date", - 'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean", 'pj.ref'=>'Text', - 'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric" + 's.rowid'=>"Numeric",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label','s.phone'=>'Text','s.siren'=>'Text', + 's.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text', + 'f.rowid'=>'Numeric','f.ref'=>"Text",'f.datec'=>"Date", + 'f.duree'=>"Duree",'f.fk_statut'=>'Numeric','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean", + 'pj.ref'=>'Text','pj.title'=>'Text', + 'fd.rowid'=>"Numeric",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric" ); $this->export_entities_array[$r]=array( 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company', 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company', 's.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention", - 'f.fk_statut'=>"intervention",'f.description'=>"intervention", 'pj.ref'=>'project', 'fd.rowid'=>"inter_line",'fd.date'=>"inter_line", + 'f.fk_statut'=>"intervention",'f.description'=>"intervention", 'pj.ref'=>'project', 'pj.title'=>'project', 'fd.rowid'=>"inter_line",'fd.date'=>"inter_line", 'fd.duree'=>'inter_line','fd.description'=>'inter_line' ); $this->export_dependencies_array[$r]=array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them + $keyforselect='fichinterdet'; $keyforelement='inter_line'; $keyforaliasextra='extradet'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'fichinter as f'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinter_extrafields as extra ON f.rowid = extra.fk_object'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinterdet as fd ON f.rowid = fd.fk_fichinter,'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinterdet as fd ON f.rowid = fd.fk_fichinter'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinterdet_extrafields as extradet ON fd.rowid = extradet.fk_object,'; $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'societe as s'; $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid'; $this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('intervention').')'; diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index 5ad2ba0d03a..aca3f4686e5 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -86,7 +86,7 @@ class modMargin extends DolibarrModules // New pages on tabs $this->tabs = array( 'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__', - 'thirdparty:+margin:Margins:margins:empty($user->societe_id) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__' + 'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__' ); diff --git a/htdocs/core/modules/modMrp.class.php b/htdocs/core/modules/modMrp.class.php new file mode 100644 index 00000000000..e66814d5fc1 --- /dev/null +++ b/htdocs/core/modules/modMrp.class.php @@ -0,0 +1,375 @@ + + * Copyright (C) 2018-2019 Nicolas ZABOURI + * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Alicealalalamdskfldmjgdfgdfhfghgfh Adminson + * + * 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 . + */ + +/** + * \defgroup mrp Module Mrp + * \brief Mrp module descriptor. + * + * \file htdocs/mrp/core/modules/modMrp.class.php + * \ingroup mrp + * \brief Description and activation file for module Mrp + */ +include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; + +/** + * Description and activation class for module Mrp + */ +class modMrp extends DolibarrModules +{ + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + global $langs,$conf; + $this->db = $db; + + // Id for module (must be unique). + // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). + $this->numero = 660; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve an id number for your module + // Key text used to identify module (for permissions, menus, etc...) + $this->rights_class = 'mrp'; + // Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...' + // It is used to group modules by family in module setup page + $this->family = "products"; + // Module position in the family on 2 digits ('01', '10', '20', ...) + $this->module_position = '62'; + // Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) + //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); + // Module label (no space allowed), used if translation string 'ModuleMrpName' not found (Mrp is name of module). + $this->name = preg_replace('/^mod/i', '', get_class($this)); + // Module description, used if translation string 'ModuleMrpDesc' not found (Mrp is name of module). + $this->description = "Module to Manage Manufacturing Orders (MO)"; + // Used only if file README.md and README-LL.md not found. + $this->descriptionlong = "Module to Manage Manufacturing Orders (MO)"; + // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' + $this->version = 'experimental'; + // Url to the file with your last numberversion of this module + //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; + + // Key used in llx_const table to save module status enabled/disabled (where MRP 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. + // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' + // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' + $this->picto='mrp'; + // Define some features supported by module (triggers, login, substitutions, menus, css, etc...) + $this->module_parts = array( + // Set this to 1 if module has its own trigger directory (core/triggers) + 'triggers' => 0, + // Set this to 1 if module has its own login method file (core/login) + 'login' => 0, + // Set this to 1 if module has its own substitution function file (core/substitutions) + 'substitutions' => 0, + // Set this to 1 if module has its own menus handler directory (core/menus) + 'menus' => 0, + // Set this to 1 if module overwrite template dir (core/tpl) + 'tpl' => 0, + // Set this to 1 if module has its own barcode directory (core/modules/barcode) + 'barcode' => 0, + // Set this to 1 if module has its own models directory (core/modules/xxx) + 'models' => 0, + // Set this to 1 if module has its own theme directory (theme) + 'theme' => 0, + // Set this to relative path of css file if module has its own css file + 'css' => array( + // '/mrp/css/mrp.css.php', + ), + // Set this to relative path of js file if module must load a js on all pages + 'js' => array( + // '/mrp/js/mrp.js.php', + ), + // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all' + 'hooks' => array( + // 'data' => array( + // 'hookcontext1', + // 'hookcontext2', + // ), + // 'entity' => '0', + ), + // Set this to 1 if features of module are opened to external users + 'moduleforexternal' => 0, + ); + // Data directories to create when module is enabled. + // Example: this->dirs = array("/mrp/temp","/mrp/subdir"); + $this->dirs = array("/mrp/temp"); + // Config pages. Put here list of php page, stored into mrp/admin directory, to use to setup module. + $this->config_page_url = array("mrp.php"); + // Dependencies + // A condition to hide module + $this->hidden = false; + // List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...) + $this->depends = array('modBom'); + $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) + $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) + $this->langfiles = array("mrp"); + $this->phpmin = array(5,5); // Minimum version of PHP required by module + $this->need_dolibarr_version = array(8,0); // Minimum version of Dolibarr required by module + $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + //$this->automatic_activation = array('FR'=>'MrpWasAutomaticallyActivatedBecauseOfYourCountryChoice'); + //$this->always_enabled = true; // If true, can't be disabled + + // Constants + // 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('MRP_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1), + // 2 => array('MRP_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1) + // ); + $this->const = array( + 1=>array('MRP_MO_ADDON_PDF', 'chaine', 'alpha', 'Name of PDF model of MO', 0), + 2=>array('MRP_MO_ADDON', 'chaine', 'mod_mo_standard', 'Name of numbering rules of MO', 0), + 3=>array('MRP_MO_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/mrps', '', 0) + ); + + // Some keys to add into the overwriting translation tables + /*$this->overwrite_translation = array( + 'en_US:ParentCompany'=>'Parent company or reseller', + 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' + )*/ + + if (! isset($conf->mrp) || ! isset($conf->mrp->enabled)) { + $conf->mrp=new stdClass(); + $conf->mrp->enabled=0; + } + + // Array to add new pages in new tabs + $this->tabs = array(); + // Example: + // $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@mrp:$user->rights->mrp->read:/mrp/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1 + // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mrp:$user->rights->othermodule->read:/mrp/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. + // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname + // + // Where objecttype can be + // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) + // 'contact' to add a tab in contact view + // 'contract' to add a tab in contract view + // 'group' to add a tab in group view + // 'intervention' to add a tab in intervention view + // 'invoice' to add a tab in customer invoice view + // 'invoice_supplier' to add a tab in supplier invoice view + // 'member' to add a tab in fundation member view + // 'opensurveypoll' to add a tab in opensurvey poll view + // 'order' to add a tab in customer order view + // 'order_supplier' to add a tab in supplier order view + // 'payment' to add a tab in payment view + // 'payment_supplier' to add a tab in supplier payment view + // 'product' to add a tab in product view + // 'propal' to add a tab in propal view + // 'project' to add a tab in project view + // 'stock' to add a tab in stock view + // 'thirdparty' to add a tab in third party view + // 'user' to add a tab in user view + + // Dictionaries + $this->dictionaries=array(); + /* Example: + $this->dictionaries=array( + 'langs'=>'mylangfile@mrp', + // List of tables we want to see into dictonnary editor + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), + // Label of tables + 'tablib'=>array("Table1","Table2","Table3"), + // Request to select fields + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), + // Sort order + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), + // List of fields (result of select to show dictionary) + 'tabfield'=>array("code,label","code,label","code,label"), + // List of fields (list of fields to edit a record) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), + // List of fields (list of fields for insert) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), + // Name of columns with primary key (try to always name it 'rowid') + 'tabrowid'=>array("rowid","rowid","rowid"), + // Condition to show each dictionary + 'tabcond'=>array($conf->mrp->enabled,$conf->mrp->enabled,$conf->mrp->enabled) + ); + */ + + // Boxes/Widgets + // Add here list of php file(s) stored in mrp/core/boxes that contains a class to show a widget. + $this->boxes = array( + 0 => array('file' => 'box_mos.php', 'note' => '', 'enabledbydefaulton' => 'Home') + ); + + // Cronjobs (List of cron jobs entries to add when module is enabled) + // unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week + $this->cronjobs = array( + // 0 => array( + // 'label' => 'MyJob label', + // 'jobtype' => 'method', + // 'class' => '/mrp/class/mo.class.php', + // 'objectname' => 'Mo', + // 'method' => 'doScheduledJob', + // 'parameters' => '', + // 'comment' => 'Comment', + // 'frequency' => 2, + // 'unitfrequency' => 3600, + // 'status' => 0, + // 'test' => '$conf->mrp->enabled', + // 'priority' => 50, + // ), + ); + // Example: $this->cronjobs=array( + // 0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>'$conf->mrp->enabled', 'priority'=>50), + // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>'$conf->mrp->enabled', 'priority'=>50) + // ); + + // Permissions provided by this module + $this->rights = array(); + $r=0; + // Add here entries to declare new permissions + /* BEGIN MODULEBUILDER PERMISSIONS */ + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Read objects of Mrp'; // Permission label + $this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->mrp->level1->level2) + $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mrp->level1->level2) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Create/Update objects of Mrp'; // Permission label + $this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->mrp->level1->level2) + $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mrp->level1->level2) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Delete objects of Mrp'; // Permission label + $this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mrp->level1->level2) + $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mrp->level1->level2) + $r++; + /* END MODULEBUILDER PERMISSIONS */ + + // Main menu entries to add + $this->menu = array(); + $r=0; + // Add here entries to declare new menus + /* BEGIN MODULEBUILDER TOPMENU */ + /* END MODULEBUILDER LEFTMENU MO */ + + // Exports profiles provided by this module + $r=1; + /* BEGIN MODULEBUILDER EXPORT MO */ + /* + $langs->load("mrp"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='MoLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='mo@mrp'; + $keyforclass = 'Mo'; $keyforclassfile='/mymobule/class/mo.class.php'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='mo'; $keyforaliasextra='extra'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mo as t'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('mo').')'; + $r++; */ + /* END MODULEBUILDER EXPORT MO */ + + // Imports profiles provided by this module + $r=1; + /* BEGIN MODULEBUILDER IMPORT MO */ + /* + $langs->load("mrp"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='MoLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='mo@mrp'; + $keyforclass = 'Mo'; $keyforclassfile='/mymobule/class/mo.class.php'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='mo'; $keyforaliasextra='extra'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mo as t'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('mo').')'; + $r++; */ + /* END MODULEBUILDER IMPORT MO */ + } + + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function init($options = '') + { + global $conf, $langs; + + $result=$this->_load_tables('/mrp/sql/'); + if ($result < 0) return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + + // Create extrafields during init + //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + //$extrafields = new ExtraFields($this->db); + //$result1=$extrafields->addExtraField('myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->mrp->enabled'); + //$result2=$extrafields->addExtraField('myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->mrp->enabled'); + //$result3=$extrafields->addExtraField('myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->mrp->enabled'); + //$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mrp', '$conf->mrp->enabled'); + //$result5=$extrafields->addExtraField('myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->mrp->enabled'); + + // Permissions + $this->remove($options); + + $sql = array(); + + // ODT template + $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/mrps/template_mo.odt'; + $dirodt=DOL_DATA_ROOT.'/doctemplates/mrps'; + $dest=$dirodt.'/template_mo.odt'; + + if (file_exists($src) && ! file_exists($dest)) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result=dol_copy($src, $dest, 0, 0); + if ($result < 0) + { + $langs->load("errors"); + $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest); + return 0; + } + } + + $sql = array( + //"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape('standard')."' AND type = 'mo' AND entity = ".$conf->entity, + //"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape('standard')."', 'mo', ".$conf->entity.")" + ); + + return $this->_init($sql, $options); + } + + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function remove($options = '') + { + $sql = array(); + return $this->_remove($sql, $options); + } +} diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index c3e010cbb4f..b6a9f968a02 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -86,6 +86,13 @@ class modProduct extends DolibarrModules $this->const[$r][4] = 0; $r++; + $this->const[$r][0] = "PRODUCT_PRICE_UNIQ"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "1"; + $this->const[$r][3] = 'pricing rule by default'; + $this->const[$r][4] = 0; + $r++; + /*$this->const[$r][0] = "PRODUCT_ADDON_PDF"; $this->const[$r][1] = "chaine"; $this->const[$r][2] = "standard"; @@ -175,10 +182,13 @@ class modProduct extends DolibarrModules 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", 'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic', - 'p.weight'=>"Weight",'p.length'=>"Length",'p.width'=>"Width",'p.height'=>"Height",'p.surface'=>"Surface",'p.volume'=>"Volume", - //'p.duration'=>"Duration", + 'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.length_units'=>"SizeUnits", + 'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits", + 'p.duration'=>"Duration", + 'p.finished' => 'Nature', 'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC", - 'p.tva_tx'=>'VATRate','p.datec'=>'DateCreation','p.tms'=>'DateModification' + 'p.tva_tx'=>'VATRate', + 'p.datec'=>'DateCreation','p.tms'=>'DateModification' ); if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly']='NPR'; if (! empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); @@ -191,13 +201,17 @@ 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.ref'=>"Text",'p.label'=>"Text", + 'p.fk_product_type'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", + '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.note_public'=>"Text", 'p.weight'=>"Numeric",'p.length'=>"Numeric",'p.width'=>"Numeric",'p.height'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"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' - //'p.duration'=>"Duree", + 'p.customcode'=>'Text', + 'p.duration'=>"Text", + 'p.finished' => 'Numeric', + 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric', + 'p.datec'=>'Date','p.tms'=>'Date' ); if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric','p.seuil_stock_alerte'=>'Numeric','p.desiredstock'=>'Numeric','p.pmp'=>'Numeric','p.cost_price'=>'Numeric')); if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); @@ -377,7 +391,7 @@ class modProduct extends DolibarrModules 'p.length' => "Length", 'p.length_units' => "LengthUnit", 'p.width' => "Width", - 'p.width_units' => "VolumeUnits", + 'p.width_units' => "WidthUnits", 'p.height' => "Height", 'p.height_units' => "HeightUnit", 'p.surface' => "Surface", @@ -552,6 +566,7 @@ class modProduct extends DolibarrModules ) ); + if (! is_array($this->import_convertvalue_array[$r])) $this->import_convertvalue_array[$r] = array(); $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( 'p.fk_unit' => array( 'rule' => 'fetchidfromcodeorlabel', diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index 06c8f51f76b..63146e87318 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -223,11 +223,10 @@ class modReception extends DolibarrModules $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch_extrafields as extra2 ON ed.rowid = extra2.fk_object'; $this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid'; - if ($idcontacts && ! empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) - { - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object'; + if ($idcontacts && ! empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) { + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object'; } $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_reception AND ed.fk_commandefourndet = cd.rowid'; $this->export_sql_end[$r] .=' AND c.entity IN ('.getEntity('reception').')'; diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 43fabdb5acd..780a9078f2b 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -149,10 +149,12 @@ class modService extends DolibarrModules 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", 'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic', - //'p.weight'=>"Weight",'p.length'=>"Length",'p.width'=>"Width",'p.height'=>"Height",'p.surface'=>"Surface",'p.volume'=>"Volume", + 'p.weight'=>"Weight",'p.length'=>"Length",'p.width'=>"Width",'p.height'=>"Height",'p.surface'=>"Surface",'p.volume'=>"Volume", 'p.duration'=>"Duration", + 'p.finished' => 'Nature', 'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC", - 'p.tva_tx'=>'VATRate','p.datec'=>'DateCreation','p.tms'=>'DateModification' + 'p.tva_tx'=>'VATRate', + 'p.datec'=>'DateCreation','p.tms'=>'DateModification' ); if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly']='NPR'; if (! empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); @@ -165,13 +167,17 @@ class modService 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.ref'=>"Text",'p.label'=>"Text", + 'p.fk_product_type'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", + '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.note_public'=>"Text", 'p.weight'=>"Numeric",'p.length'=>"Numeric",'p.width'=>"Numeric",'p.height'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"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', - 'p.duration'=>"Duree", + 'p.customcode'=>'Text', + 'p.duration'=>"Text", + 'p.finished' => 'Numeric', + 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric', + 'p.datec'=>'Date','p.tms'=>'Date' ); if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric','p.seuil_stock_alerte'=>'Numeric','p.desiredstock'=>'Numeric','p.pmp'=>'Numeric','p.cost_price'=>'Numeric')); if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); @@ -354,7 +360,7 @@ class modService extends DolibarrModules 'p.length' => "Length", 'p.length_units' => "LengthUnit", 'p.width' => "Width", - 'p.width_units' => "VolumeUnits", + 'p.width_units' => "WidthUnits", 'p.height' => "Height", 'p.height_units' => "HeightUnit", 'p.surface' => "Surface", @@ -527,6 +533,7 @@ class modService extends DolibarrModules ) ); + if (! is_array($this->import_convertvalue_array[$r])) $this->import_convertvalue_array[$r] = array(); $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( 'p.fk_unit' => array( 'rule' => 'fetchidfromcodeorlabel', diff --git a/htdocs/core/modules/modSocialNetworks.class.php b/htdocs/core/modules/modSocialNetworks.class.php index cb27047996b..a06acc5ebdb 100644 --- a/htdocs/core/modules/modSocialNetworks.class.php +++ b/htdocs/core/modules/modSocialNetworks.class.php @@ -62,7 +62,7 @@ class modSocialNetworks extends DolibarrModules $this->dirs = array(); // Config pages - $this->config_page_url = array("socialnetworks.php"); + $this->config_page_url = array(DOL_URL_ROOT.'/admin/dict.php?id=38'); // Dependencies $this->hidden = ! empty($conf->global->MODULE_SOCIALNETWORKS_DISABLED); // A condition to hide module diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 3c98cd7709d..5a2c5040e88 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -148,7 +148,7 @@ class modSociete extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'lire'; -/* $r++; + /*$r++; $this->rights[$r][0] = 241; $this->rights[$r][1] = 'Read thirdparties customers'; $this->rights[$r][2] = 'r'; @@ -163,7 +163,7 @@ class modSociete extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'read'; -*/ + */ $r++; $this->rights[$r][0] = 122; // id de la permission @@ -172,8 +172,8 @@ class modSociete extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'creer'; -/* $r++; - $this->rights[$r][0] = 251; + /* $r++; + $this->rights[$r][0] = 251; $this->rights[$r][1] = 'Create thirdparties customers'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; @@ -187,7 +187,7 @@ class modSociete extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'read'; -*/ + */ $r++; $this->rights[$r][0] = 125; // id de la permission @@ -270,6 +270,7 @@ class modSociete extends DolibarrModules 'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode' ); if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; + if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level']='PriceLevel'; // Add multicompany field if (! empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) { @@ -295,7 +296,8 @@ class modSociete extends DolibarrModules 's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text", 'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code', 'st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text', - 'paymode.libelle'=>'Text','s.entity'=>'Numeric' + 'paymode.libelle'=>'Text','s.entity'=>'Numeric', + 's.price_level'=>'Numeric' ); $this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 7baf96f8d96..cfa45cb6a4b 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -82,8 +82,8 @@ class modStripe extends DolibarrModules // New pages on tabs $this->tabs = array(); - // Boxes - $this->boxes = array(); // List of boxes + // List of boxes + $this->boxes = array(); $r=0; // Permissions @@ -92,8 +92,8 @@ class modStripe extends DolibarrModules // Main menu entries $r=0; - /* $this->menu[$r]=array( - 'fk_menu'=>'fk_mainmenu=billing,fk_leftmenu=customers_bills_payment', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + /* $this->menu[$r]=array( + 'fk_menu'=>'fk_mainmenu=billing,fk_leftmenu=customers_bills_payment', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'mainmenu'=>'billing', 'leftmenu'=>'customers_bills_payment_stripe', 'type'=>'left', // This is a Left menu entry @@ -150,7 +150,7 @@ class modStripe extends DolibarrModules 'target' => '', 'user' => 0 ); - $this->menu[$r] = array( + $this->menu[$r] = array( 'fk_menu' => 'fk_mainmenu=bank,fk_leftmenu=stripe', 'type' => 'left', 'titre' => 'StripePayoutList', diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index 8c92d97710d..7024a151bb9 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -253,28 +253,6 @@ class modTakePos extends DolibarrModules 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both END MODULEBUILDER LEFTMENU MYOBJECT */ - - - // Exports - $r=1; - - /* BEGIN MODULEBUILDER EXPORT MYOBJECT */ - /* - $langs->load("cashdesk"); - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='MyObjectLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_icon[$r]='myobject@takepos'; - $keyforclass = 'MyObject'; $keyforclassfile='/mymobule/class/myobject.class.php'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforselect='myobject'; $keyforaliasextra='extra'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'myobject as t'; - $this->export_sql_end[$r] .=' WHERE 1 = 1'; - $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('myobject').')'; - $r++; */ - /* END MODULEBUILDER EXPORT MYOBJECT */ } /** diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index 8b973c45624..8d7f16fcaf7 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -81,8 +81,6 @@ class modTicket extends DolibarrModules $this->module_parts = array( // Set this to 1 if module has its own trigger directory 'triggers' => 1, - // Set this to 1 if module has its own models directory - 'models' => 1, ); // Data directories to create when module is enabled. diff --git a/htdocs/core/modules/modVariants.class.php b/htdocs/core/modules/modVariants.class.php index 31e008b2870..2c9aad59425 100644 --- a/htdocs/core/modules/modVariants.class.php +++ b/htdocs/core/modules/modVariants.class.php @@ -53,6 +53,8 @@ class modVariants extends DolibarrModules // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' // It is used to group modules in module setup page $this->family = "products"; + // Module position in the family on 2 digits ('01', '10', '20', ...) + $this->module_position = '50'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) @@ -90,7 +92,7 @@ class modVariants extends DolibarrModules // Array to add new pages in new tabs $this->tabs = array( -// 'product:+combinations:Combinaciones:products:1:/variants/combinations.php?id=__ID__' + // 'product:+combinations:Combinaciones:products:1:/variants/combinations.php?id=__ID__' ); // Dictionaries diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index 7c11a4b98b0..52c25f2450e 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -134,7 +134,6 @@ class modWebsite extends DolibarrModules include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; //$keyforselect='myobject'; $keyforelement='myobject'; $keyforaliasextra='extra'; //include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'website_page as t, '.MAIN_DB_PREFIX.'website as p'; $this->export_sql_end[$r] .=' WHERE t.fk_website = p.rowid'; @@ -186,17 +185,15 @@ class modWebsite extends DolibarrModules dol_mkdir($destroot); $docs=dol_dir_list($srcroot, 'files', 0, 'website_.*(\.zip|\.jpg)$'); - foreach($docs as $cursorfile) - { - $src=$srcroot.'/'.$cursorfile['name']; - $dest=$destroot.'/'.$cursorfile['name']; + foreach($docs as $cursorfile) { + $src=$srcroot.'/'.$cursorfile['name']; + $dest=$destroot.'/'.$cursorfile['name']; - $result=dol_copy($src, $dest, 0, 0); - if ($result < 0) - { - $langs->load("errors"); - $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest); - } + $result=dol_copy($src, $dest, 0, 0); + if ($result < 0) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest); + } } $sql = array(); diff --git a/htdocs/core/modules/modZapier.class.php b/htdocs/core/modules/modZapier.class.php index ed628110044..773298e9959 100644 --- a/htdocs/core/modules/modZapier.class.php +++ b/htdocs/core/modules/modZapier.class.php @@ -42,14 +42,14 @@ class modZapier extends DolibarrModules $this->db = $db; // Id for module (must be unique). // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). - $this->numero = 792000; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module + $this->numero = 50330; // Key text used to identify module (for permissions, menus, etc...) $this->rights_class = 'zapier'; // Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...' // It is used to group modules by family in module setup page $this->family = "interface"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = 100; + $this->module_position = '13'; // Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); // Module label (no space allowed), used if translation string 'ModuleZapierName' not found (Zapier is name of module). @@ -316,24 +316,6 @@ class modZapier extends DolibarrModules 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both ); */ - // Exports - $r=1; - /* EXPORT */ - /* - $langs->load("zapier@zapier"); - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='MyObjectLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_icon[$r]='myobject@zapier'; - $keyforclass = 'MyObject'; $keyforclassfile='/mymobule/class/myobject.class.php'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforselect='myobject'; $keyforaliasextra='extra'; $keyforelement='myobject'; - include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'myobject as t'; - $this->export_sql_end[$r] .=' WHERE 1 = 1'; - $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('myobject').')'; - $r++; */ } /** diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php new file mode 100644 index 00000000000..84602928cd9 --- /dev/null +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -0,0 +1,514 @@ + + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García + * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2018-2019 Philippe Grand + * Copyright (C) 2018 Frédéric France + * + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php + * \ingroup mrp + * \brief File of class to build ODT documents for MOs + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/mrp/modules_mrp.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; + + +/** + * Class to build documents using ODF templates generator + */ +class doc_generic_mo_odt extends ModelePDFMo +{ + /** + * Issuer + * @var Societe + */ + public $emetteur; + + /** + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.5 = array(5, 5) + */ + public $phpmin = array(5, 5); + + /** + * @var string Dolibarr version of the loaded document + */ + public $version = 'dolibarr'; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + global $conf, $langs, $mysoc; + + // Load translation files required by the page + $langs->loadLangs(array("main","companies")); + + $this->db = $db; + $this->name = "ODT templates"; + $this->description = $langs->trans("DocumentModelOdt"); + $this->scandir = 'MRP_MO_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan + + // Page size for A4 format + $this->type = 'odt'; + $this->page_largeur = 0; + $this->page_hauteur = 0; + $this->format = array($this->page_largeur,$this->page_hauteur); + $this->marge_gauche=0; + $this->marge_droite=0; + $this->marge_haute=0; + $this->marge_basse=0; + + $this->option_logo = 1; // Affiche logo + $this->option_tva = 0; // Gere option tva + $this->option_modereg = 0; // Affiche mode reglement + $this->option_condreg = 0; // Affiche conditions reglement + $this->option_codeproduitservice = 0; // Affiche code produit-service + $this->option_multilang = 1; // Dispo en plusieurs langues + $this->option_escompte = 0; // Affiche si il y a eu escompte + $this->option_credit_note = 0; // Support credit notes + $this->option_freetext = 1; // Support add of a personalised text + $this->option_draft_watermark = 0; // Support add of a watermark on drafts + + // Recupere emetteur + $this->emetteur=$mysoc; + if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined + } + + + /** + * Return description of a module + * + * @param Translate $langs Lang object to use for output + * @return string Description + */ + public function info($langs) + { + global $conf,$langs; + + // Load translation files required by the page + $langs->loadLangs(array("errors","companies")); + + $form = new Form($this->db); + + $texte = $this->description.".
\n"; + $texte.= '
'; + $texte.= ''; + $texte.= ''; + $texte.= ''; + $texte.= '
'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).''; + $return.= ''; // maring bottom must be same than into print_barre_list + if ($picto) $return.= ''; + $return.= ''; if (dol_strlen($morehtmlcenter)) @@ -4126,7 +4157,7 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict } if (dol_strlen($morehtmlright)) { - $return.= ''; + $return.= ''; } $return.= '
'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).''; $return.= '
'.$titre.'
'; $return.= '
'.$morehtmlright.''.$morehtmlright.'
'."\n"; @@ -4177,11 +4208,10 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', print "\n"; print "\n"; - print ''; // maring bottom must be same than into load_fiche_tire + print '
'; // maring bottom must be same than into load_fiche_tire // Left - //if ($picto && $titre) print ''; - print ''; print ''."\n"; - print ''; - print ''; - } - - if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; - - print ''."\n"; - - // User - /* - print ''; - */ - - // Project - print ""; - - // Thirdparty - print ''; - - // Ref - print '\n"; - - // Date - print ''; - - $disabledproject=1;$disabledtask=1; - //print "x".$lines[$i]->fk_project; - //var_dump($lines[$i]); - //var_dump($projectsrole[$lines[$i]->fk_project]); - // If at least one role for project - if ($lines[$i]->public || ! empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) - { - $disabledproject=0; - $disabledtask=0; - } - // If $restricteditformytask is on and I have no role on task, i disable edit - if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) - { - $disabledtask=1; - } - - // Hour - print ''; - - $cssonholiday=''; - if (! $isavailable[$preselectedday]['morning'] && ! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayallday '; - elseif (! $isavailable[$preselectedday]['morning']) $cssonholiday.='onholidaymorning '; - elseif (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon '; - - // Duration - print ''; - - // Note - print ''; - - // Warning - print ''; - - print "\n"; } + + if (empty($workloadforid[$projectstatic->id])) + { + if ($preselectedday) + { + $projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week + $workloadforid[$projectstatic->id]=1; + } + } + + $projectstatic->id=$lines[$i]->fk_project; + $projectstatic->ref=$lines[$i]->project_ref; + $projectstatic->title=$lines[$i]->project_label; + $projectstatic->public=$lines[$i]->public; + + $taskstatic->id=$lines[$i]->task_id; + $taskstatic->ref=($lines[$i]->task_ref?$lines[$i]->task_ref:$lines[$i]->task_id); + $taskstatic->label=$lines[$i]->task_label; + $taskstatic->date_start=$lines[$i]->date_start; + $taskstatic->date_end=$lines[$i]->date_end; + + $thirdpartystatic->id=$lines[$i]->socid; + $thirdpartystatic->name=$lines[$i]->thirdparty_name; + $thirdpartystatic->email=$lines[$i]->thirdparty_email; + + if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) + { + print ''."\n"; + print ''; + print ''; + } + + if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; + + print ''."\n"; + + // User + /* + print ''; + */ + + // Project + print ""; + + // Thirdparty + print ''; + + // Ref + print '\n"; + + // Date + print ''; + + $disabledproject=1;$disabledtask=1; + //print "x".$lines[$i]->fk_project; + //var_dump($lines[$i]); + //var_dump($projectsrole[$lines[$i]->fk_project]); + // If at least one role for project + if ($lines[$i]->public || ! empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) + { + $disabledproject=0; + $disabledtask=0; + } + // If $restricteditformytask is on and I have no role on task, i disable edit + if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) + { + $disabledtask=1; + } + + // Hour + print ''; + + $cssonholiday=''; + if (! $isavailable[$preselectedday]['morning'] && ! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayallday '; + elseif (! $isavailable[$preselectedday]['morning']) $cssonholiday.='onholidaymorning '; + elseif (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon '; + + // Duration + print ''; + + // Note + print ''; + + // Warning + print ''; + + print "\n"; + } //} //else //{ @@ -1371,7 +1372,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ { for ($i = 0 ; $i < $numlines ; $i++) { - if ($lines[$i]->fk_task_parent) $lineswithoutlevel0[]=$lines[$i]; + if ($lines[$i]->fk_task_parent) $lineswithoutlevel0[]=$lines[$i]; } } @@ -1748,12 +1749,12 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) * @param int $socid Id thirdparty * @param int $projectsListId Id of project I have permission on * @param int $mytasks Limited to task I am contact to - * @param int $statut -1=No filter on statut, 0 or 1 = Filter on status + * @param int $status -1=No filter on statut, 0 or 1 = Filter on status * @param array $listofoppstatus List of opportunity status * @param array $hiddenfields List of info to not show ('projectlabel', 'declaredprogress', '...', ) * @return void */ -function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $statut = -1, $listofoppstatus = array(), $hiddenfields = array()) +function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array()) { global $langs,$conf,$user,$bc; @@ -1767,12 +1768,12 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $project_year_filter=0; $title=$langs->trans("Projects"); - if (strcmp($statut, '') && $statut >= 0) $title=$langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$statut]); + if (strcmp($status, '') && $status >= 0) $title=$langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$status]); $arrayidtypeofcontact=array(); print '
'; - print '
'.img_picto('', $picto, 'id="pictotitle"', $pictoisfullpath).''; + print ''; if ($picto && $titre) print img_picto('', $picto, 'class="hideonsmartphone valignmiddle opacityhigh pictotitle widthpictotitle"', $pictoisfullpath); print '
'.$titre; if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')'; @@ -4617,7 +4647,7 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round $unit = $forceunitoutput; }*/ - $ret=price($dimension, 0, $outputlangs, 0, 0, $round).' '.measuring_units_string(0, $type, $unit); + $ret=price($dimension, 0, $outputlangs, 0, 0, $round).' '.measuringUnitString(0, $type, $unit); return $ret; } @@ -5859,7 +5889,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, // Add SIGNATURE into substitutionarray first, so, when we will make the substitution, // this will include signature content first and then replace var found into content of signature $signature = $user->signature; -$substitutionarray=array_merge($substitutionarray, array( + $substitutionarray=array_merge($substitutionarray, array( '__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '') ) ); @@ -5869,7 +5899,7 @@ $substitutionarray=array_merge($substitutionarray, array( $substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : ''); } -$substitutionarray=array_merge($substitutionarray, array( + $substitutionarray=array_merge($substitutionarray, array( '__USER_ID__' => (string) $user->id, '__USER_LOGIN__' => (string) $user->login, '__USER_LASTNAME__' => (string) $user->lastname, @@ -5882,7 +5912,7 @@ $substitutionarray=array_merge($substitutionarray, array( } if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc)) { -$substitutionarray=array_merge($substitutionarray, array( + $substitutionarray=array_merge($substitutionarray, array( '__MYCOMPANY_NAME__' => $mysoc->name, '__MYCOMPANY_EMAIL__' => $mysoc->email, '__MYCOMPANY_PROFID1__' => $mysoc->idprof1, @@ -5910,6 +5940,8 @@ $substitutionarray=array_merge($substitutionarray, array( $substitutionarray['__REF__'] = '__REF__'; $substitutionarray['__REF_CLIENT__'] = '__REF_CLIENT__'; $substitutionarray['__REF_SUPPLIER__'] = '__REF_SUPPLIER__'; + $substitutionarray['__NOTE_PUBLIC__'] = '__NOTE_PUBLIC__'; + $substitutionarray['__NOTE_PRIVATE__'] = '__NOTE_PRIVATE__'; $substitutionarray['__EXTRAFIELD_XXX__'] = '__EXTRAFIELD_XXX__'; if (! empty($conf->societe->enabled)) @@ -5917,7 +5949,21 @@ $substitutionarray=array_merge($substitutionarray, array( $substitutionarray['__THIRDPARTY_ID__'] = '__THIRDPARTY_ID__'; $substitutionarray['__THIRDPARTY_NAME__'] = '__THIRDPARTY_NAME__'; $substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = '__THIRDPARTY_NAME_ALIAS__'; + $substitutionarray['__THIRDPARTY_CODE_CLIENT__'] = '__THIRDPARTY_CODE_CLIENT__'; + $substitutionarray['__THIRDPARTY_CODE_FOURNISSEUR__'] = '__THIRDPARTY_CODE_FOURNISSEUR__'; $substitutionarray['__THIRDPARTY_EMAIL__'] = '__THIRDPARTY_EMAIL__'; + $substitutionarray['__THIRDPARTY_PHONE__'] = '__THIRDPARTY_PHONE__'; + $substitutionarray['__THIRDPARTY_FAX__'] = '__THIRDPARTY_FAX__'; + $substitutionarray['__THIRDPARTY_ADRESSE__'] = '__THIRDPARTY_ADRESSE__'; + $substitutionarray['__THIRDPARTY_ZIP__'] = '__THIRDPARTY_ZIP__'; + $substitutionarray['__THIRDPARTY_TOWN__'] = '__THIRDPARTY_TOWN__'; + $substitutionarray['__THIRDPARTY_SIREN__'] = '__THIRDPARTY_SIREN__'; + $substitutionarray['__THIRDPARTY_SIRET__'] = '__THIRDPARTY_SIRET__'; + $substitutionarray['__THIRDPARTY_APE__'] = '__THIRDPARTY_APE__'; + $substitutionarray['__THIRDPARTY_RCSRM__'] = '__THIRDPARTY_RCSRM__'; + $substitutionarray['__THIRDPARTY_TVAINTRA__'] = '__THIRDPARTY_TVAINTRA__'; + /*$substitutionarray['__THIRDPARTY_NOTE_PUBLIC__'] = '__THIRDPARTY_NOTE_PUBLIC__'; + $substitutionarray['__THIRDPARTY_NOTE_PRIVATE__'] = '__THIRDPARTY_NOTE_PRIVATE__';*/ } if (! empty($conf->adherent->enabled)) { @@ -5925,12 +5971,16 @@ $substitutionarray=array_merge($substitutionarray, array( $substitutionarray['__MEMBER_CIVILITY__'] = '__MEMBER_CIVILITY__'; $substitutionarray['__MEMBER_FIRSTNAME__'] = '__MEMBER_FIRSTNAME__'; $substitutionarray['__MEMBER_LASTNAME__'] = '__MEMBER_LASTNAME__'; + /*$substitutionarray['__MEMBER_NOTE_PUBLIC__'] = '__MEMBER_NOTE_PUBLIC__'; + $substitutionarray['__MEMBER_NOTE_PRIVATE__'] = '__MEMBER_NOTE_PRIVATE__';*/ } if (! empty($conf->projet->enabled)) { $substitutionarray['__PROJECT_ID__'] = '__PROJECT_ID__'; $substitutionarray['__PROJECT_REF__'] = '__PROJECT_REF__'; $substitutionarray['__PROJECT_NAME__'] = '__PROJECT_NAME__'; + /*$substitutionarray['__PROJECT_NOTE_PUBLIC__'] = '__PROJECT_NOTE_PUBLIC__'; + $substitutionarray['__PROJECT_NOTE_PRIVATE__'] = '__PROJECT_NOTE_PRIVATE__';*/ } if (! empty($conf->contrat->enabled)) { @@ -5963,13 +6013,17 @@ $substitutionarray=array_merge($substitutionarray, array( $substitutionarray['__REF__'] = $object->ref; $substitutionarray['__REF_CLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); $substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); - $substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs): ''); + $substitutionarray['__NOTE_PUBLIC__'] = (isset($object->note_public) ? $object->note_public : null); + $substitutionarray['__NOTE_PRIVATE__'] = (isset($object->note_private) ? $object->note_private : null); + + $substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs): ''); + // For backward compatibility $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); - - // TODO Remove this - $msgishtml = 0; + $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); + $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); + $substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs): ''); $birthday = dol_print_date($object->birth, 'day'); @@ -5977,22 +6031,22 @@ $substitutionarray=array_merge($substitutionarray, array( { $substitutionarray['__MEMBER_ID__']=$object->id; if (method_exists($object, 'getCivilityLabel')) $substitutionarray['__MEMBER_CIVILITY__'] = $object->getCivilityLabel(); - $substitutionarray['__MEMBER_FIRSTNAME__']=$msgishtml?dol_htmlentitiesbr($object->firstname):$object->firstname; - $substitutionarray['__MEMBER_LASTNAME__']=$msgishtml?dol_htmlentitiesbr($object->lastname):$object->lastname; - if (method_exists($object, 'getFullName')) $substitutionarray['__MEMBER_FULLNAME__']=$msgishtml?dol_htmlentitiesbr($object->getFullName($outputlangs)):$object->getFullName($outputlangs); - $substitutionarray['__MEMBER_COMPANY__']=$msgishtml?dol_htmlentitiesbr($object->societe):$object->societe; - $substitutionarray['__MEMBER_ADDRESS__']=$msgishtml?dol_htmlentitiesbr($object->address):$object->address; - $substitutionarray['__MEMBER_ZIP__']=$msgishtml?dol_htmlentitiesbr($object->zip):$object->zip; - $substitutionarray['__MEMBER_TOWN__']=$msgishtml?dol_htmlentitiesbr($object->town):$object->town; - $substitutionarray['__MEMBER_COUNTRY__']=$msgishtml?dol_htmlentitiesbr($object->country):$object->country; - $substitutionarray['__MEMBER_EMAIL__']=$msgishtml?dol_htmlentitiesbr($object->email):$object->email; - $substitutionarray['__MEMBER_BIRTH__']=$msgishtml?dol_htmlentitiesbr($birthday):$birthday; - $substitutionarray['__MEMBER_PHOTO__']=$msgishtml?dol_htmlentitiesbr($object->photo):$object->photo; - $substitutionarray['__MEMBER_LOGIN__']=$msgishtml?dol_htmlentitiesbr($object->login):$object->login; - $substitutionarray['__MEMBER_PASSWORD__']=$msgishtml?dol_htmlentitiesbr($object->pass):$object->pass; - $substitutionarray['__MEMBER_PHONE__']=$msgishtml?dol_htmlentitiesbr($object->phone):$object->phone; - $substitutionarray['__MEMBER_PHONEPRO__']=$msgishtml?dol_htmlentitiesbr($object->phone_perso):$object->phone_perso; - $substitutionarray['__MEMBER_PHONEMOBILE__']=$msgishtml?dol_htmlentitiesbr($object->phone_mobile):$object->phone_mobile; + $substitutionarray['__MEMBER_FIRSTNAME__']=$object->firstname; + $substitutionarray['__MEMBER_LASTNAME__']=$object->lastname; + if (method_exists($object, 'getFullName')) $substitutionarray['__MEMBER_FULLNAME__']=$object->getFullName($outputlangs); + $substitutionarray['__MEMBER_COMPANY__']=$object->societe; + $substitutionarray['__MEMBER_ADDRESS__']=$object->address; + $substitutionarray['__MEMBER_ZIP__']=$object->zip; + $substitutionarray['__MEMBER_TOWN__']=$object->town; + $substitutionarray['__MEMBER_COUNTRY__']=$object->country; + $substitutionarray['__MEMBER_EMAIL__']=$object->email; + $substitutionarray['__MEMBER_BIRTH__']=$birthday; + $substitutionarray['__MEMBER_PHOTO__']=$object->photo; + $substitutionarray['__MEMBER_LOGIN__']=$object->login; + $substitutionarray['__MEMBER_PASSWORD__']=$object->pass; + $substitutionarray['__MEMBER_PHONE__']=$object->phone; + $substitutionarray['__MEMBER_PHONEPRO__']=$object->phone_perso; + $substitutionarray['__MEMBER_PHONEMOBILE__']=$object->phone_mobile; $substitutionarray['__MEMBER_FIRST_SUBSCRIPTION_DATE__'] = dol_print_date($object->first_subscription_date, 'dayrfc'); $substitutionarray['__MEMBER_FIRST_SUBSCRIPTION_DATE_START__'] = dol_print_date($object->first_subscription_date_start, 'dayrfc'); $substitutionarray['__MEMBER_FIRST_SUBSCRIPTION_DATE_END__'] = dol_print_date($object->first_subscription_date_end, 'dayrfc'); @@ -6006,14 +6060,38 @@ $substitutionarray=array_merge($substitutionarray, array( $substitutionarray['__THIRDPARTY_ID__'] = (is_object($object)?$object->id:''); $substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object)?$object->name:''); $substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = (is_object($object)?$object->name_alias:''); + $substitutionarray['__THIRDPARTY_CODE_CLIENT__'] = (is_object($object)?$object->code_client:''); + $substitutionarray['__THIRDPARTY_CODE_FOURNISSEUR__'] = (is_object($object)?$object->code_fournisseur:''); $substitutionarray['__THIRDPARTY_EMAIL__'] = (is_object($object)?$object->email:''); + $substitutionarray['__THIRDPARTY_PHONE__'] = (is_object($object)?$object->phone:''); + $substitutionarray['__THIRDPARTY_FAX__'] = (is_object($object)?$object->name_fax:''); + $substitutionarray['__THIRDPARTY_ADRESSE__'] = (is_object($object)?$object->address:''); + $substitutionarray['__THIRDPARTY_ZIP__'] = (is_object($object)?$object->zip:''); + $substitutionarray['__THIRDPARTY_TOWN__'] = (is_object($object)?$object->town:''); + $substitutionarray['__THIRDPARTY_SIREN__'] = (is_object($object)?$object->idprof1:''); + $substitutionarray['__THIRDPARTY_SIRET__'] = (is_object($object)?$object->idprof2:''); + $substitutionarray['__THIRDPARTY_APE__'] = (is_object($object)?$object->idprof3:''); + $substitutionarray['__THIRDPARTY_RCSRM__'] = (is_object($object)?$object->idprof4:''); + $substitutionarray['__THIRDPARTY_TVAINTRA__'] = (is_object($object)?$object->tva_intra:''); } elseif (is_object($object->thirdparty) && $object->thirdparty->id > 0) { $substitutionarray['__THIRDPARTY_ID__'] = (is_object($object->thirdparty)?$object->thirdparty->id:''); $substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object->thirdparty)?$object->thirdparty->name:''); $substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = (is_object($object->thirdparty)?$object->thirdparty->name_alias:''); + $substitutionarray['__THIRDPARTY_CODE_CLIENT__'] = (is_object($object->thirdparty)?$object->thirdparty->code_client:''); + $substitutionarray['__THIRDPARTY_CODE_FOURNISSEUR__'] = (is_object($object->thirdparty)?$object->thirdparty->code_fournisseur:''); $substitutionarray['__THIRDPARTY_EMAIL__'] = (is_object($object->thirdparty)?$object->thirdparty->email:''); + $substitutionarray['__THIRDPARTY_PHONE__'] = (is_object($object->thirdparty)?$object->phone:''); + $substitutionarray['__THIRDPARTY_FAX__'] = (is_object($object->thirdparty)?$object->name_fax:''); + $substitutionarray['__THIRDPARTY_ADRESSE__'] = (is_object($object->thirdparty)?$object->address:''); + $substitutionarray['__THIRDPARTY_ZIP__'] = (is_object($object->thirdparty)?$object->zip:''); + $substitutionarray['__THIRDPARTY_TOWN__'] = (is_object($object->thirdparty)?$object->town:''); + $substitutionarray['__THIRDPARTY_SIREN__'] = (is_object($object->thirdparty)?$object->idprof1:''); + $substitutionarray['__THIRDPARTY_SIRET__'] = (is_object($object->thirdparty)?$object->idprof2:''); + $substitutionarray['__THIRDPARTY_APE__'] = (is_object($object->thirdparty)?$object->idprof3:''); + $substitutionarray['__THIRDPARTY_RCSRM__'] = (is_object($object->thirdparty)?$object->idprof4:''); + $substitutionarray['__THIRDPARTY_TVAINTRA__'] = (is_object($object->thirdparty)?$object->tva_intra:''); } if (is_object($object->project) && $object->project->id > 0) @@ -6380,11 +6458,11 @@ function dolGetFirstLastname($firstname, $lastname, $nameorder = -1) } elseif ($nameorder == 2 || $nameorder == 3) { - $ret.=$firstname; - if (empty($ret) && $nameorder == 3) - { - $ret.=$lastname; - } + $ret.=$firstname; + if (empty($ret) && $nameorder == 3) + { + $ret.=$lastname; + } } else { @@ -7920,7 +7998,7 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield if (!isset($dictvalues[$tablename])) { $dictvalues[$tablename] = array(); - $sql = 'SELECT * FROM '.$tablename.' WHERE 1'; + $sql = 'SELECT * FROM '.$tablename.' WHERE 1'; // Here select * is allowed as it is generic code and we don't have list of fields if ($checkentity) $sql.= ' AND entity IN (0,'.getEntity($tablename).')'; $resql = $db->query($sql); @@ -8033,25 +8111,24 @@ function roundUpToNextMultiple($n, $x = 5) * @param string $type type of badge : Primary Secondary Success Danger Warning Info Light Dark status0 status1 status2 status3 status4 status5 status6 status7 status8 status9 * @param string $mode default '' , pill, dot * @param string $url the url for link - * @param array $params various params for future : recommended rather than adding more fuction arguments + * @param array $params various params for future : recommended rather than adding more fuction arguments. array('attr'=>array('title'=>'abc')) * @return string Html badge */ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = '', $params = array()) { $attr=array( - 'class'=>'badge'.(!empty($mode)?' badge-'.$mode:'').(!empty($type)?' badge-'.$type:'') + 'class'=>'badge badge-status'.(!empty($mode)?' badge-'.$mode:'').(!empty($type)?' badge-'.$type:'').(empty($params['css'])?'':' '.$params['css']) ); - if(empty($html)){ + if (empty($html)) { $html = $label; } - if(!empty($url)){ + if (!empty($url)) { $attr['href'] = $url; } - if($mode==='dot') - { + if ($mode==='dot') { $attr['class'].= ' classfortooltip'; $attr['title'] = $html; $attr['aria-label'] = $label; @@ -8059,8 +8136,8 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = ' } // Override attr - if(!empty($params['attr']) && is_array($params['attr'])){ - foreach($params['attr']as $key => $value){ + if (!empty($params['attr']) && is_array($params['attr'])) { + foreach($params['attr']as $key => $value) { $attr[$key] = $value; } } @@ -8071,7 +8148,7 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = ' $attr = array_map('dol_escape_htmltag', $attr); $TCompiledAttr = array(); - foreach($attr as $key => $value){ + foreach($attr as $key => $value) { $TCompiledAttr[] = $key.'="'.$value.'"'; } @@ -8100,26 +8177,12 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st global $conf; $return = ''; - $dolGetBadgeParams = array(); - if(!empty($params['badgeParams'])){ + + if (!empty($params['badgeParams'])){ $dolGetBadgeParams = $params['badgeParams']; } - // image's filename are still in French - $statusImg=array( - 'status0' => 'statut0' - ,'status1' => 'statut1' - ,'status2' => 'statut2' - ,'status3' => 'statut3' - ,'status4' => 'statut4' - ,'status5' => 'statut5' - ,'status6' => 'statut6' - ,'status7' => 'statut7' - ,'status8' => 'statut8' - ,'status9' => 'statut9' - ); - // TODO : add a hook if ($displayMode == 0) { @@ -8128,13 +8191,35 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st elseif ($displayMode == 1) { $return = !empty($html)?$html:(!empty($statusLabelShort)?$statusLabelShort:$statusLabel); } - // use status with images - elseif (empty($conf->global->MAIN_STATUS_USES_CSS)){ + // Use status with images (for backward compatibility) + elseif (! empty($conf->global->MAIN_STATUS_USES_IMAGES)) { $return = ''; $htmlLabel = (in_array($displayMode, array(1,2,5))?'':'').(!empty($html)?$html:$statusLabel).(in_array($displayMode, array(1,2,5))?'':''); $htmlLabelShort = (in_array($displayMode, array(1,2,5))?'':'').(!empty($html)?$html:(!empty($statusLabelShort)?$statusLabelShort:$statusLabel)).(in_array($displayMode, array(1,2,5))?'':''); - if(!empty($statusImg[$statusType])){ + // For small screen, we always use the short label instead of long label. + if (! empty($conf->dol_optimize_smallscreen)) + { + if ($displayMode == 0) $displayMode = 1; + elseif ($displayMode == 4) $displayMode = 2; + elseif ($displayMode == 6) $displayMode = 5; + } + + // For backward compatibility. Image's filename are still in French, so we use this array to convert + $statusImg=array( + 'status0' => 'statut0' + ,'status1' => 'statut1' + ,'status2' => 'statut2' + ,'status3' => 'statut3' + ,'status4' => 'statut4' + ,'status5' => 'statut5' + ,'status6' => 'statut6' + ,'status7' => 'statut7' + ,'status8' => 'statut8' + ,'status9' => 'statut9' + ); + + if (!empty($statusImg[$statusType])){ $htmlImg = img_picto($statusLabel, $statusImg[$statusType]); }else{ $htmlImg = img_picto($statusLabel, $statusType); @@ -8157,7 +8242,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st } } // Use new badge - elseif (!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)) { + elseif (empty($conf->global->MAIN_STATUS_USES_IMAGES) && !empty($displayMode)) { $statusLabelShort = !empty($statusLabelShort)?$statusLabelShort:$statusLabel; if ($displayMode == 3) { @@ -8273,7 +8358,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $class = 'btnTitle'; // hidden conf keep during button transition TODO: remove this block - if (empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)) { + if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) { $class = 'butActionNew'; } if (! empty($params['morecss'])) $class.=' '.$params['morecss']; @@ -8291,7 +8376,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $attr['class'] .= ' refused'; // hidden conf keep during button transition TODO: remove this block - if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){ + if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){ $attr['class'] = 'butActionNewRefused'; } @@ -8353,7 +8438,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $button.= ''; // hidden conf keep during button transition TODO: remove this block - if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){ + if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){ $button='<'.$tag.' '.$compiledAttributes.' >'.$label.''; $button.= ''; $button.= ''; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 8ff78fe5be0..07f058f2fe2 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -505,14 +505,7 @@ function dolAddEmailTrackId($email, $trackingid) function isValidMailDomain($mail) { list($user, $domain) = explode("@", $mail, 2); - if (checkdnsrr($domain, "MX")) - { - return true; - } - else - { - return false; - } + return checkdnsrr($domain, "MX"); } /** @@ -839,12 +832,12 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ if (strstr($mask, 'user_extra_')) { - $start = "{user_extra_"; - $end = "\}"; - $extra= get_string_between($mask, "user_extra_", "}"); - if(!empty($user->array_options['options_'.$extra])){ - $mask = preg_replace('#('.$start.')(.*?)('.$end.')#si', $user->array_options['options_'.$extra], $mask); - } + $start = "{user_extra_"; + $end = "\}"; + $extra= get_string_between($mask, "user_extra_", "}"); + if (!empty($user->array_options['options_'.$extra])) { + $mask = preg_replace('#('.$start.')(.*?)('.$end.')#si', $user->array_options['options_'.$extra], $mask); + } } $maskwithonlyymcode=$mask; $maskwithonlyymcode=preg_replace('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i', $maskcounter, $maskwithonlyymcode); @@ -1624,7 +1617,7 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) $found=0; $dirtoscan=''; - $sql = "SELECT nom as id, nom as lib, libelle as label, description as description"; + $sql = "SELECT nom as id, nom as doc_template_name, libelle as label, description as description"; $sql.= " FROM ".MAIN_DB_PREFIX."document_model"; $sql.= " WHERE type = '".$type."'"; $sql.= " AND entity IN (0,".$conf->entity.")"; @@ -1652,7 +1645,7 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) //irtoscan.=($dirtoscan?',':'').preg_replace('/[\r\n]+/',',',trim($conf->global->$const)); $dirtoscan= preg_replace('/[\r\n]+/', ',', trim($conf->global->$const)); - $listoffiles=array(); + $listoffiles=array(); // Now we add models found in directories scanned $listofdir=explode(',', $dirtoscan); @@ -1663,8 +1656,8 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) if (! $tmpdir) { unset($listofdir[$key]); continue; } if (is_dir($tmpdir)) { - // all type of template is allowed - $tmpfiles=dol_dir_list($tmpdir, 'files', 0, '', '', 'name', SORT_ASC, 0); + // all type of template is allowed + $tmpfiles=dol_dir_list($tmpdir, 'files', 0, '', '', 'name', SORT_ASC, 0); if (count($tmpfiles)) $listoffiles=array_merge($listoffiles, $tmpfiles); } } @@ -1684,18 +1677,18 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) } else { - if ($type == 'member' && $obj->lib == 'standard') // Special case, if member template, we add variant per format + if ($type == 'member' && $obj->doc_template_name == 'standard') // Special case, if member template, we add variant per format { global $_Avery_Labels; include_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; foreach($_Avery_Labels as $key => $val) { - $liste[$obj->id.':'.$key]=($obj->label?$obj->label:$obj->lib).' '.$val['name']; + $liste[$obj->id.':'.$key]=($obj->label?$obj->label:$obj->doc_template_name).' '.$val['name']; } } else // Common usage { - $liste[$obj->id]=$obj->label?$obj->label:$obj->lib; + $liste[$obj->id]=$obj->label?$obj->label:$obj->doc_template_name; } } $i++; @@ -1722,7 +1715,6 @@ function is_ip($ip) { // First we test if it is a valid IPv4 if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - // Then we test if it is a private range if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) return 2; @@ -1820,69 +1812,76 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') $subelement = $regs[2]; } + // Generic case for $classpath $classpath = $element.'/class'; - // To work with non standard path + // Special cases, to work with non standard path if ($objecttype == 'facture' || $objecttype == 'invoice') { $classpath = 'compta/facture/class'; $module='facture'; $subelement='facture'; } - if ($objecttype == 'commande' || $objecttype == 'order') { + elseif ($objecttype == 'commande' || $objecttype == 'order') { $classpath = 'commande/class'; $module='commande'; $subelement='commande'; } - if ($objecttype == 'propal') { + elseif ($objecttype == 'propal') { $classpath = 'comm/propal/class'; } - if ($objecttype == 'supplier_proposal') { + elseif ($objecttype == 'supplier_proposal') { $classpath = 'supplier_proposal/class'; } - if ($objecttype == 'shipping') { + elseif ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; } - if ($objecttype == 'delivery') { + elseif ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; } - if ($objecttype == 'contract') { + elseif ($objecttype == 'contract') { $classpath = 'contrat/class'; $module='contrat'; $subelement='contrat'; } - if ($objecttype == 'member') { + elseif ($objecttype == 'member') { $classpath = 'adherents/class'; $module='adherent'; $subelement='adherent'; } - if ($objecttype == 'cabinetmed_cons') { + elseif ($objecttype == 'cabinetmed_cons') { $classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons'; } - if ($objecttype == 'fichinter') { + elseif ($objecttype == 'fichinter') { $classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter'; } - if ($objecttype == 'task') { + elseif ($objecttype == 'task') { $classpath = 'projet/class'; $module='projet'; $subelement='task'; } - if ($objecttype == 'stock') { + elseif ($objecttype == 'stock') { $classpath = 'product/stock/class'; $module='stock'; $subelement='stock'; } + elseif ($objecttype == 'inventory') { + $classpath = 'product/inventory/class'; + $module='stock'; + $subelement='inventory'; + } - //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement; - + // Generic case for $classfile and $classname $classfile = strtolower($subelement); $classname = ucfirst($subelement); + //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement." classfile=".$classfile." classname=".$classname; + if ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; @@ -2251,13 +2250,16 @@ function colorValidateHex($color, $allow_white = true) /** * Change color to make it less aggressive (ratio is negative) or more aggressive (ratio is positive) * - * @param string $hex Color in hex ('#AA1122' or 'AA1122' or '#a12' or 'a12') - * @param integer $ratio Default=-50. Note: 0=Component color is unchanged, -100=Component color become 88, +100=Component color become 00 or FF + * @param string $hex Color in hex ('#AA1122' or 'AA1122' or '#a12' or 'a12') + * @param integer $ratio Default=-50. Note: 0=Component color is unchanged, -100=Component color become 88, +100=Component color become 00 or FF + * @param integer $brightness Default=0. Adjust brightness. -100=Decrease brightness by 100%, +100=Increase of 100%. * @return string New string of color * @see colorAdjustBrightness() */ -function colorAgressivity($hex, $ratio = -50) +function colorAgressiveness($hex, $ratio = -50, $brightness = 0) { + if (empty($ratio)) $ratio = 0; // To avoid null + // Steps should be between -255 and 255. Negative = darker, positive = lighter $ratio = max(-100, min(100, $ratio)); @@ -2278,12 +2280,21 @@ function colorAgressivity($hex, $ratio = -50) if ($color > 127) $color += ((255 - $color) * ($ratio / 100)); if ($color < 128) $color -= ($color * ($ratio / 100)); } - else // We decrease agressivity + else // We decrease agressiveness { if ($color > 128) $color -= (($color - 128) * (abs($ratio) / 100)); if ($color < 127) $color += ((128 - $color) * (abs($ratio) / 100)); } - $color = max(0, min(255, $color)); // Adjust color + if ($brightness > 0) + { + $color = ($color * (100 + abs($brightness)) / 100); + } + else + { + $color = ($color * (100 - abs($brightness)) / 100); + } + + $color = max(0, min(255, $color)); // Adjust color to stay into valid range $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code } @@ -2295,7 +2306,7 @@ function colorAgressivity($hex, $ratio = -50) * @param string $hex Color in hex ('#AA1122' or 'AA1122' or '#a12' or 'a12') * @param integer $steps Step/offset added to each color component. It should be between -255 and 255. Negative = darker, positive = lighter * @return string New color with format '#AA1122' - * @see colorAgressivity() + * @see colorAgressiveness() */ function colorAdjustBrightness($hex, $steps) { diff --git a/htdocs/core/lib/holiday.lib.php b/htdocs/core/lib/holiday.lib.php index cb4e1331837..f1b18df11b2 100644 --- a/htdocs/core/lib/holiday.lib.php +++ b/htdocs/core/lib/holiday.lib.php @@ -47,7 +47,7 @@ function holiday_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 739e115efb1..f2818f72872 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -50,7 +50,7 @@ function facture_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -71,7 +71,7 @@ function facture_prepare_head($object) else dol_print_error($db); $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id; $head[$h][1] = $langs->trans('StandingOrders'); - if ($nbStandingOrders > 0) $head[$h][1].= ' '.$nbStandingOrders.''; + if ($nbStandingOrders > 0) $head[$h][1].= ''.$nbStandingOrders.''; $head[$h][2] = 'standingorders'; $h++; } @@ -89,7 +89,7 @@ function facture_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -101,7 +101,7 @@ function facture_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -136,14 +136,14 @@ function invoice_admin_prepare_head() $head[$h][1] = $langs->trans("Payments"); $head[$h][2] = 'payment'; $h++; - - if($conf->global->INVOICE_USE_SITUATION){ - $head[$h][0] = DOL_URL_ROOT.'/admin/facture_situation.php'; - $head[$h][1] = $langs->trans("InvoiceSituation"); - $head[$h][2] = 'situation'; - $h++; + + if ($conf->global->INVOICE_USE_SITUATION) { + $head[$h][0] = DOL_URL_ROOT.'/admin/facture_situation.php'; + $head[$h][1] = $langs->trans("InvoiceSituation"); + $head[$h][2] = 'situation'; + $h++; } - + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab @@ -189,7 +189,7 @@ function invoice_rec_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/card-rec.php?id='.$object->id; $head[$h][1] = $langs->trans("CardBill"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index dd8d1a4a944..3ce9d871b7f 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -118,7 +118,6 @@ function _val($val) * escaping with a slash or encoding to UTF-8 where necessary */ for ($c = 0; $c < $strlen_var; ++$c) { - $ord_var_c = ord($val[$c]); switch (true) { @@ -318,19 +317,19 @@ function utf162utf8($utf16) switch(true) { case ((0x7F & $bytes) == $bytes): - // this case should never be reached, because we are in ASCII range - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 return chr($bytes); case (0x07FF & $bytes) == $bytes: - // return a 2-byte UTF-8 character - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + // return a 2-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 return chr(0xC0 | (($bytes >> 6) & 0x1F)) . chr(0x80 | ($bytes & 0x3F)); case (0xFFFF & $bytes) == $bytes: - // return a 3-byte UTF-8 character - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + // return a 3-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 return chr(0xE0 | (($bytes >> 12) & 0x0F)) . chr(0x80 | (($bytes >> 6) & 0x3F)) . chr(0x80 | ($bytes & 0x3F)); @@ -354,24 +353,24 @@ function utf82utf16($utf8) { // oh please oh please oh please oh please oh please if(function_exists('mb_convert_encoding')) { - return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); } switch(strlen($utf8)) { case 1: - // this case should never be reached, because we are in ASCII range - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return $utf8; + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; case 2: - // return a UTF-16 character from a 2-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1}))); + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1}))); case 3: - // return a UTF-16 character from a 3-byte UTF-8 char - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2}))); + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2}))); } // ignoring UTF-32 for now, sorry diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 3f1baa72e8a..01ebdd277e1 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -163,7 +163,6 @@ function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = $hide=0; if (! is_numeric($key)) { - print '
'; print $key; diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php index bc7b0034b35..e751dfd68c8 100644 --- a/htdocs/core/lib/loan.lib.php +++ b/htdocs/core/lib/loan.lib.php @@ -40,7 +40,7 @@ function loan_prepare_head($object) $head[$tab][1] = $langs->trans('Card'); $head[$tab][2] = 'card'; $tab++; - + $head[$tab][0] = DOL_URL_ROOT.'/loan/schedule.php?loanid='.$object->id; $head[$tab][1] = $langs->trans('FinancialCommitment'); $head[$tab][2] = 'FinancialCommitment'; @@ -59,7 +59,7 @@ function loan_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$tab][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id; $head[$tab][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ''.($nbFiles+$nbLinks).''; $head[$tab][2] = 'documents'; $tab++; @@ -68,7 +68,7 @@ function loan_prepare_head($object) $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1); $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id; $head[$tab][1] = $langs->trans("Notes"); - if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.''; + if($nbNote > 0) $head[$tab][1].= ''.$nbNote.''; $head[$tab][2] = 'note'; $tab++; } diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 93146738f66..1f643dd8a48 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -59,7 +59,7 @@ function member_prepare_head(Adherent $object) $head[$h][0] = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$object->id; $head[$h][1] = $langs->trans("Subscriptions"); $head[$h][2] = 'subscription'; - if ($nbSubscription > 0) $head[$h][1].= ' '.$nbSubscription.''; + if ($nbSubscription > 0) $head[$h][1].= ''.$nbSubscription.''; $h++; } @@ -76,7 +76,7 @@ function member_prepare_head(Adherent $object) $head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id; $head[$h][1] = $langs->trans("Note"); $head[$h][2] = 'note'; - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $h++; // Attachments @@ -87,7 +87,7 @@ function member_prepare_head(Adherent $object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; @@ -127,7 +127,7 @@ function member_type_prepare_head(AdherentType $object) $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; - + // Multilangs if (! empty($conf->global->MAIN_MULTILANGS)) { diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index d353cca0097..22e660b2e22 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -55,7 +55,7 @@ function dol_setcache($memoryid, $data) $result=$dolmemcache->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211); if (! $result) return -1; } - + $memoryid=session_name().'_'.$memoryid; //$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false); $dolmemcache->add($memoryid, $data); // This fails if key already exists @@ -79,7 +79,7 @@ function dol_setcache($memoryid, $data) $result=$dolmemcache->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211); if (! $result) return -1; } - + $memoryid=session_name().'_'.$memoryid; //$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false); $result=$dolmemcache->add($memoryid, $data); // This fails if key already exists @@ -122,7 +122,7 @@ function dol_getcache($memoryid) $result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211); if (! $result) return -1; } - + $memoryid=session_name().'_'.$memoryid; //$m->setOption(Memcached::OPT_COMPRESSION, false); //print "Get memoryid=".$memoryid; @@ -149,7 +149,7 @@ function dol_getcache($memoryid) $result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211); if (! $result) return -1; } - + $memoryid=session_name().'_'.$memoryid; //$m->setOption(Memcached::OPT_COMPRESSION, false); $data=$m->get($memoryid); diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index fff750c167b..4e5cbb92c02 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -123,23 +123,24 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = if (count($object->fields)) { - foreach($object->fields as $key => $val) { $i++; $texttoinsert.= "\t\t'".$key."' => array('type'=>'".$val['type']."', 'label'=>'".$val['label']."',"; $texttoinsert.= " 'enabled'=>".($val['enabled']!=''?$val['enabled']:1).","; - $texttoinsert.= " 'visible'=>".($val['visible']!=''?$val['visible']:-1).","; $texttoinsert.= " 'position'=>".($val['position']!=''?$val['position']:50).","; - $texttoinsert.= " 'notnull'=>".($val['notnull']!=''?$val['notnull']:-1).","; + $texttoinsert.= " 'notnull'=>".(empty($val['notnull'])?0:$val['notnull']).","; + $texttoinsert.= " 'visible'=>".($val['visible']!=''?$val['visible']:-1).","; + if ($val['noteditable']) $texttoinsert.= " 'noteditable'=>'".$val['noteditable']."',"; if ($val['default']) $texttoinsert.= " 'default'=>'".$val['default']."',"; if ($val['index']) $texttoinsert.= " 'index'=>".$val['index'].","; + if ($val['foreignkey']) $texttoinsert.= " 'foreignkey'=>'".$val['foreignkey']."',"; if ($val['searchall']) $texttoinsert.= " 'searchall'=>".$val['searchall'].","; if ($val['isameasure']) $texttoinsert.= " 'isameasure'=>'".$val['isameasure']."',"; - if ($val['foreignkey']) $texttoinsert.= " 'foreignkey'=>'".$val['foreignkey']."',"; + if ($val['css']) $texttoinsert.= " 'css'=>'".$val['css']."',"; if ($val['help']) $texttoinsert.= " 'help'=>\"".preg_replace('/"/', '', $val['help'])."\","; - if ($val['comment']) $texttoinsert.= " 'comment'=>\"".preg_replace('/"/', '', $val['comment'])."\","; if ($val['showoncombobox']) $texttoinsert.= " 'showoncombobox'=>'".$val['showoncombobox']."',"; + if ($val['disabled']) $texttoinsert.= " 'disabled'=>'".$val['disabled']."',"; if ($val['arrayofkeyval']) { $texttoinsert.= " 'arrayofkeyval'=>array("; @@ -150,8 +151,10 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = $texttoinsert.="'".$key2."'=>'".$val2."'"; $i++; } - $texttoinsert.= ")"; + $texttoinsert.= "),"; } + if ($val['comment']) $texttoinsert.= " 'comment'=>\"".preg_replace('/"/', '', $val['comment'])."\""; + $texttoinsert.= "),\n"; } } diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 558a3d0d035..97ab411bdfc 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -53,7 +53,7 @@ function commande_prepare_head(Commande $object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -67,7 +67,7 @@ function commande_prepare_head(Commande $object) if ($conf->expedition_bon->enabled) $text.=$langs->trans("Shipments"); if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text.='/'; if ($conf->livraison_bon->enabled) $text.=$langs->trans("Receivings"); - if ($nbShipments > 0 || $nbReceiption > 0) $text.= ' '.($nbShipments?$nbShipments:0); + if ($nbShipments > 0 || $nbReceiption > 0) $text.= ''.($nbShipments?$nbShipments:0); if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.='/'; if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.= ($nbReceiption?$nbReceiption:0); if ($nbShipments > 0 || $nbReceiption > 0) $text.= ''; @@ -89,7 +89,7 @@ function commande_prepare_head(Commande $object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -101,7 +101,7 @@ function commande_prepare_head(Commande $object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index d16fc569961..918b5ebb6a3 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -240,14 +240,18 @@ function pdf_getPDFFont($outputlangs) */ function pdf_getPDFFontSize($outputlangs) { + global $conf; + $size=10; // By default, for FPDI or ISO language on TCPDF - if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower) + if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 font like DejaVuSans if required (slower) { - if ($outputlangs->trans('FONTSIZEFORPDF')!='FONTSIZEFORPDF') + if ($outputlangs->trans('FONTSIZEFORPDF') != 'FONTSIZEFORPDF') { $size = (int) $outputlangs->trans('FONTSIZEFORPDF'); } } + if (! empty($conf->global->MAIN_PDF_FORCE_FONT_SIZE)) $size = $conf->global->MAIN_PDF_FORCE_FONT_SIZE; + return $size; } @@ -1413,8 +1417,8 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, //print '>'.$outputlangs->charset_output.','.$period; if(!empty($conf->global->ADD_HTML_FORMATING_INTO_DESC_DOC)){ $libelleproduitservice.= ''."__N__ ".$period.''; - }else{ - $libelleproduitservice.="__N__".$period; + } else { + $libelleproduitservice.="__N__".$period; } //print $libelleproduitservice; } @@ -1701,8 +1705,8 @@ function pdf_getlineqty($object, $i, $outputlangs, $hidedetails = 0) } if (empty($reshook)) { - if ($object->lines[$i]->special_code == 3) return ''; - if (empty($hidedetails) || $hidedetails > 1) $result.=$object->lines[$i]->qty; + if ($object->lines[$i]->special_code == 3) return ''; + if (empty($hidedetails) || $hidedetails > 1) $result.=$object->lines[$i]->qty; } return $result; } @@ -2104,7 +2108,7 @@ function pdf_getLinkedObjects($object, $outputlangs) { if ($objecttype == 'facture') { - // For invoice, we don't want to have a reference line on document. Image we are using recuring invoice, we will have a line longer than document width. + // For invoice, we don't want to have a reference line on document. Image we are using recuring invoice, we will have a line longer than document width. } elseif ($objecttype == 'propal' || $objecttype == 'supplier_proposal') { @@ -2238,7 +2242,6 @@ function pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, $hidedetails = } else { - if (is_object($hookmanager)) { $special_code = $object->lines[$i]->special_code; diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 9ba505e9eae..f4efd0c0ee9 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -204,15 +204,15 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $localtaxes = array(0,0,0); $apply_tax = false; switch($localtax1_type) { - case '2': // localtax on product or service - $apply_tax = true; - break; - case '4': // localtax on product - if ($type == 0) $apply_tax = true; - break; - case '6': // localtax on service - if ($type == 1) $apply_tax = true; - break; + case '2': // localtax on product or service + $apply_tax = true; + break; + case '4': // localtax on product + if ($type == 0) $apply_tax = true; + break; + case '6': // localtax on service + if ($type == 1) $apply_tax = true; + break; } if ($uselocaltax1_rate && $apply_tax) { @@ -299,15 +299,15 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $apply_tax = false; switch($localtax1_type) { - case '1': // localtax on product or service - $apply_tax = true; - break; - case '3': // localtax on product - if ($type == 0) $apply_tax = true; - break; - case '5': // localtax on service - if ($type == 1) $apply_tax = true; - break; + case '1': // localtax on product or service + $apply_tax = true; + break; + case '3': // localtax on product + if ($type == 0) $apply_tax = true; + break; + case '5': // localtax on service + if ($type == 1) $apply_tax = true; + break; } if ($uselocaltax1_rate && $apply_tax) { $result[14] = price2num(($tot_sans_remise * (1 + ( $localtax1_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax1 for total_ht_without_discount diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index ba4d90a69eb..bdeb9181d3b 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -82,7 +82,7 @@ function product_prepare_head($object) $head[$h][1] = $langs->trans('AssociatedProducts'); $nbFatherAndChild = $object->hasFatherOrChild(); - if ($nbFatherAndChild > 0) $head[$h][1].= ' '.$nbFatherAndChild.''; + if ($nbFatherAndChild > 0) $head[$h][1].= ''.$nbFatherAndChild.''; $head[$h][2] = 'subproduct'; $h++; } @@ -98,7 +98,6 @@ function product_prepare_head($object) $h++; if (!empty($conf->variants->enabled) && ($object->isProduct() || $object->isService())) { - global $db; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; @@ -111,7 +110,7 @@ function product_prepare_head($object) $head[$h][1] = $langs->trans('ProductCombinations'); $head[$h][2] = 'combinations'; $nbVariant = $prodcomb->countNbOfCombinationForFkProductParent($object->id); - if ($nbVariant > 0) $head[$h][1].= ' '.$nbVariant.''; + if ($nbVariant > 0) $head[$h][1].= ''.$nbVariant.''; } $h++; @@ -161,7 +160,7 @@ function product_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/product/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -180,7 +179,7 @@ function product_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -229,7 +228,7 @@ function productlot_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT."/product/stock/productlot_document.php?id=".$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -292,6 +291,11 @@ function product_admin_prepare_head() $head[$h][2] = 'attributes'; $h++; + $head[$h][0] = DOL_URL_ROOT.'/product/admin/product_supplier_extrafields.php'; + $head[$h][1] = $langs->trans("ProductSupplierExtraFields"); + $head[$h][2] = 'supplierAttributes'; + $h++; + complete_head_from_modules($conf, $langs, null, $head, $h, 'product_admin', 'remove'); return $head; @@ -480,6 +484,22 @@ function show_stats_for_company($product, $socid) return $nblines++; } +/** + * Return translation label of a unit key. + * Function kept for backward compatibility. + * + * @param string $scale Scale of unit: '0', '-3', '6', ... + * @param string $measuring_style Style of unit: weight, volume,... + * @param int $unit ID of unit (rowid in llx_c_units table) + * @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated. + * @return string Unit string + * @see measuringUnitString() formproduct->selectMeasuringUnits() + */ +function measuring_units_string($scale = '', $measuring_style = '', $unit = 0, $use_short_label = 0) +{ + return measuringUnitString($unit, $measuring_style, $scale, $use_short_label); +} + /** * Return translation label of a unit key * @@ -488,9 +508,9 @@ function show_stats_for_company($product, $socid) * @param string $scale Scale of unit: '0', '-3', '6', ... * @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated. * @return string Unit string - * @see formproduct->selectMeasuringUnits + * @see formproduct->selectMeasuringUnits() */ -function measuring_units_string($unit, $measuring_style = '', $scale = '', $use_short_label = 0) +function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_short_label = 0) { global $langs, $db; require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; @@ -527,9 +547,9 @@ function measuring_units_string($unit, $measuring_style = '', $scale = '', $use_ } /** - * Transform a given unit into the square of that unit, if known + * Transform a given unit scale into the square of that unit, if known. * - * @param int $unit Unit key (-3,-2,-1,0,98,99...) + * @param int $unit Unit scale key (-3,-2,-1,0,98,99...) * @return int Squared unit key (-6,-4,-2,0,98,99...) * @see formproduct->selectMeasuringUnits */ @@ -547,9 +567,9 @@ function measuring_units_squared($unit) /** - * Transform a given unit into the cube of that unit, if known + * Transform a given unit scale into the cube of that unit, if known * - * @param int $unit Unit key (-3,-2,-1,0,98,99...) + * @param int $unit Unit scale key (-3,-2,-1,0,98,99...) * @return int Cubed unit key (-9,-6,-3,0,88,89...) * @see formproduct->selectMeasuringUnits */ diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index d6dc59d1dcc..21df0301d49 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -48,7 +48,7 @@ function project_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$object->id; $head[$h][1] = $langs->trans("ProjectContact"); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; @@ -61,7 +61,7 @@ function project_prepare_head($object) require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; $taskstatic=new Task($db); $nbTasks=count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0)); - if ($nbTasks > 0) $head[$h][1].= ' '.($nbTasks).''; + if ($nbTasks > 0) $head[$h][1].= ''.($nbTasks).''; $head[$h][2] = 'tasks'; $h++; @@ -82,7 +82,7 @@ function project_prepare_head($object) $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id; $head[$h][1] = $langs->trans("TimeSpent"); - if ($nbTimeSpent > 0) $head[$h][1].= ' ...'; + if ($nbTimeSpent > 0) $head[$h][1].= '...'; $head[$h][2] = 'timespent'; $h++; } @@ -123,7 +123,7 @@ function project_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; @@ -133,7 +133,7 @@ function project_prepare_head($object) $nbComments = $object->getNbComments(); $head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$object->id; $head[$h][1] = $langs->trans("CommentLink"); - if ($nbComments > 0) $head[$h][1].= ' '.$nbComments.''; + if ($nbComments > 0) $head[$h][1].= ''.$nbComments.''; $head[$h][2] = 'project_comment'; $h++; } @@ -174,7 +174,7 @@ function task_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans("TaskRessourceLinks"); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'task_contact'; $h++; @@ -195,7 +195,7 @@ function task_prepare_head($object) $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans("TimeSpent"); - if ($nbTimeSpent > 0) $head[$h][1].= ' ...'; + if ($nbTimeSpent > 0) $head[$h][1].= '...'; $head[$h][2] = 'task_time'; $h++; @@ -212,7 +212,7 @@ function task_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'task_notes'; $h++; } @@ -224,7 +224,7 @@ function task_prepare_head($object) $nbFiles = count(dol_dir_list($filesdir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'task_document'; $h++; @@ -234,7 +234,7 @@ function task_prepare_head($object) $nbComments = $object->getNbComments(); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans("CommentLink"); - if ($nbComments > 0) $head[$h][1].= ' '.$nbComments.''; + if ($nbComments > 0) $head[$h][1].= ''.$nbComments.''; $head[$h][2] = 'task_comment'; $h++; } @@ -670,8 +670,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($total_projectlinesa_planned) { $totalAverageDeclaredProgress = round(100 * $total_projectlinesa_declared_if_planned / $total_projectlinesa_planned, 2); $totalCalculatedProgress = round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned, 2); - // this conf is actually hidden, by default we use 1% for "be carefull or warning" - $warningRatio = !empty($conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT) ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.01; + + // this conf is actually hidden, by default we use 10% for "be carefull or warning" + $warningRatio = !empty($conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT) ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.10; // define progress color according to time spend vs workload $progressBarClass = 'progress-bar-info'; @@ -780,171 +781,171 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec //if ($lines[$i]->fk_task_parent == $parent) //{ - // If we want all or we have a role on task, we show it - if (empty($mine) || ! empty($tasksrole[$lines[$i]->id])) + // If we want all or we have a role on task, we show it + if (empty($mine) || ! empty($tasksrole[$lines[$i]->id])) + { + //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); + + // Break on a new project + if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) { - //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); - - // Break on a new project - if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) + $lastprojectid=$lines[$i]->fk_project; + if ($preselectedday) { - $lastprojectid=$lines[$i]->fk_project; - if ($preselectedday) - { - $projectstatic->id = $lines[$i]->fk_project; - } + $projectstatic->id = $lines[$i]->fk_project; } - - if (empty($workloadforid[$projectstatic->id])) - { - if ($preselectedday) - { - $projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week - $workloadforid[$projectstatic->id]=1; - } - } - - $projectstatic->id=$lines[$i]->fk_project; - $projectstatic->ref=$lines[$i]->project_ref; - $projectstatic->title=$lines[$i]->project_label; - $projectstatic->public=$lines[$i]->public; - - $taskstatic->id=$lines[$i]->task_id; - $taskstatic->ref=($lines[$i]->task_ref?$lines[$i]->task_ref:$lines[$i]->task_id); - $taskstatic->label=$lines[$i]->task_label; - $taskstatic->date_start=$lines[$i]->date_start; - $taskstatic->date_end=$lines[$i]->date_end; - - $thirdpartystatic->id=$lines[$i]->socid; - $thirdpartystatic->name=$lines[$i]->thirdparty_name; - $thirdpartystatic->email=$lines[$i]->thirdparty_email; - - if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) - { - print '
'; - print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - if ($projectstatic->title) - { - print ' - '; - print $projectstatic->title; - } - print '
'; - print $fuser->getNomUrl(1, 'withproject', 'time'); - print '"; - if ($oldprojectforbreak == -1) - { - print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - print '
'.$projectstatic->title; - } - print "
'; - if ($thirdpartystatic->id > 0) print $thirdpartystatic->getNomUrl(1, 'project', 10); - print ''; - print ''; - for ($k = 0 ; $k < $level ; $k++) print "   "; - print $taskstatic->getNomUrl(1, 'withproject', 'time'); - // Label task - print '
'; - for ($k = 0 ; $k < $level ; $k++) print "   "; - print $taskstatic->label; - //print "
"; - //for ($k = 0 ; $k < $level ; $k++) print "   "; - //print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0); - print "
'; - print dol_print_date($lines[$i]->timespent_datehour, 'day'); - print ''; - print dol_print_date($lines[$i]->timespent_datehour, 'hour'); - print ''; - - $dayWorkLoad = $lines[$i]->timespent_duration; - $totalforeachline[$preselectedday]+=$lines[$i]->timespent_duration; - - $alreadyspent=''; - if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); - - print convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); - - $modeinput='hours'; - - print ''; - - print ''; - print ''; - print ''; - /*if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); - else if ($disabledtask) - { - $titleassigntask = $langs->trans("AssignTaskToMe"); - if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); - - print $form->textwithpicto('',$langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); - }*/ - print '
'; + print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + if ($projectstatic->title) + { + print ' - '; + print $projectstatic->title; + } + print '
'; + print $fuser->getNomUrl(1, 'withproject', 'time'); + print '"; + if ($oldprojectforbreak == -1) + { + print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + print '
'.$projectstatic->title; + } + print "
'; + if ($thirdpartystatic->id > 0) print $thirdpartystatic->getNomUrl(1, 'project', 10); + print ''; + print ''; + for ($k = 0 ; $k < $level ; $k++) print "   "; + print $taskstatic->getNomUrl(1, 'withproject', 'time'); + // Label task + print '
'; + for ($k = 0 ; $k < $level ; $k++) print "   "; + print $taskstatic->label; + //print "
"; + //for ($k = 0 ; $k < $level ; $k++) print "   "; + //print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0); + print "
'; + print dol_print_date($lines[$i]->timespent_datehour, 'day'); + print ''; + print dol_print_date($lines[$i]->timespent_datehour, 'hour'); + print ''; + + $dayWorkLoad = $lines[$i]->timespent_duration; + $totalforeachline[$preselectedday]+=$lines[$i]->timespent_duration; + + $alreadyspent=''; + if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); + + print convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); + + $modeinput='hours'; + + print ''; + + print ''; + print ''; + print ''; + /*if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); + else if ($disabledtask) + { + $titleassigntask = $langs->trans("AssignTaskToMe"); + if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + + print $form->textwithpicto('',$langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); + }*/ + print '
'; + print '
'; $sql= " FROM ".MAIN_DB_PREFIX."projet as p"; if ($mytasks) @@ -1796,9 +1797,9 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $sql.= " AND ec.fk_c_type_contact = ctc.rowid"; // Replace the 2 lines with ec.fk_c_type_contact in $arrayidtypeofcontact $sql.= " AND ctc.element = 'project_task'"; } - if ($statut >= 0) + if ($status >= 0) { - $sql.= " AND p.fk_statut = ".$statut; + $sql.= " AND p.fk_statut = ".(int) $status; } if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) { @@ -1848,7 +1849,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $resql = $db->query($sql2); if ($resql) { - $total_task = 0; + $total_task = 0; $total_opp_amount = 0; $ponderated_opp_amount = 0; @@ -1856,7 +1857,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $i = 0; print ''; - print_liste_field_titre($title.' '.$num.'', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre($title.''.$num.'', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { @@ -1995,6 +1996,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks * @param hideOnProgressNull $hideOnProgressNull bool hide if progress is null * @param spaced $spaced bool used to add space at bottom (made by css) * @return string + * @see getTaskProgressBadge() */ function getTaskProgressView($task, $label = true, $progressNumber = true, $hideOnProgressNull = false, $spaced = false) { @@ -2020,26 +2022,27 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide if ($task->planned_workload){ $progressCalculated = round(100 * doubleval($task->duration_effective) / doubleval($task->planned_workload), 2); - // this conf is actually hidden, by default we use 1% for "be carefull or warning" - $warningRatio = !empty($conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT) ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.01; + // this conf is actually hidden, by default we use 10% for "be carefull or warning" + $warningRatio = !empty($conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT) ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.10; - $diffTitle = '
'.$langs->trans('ProgressDeclared').' : '.$task->progress.'%'; - $diffTitle.= '
'.$langs->trans('ProgressCalculated').' : '.$progressCalculated.'%'; + $diffTitle = '
'.$langs->trans('ProgressDeclared').' : '.$task->progress.($task->progress ? '%' : ''); + $diffTitle.= '
'.$langs->trans('ProgressCalculated').' : '.$progressCalculated.($progressCalculated ? '%' : ''); - if($progressCalculated > doubleval($task->progress)){ + //var_dump($progressCalculated.' '.$warningRatio.' '.$task->progress.' '.doubleval($task->progress * $warningRatio)); + if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) { $progressBarClass = 'progress-bar-danger'; - $title = $langs->trans('TheReportedProgressIsLessThanTheCalculatedProgressionByX', abs($task->progress-$progressCalculated).'%'); - $diff = ' '.($task->progress-$progressCalculated).'%'; + $title = $langs->trans('TheReportedProgressIsLessThanTheCalculatedProgressionByX', abs($task->progress-$progressCalculated).' '.$langs->trans("point")); + $diff = ' '.($task->progress-$progressCalculated).'%'; } - elseif($progressCalculated * $warningRatio >= doubleval($task->progress)){ // warning if close at 1% + elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% $progressBarClass = 'progress-bar-warning'; - $title = $langs->trans('TheReportedProgressIsLessThanTheCalculatedProgressionByX', abs($task->progress-$progressCalculated).'%'); - $diff = ' '.($task->progress-$progressCalculated).'%'; + $title = $langs->trans('TheReportedProgressIsLessThanTheCalculatedProgressionByX', abs($task->progress-$progressCalculated).' '.$langs->trans("point")); + $diff = ' '.($task->progress-$progressCalculated).'%'; } else{ $progressBarClass = 'progress-bar-success'; - $title = $langs->trans('TheReportedProgressIsMoreThanTheCalculatedProgressionByX', ($task->progress-$progressCalculated).'%'); - $diff = ' '.($task->progress-$progressCalculated).'%'; + $title = $langs->trans('TheReportedProgressIsMoreThanTheCalculatedProgressionByX', ($task->progress-$progressCalculated).' '.$langs->trans("point")); + $diff = ' '.($task->progress-$progressCalculated).'%'; } } @@ -2062,7 +2065,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide if($progressNumber !== false) { $out.= ' '; - if($progressNumber!==true){ + if ($progressNumber!==true) { $out.= $progressNumber; // replace label by param } else{ @@ -2087,8 +2090,21 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $out.= ''; - $out.= '
'; - $out.= '
'; + $out.= '
'; + $diffval = doubleval($task->progress) - doubleval($progressCalculated); + if ($diffval >= 0) { + // good + $out.= '
'; + $out.= '
'; + $out.= '
'; + } + else + { + // bad + $out.= '
'; + $out.= '
'; + $out.= '
'; + } $out.= '
'; $out.= '
'; @@ -2101,6 +2117,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide * @param label $label string empty = auto (progress), string = replace output * @param tooltip $tooltip string empty = auto , string = replace output * @return string + * @see getTaskProgressView() */ function getTaskProgressBadge($task, $label = '', $tooltip = '') { @@ -2117,13 +2134,13 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '') if ($task->planned_workload){ $progressCalculated = round(100 * doubleval($task->duration_effective) / doubleval($task->planned_workload), 2); - // this conf is actually hidden, by default we use 1% for "be carefull or warning" - $warningRatio = !empty($conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT) ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.01; + // this conf is actually hidden, by default we use 10% for "be carefull or warning" + $warningRatio = !empty($conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT) ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.10; - if($progressCalculated > doubleval($task->progress)){ + if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) { $badgeClass.= 'badge-danger'; } - elseif($progressCalculated * $warningRatio >= doubleval($task->progress)){ // warning if close at 1% + elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% $badgeClass.= 'badge-warning'; } else{ diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index 2b894b49790..9e12e9d4229 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -60,7 +60,7 @@ function propal_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/comm/propal/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -78,7 +78,7 @@ function propal_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -90,7 +90,7 @@ function propal_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php index af27cea4292..33591b3beea 100644 --- a/htdocs/core/lib/reception.lib.php +++ b/htdocs/core/lib/reception.lib.php @@ -60,7 +60,7 @@ function reception_prepare_head(Reception $object) $nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id; $head[$h][1] = $langs->trans("ContactsAddresses"); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -70,7 +70,7 @@ function reception_prepare_head(Reception $object) if (!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT."/reception/note.php?id=".$object->id; $head[$h][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; @@ -105,18 +105,18 @@ function reception_admin_prepare_head() if (! empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFields"); - $head[$h][2] = 'attributes_reception'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributes_reception'; + $h++; } if (! empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsLines"); - $head[$h][2] = 'attributeslines_reception'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'attributeslines_reception'; + $h++; } diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php index 0ee012e49cc..7bd2454dbe6 100644 --- a/htdocs/core/lib/resource.lib.php +++ b/htdocs/core/lib/resource.lib.php @@ -45,7 +45,7 @@ function resource_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -63,7 +63,7 @@ function resource_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/resource/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -73,7 +73,7 @@ function resource_prepare_head($object) $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $head[$h][0] = DOL_URL_ROOT.'/resource/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; + if($nbFiles > 0) $head[$h][1].= ''.$nbFiles.''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/salaries.lib.php b/htdocs/core/lib/salaries.lib.php index 6c468a74af9..01b3cafd60d 100644 --- a/htdocs/core/lib/salaries.lib.php +++ b/htdocs/core/lib/salaries.lib.php @@ -51,7 +51,7 @@ function salaries_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/salaries/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 0b72fe4645a..d5226bb7e3d 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -217,7 +217,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f { $featureforlistofmodule=$feature; if ($featureforlistofmodule == 'produit') $featureforlistofmodule='product'; - if (! empty($user->societe_id) && ! empty($conf->global->MAIN_MODULES_FOR_EXTERNAL) && ! in_array($featureforlistofmodule, $listofmodules)) // If limits on modules for external users, module must be into list of modules for external users + if (! empty($user->socid) && ! empty($conf->global->MAIN_MODULES_FOR_EXTERNAL) && ! in_array($featureforlistofmodule, $listofmodules)) // If limits on modules for external users, module must be into list of modules for external users { $readok=0; $nbko++; continue; @@ -312,17 +312,26 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f foreach($feature2 as $subfeature) { if (empty($user->rights->$feature->$subfeature->creer) - && empty($user->rights->$feature->$subfeature->write) - && empty($user->rights->$feature->$subfeature->create)) { $createok=0; $nbko++; } - else { $createok=1; break; } // Break to bypass second test if the first is ok + && empty($user->rights->$feature->$subfeature->write) + && empty($user->rights->$feature->$subfeature->create)) { + $createok=0; + $nbko++; + } else { + $createok=1; + // Break to bypass second test if the first is ok + break; + } } } elseif (! empty($feature)) // This is for permissions on 2 levels ('creer' or 'write') { //print '
feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write; if (empty($user->rights->$feature->creer) - && empty($user->rights->$feature->write) - && empty($user->rights->$feature->create)) { $createok=0; $nbko++; } + && empty($user->rights->$feature->write) + && empty($user->rights->$feature->create)) { + $createok=0; + $nbko++; + } } } diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 07eecf0f352..c81ea9d98d7 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -282,8 +282,11 @@ if (! function_exists('dol_loginfunction')) // Set jquery theme $dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:''); - $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico', 1); + + $favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png'; + if (! empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; + $jquerytheme = 'base'; if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index e1732e1b4fd..79446183685 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -74,7 +74,7 @@ function shipping_prepare_head($object) $nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id; $head[$h][1] = $langs->trans("ContactsAddresses"); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -86,7 +86,7 @@ function shipping_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -95,7 +95,7 @@ function shipping_prepare_head($object) if (!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT."/expedition/note.php?id=".$object->id; $head[$h][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; @@ -215,7 +215,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') if ($filter) print load_fiche_titre($langs->trans("OtherSendingsForSameOrder")); else print load_fiche_titre($langs->trans("SendingsAndReceivingForSameOrder")); - print '
'; + print '
'; print ''; //print ''; print ''; diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index 4d1bc5b3593..988c7a2d78c 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -29,7 +29,7 @@ */ function stock_prepare_head($object) { - global $langs, $conf; + global $langs, $conf, $user; $h = 0; $head = array(); @@ -39,10 +39,13 @@ function stock_prepare_head($object) $head[$h][2] = 'card'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/product/stock/movement_list.php?id='.$object->id; - $head[$h][1] = $langs->trans("StockMovements"); - $head[$h][2] = 'movements'; - $h++; + if (!empty($user->rights->stock->mouvement->lire)) + { + $head[$h][0] = DOL_URL_ROOT.'/product/stock/movement_list.php?id='.$object->id; + $head[$h][1] = $langs->trans("StockMovements"); + $head[$h][2] = 'movements'; + $h++; + } /* $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche-valo.php?id='.$object->id; diff --git a/htdocs/core/lib/supplier_proposal.lib.php b/htdocs/core/lib/supplier_proposal.lib.php index e5eff78b1ac..6549b362c11 100644 --- a/htdocs/core/lib/supplier_proposal.lib.php +++ b/htdocs/core/lib/supplier_proposal.lib.php @@ -49,7 +49,7 @@ function supplier_proposal_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -67,7 +67,7 @@ function supplier_proposal_prepare_head($object) if(!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; } @@ -79,7 +79,7 @@ function supplier_proposal_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 15476fc3420..ade6a7f49cf 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -59,7 +59,7 @@ function tax_prepare_head(ChargeSociales $object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 53afbe50dce..41e783b7597 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -86,7 +86,7 @@ function ticket_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; + if ($nbContact > 0) $head[$h][1].= ''.$nbContact.''; $head[$h][2] = 'contact'; $h++; } @@ -100,7 +100,7 @@ function ticket_prepare_head($object) $head[$h][0] = dol_buildpath('/ticket/document.php', 1) . '?id=' . $object->id; $head[$h][1] = $langs->trans("Documents"); if ($nbFiles > 0) { - $head[$h][1] .= ' ' . $nbFiles . ''; + $head[$h][1] .= '' . $nbFiles . ''; } $head[$h][2] = 'tabTicketDocument'; @@ -151,6 +151,7 @@ function showDirectPublicLink($object) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $email = CMailFile::getValidAddress($object->origin_email, 2); + $url = ''; if ($email) { $url = dol_buildpath('/public/ticket/view.php', 3).'?track_id='.$object->track_id.'&email='.$email; @@ -233,7 +234,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ } if (! empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { - print '' . ($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC ? $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC : $langs->trans("TicketSystem")) . ''; + print '' . ($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC ? $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC : $langs->trans("TicketSystem")) . ''; } print '
'; } @@ -689,10 +690,10 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out.=$actionstatic->getNomUrl(1, -1).' '; } -// if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id) -// { -// $out.=''.$langs->trans('Show').''; -// } + //if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id) + //{ + // $out.=''.$langs->trans('Show').''; + //} if ($user->rights->agenda->allactions->create || @@ -722,9 +723,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out.="\n"; // Ref - - $out.='

'; - + $out.='

'; // Author of event $out.=''; @@ -738,11 +737,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no } $out.=''; - // Title $out .= ' '; - if($actionstatic->code == 'TICKET_MSG') { $out .= $langs->trans('TicketNewMessage'); } @@ -785,7 +782,6 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no // Contact for this action if (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) { - $contactList = ''; foreach ($histo[$key]['socpeopleassigned'] as $cid => $Tab) { $contact = new Contact($db); @@ -823,6 +819,46 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no } } + $documents = getTicketActionCommEcmList($actionstatic) ; + if(!empty($documents)) + { + $footer.= '
'; + foreach ($documents as $doc) + { + $footer.= 'id.'" '; + $footer.= ' data-path="'.$doc->filepath.'"'; + $footer.= ' data-filename="'.dol_escape_htmltag($doc->filename).'" '; + $footer.= '>'; + + $filePath = DOL_DATA_ROOT . '/'. $doc->filepath . '/'. $doc->filename; + $mime = dol_mimetype($filePath); + $file = $actionstatic->id.'/'.$doc->filename; + $thumb = $actionstatic->id.'/thumbs/'.substr($doc->filename, 0, strrpos($doc->filename, '.')).'_mini'.substr($doc->filename, strrpos($doc->filename, '.')); + $doclink = dol_buildpath('document.php', 1).'?modulepart=actions&attachment=0&file='.urlencode($file).'&entity='.$conf->entity; + $viewlink = dol_buildpath('viewimage.php', 1).'?modulepart=actions&file='.urlencode($thumb).'&entity='.$conf->entity; + + $mimeAttr = ' mime="'.$mime.'" '; + $class = ''; + if(in_array($mime, array('image/png', 'image/jpeg', 'application/pdf'))){ + $class.= ' documentpreview'; + } + + $footer.= ''; + $footer.= img_mime($filePath).' '.$doc->filename; + $footer.= ''; + + $footer.= ''; + } + $footer.= '
'; + } + + + + + + + if(!empty($footer)){ $out.=''; } @@ -842,3 +878,34 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no if ($noprint) return $out; else print $out; } + + +/** + * getTicketActionCommEcmList + * + * @param ActionComm $object Object ActionComm + * @return array Array of documents in index table + */ +function getTicketActionCommEcmList($object) +{ + global $conf, $db; + + $documents = array(); + + $sql = 'SELECT ecm.rowid as id, ecm.src_object_type, ecm.src_object_id, ecm.filepath, ecm.filename'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'ecm_files ecm'; + $sql.= ' WHERE ecm.filepath = \'agenda/'.$object->id.'\''; + //$sql.= ' ecm.src_object_type = \''.$object->element.'\' AND ecm.src_object_id = '.$object->id; // Actually upload file doesn't add type + $sql.= ' ORDER BY ecm.position ASC'; + + $resql= $db->query($sql); + if ($resql) { + if ($db->num_rows($resql)) { + while ($obj = $db->fetch_object($resql)) { + $documents[$obj->id] = $obj; + } + } + } + + return $documents; +} diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index ef875675ed7..5e842612b24 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -64,7 +64,7 @@ function user_prepare_head($object) if ($canreadperms) { $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id; - $head[$h][1] = $langs->trans("Rights"). ' '.($object->nb_rights).''; + $head[$h][1] = $langs->trans("Rights"). ''.($object->nb_rights).''; $head[$h][2] = 'rights'; $h++; } @@ -94,7 +94,7 @@ function user_prepare_head($object) } $head[$h][0] = DOL_URL_ROOT.'/user/agenda_extsites.php?id='.$object->id; - $head[$h][1] = $langs->trans("ExtSites").($nbagenda ? ' '.$nbagenda.'' : ''); + $head[$h][1] = $langs->trans("ExtSites").($nbagenda ? ''.$nbagenda.'' : ''); $head[$h][2] = 'extsites'; $h++; } @@ -108,7 +108,7 @@ function user_prepare_head($object) } // Notifications - if ($user->societe_id == 0 && ! empty($conf->notification->enabled)) + if ($user->socid == 0 && ! empty($conf->notification->enabled)) { $nbNote = 0; $sql = "SELECT COUNT(n.rowid) as nb"; @@ -132,7 +132,7 @@ function user_prepare_head($object) $head[$h][0] = DOL_URL_ROOT.'/user/notify/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Notifications"); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'notify'; $h++; } @@ -157,14 +157,14 @@ function user_prepare_head($object) } // Such info on users is visible only by internal user - if (empty($user->societe_id)) + if (empty($user->socid)) { // Notes $nbNote = 0; if(!empty($object->note)) $nbNote++; $head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id; $head[$h][1] = $langs->trans("Note"); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + if ($nbNote > 0) $head[$h][1].= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; @@ -176,7 +176,7 @@ function user_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/user/document.php?userid='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; @@ -228,7 +228,7 @@ function group_prepare_head($object) if ($canreadperms) { $head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$object->id; - $head[$h][1] = $langs->trans("GroupRights"). ' '.($object->nb_rights).''; + $head[$h][1] = $langs->trans("GroupRights"). ''.($object->nb_rights).''; $head[$h][2] = 'rights'; $h++; } @@ -330,7 +330,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($foruserprofile) $colspan=4; $thumbsbyrow=6; - print '

'.$langs->trans("QtyOrdered").''.$langs->trans("SendingSheet").'
'; + print '
'; // Title if ($foruserprofile) @@ -348,23 +348,21 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else { - print ''; + $dirthemestring = ''; + foreach($dirthemes as $dirtheme) + { + $dirthemestring .= '"'.$dirtheme.'" '; + } + + print ''; print ''; - - print ''; - print ''; - print ''; - print ''; } print ''; + // Show logo + if ($foruserprofile) + { + // Nothing + } + else + { + // Show logo + print ''; + print ''; + /* + print ''; + print "";*/ + } + + // TopMenuDisableImages if ($foruserprofile) { @@ -615,8 +638,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // TextTitleColor for title of Pages if ($foruserprofile) { - - } else { @@ -642,8 +663,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // BackgroundTableTitleColor if ($foruserprofile) { - - } else { @@ -669,8 +688,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // TextTitleColor if ($foruserprofile) { - - } else { @@ -696,7 +713,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // BackgroundTableLineOddColor if ($foruserprofile) { - } else { @@ -726,7 +742,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // BackgroundTableLineEvenColor if ($foruserprofile) { - } else { @@ -982,7 +997,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else { - } print '
'.$langs->trans("DefaultSkin").'
'; + print $form->textwithpicto($langs->trans("DefaultSkin"), $langs->trans("ThemeDir").' : '.$dirthemestring); + print ''; $url='https://www.dolistore.com/4-skins'; print ''; print $langs->trans('DownloadMoreSkins'); print ''; print '
'.$langs->trans("ThemeDir").''; - foreach($dirthemes as $dirtheme) - { - echo '"'.$dirtheme.'" '; - } - print '
'; @@ -399,7 +397,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive"); else $title=$langs->trans("ShowPreview"); - print ''.$title.''; + print ''.$title.''; print '
'; if ($subdir == $selected_theme) { @@ -422,6 +420,31 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("EnableShowLogo").''; + if ($edit) + { + print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); + } + else + { + print yn($conf->global->MAIN_SHOW_LOGO); + } + print '
'.$langs->trans("EnableShowLogo").'' . yn($conf->global->MAIN_SHOW_LOGO) . '
'; } diff --git a/htdocs/core/lib/vat.lib.php b/htdocs/core/lib/vat.lib.php index 57798381274..f8c7b579c18 100644 --- a/htdocs/core/lib/vat.lib.php +++ b/htdocs/core/lib/vat.lib.php @@ -54,7 +54,7 @@ function vat_prepare_head($object) $nbLinks=Link::count($db, $object->element, $object->id); $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/document.php?id='.$object->id; $head[$tab][1] = $langs->trans("Documents"); - if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' '.($nbFiles+$nbLinks).''; + if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ''.($nbFiles+$nbLinks).''; $head[$tab][2] = 'documents'; $tab++; diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 9b2abe22904..6d8a14fc5ea 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -369,7 +369,7 @@ function showWebsiteTemplates(Website $website) $colspan=2; $thumbsbyrow=6; - print ''; + print '
'; // Title print ''; @@ -433,7 +433,7 @@ function showWebsiteTemplates(Website $website) if (! empty($urladvanced)) $ret.=''; else $ret.=''; print $ret; - print ''.$title.''; + print ''.$title.''; print ''; print '
'; diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index f0edbd6f877..7e7cbd9672e 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -25,497 +25,573 @@ * Build a file from an array of events * All input params and data must be encoded in $conf->charset_output * - * @param string $format 'vcal' or 'ical' - * @param string $title Title of export - * @param string $desc Description of export - * @param array $events_array Array of events ('eid','startdate','duration','enddate','title','summary','category','email','url','desc','author') - * @param string $outputfile Output file - * @return int <0 if ko, Nb of events in file if ok + * @param string $format "vcal" or "ical" + * @param string $title Title of export + * @param string $desc Description of export + * @param array $events_array Array of events ("uid","startdate","duration","enddate","title","summary","category","email","url","desc","author") + * @param string $outputfile Output file + * @return int < 0 if ko, Nb of events in file if ok */ function build_calfile($format, $title, $desc, $events_array, $outputfile) { - global $conf,$langs; + global $conf, $langs; - dol_syslog("xcal.lib.php::build_calfile Build cal file ".$outputfile." to format ".$format); + dol_syslog("xcal.lib.php::build_calfile Build cal file ".$outputfile." to format ".$format); - if (empty($outputfile)) return -1; + if (empty($outputfile)) + { + // -1 = error + return -1; + } // Note: A cal file is an UTF8 encoded file - $calfileh=fopen($outputfile, 'w'); - if ($calfileh) - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - $now=dol_now(); + $calfileh = fopen($outputfile, "w"); - $encoding=''; - if ($format == 'vcal') $encoding='ENCODING=QUOTED-PRINTABLE:'; + if ($calfileh) + { + include_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; - // Print header - fwrite($calfileh, "BEGIN:VCALENDAR\n"); - fwrite($calfileh, "VERSION:2.0\n"); - fwrite($calfileh, "METHOD:PUBLISH\n"); - //fwrite($calfileh,"PRODID:-//DOLIBARR ".DOL_VERSION."//EN\n"); - fwrite($calfileh, "PRODID:-//DOLIBARR ".DOL_VERSION."\n"); - fwrite($calfileh, "CALSCALE:GREGORIAN\n"); - fwrite($calfileh, "X-WR-CALNAME:".$encoding.format_cal($format, $title)."\n"); - fwrite($calfileh, "X-WR-CALDESC:".$encoding.format_cal($format, $desc)."\n"); - //fwrite($calfileh,"X-WR-TIMEZONE:Europe/Paris\n"); - if (! empty($conf->global->MAIN_AGENDA_EXPORT_CACHE) - && $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60){ - $hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, 'hour'); - $mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, 'min'); - $ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, 'sec'); - fwrite($calfileh, "X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n"); + $now = dol_now(); + $encoding = ""; + + if ($format === "vcal") + { + $encoding = "ENCODING=QUOTED-PRINTABLE:"; } - foreach ($events_array as $key => $event) - { - $eventqualified=true; - if ($eventqualified) - { - // See http://fr.wikipedia.org/wiki/ICalendar for format - // See http://www.ietf.org/rfc/rfc2445.txt for RFC - $uid = $event['uid']; - $type = $event['type']; - $startdate = $event['startdate']; - $duration = $event['duration']; - $enddate = $event['enddate']; - $summary = $event['summary']; - $category = $event['category']; - $priority = $event['priority']; - $fulldayevent = $event['fulldayevent']; - $location = $event['location']; - $email = $event['email']; - $url = $event['url']; - $transparency = $event['transparency']; // OPAQUE (busy) or TRANSPARENT (not busy) - $description=preg_replace('//i', "\n", $event['desc']); - $description=dol_string_nohtmltag($description, 0); // Remove html tags - $created = $event['created']; - $modified = $event['modified']; + // Print header + fwrite($calfileh, "BEGIN:VCALENDAR\n"); - // Uncomment for tests - //$summary="Resume"; - //$description="Description"; - //$description="MemberValidatedInDolibarr gd gdf gd gdff\nNom: tgdf g dfgdf gfd r ter\nType: gdfgfdf dfg fd gfd gd gdf gdf gfd gdfg dfg ddf\nAuteur: AD01fg dgdgdfg df gdf gd"; + // version is always "2.0" + fwrite($calfileh, "VERSION:2.0\n"); - // Format - $summary=format_cal($format, $summary); - $description=format_cal($format, $description); - $category=format_cal($format, $category); - $location=format_cal($format, $location); + fwrite($calfileh, "METHOD:PUBLISH\n"); + fwrite($calfileh, "PRODID:-//DOLIBARR ".DOL_VERSION."\n"); + fwrite($calfileh, "CALSCALE:GREGORIAN\n"); + fwrite($calfileh, "X-WR-CALNAME:".$encoding.format_cal($format, $title)."\n"); + fwrite($calfileh, "X-WR-CALDESC:".$encoding.format_cal($format, $desc)."\n"); + //fwrite($calfileh,"X-WR-TIMEZONE:Europe/Paris\n"); - // Output the vCard/iCal VEVENT object - /* - Example from Google ical export for a 1 hour event: - BEGIN:VEVENT - DTSTART:20101103T120000Z - DTEND:20101103T130000Z - DTSTAMP:20101121T144902Z - UID:4eilllcsq8r1p87ncg7vc8dbpk@google.com - CREATED:20101121T144657Z - DESCRIPTION: - LAST-MODIFIED:20101121T144707Z - LOCATION: - SEQUENCE:0 - STATUS:CONFIRMED - SUMMARY:Tâche 1 heure - TRANSP:OPAQUE - END:VEVENT + if (! empty($conf->global->MAIN_AGENDA_EXPORT_CACHE) && $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60) + { + $hh = convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, "hour"); + $mm = convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, "min"); + $ss = convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, "sec"); - Example from Google ical export for a 1 day event: - BEGIN:VEVENT - DTSTART;VALUE=DATE:20101102 - DTEND;VALUE=DATE:20101103 - DTSTAMP:20101121T144902Z - UID:d09t43kcf1qgapu9efsmmo1m6k@google.com - CREATED:20101121T144607Z - DESCRIPTION: - LAST-MODIFIED:20101121T144607Z - LOCATION: - SEQUENCE:0 - STATUS:CONFIRMED - SUMMARY:Tâche 1 jour - TRANSP:TRANSPARENT - END:VEVENT - */ - if ($type == 'event') - { - fwrite($calfileh, "BEGIN:VEVENT\n"); - fwrite($calfileh, "UID:".$uid."\n"); - if (! empty($email)) - { - fwrite($calfileh, "ORGANIZER:MAILTO:".$email."\n"); - fwrite($calfileh, "CONTACT:MAILTO:".$email."\n"); - } - if (! empty($url)) - { - fwrite($calfileh, "URL:".$url."\n"); - }; + fwrite($calfileh, "X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n"); + } - if ($created) fwrite($calfileh, "CREATED:".dol_print_date($created, 'dayhourxcard', true)."\n"); - if ($modified) fwrite($calfileh, "LAST-MODIFIED:".dol_print_date($modified, 'dayhourxcard', true)."\n"); - fwrite($calfileh, "SUMMARY:".$encoding.$summary."\n"); - fwrite($calfileh, "DESCRIPTION:".$encoding.$description."\n"); + foreach ($events_array as $key => $event) + { + // See http://fr.wikipedia.org/wiki/ICalendar for format + // See http://www.ietf.org/rfc/rfc2445.txt for RFC - /* Other keys: - // Status values for a "VEVENT" - statvalue = "TENTATIVE" ;Indicates event is - ;tentative. - / "CONFIRMED" ;Indicates event is - ;definite. - / "CANCELLED" ;Indicates event was - // Status values for "VTODO". - statvalue =/ "NEEDS-ACTION" ;Indicates to-do needs action. - / "COMPLETED" ;Indicates to-do completed. - / "IN-PROCESS" ;Indicates to-do in process of - / "CANCELLED" ;Indicates to-do was cancelled. - // Status values for "VJOURNAL". - statvalue =/ "DRAFT" ;Indicates journal is draft. - / "FINAL" ;Indicates journal is final. - / "CANCELLED" ;Indicates journal is removed. - */ - //fwrite($calfileh,"CLASS:PUBLIC\n"); // PUBLIC, PRIVATE, CONFIDENTIAL - //fwrite($calfileh,"X-MICROSOFT-CDO-BUSYSTATUS:1\n"); - //ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Laurent Destailleur;X-NUM-GUESTS=0:mailto:eldy10@gmail.com + // TODO: avoid use extra event array, use objects direct thahtwas created before - if (! empty($location)) fwrite($calfileh, "LOCATION:".$encoding.$location."\n"); - if ($fulldayevent) fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n"); - if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:1\n"); + $uid = $event["uid"]; + $type = $event["type"]; + $startdate = $event["startdate"]; + $duration = $event["duration"]; + $enddate = $event["enddate"]; + $summary = $event["summary"]; + $category = $event["category"]; + $priority = $event["priority"]; + $fulldayevent = $event["fulldayevent"]; + $location = $event["location"]; + $email = $event["email"]; + $url = $event["url"]; + $transparency = $event["transparency"]; + $description = dol_string_nohtmltag(preg_replace("//i", "\n", $event["desc"]), 0); + $created = $event["created"]; + $modified = $event["modified"]; + $assignedUsers = $event["assignedUsers"]; - // Date must be GMT dates - // Current date - fwrite($calfileh, "DTSTAMP:".dol_print_date($now, 'dayhourxcard', true)."\n"); - // Start date - $prefix=''; - $startdatef = dol_print_date($startdate, 'dayhourxcard', true); - if ($fulldayevent) - { - $prefix=';VALUE=DATE'; - $startdatef = dol_print_date($startdate, 'dayxcard', false); // Local time - } - fwrite($calfileh, "DTSTART".$prefix.":".$startdatef."\n"); - // End date - if ($fulldayevent) - { - if (empty($enddate)) $enddate=dol_time_plus_duree($startdate, 1, 'd'); - } - else - { - if (empty($enddate)) $enddate=$startdate+$duration; - } - $prefix=''; - $enddatef = dol_print_date($enddate, 'dayhourxcard', true); - if ($fulldayevent) - { - $prefix=';VALUE=DATE'; - $enddatef = dol_print_date($enddate+1, 'dayxcard', false); - //$enddatef .= dol_print_date($enddate+1,'dayhourxcard',false); // Local time - } - fwrite($calfileh, "DTEND".$prefix.":".$enddatef."\n"); - fwrite($calfileh, 'STATUS:CONFIRMED'."\n"); - if (! empty($transparency)) fwrite($calfileh, "TRANSP:".$transparency."\n"); - if (! empty($category)) fwrite($calfileh, "CATEGORIES:".$encoding.$category."\n"); - fwrite($calfileh, "END:VEVENT\n"); - } + // Format + $summary = format_cal($format, $summary); + $description = format_cal($format, $description); + $category = format_cal($format, $category); + $location = format_cal($format, $location); - // Output the vCard/iCal VTODO object - // ... - //PERCENT-COMPLETE:39 + // Output the vCard/iCal VEVENT object + /* + Example from Google ical export for a 1 hour event: + BEGIN:VEVENT + DTSTART:20101103T120000Z + DTEND:20101103T130000Z + DTSTAMP:20101121T144902Z + UID:4eilllcsq8r1p87ncg7vc8dbpk@google.com + CREATED:20101121T144657Z + DESCRIPTION: + LAST-MODIFIED:20101121T144707Z + LOCATION: + SEQUENCE:0 + STATUS:CONFIRMED + SUMMARY:Tâche 1 heure + TRANSP:OPAQUE + END:VEVENT - // Output the vCard/iCal VJOURNAL object - if ($type == 'journal') - { - fwrite($calfileh, "BEGIN:VJOURNAL\n"); - fwrite($calfileh, "UID:".$uid."\n"); - if (! empty($email)) - { - fwrite($calfileh, "ORGANIZER:MAILTO:".$email."\n"); - fwrite($calfileh, "CONTACT:MAILTO:".$email."\n"); - } - if (! empty($url)) - { - fwrite($calfileh, "URL:".$url."\n"); - }; + Example from Google ical export for a 1 day event: + BEGIN:VEVENT + DTSTART;VALUE=DATE:20101102 + DTEND;VALUE=DATE:20101103 + DTSTAMP:20101121T144902Z + UID:d09t43kcf1qgapu9efsmmo1m6k@google.com + CREATED:20101121T144607Z + DESCRIPTION: + LAST-MODIFIED:20101121T144607Z + LOCATION: + SEQUENCE:0 + STATUS:CONFIRMED + SUMMARY:Tâche 1 jour + TRANSP:TRANSPARENT + END:VEVENT + */ - if ($created) fwrite($calfileh, "CREATED:".dol_print_date($created, 'dayhourxcard', true)."\n"); - if ($modified) fwrite($calfileh, "LAST-MODIFIED:".dol_print_date($modified, 'dayhourxcard', true)."\n"); - fwrite($calfileh, "SUMMARY:".$encoding.$summary."\n"); - fwrite($calfileh, "DESCRIPTION:".$encoding.$description."\n"); - fwrite($calfileh, 'STATUS:CONFIRMED'."\n"); - fwrite($calfileh, "CATEGORIES:".$category."\n"); - fwrite($calfileh, "LOCATION:".$location."\n"); - fwrite($calfileh, "TRANSP:OPAQUE\n"); - fwrite($calfileh, "CLASS:CONFIDENTIAL\n"); - fwrite($calfileh, "DTSTAMP:".dol_print_date($startdatef, 'dayhourxcard', true)."\n"); + if ($type === "event") + { + fwrite($calfileh, "BEGIN:VEVENT\n"); + fwrite($calfileh, "UID:".$uid."\n"); - fwrite($calfileh, "END:VJOURNAL\n"); - } + if (! empty($email)) + { + fwrite($calfileh, "ORGANIZER:MAILTO:".$email."\n"); + fwrite($calfileh, "CONTACT:MAILTO:".$email."\n"); + } + if (! empty($url)) + { + fwrite($calfileh, "URL:".$url."\n"); + } - // Put other info in comment - /* - $comment=array(); - $comment ['eid'] = $eid; - $comment ['url'] = $linktoevent; - $comment ['date'] = dol_mktime($evttime,"Ymd"); - $comment ['duration'] = $duration; - $comment ['startdate'] = $startdate; - $comment ['enddate'] = $enddate; - fwrite($calfileh,"COMMENT:" . serialize ($comment) . "\n"); - */ - } - } + if (is_array($assignedUsers)) + { + foreach($assignedUsers as $assignedUser) + { + if($assignedUser->email === $email) + { + continue; + } - // Footer - fwrite($calfileh, "END:VCALENDAR"); + fwrite($calfileh, "ATTENDEE;RSVP=TRUE:mailto:".$assignedUser->email."\n"); + } + } - fclose($calfileh); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); - } - else - { - dol_syslog("xcal.lib.php::build_calfile Failed to open file ".$outputfile." for writing"); - return -2; - } + if ($created) + { + fwrite($calfileh, "CREATED:".dol_print_date($created, "dayhourxcard", true)."\n"); + } + + if ($modified) + { + fwrite($calfileh, "LAST-MODIFIED:".dol_print_date($modified, "dayhourxcard", true)."\n"); + } + + fwrite($calfileh, "SUMMARY:".$encoding.$summary."\n"); + fwrite($calfileh, "DESCRIPTION:".$encoding.$description."\n"); + + if (! empty($location)) + { + fwrite($calfileh, "LOCATION:".$encoding.$location."\n"); + } + + if ($fulldayevent) + { + fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n"); + } + + // see https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcical/0f262da6-c5fd-459e-9f18-145eba86b5d2 + if ($fulldayevent) + { + fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:TRUE\n"); + } + + // Date must be GMT dates + // Current date + fwrite($calfileh, "DTSTAMP:".dol_print_date($now, "dayhourxcard", true)."\n"); + + // Start date + $prefix = ""; + $startdatef = dol_print_date($startdate, "dayhourxcard", true); + + if ($fulldayevent) + { + // Local time + $prefix = ";VALUE=DATE"; + $startdatef = dol_print_date($startdate, "dayxcard", false); + } + + fwrite($calfileh, "DTSTART".$prefix.":".$startdatef."\n"); + + // End date + if ($fulldayevent) + { + if (empty($enddate)) + { + $enddate = dol_time_plus_duree($startdate, 1, "d"); + } + } + else + { + if (empty($enddate)) + { + $enddate = $startdate+$duration; + } + } + + $prefix = ""; + $enddatef = dol_print_date($enddate, "dayhourxcard", true); + + if ($fulldayevent) + { + $prefix = ";VALUE=DATE"; + $enddatef = dol_print_date($enddate+1, "dayxcard", false); + + // Local time + //$enddatef .= dol_print_date($enddate+1,"dayhourxcard",false); + } + + fwrite($calfileh, "DTEND".$prefix.":".$enddatef."\n"); + fwrite($calfileh, "STATUS:CONFIRMED"."\n"); + + if (! empty($transparency)) + { + fwrite($calfileh, "TRANSP:".$transparency."\n"); + } + + if (! empty($category)) + { + fwrite($calfileh, "CATEGORIES:".$encoding.$category."\n"); + } + + fwrite($calfileh, "END:VEVENT\n"); + } + + // Output the vCard/iCal VJOURNAL object + if ($type === "journal") + { + fwrite($calfileh, "BEGIN:VJOURNAL\n"); + fwrite($calfileh, "UID:".$uid."\n"); + + if (! empty($email)) + { + fwrite($calfileh, "ORGANIZER:MAILTO:".$email."\n"); + fwrite($calfileh, "CONTACT:MAILTO:".$email."\n"); + } + + if (! empty($url)) + { + fwrite($calfileh, "URL:".$url."\n"); + } + + if ($created) + { + fwrite($calfileh, "CREATED:".dol_print_date($created, "dayhourxcard", true)."\n"); + } + + if ($modified) + { + fwrite($calfileh, "LAST-MODIFIED:".dol_print_date($modified, "dayhourxcard", true)."\n"); + } + + fwrite($calfileh, "SUMMARY:".$encoding.$summary."\n"); + fwrite($calfileh, "DESCRIPTION:".$encoding.$description."\n"); + fwrite($calfileh, "STATUS:CONFIRMED"."\n"); + fwrite($calfileh, "CATEGORIES:".$category."\n"); + fwrite($calfileh, "LOCATION:".$location."\n"); + fwrite($calfileh, "TRANSP:OPAQUE\n"); + fwrite($calfileh, "CLASS:CONFIDENTIAL\n"); + fwrite($calfileh, "DTSTAMP:".dol_print_date($startdatef, "dayhourxcard", true)."\n"); + + fwrite($calfileh, "END:VJOURNAL\n"); + } + } + + // Footer + fwrite($calfileh, "END:VCALENDAR"); + + fclose($calfileh); + + if (! empty($conf->global->MAIN_UMASK)) + { + @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); + } + } + else + { + dol_syslog("xcal.lib.php::build_calfile Failed to open file ".$outputfile." for writing"); + return -2; + } } /** - * Build a file from an array of events. + * Build a file from an array of events. * All input data must be encoded in $conf->charset_output * - * @param string $format 'rss' - * @param string $title Title of export - * @param string $desc Description of export - * @param array $events_array Array of events ('uid','startdate','summary','url','desc','author','category') - * @param string $outputfile Output file - * @param string $filter Filter - * @return int <0 if ko, Nb of events in file if ok + * @param string $format "rss" + * @param string $title Title of export + * @param string $desc Description of export + * @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category") + * @param string $outputfile Output file + * @param string $filter (optional) Filter + * @return int < 0 if ko, Nb of events in file if ok */ -function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filter = '') +function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filter = "") { - global $user,$conf,$langs; - global $dolibarr_main_url_root; + global $user, $conf, $langs; + global $dolibarr_main_url_root; - dol_syslog("xcal.lib.php::build_rssfile Build rss file ".$outputfile." to format ".$format); + dol_syslog("xcal.lib.php::build_rssfile Build rss file ".$outputfile." to format ".$format); - if (empty($outputfile)) return -1; + if (empty($outputfile)) + { + // -1 = error + return -1; + } - $fichier=fopen($outputfile, 'w'); - if ($fichier) - { - $date=date("r"); + $fichier = fopen($outputfile, "w"); - // Print header - $form='charset_output.'"?>'; - fwrite($fichier, $form); - fwrite($fichier, "\n"); - $form=''; - fwrite($fichier, $form); - fwrite($fichier, "\n"); + if ($fichier) + { + $date = date("r"); - $form="\n".$title."\n"; - fwrite($fichier, $form); + // Print header + fwrite($fichier, 'charset_output.""?>'); + fwrite($fichier, "\n"); - $form=''."\n". -// 'fr'."\n". - 'Dolibarr'."\n". - ''.$date.''."\n". - 'Dolibarr'."\n"; + fwrite($fichier, ''); + fwrite($fichier, "\n"); - // Define $urlwithroot - $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); - $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file - //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $url=$urlwithroot.'/public/agenda/agendaexport.php?format=rss&exportkey='.urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY); - $form.=''."\n"; + fwrite($fichier, "\n".$title."\n"); - //print $form; - fwrite($fichier, $form); + $form = ""."\n". + // "fr"."\n". + "Dolibarr"."\n". + "".$date.""."\n". + "Dolibarr"."\n"; + // Define $urlwithroot + $urlwithouturlroot = preg_replace("/".preg_quote(DOL_URL_ROOT, "/")."$/i", "", trim($dolibarr_main_url_root)); - foreach ($events_array as $key => $event) - { - $eventqualified=true; - if ($filter) - { - // TODO Add a filter + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $eventqualified=false; - } + $url=$urlwithroot."/public/agenda/agendaexport.php?format=rss&exportkey=".urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY); - if ($eventqualified) - { - $uid = $event['uid']; - $startdate = $event['startdate']; - $summary = $event['summary']; - $url = $event['url']; - $author = $event['author']; - $category = $event['category']; - /* No place inside a RSS - $priority = $event['priority']; - $fulldayevent = $event['fulldayevent']; - $location = $event['location']; - $email = $event['email']; + fwrite($fichier, ""."\n"); + + foreach ($events_array as $key => $event) + { + $eventqualified = true; + + if ($filter) + { + // TODO Add a filter + + $eventqualified=false; + } + + if ($eventqualified) + { + $uid = $event["uid"]; + $startdate = $event["startdate"]; + $summary = $event["summary"]; + $url = $event["url"]; + $author = $event["author"]; + $category = $event["category"]; + + /* No place inside a RSS + $priority = $event["priority"]; + $fulldayevent = $event["fulldayevent"]; + $location = $event["location"]; + $email = $event["email"]; */ - $description=preg_replace('//i', "\n", $event['desc']); - $description=dol_string_nohtmltag($description, 0); // Remove html tags - fwrite($fichier, "\n"); - fwrite($fichier, "<![CDATA[".$summary."]]>\n"); - fwrite($fichier, "\n"); - fwrite($fichier, "\n"); - fwrite($fichier, "\n"); - fwrite($fichier, "\n"); - fwrite($fichier, "".date("r", $startdate)."\n"); - fwrite($fichier, "\n"); - fwrite($fichier, "\n"); - fwrite($fichier, "\n"); - } - } + $description = dol_string_nohtmltag(preg_replace("//i", "\n", $event["desc"]), 0); - fwrite($fichier, ''); - fwrite($fichier, "\n"); - fwrite($fichier, ''); + fwrite($fichier, "\n"); + fwrite($fichier, "<![CDATA[".$summary."]]>\n"); + fwrite($fichier, "\n"); + fwrite($fichier, "\n"); + fwrite($fichier, "\n"); + fwrite($fichier, "global->MAIN_UMASK)) - @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); - } + if ($description) + fwrite($fichier, $description); + // else + // fwrite($fichier, "NoDesc"); + + fwrite($fichier, "]]>\n"); + fwrite($fichier, "".date("r", $startdate)."\n"); + fwrite($fichier, "\n"); + fwrite($fichier, "\n"); + fwrite($fichier, "\n"); + } + } + + fwrite($fichier, ""); + fwrite($fichier, "\n"); + fwrite($fichier, ""); + + fclose($fichier); + + if (! empty($conf->global->MAIN_UMASK)) + { + @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); + } + } } - /** - * Encode for cal export + * Encode for cal export * - * @param string $format vcal or ical - * @param string $string string to encode - * @return string string encoded + * @param string $format "vcal" or "ical" + * @param string $string String to encode + * @return string String encoded */ function format_cal($format, $string) { - global $conf; + global $conf; - $newstring=$string; + $newstring = $string; - if ($format == 'vcal') - { - $newstring=quotedPrintEncode($newstring); - } - if ($format == 'ical') - { - // Replace new lines chars by '\n' - $newstring=preg_replace('/'."\r\n".'/i', "\n", $newstring); - $newstring=preg_replace('/'."\n\r".'/i', "\n", $newstring); - $newstring=preg_replace('/'."\n".'/i', '\n', $newstring); - // Must not exceed 75 char. Cut with "\r\n"+Space - $newstring=calEncode($newstring); - } + if ($format === "vcal") + { + $newstring = quotedPrintEncode($newstring); + } - return $newstring; + if ($format === "ical") + { + // Replace new lines chars by "\n" + $newstring = preg_replace("/"."\r\n"."/i", "\\n", $newstring); + $newstring = preg_replace("/"."\n\r"."/i", "\\n", $newstring); + $newstring = preg_replace("/"."\n"."/i", "\\n", $newstring); + + // Must not exceed 75 char. Cut with "\r\n"+Space + $newstring = calEncode($newstring); + } + + return $newstring; } /** - * Cut string after 75 chars. Add CRLF+Space. - * line must be encoded in UTF-8 + * Cut string after 75 chars. Add CRLF+Space. + * line must be encoded in UTF-8 * - * @param string $line String to convert - * @return string String converted + * @param string $line String to convert + * @return string String converted */ function calEncode($line) { - $out = ''; + $out = ""; + $newpara = ""; - $newpara = ''; + // If mb_ functions exists, it"s better to use them + if (function_exists("mb_strlen")) + { + $strlength = mb_strlen($line, "UTF-8"); - // If mb_ functions exists, it's better to use them - if (function_exists('mb_strlen')) - { - $strlength=mb_strlen($line, 'UTF-8'); - for ($j = 0; $j <= ($strlength - 1); $j++) - { - $char = mb_substr($line, $j, 1, 'UTF-8'); // Take char at position $j + for ($j = 0; $j < $strlength; $j++) + { + // Take char at position $j + $char = mb_substr($line, $j, 1, "UTF-8"); - if ((mb_strlen($newpara, 'UTF-8') + mb_strlen($char, 'UTF-8')) >= 75) - { - $out .= $newpara . "\r\n "; // CRLF + Space for cal - $newpara = ''; - } - $newpara .= $char; - } - $out .= $newpara; - } - else - { - $strlength=dol_strlen($line); - for ($j = 0; $j <= ($strlength - 1); $j++) - { - $char = substr($line, $j, 1); // Take char at position $j + if ((mb_strlen($newpara, "UTF-8") + mb_strlen($char, "UTF-8")) >= 75) + { + // CRLF + Space for cal + $out .= $newpara . "\r\n "; - if ((dol_strlen($newpara) + dol_strlen($char)) >= 75 ) - { - $out .= $newpara . "\r\n "; // CRLF + Space for cal - $newpara = ''; - } - $newpara .= $char; - } - $out .= $newpara; - } + $newpara = ""; + } - return trim($out); + $newpara .= $char; + } + + $out .= $newpara; + } + else + { + $strlength = dol_strlen($line); + + for ($j = 0; $j < $strlength; $j++) + { + // Take char at position $j + $char = substr($line, $j, 1); + + if ((dol_strlen($newpara) + dol_strlen($char)) >= 75 ) + { + // CRLF + Space for cal + $out .= $newpara . "\r\n "; + + $newpara = ""; + } + + $newpara .= $char; + } + + $out .= $newpara; + } + + return trim($out); } /** - * Encode into vcal format + * Encode into vcal format * - * @param string $str String to convert - * @param int $forcal 1=For cal - * @return string String converted + * @param string $str String to convert + * @param int $forcal (optional) 1 = For cal + * @return string String converted */ function quotedPrintEncode($str, $forcal = 0) { - $lines = preg_split("/\r\n/", $str); - $out = ''; + $lines = preg_split("/\r\n/", $str); + $out = ""; - foreach ($lines as $line) - { - $newpara = ''; + foreach ($lines as $line) + { + $newpara = ""; - $strlength=strlen($line); // Do not use dol_strlen here, we need number of bytes - for ($j = 0; $j <= ($strlength - 1); $j++) - { - $char = substr($line, $j, 1); - $ascii = ord($char); + // Do not use dol_strlen here, we need number of bytes + $strlength = strlen($line); - if ( $ascii < 32 || $ascii == 61 || $ascii > 126 ) - $char = '=' . strtoupper(sprintf("%02X", $ascii)); + for ($j = 0; $j < $strlength; $j++) + { + $char = substr($line, $j, 1); + $ascii = ord($char); - if ((strlen($newpara) + strlen($char)) >= 76 ) // Do not use dol_strlen here, we need number of bytes - { - $out .= $newpara . '=' . "\r\n"; // CRLF - if ($forcal) $out .= " "; // + Space for cal - $newpara = ''; - } - $newpara .= $char; - } - $out .= $newpara; - } - return trim($out); + if ( $ascii < 32 || $ascii === 61 || $ascii > 126 ) + { + $char = "=" . strtoupper(sprintf("%02X", $ascii)); + } + + // Do not use dol_strlen here, we need number of bytes + if ((strlen($newpara) + strlen($char)) >= 76 ) + { + // New line with carray-return (CR) and line-feed (LF) + $out .= $newpara . "=" . "\r\n"; + + // extra space for cal + if ($forcal) + $out .= " "; + + $newpara = ""; + } + + $newpara .= $char; + } + + $out .= $newpara; + } + return trim($out); } /** - * Decode vcal format + * Decode vcal format * - * @param string $str String to convert - * @return string String converted + * @param string $str String to convert + * @return string String converted */ function quotedPrintDecode($str) { - $out = preg_replace('/=\r?\n/', '', $str); - $out = quoted_printable_decode($out); // Available with PHP 4+ - return trim($out); + return trim(quoted_printable_decode(preg_replace("/=\r?\n/", "", $str))); } diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 57a26523c12..63a4c6d01e6 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -156,41 +156,41 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // ldap2dolibarr synchronisation if ($login && ! empty($conf->ldap->enabled) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') // ldap2dolibarr synchronisation { - dol_syslog("functions_ldap::check_user_password_ldap Sync ldap2dolibarr"); + dol_syslog("functions_ldap::check_user_password_ldap Sync ldap2dolibarr"); - // On charge les attributs du user ldap - if ($ldapdebug) print "DEBUG: login ldap = ".$login."
\n"; - $resultFetchLdapUser = $ldap->fetch($login, $userSearchFilter); + // On charge les attributs du user ldap + if ($ldapdebug) print "DEBUG: login ldap = ".$login."
\n"; + $resultFetchLdapUser = $ldap->fetch($login, $userSearchFilter); - if ($ldapdebug) print "DEBUG: UACF = ".join(',', $ldap->uacf)."
\n"; - if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset, 'day')."
\n"; - if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime, 'day')."
\n"; + if ($ldapdebug) print "DEBUG: UACF = ".join(',', $ldap->uacf)."
\n"; + if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset, 'day')."
\n"; + if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime, 'day')."
\n"; - // On recherche le user dolibarr en fonction de son SID ldap (only for Active Directory) - $sid = null; - if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") + // On recherche le user dolibarr en fonction de son SID ldap (only for Active Directory) + $sid = null; + if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") + { + $sid = $ldap->getObjectSid($login); + if ($ldapdebug) print "DEBUG: sid = ".$sid."
\n"; + } + + $usertmp=new User($db); + $resultFetchUser=$usertmp->fetch('', $login, $sid); + if ($resultFetchUser > 0) + { + dol_syslog("functions_ldap::check_user_password_ldap Sync user found user id=".$usertmp->id); + // On verifie si le login a change et on met a jour les attributs dolibarr + + if ($usertmp->login != $ldap->login && $ldap->login) { - $sid = $ldap->getObjectSid($login); - if ($ldapdebug) print "DEBUG: sid = ".$sid."
\n"; + $usertmp->login = $ldap->login; + $usertmp->update($usertmp); + // TODO Que faire si update echoue car on update avec un login deja existant. } - $usertmp=new User($db); - $resultFetchUser=$usertmp->fetch('', $login, $sid); - if ($resultFetchUser > 0) - { - dol_syslog("functions_ldap::check_user_password_ldap Sync user found user id=".$usertmp->id); - // On verifie si le login a change et on met a jour les attributs dolibarr - - if ($usertmp->login != $ldap->login && $ldap->login) - { - $usertmp->login = $ldap->login; - $usertmp->update($usertmp); - // TODO Que faire si update echoue car on update avec un login deja existant. - } - - //$resultUpdate = $usertmp->update_ldap2dolibarr($ldap); - } - unset($usertmp); + //$resultUpdate = $usertmp->update_ldap2dolibarr($ldap); + } + unset($usertmp); } if (! empty($conf->multicompany->enabled)) // We must check entity (even if sync is not active) @@ -240,7 +240,6 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // Load translation files required by the page $langs->loadLangs(array('main', 'other', 'errors')); -; $_SESSION["dol_loginmesg"]=($ldap->error?$ldap->error:$langs->trans("ErrorBadLoginPassword")); } diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index dcd874bdf3d..10c9f2003c0 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -54,7 +54,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 301__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_export.php?mainmenu=home&leftmenu=admintools', 'Backup', 1, 'admin', '', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 302__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_import.php?mainmenu=home&leftmenu=admintools', 'Restore', 1, 'admin', '', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 305__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/update.php?mainmenu=home&leftmenu=admintools', 'MenuUpgrade', 1, 'admin', '', '', 2, 8, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && function_exists("eaccelerator_info")', __HANDLER__, 'left', 306__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/eaccelerator.php?mainmenu=home&leftmenu=admintools', 'EAccelerator', 1, 'admin', '', '', 2, 9, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 307__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listevents.php?mainmenu=home&leftmenu=admintools', 'Audit', 1, 'admin', '', '', 2, 10, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 308__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listsessions.php?mainmenu=home&leftmenu=admintools', 'Sessions', 1, 'admin', '', '', 2, 11, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 309__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?mainmenu=home&leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 12, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 66f4dac2a44..6819ab864b3 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -39,10 +39,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; */ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { - global $user,$conf,$langs,$dolibarr_main_db_name; + global $user,$conf,$langs,$mysoc; + global $dolibarr_main_db_name; - $mainmenu=$_SESSION["mainmenu"]; - $leftmenu=$_SESSION["leftmenu"]; + $mainmenu=(empty($_SESSION["mainmenu"])?'':$_SESSION["mainmenu"]); + $leftmenu=(empty($_SESSION["leftmenu"])?'':$_SESSION["leftmenu"]); $id='mainmenu'; $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); @@ -53,17 +54,17 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout if (empty($noout)) print_start_menu_array_auguria(); - global $usemenuhider; - $usemenuhider = 1; + global $usemenuhider; + $usemenuhider = 1; - // Show/Hide vertical menu - if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + // Show/Hide vertical menu. The hamburger icon for .menuhider action. + if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $showmode=1; $classname = 'class="tmenu menuhider"'; $idsel='menu'; - $menu->add('#', '', 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); + $menu->add('#', (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE) ? '' : ''), 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); } $num = count($newTabMenu); @@ -125,20 +126,44 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout $menu->liste = dol_sort_array($menu->liste, 'position'); // Output menu entries - foreach($menu->liste as $menkey => $menuval) + // Show logo company + if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - if (empty($noout)) print_start_menu_entry_auguria($menuval['idsel'], $menuval['classname'], $menuval['enabled']); - if (empty($noout)) print_text_menu_entry_auguria($menuval['titre'], $menuval['enabled'], ($menuval['url']!='#'?DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target']?$menuval['target']:$atarget)); - if (empty($noout)) print_end_menu_entry_auguria($menuval['enabled']); + //$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); + $mysoc->logo_squarred_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); + if (! empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) + { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); + } + else + { + $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo_squarred_alpha.png'; + } + $title=$langs->trans("GoIntoSetupToChangeLogo"); + + print "\n".''."\n"; + print_start_menu_entry_auguria('companylogo', 'class="tmenu tmenucompanylogo"', 1); + + print ''."\n"; + + print_end_menu_entry_auguria(4); + } + + if (empty($noout)) { + foreach($menu->liste as $menuval) + { + print_start_menu_entry_auguria($menuval['idsel'], $menuval['classname'], $menuval['enabled']); + print_text_menu_entry_auguria($menuval['titre'], $menuval['enabled'], ($menuval['url']!='#'?DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target']?$menuval['target']:$atarget)); + print_end_menu_entry_auguria($menuval['enabled']); + } } $showmode=1; - if (empty($noout)) print_start_menu_entry_auguria('', 'class="tmenuend"', $showmode); - if (empty($noout)) print_end_menu_entry_auguria($showmode); - - if (empty($noout)) print_end_menu_array_auguria(); - - print "\n"; + if (empty($noout)) { + print_start_menu_entry_auguria('', 'class="tmenuend"', $showmode); + print_end_menu_entry_auguria($showmode); + print_end_menu_array_auguria(); + } return 0; } @@ -193,16 +218,16 @@ function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $cla if ($showmode == 1) { - print ''; + print ''; print '
'; print '
'; - print ''; + print ''; print ''; print $text; print ''; print ''; } - if ($showmode == 2) + elseif ($showmode == 2) { print '
'; print ''; @@ -244,17 +269,18 @@ function print_end_menu_array_auguria() /** * Core function to output left menu auguria + * Fill &$menu (example with $forcemainmenu='home' $forceleftmenu='all', return left menu tree of Home) * * @param DoliDB $db Database handler - * @param array $menu_array_before Table of menu entries to show before entries of menu handler - * @param array $menu_array_after Table of menu entries to show after entries of menu handler + * @param array $menu_array_before Table of menu entries to show before entries of menu handler (menu->liste filled with menu->add) + * @param array $menu_array_after Table of menu entries to show after entries of menu handler (menu->liste filled with menu->add) * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) * @param Menu $menu Object Menu to return back list of menu entries * @param int $noout Disable output (Initialise &$menu only). * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' - * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all) + * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not defined in session. * @param array $moredata An array with more data to output - * @return int Nb of entries + * @return int Nb of menu entries */ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { @@ -268,35 +294,6 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t global $usemenuhider; $usemenuhider = 0; - // Show logo company - if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); - $mysoc->logo_squarred_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); - if (! empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - } - elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); - } - else - { - $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo_squarred.png'; - } - $title=$langs->trans("GoIntoSetupToChangeLogo"); - print "\n".''."\n"; - print ''."\n"; - } - if (is_array($moredata) && ! empty($moredata['searchform'])) // searchform can contains select2 code or link to show old search form or link to switch on search page { print "\n"; @@ -319,7 +316,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t // We update newmenu with entries found into database $menuArbo = new Menubase($db, 'auguria'); - $newmenu = $menuArbo->menuLeftCharger($newmenu, $mainmenu, $leftmenu, ($user->societe_id?1:0), 'auguria', $tabMenu); + $newmenu = $menuArbo->menuLeftCharger($newmenu, $mainmenu, $leftmenu, ($user->socid?1:0), 'auguria', $tabMenu); // We update newmenu for special dynamic menus if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account @@ -355,9 +352,9 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $db->free($resql); } - if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account + if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account { - $newmenu->add('', $langs->trans("Journalization"), 0, $user->rights->accounting->comptarapport->lire, '', 'accountancy', 'accountancy'); + $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire, '', 'accountancy', 'accountancy'); // Multi journal $sql = "SELECT rowid, code, label, nature"; @@ -390,7 +387,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t if ($objp->nature == 9) $nature="hasnew"; // To enable when page exists - if (! empty($conf->global->ACCOUNTANCY_SHOW_DEVELOP_JOURNAL)) + if (empty($conf->global->ACCOUNTANCY_SHOW_DEVELOP_JOURNAL)) { if ($nature == 'various' || $nature == 'hasnew' || $nature == 'inventory') $nature=''; } @@ -399,7 +396,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t { $langs->load('accountancy'); $journallabel=$langs->transnoentities($objp->label); // Labels in this table are set by loading llx_accounting_abc.sql. Label can be 'ACCOUNTING_SELL_JOURNAL', 'InventoryJournal', ... - if (empty($leftmenu) || preg_match('/accountancy/', $leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire); + $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire); } $i++; } @@ -444,7 +441,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t */ } - if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP + if (! empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP { $MAXFTP=20; $i=1; diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index c4622f2d6ee..adee27687dd 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -111,15 +111,18 @@ class MenuManager $tabMenu=array(); $menuArbo = new Menubase($this->db, 'auguria'); $menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'auguria', $tabMenu); - $this->tabMenu=$tabMenu; - } + //var_dump($tabMenu); + + //if ($forcemainmenu == 'all') { var_dump($this->tabMenu); exit; } + } /** * Show menu + * Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called. * - * @param string $mode 'top', 'left', 'jmobile' (used to get full xml ul/li menu) + * @param string $mode 'top', 'topnb', 'left', 'jmobile' (used to get full xml ul/li menu) * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ @@ -138,8 +141,17 @@ class MenuManager require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php'; $this->menu=new Menu(); - if ($mode == 'top') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); - if ($mode == 'left') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0, '', '', $moredata); + if (empty($conf->global->MAIN_MENU_INVERT)) + { + if ($mode == 'top') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); + if ($mode == 'left') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0, '', '', $moredata); + } + else + { + $conf->global->MAIN_SHOW_LOGO=0; + if ($mode == 'top') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0); + if ($mode == 'left') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); + } if ($mode == 'topnb') { @@ -315,5 +327,8 @@ class MenuManager } unset($this->menu); + + //print 'xx'.$mode; + return 0; } } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index dbf56429086..786ffdeb24a 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -144,8 +144,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Products-Services $tmpentry = array( - 'enabled'=> (! empty($conf->product->enabled) || ! empty($conf->service->enabled)), - 'perms'=> (! empty($user->rights->produit->lire) || ! empty($user->rights->service->lire)), + 'enabled'=> (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->expedition->enabled)), + 'perms'=> (! empty($user->rights->produit->lire) || ! empty($user->rights->service->lire) || ! empty($user->rights->expedition->lire)), 'module'=>'product|service' ); $menu_arr[] = array( @@ -230,7 +230,13 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = ! empty($conf->contrat->enabled) || ! empty($conf->ficheinter->enabled) )?1:0, - 'perms'=>(! empty($user->rights->societe->lire) || ! empty($user->rights->societe->contact->lire)), + 'perms'=>(! empty($user->rights->propal->lire) || + ! empty($user->rights->commande->lire) || + ! empty($user->rights->supplier_order->lire) || + ! empty($user->rights->supplier_proposal->lire) || + ! empty($user->rights->contrat->lire) || + ! empty($user->rights->ficheinter->lire) + ), 'module'=>'propal|commande|supplier_order|contrat|ficheinter' ); $menu_arr[] = array( @@ -478,26 +484,34 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Show logo company if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - $mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); + //$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); $mysoc->logo_squarred_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); + + $logoContainerAdditionalClass = 'backgroundforcompanylogo'; + if(! empty($conf->global->MAIN_INFO_SOCIETE_LOGO_NO_BACKGROUND)){ + $logoContainerAdditionalClass = ''; + } + if (! empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); } - elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + /*elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); - } + }*/ else { - $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo_squarred.png'; + $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo_squarred_alpha.png'; + $logoContainerAdditionalClass = ''; } $title=$langs->trans("GoIntoSetupToChangeLogo"); print "\n".''."\n"; print_start_menu_entry('companylogo', 'class="tmenu tmenucompanylogo"', 1); - print ''."\n"; + + print ''."\n"; print_end_menu_entry(4); } @@ -629,7 +643,7 @@ function print_end_menu_array() * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not defined in session. * @param array $moredata An array with more data to output - * @return int nb of menu entries + * @return int Nb of menu entries */ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { @@ -702,8 +716,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $warnpicto = ' '.img_warning($langs->trans("WarningMandatorySetupNotComplete")); } $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules").$warnpicto, 1); - $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"), 1); $newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"), 1); + $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"), 1); $newmenu->add("/admin/translation.php?mainmenu=home", $langs->trans("Translation"), 1); $newmenu->add("/admin/defaultvalues.php?mainmenu=home", $langs->trans("DefaultValues"), 1); @@ -737,7 +751,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add('/admin/system/phpinfo.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoPHP'), 1); //if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1); $newmenu->add('/admin/system/database.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoDatabase'), 1); - if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home&leftmenu=admintools", $langs->trans("EAccelerator"), 1); //$newmenu->add("/admin/system/perf.php?mainmenu=home&leftmenu=admintools", $langs->trans("InfoPerf"),1); $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home&leftmenu=admintools", $langs->trans("Backup"), 1); $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home&leftmenu=admintools", $langs->trans("Restore"), 1); @@ -1165,7 +1178,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Fiscal year - Not really yet used. In a future will lock some periods. if ($conf->global->MAIN_FEATURES_LEVEL > 1) { - $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear', 20); + $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'fiscalyear', 20); } $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_journal', 30); @@ -1283,12 +1296,22 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Accounting $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->rights->accounting->mouvements->lire, '', $mainmenu, 'accountancy', 1); + // General Ledger $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->rights->accounting->mouvements->lire); // Balance $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire); + // Closure + if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { + $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'closure'); + + if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_closure/', $leftmenu)) { + $newmenu->add("/accountancy/closure/validate.php?leftmenu=accountancy_closure", $langs->trans("MenuAccountancyValidationMovements"), 2, $user->rights->accounting->fiscalyear->write); + } + } + // Files if ((! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 1) || ! empty($conf->global->ACCOUNTANCY_SHOW_EXPORT_FILES_MENU)) { @@ -1298,9 +1321,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Reports $newmenu->add("/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca'); - if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { + if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->rights->accounting->comptarapport->lire); - $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->rights->accounting->comptarapport->lire); + $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->rights->accounting->comptarapport->lire); $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->rights->accounting->comptarapport->lire); } @@ -1834,7 +1857,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Add personalized menus and modules menus //var_dump($newmenu->liste); // $menuArbo = new Menubase($db, 'eldy'); - $newmenu = $menuArbo->menuLeftCharger($newmenu, $mainmenu, $leftmenu, (empty($user->societe_id)?0:1), 'eldy', $tabMenu); + $newmenu = $menuArbo->menuLeftCharger($newmenu, $mainmenu, $leftmenu, (empty($user->socid)?0:1), 'eldy', $tabMenu); //var_dump($newmenu->liste); // // We update newmenu for special dynamic menus diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index d8a47d45c68..b5913bbde20 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -64,6 +64,8 @@ class MenuManager */ public function loadMenu($forcemainmenu = '', $forceleftmenu = '') { + global $conf, $user, $langs; + // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; @@ -77,7 +79,7 @@ class MenuManager $_SESSION["leftmenuopened"]=""; } else - { + { // On va le chercher en session si non defini par le lien $mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:''; } @@ -117,7 +119,7 @@ class MenuManager /** * Show menu. - * Module defined in sql tables were stored into $this->tabMenu BEFORE this is called. + * Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called. * * @param string $mode 'top', 'topnb', 'left', 'jmobile' (used to get full xml ul/li menu) * @param array $moredata An array with more data to output diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 11d6ac9dd34..f3f0a5795c5 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -307,10 +307,12 @@ class MenuManager print $val2['titre']; if ($relurl2) { - if ($val2['enabled']) // Allowed - print ''; - else - print ''; + if ($val2['enabled']) { + // Allowed + print ''; + } else { + print ''; + } } print ''."\n"; } @@ -448,7 +450,7 @@ class MenuManager unset($this->menu->liste); } } -/* + /* if ($mode == 'jmobile') { foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' @@ -506,7 +508,7 @@ class MenuManager break; // Only first menu entry (so home) } } -*/ + */ unset($this->menu); return $res; diff --git a/htdocs/core/modules/action/modules_action.php b/htdocs/core/modules/action/modules_action.php index 5199933c0a2..0a559ae2d92 100644 --- a/htdocs/core/modules/action/modules_action.php +++ b/htdocs/core/modules/action/modules_action.php @@ -47,23 +47,23 @@ abstract class ModeleAction extends CommonDocGenerator global $conf; $type='action'; - $liste=array(); + $list=array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste=getListOfModels($db, $type, $maxfilenamelength); + $list=getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** - * Create an product document on disk using template defined into PRODUCT_ADDON_PDF + * Create a product document on disk using template defined into PRODUCT_ADDON_PDF * - * @param DoliDB $db objet base de donnee + * @param DoliDB $db data base object * @param Object $object Object fichinter - * @param string $modele force le modele a utiliser ('' par defaut) - * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param string $modele forces the model to use ('' by default) + * @param Translate $outputlangs lang object to use for translation * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref @@ -79,7 +79,7 @@ function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $h $srctemplatepath=''; - // Positionne modele sur le nom du modele de fichinter a utiliser + // Position modele on the name of fichinter model to use if (! dol_strlen($modele)) { if (! empty($conf->global->ACTION_EVENT_ADDON_PDF)) diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 6be9aa859c3..b8fc623709d 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -49,7 +49,10 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $code_auto; // Automatic Numbering + /** + * @var int Automatic numbering + */ + public $code_auto; public $searchcode; // Search string diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php new file mode 100644 index 00000000000..0622f5edd13 --- /dev/null +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -0,0 +1,507 @@ + + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García + * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2018-2019 Philippe Grand + * Copyright (C) 2018 Frédéric France + * + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php + * \ingroup bom + * \brief File of class to build ODT documents for BOMs + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/bom/modules_bom.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; + + +/** + * Class to build documents using ODF templates generator + */ +class doc_generic_bom_odt extends ModelePDFBom +{ + /** + * Issuer + * @var Societe + */ + public $emetteur; + + /** + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.5 = array(5, 5) + */ + public $phpmin = array(5, 5); + + /** + * @var string Dolibarr version of the loaded document + */ + public $version = 'dolibarr'; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + global $conf, $langs, $mysoc; + + // Load translation files required by the page + $langs->loadLangs(array("main","companies")); + + $this->db = $db; + $this->name = "ODT templates"; + $this->description = $langs->trans("DocumentModelOdt"); + $this->scandir = 'BOM_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan + + // Page size for A4 format + $this->type = 'odt'; + $this->page_largeur = 0; + $this->page_hauteur = 0; + $this->format = array($this->page_largeur,$this->page_hauteur); + $this->marge_gauche=0; + $this->marge_droite=0; + $this->marge_haute=0; + $this->marge_basse=0; + + $this->option_multilang = 1; // Dispo en plusieurs langues + $this->option_freetext = 1; // Support add of a personalised text + $this->option_draft_watermark = 0; // Support add of a watermark on drafts + + // Recupere emetteur + $this->emetteur=$mysoc; + if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined + } + + + /** + * Return description of a module + * + * @param Translate $langs Lang object to use for output + * @return string Description + */ + public function info($langs) + { + global $conf,$langs; + + // Load translation files required by the page + $langs->loadLangs(array("errors","companies")); + + $form = new Form($this->db); + + $texte = $this->description.".
\n"; + $texte.= ''; + $texte.= ''; + $texte.= ''; + $texte.= ''; + $texte.= '
'; + + // List of directories area + $texte.= ''; + + $texte.= ''; + $texte.= ''; + + $texte.= '
'; + $texttitle=$langs->trans("ListOfDirectories"); + $listofdir=explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->BOM_ADDON_PDF_ODT_PATH))); + $listoffiles=array(); + foreach($listofdir as $key=>$tmpdir) + { + $tmpdir=trim($tmpdir); + $tmpdir=preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); + if (! $tmpdir) { + unset($listofdir[$key]); continue; + } + if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); + else + { + $tmpfiles=dol_dir_list($tmpdir, 'files', 0, '\.(ods|odt)'); + if (count($tmpfiles)) $listoffiles=array_merge($listoffiles, $tmpfiles); + } + } + $texthelp=$langs->trans("ListOfDirectoriesForModelGenODT"); + // Add list of substitution keys + $texthelp.='
'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'
'; + $texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it + + $texte.= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1); + $texte.= '
'; + $texte.= ''; + $texte.= '
'; + $texte.= ''; + $texte.= '
'; + + // Scan directories + $nbofiles=count($listoffiles); + if (! empty($conf->global->BOM_ADDON_PDF_ODT_PATH)) + { + $texte.=$langs->trans("NumberOfModelFilesFound").': '; + //$texte.=$nbofiles?'':''; + $texte.=count($listoffiles); + //$texte.=$nbofiles?'':''; + $texte.=''; + } + + if ($nbofiles) + { + $texte.='
'; + $texte.= $langs->trans("ExampleOfDirectoriesForModelGen"); + $texte.= '
'; + $texte.= ''; + + return $texte; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to build a document on disk using the generic odt module. + * + * @param BOM $object Object source to build document + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int $hidedetails Do not show line details + * @param int $hidedesc Do not show desc + * @param int $hideref Do not show ref + * @return int 1 if OK, <=0 if KO + */ + public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) + { + // phpcs:enable + global $user,$langs,$conf,$mysoc,$hookmanager; + + if (empty($srctemplatepath)) + { + dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); + return -1; + } + + // Add odtgeneration hook + if (! is_object($hookmanager)) + { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($this->db); + } + $hookmanager->initHooks(array('odtgeneration')); + global $action; + + if (! is_object($outputlangs)) $outputlangs=$langs; + $sav_charset_output=$outputlangs->charset_output; + $outputlangs->charset_output='UTF-8'; + + $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); + + if ($conf->bom->dir_output) + { + // If $object is id instead of object + if (! is_object($object)) + { + $id = $object; + $object = new Bom($this->db); + $result=$object->fetch($id); + if ($result < 0) + { + dol_print_error($this->db, $object->error); + return -1; + } + } + + $dir = $conf->bom->multidir_output[$object->entity]; + $objectref = dol_sanitizeFileName($object->ref); + if (! preg_match('/specimen/i', $objectref)) $dir.= "/" . $objectref; + $file = $dir . "/" . $objectref . ".odt"; + + if (! file_exists($dir)) + { + if (dol_mkdir($dir) < 0) + { + $this->error=$langs->transnoentities("ErrorCanNotCreateDir", $dir); + return -1; + } + } + + if (file_exists($dir)) + { + //print "srctemplatepath=".$srctemplatepath; // Src filename + $newfile=basename($srctemplatepath); + $newfiletmp=preg_replace('/\.od(t|s)/i', '', $newfile); + $newfiletmp=preg_replace('/template_/i', '', $newfiletmp); + $newfiletmp=preg_replace('/modele_/i', '', $newfiletmp); + $newfiletmp=$objectref.'_'.$newfiletmp; + //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; + // Get extension (ods or odt) + $newfileformat=substr($newfile, strrpos($newfile, '.')+1); + if ( ! empty($conf->global->MAIN_DOC_USE_TIMING)) + { + $format=$conf->global->MAIN_DOC_USE_TIMING; + if ($format == '1') $format='%Y%m%d%H%M%S'; + $filename=$newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + } + else + { + $filename=$newfiletmp.'.'.$newfileformat; + } + $file=$dir.'/'.$filename; + //print "newdir=".$dir; + //print "newfile=".$newfile; + //print "file=".$file; + //print "conf->societe->dir_temp=".$conf->societe->dir_temp; + + dol_mkdir($conf->bom->dir_temp); + + + // If CUSTOMER contact defined on order, we use it + $usecontact=false; + $arrayidcontact=$object->getIdContact('external', 'CUSTOMER'); + if (count($arrayidcontact) > 0) + { + $usecontact=true; + $result=$object->fetch_contact($arrayidcontact[0]); + } + + // Recipient name + $contactobject=null; + if (! empty($usecontact)) + { + // On peut utiliser le nom de la societe du contact + if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; + else { + $socobject = $object->thirdparty; + // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use + $contactobject = $object->contact; + } + } + else + { + $socobject=$object->thirdparty; + } + + // Make substitution + $substitutionarray=array( + '__QTY_TO_PRODUCE__' => $object->qty, + ); + complete_substitutions_array($substitutionarray, $langs, $object); + // Call the ODTSubstitution hook + $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$substitutionarray); + $reshook=$hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + // Line of free text + $newfreetext=''; + $paramfreetext='BOM_FREE_TEXT'; + if (! empty($conf->global->$paramfreetext)) + { + $newfreetext=make_substitutions($conf->global->$paramfreetext, $substitutionarray); + } + + // Open and load template + require_once ODTPHP_PATH.'odf.php'; + try { + $odfHandler = new odf( + $srctemplatepath, + array( + 'PATH_TO_TMP' => $conf->bom->dir_temp, + 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' + ) + ); + } + catch(Exception $e) + { + $this->error=$e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); + return -1; + } + // After construction $odfHandler->contentXml contains content and + // [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by + // [!-- BEGIN lines --]*[!-- END lines --] + //print html_entity_decode($odfHandler->__toString()); + //print exit; + + + // Make substitutions into odt of freetext + try { + $odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8'); + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + + // Define substitution array + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); + $array_object_from_properties=$this->get_substitutionarray_each_var_object($object, $outputlangs); + $array_objet=$this->get_substitutionarray_object($object, $outputlangs); + $array_user=$this->get_substitutionarray_user($user, $outputlangs); + $array_soc=$this->get_substitutionarray_mysoc($mysoc, $outputlangs); + $array_thirdparty=$this->get_substitutionarray_thirdparty($socobject, $outputlangs); + $array_other=$this->get_substitutionarray_other($outputlangs); + // retrieve contact information for use in object as contact_xxx tags + $array_thirdparty_contact = array(); + if ($usecontact && is_object($contactobject)) $array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + + $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); + complete_substitutions_array($tmparray, $outputlangs, $object); + + // Call the ODTSubstitution hook + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + foreach($tmparray as $key=>$value) + { + try { + if (preg_match('/logo$/', $key)) // Image + { + if (file_exists($value)) $odfHandler->setImage($key, $value); + else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } + else // Text + { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + } + // Replace tags of lines + try + { + $foundtagforlines = 1; + try { + $listlines = $odfHandler->setSegment('lines'); + } + catch(OdfException $e) + { + // We may arrive here if tags for lines not present into template + $foundtagforlines = 0; + dol_syslog($e->getMessage(), LOG_INFO); + } + if ($foundtagforlines) + { + foreach ($object->lines as $line) + { + $tmparray=$this->get_substitutionarray_lines($line, $outputlangs); + complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); + // Call the ODTSubstitutionLine hook + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray,'line'=>$line); + $reshook=$hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + foreach($tmparray as $key => $val) + { + try + { + $listlines->setVars($key, $val, true, 'UTF-8'); + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + catch(SegmentException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + } + $listlines->merge(); + } + $odfHandler->mergeSegment($listlines); + } + } + catch(OdfException $e) + { + $this->error=$e->getMessage(); + dol_syslog($this->error, LOG_WARNING); + return -1; + } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + } + + // Call the beforeODTSave hook + + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + // Write new file + if (!empty($conf->global->MAIN_ODT_AS_PDF)) { + try { + $odfHandler->exportAsAttachedPDF($file); + }catch (Exception $e){ + $this->error=$e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); + return -1; + } + } + else { + try { + $odfHandler->saveToDisk($file); + } catch (Exception $e) { + $this->error=$e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); + return -1; + } + } + + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $odfHandler=null; // Destroy object + + $this->result = array('fullpath'=>$file); + + return 1; // Success + } + else + { + $this->error=$langs->transnoentities("ErrorCanNotCreateDir", $dir); + return -1; + } + } + + return -1; + } +} diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index be6bd9f095d..4a139b98379 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/bom/mod_bom_advanced.php * \ingroup bom - * \brief File containing class for numbering model of bom advanced + * \brief File containing class for numbering model of BOMs advanced */ require_once DOL_DOCUMENT_ROOT .'/core/modules/bom/modules_bom.php'; @@ -118,11 +118,11 @@ class mod_bom_advanced extends ModeleNumRefboms /** * Return next free value * - * @param Societe $objsoc Object thirdparty + * @param Product $objprod Object product * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - public function getNextValue($objsoc, $object) + public function getNextValue($objprod, $object) { global $db,$conf; @@ -139,7 +139,7 @@ class mod_bom_advanced extends ModeleNumRefboms $date = ($object->date_bom ? $object->date_bom : $object->date); - $numFinal=get_next_value($db, $mask, 'bom_bom', 'ref', '', $objsoc, $date); + $numFinal=get_next_value($db, $mask, 'bom_bom', 'ref', '', null, $date); return $numFinal; } diff --git a/htdocs/core/modules/bom/mod_bom_standard.php b/htdocs/core/modules/bom/mod_bom_standard.php index af7e173bbae..77c0856d3f6 100644 --- a/htdocs/core/modules/bom/mod_bom_standard.php +++ b/htdocs/core/modules/bom/mod_bom_standard.php @@ -20,7 +20,7 @@ /** * \file htdocs/core/modules/bom/mod_bom_standard.php * \ingroup bom - * \brief File of class to manage customer order numbering rules standard + * \brief File of class to manage BOMs numbering rules standard */ require_once DOL_DOCUMENT_ROOT .'/core/modules/bom/modules_bom.php'; @@ -108,16 +108,16 @@ class mod_bom_standard extends ModeleNumRefboms /** * Return next free value * - * @param Societe $objsoc Object thirdparty + * @param Product $objprod Object product * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - public function getNextValue($objsoc, $object) + public function getNextValue($objprod, $object) { global $db,$conf; // D'abord on recupere la valeur max - $posindice=8; + $posindice=9; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; $sql.= " FROM ".MAIN_DB_PREFIX."bom_bom"; $sql.= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; @@ -137,7 +137,7 @@ class mod_bom_standard extends ModeleNumRefboms } //$date=time(); - $date=$object->date; + $date=$object->date_creation; $yymm = strftime("%y%m", $date); if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is diff --git a/htdocs/core/modules/bom/modules_bom.php b/htdocs/core/modules/bom/modules_bom.php index 9f871d0b578..45bca8a38b3 100644 --- a/htdocs/core/modules/bom/modules_bom.php +++ b/htdocs/core/modules/bom/modules_bom.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir /** * Parent class for boms models */ -abstract class ModelePDFBoms extends CommonDocGenerator +abstract class ModelePDFBom extends CommonDocGenerator { // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -52,7 +52,7 @@ abstract class ModelePDFBoms extends CommonDocGenerator // phpcs:enable global $conf; - $type = 'order'; + $type = 'bom'; $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index f66fc13770c..c90eca21ae4 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -486,7 +486,7 @@ class doc_generic_order_odt extends ModelePDFCommandes } else { try { - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e) { $this->error=$e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index e6b960be0ce..5d69840644e 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -307,7 +307,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right - // Positionne $this->atleastonediscount si on a au moins une remise + // Set $this->atleastonediscount if you have at least one discount for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) @@ -361,7 +361,7 @@ class pdf_einstein extends ModelePDFCommandes } } - // Affiche notes + // Displays notes $notetoshow=empty($object->note_public)?'':$object->note_public; if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { @@ -461,7 +461,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) @@ -503,7 +503,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($this->postotalht, $curY); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0); - // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva + // Collection of totals by value of vat in $this->vat["rate"] = total_tva if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; else $tvaligne=$object->lines[$i]->total_tva; @@ -912,66 +912,64 @@ class pdf_einstein extends ModelePDFCommandes //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // VAT foreach($this->tva as $tvakey => $tvaval) @@ -1001,67 +999,67 @@ class pdf_einstein extends ModelePDFCommandes //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // Total TTC diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 90efc67cd7f..30b8604a298 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1,13 +1,13 @@ - * Copyright (C) 2005-2012 Regis Houssin +/* Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2015 Marcos García * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -430,7 +430,7 @@ class pdf_eratosthene extends ModelePDFCommandes { $pdf->rollbackTransaction(true); - // prepar pages to receive notes + // prepare pages to receive notes while ($pagenb < $pageposafternote) { $pdf->AddPage(); $pagenb++; @@ -464,7 +464,7 @@ class pdf_eratosthene extends ModelePDFCommandes } - // apply note frame to previus pages + // apply note frame to previous pages $i = $pageposbeforenote; while ($i < $pageposafternote) { $pdf->setPage($i); @@ -526,7 +526,7 @@ class pdf_eratosthene extends ModelePDFCommandes } - // Use new auto collum system + // Use new auto column system $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); // tab simulation to know line height @@ -636,7 +636,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate if ($this->getColumnStatus('vat')) @@ -701,7 +701,7 @@ class pdf_eratosthene extends ModelePDFCommandes $reshook=$hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook - // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva + // Collection of totals by value of vat in $this->tva["rate"] = total_tva if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; else $tvaligne=$object->lines[$i]->total_tva; @@ -1099,66 +1099,63 @@ class pdf_eratosthene extends ModelePDFCommandes //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // VAT foreach($this->tva as $tvakey => $tvaval) @@ -1188,67 +1185,67 @@ class pdf_eratosthene extends ModelePDFCommandes //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // Total TTC diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index a6d9514d7a7..f1324605874 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -342,7 +342,7 @@ class doc_generic_contract_odt extends ModelePDFContract // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->contrat->dir_temp, @@ -470,7 +470,7 @@ class doc_generic_contract_odt extends ModelePDFContract } else { try { - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e) { $this->error=$e->getMessage(); return -1; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index d2dd1f56218..badf7343295 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -269,7 +269,7 @@ class pdf_strato extends ModelePDFContract $tab_top = 90; $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10); - // Affiche notes + // Display notes if (! empty($object->note_public)) { $tab_top -= 2; @@ -411,7 +411,7 @@ class pdf_strato extends ModelePDFContract $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) @@ -613,7 +613,7 @@ class pdf_strato extends ModelePDFContract pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->CONTRACT_DRAFT_WATERMARK); } - //Prepare la suite + //Prepare next $pdf->SetTextColor(0, 0, 60); $pdf->SetFont('', 'B', $default_font_size + 3); @@ -727,7 +727,7 @@ class pdf_strato extends ModelePDFContract $this->recipient = $object->thirdparty; //Recipient name - // On peut utiliser le nom de la societe du contact + // You can use the name of the contact company if ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) { $thirdparty = $object->contact; } else { diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 7bb13f79af1..8e723cba8df 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -53,6 +53,9 @@ class mod_contract_magre extends ModelNumRefContracts */ public $name='Magre'; + /** + * @var int Automatic numbering + */ public $code_auto=1; /** diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 405781a48ae..6a198fdb309 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -58,7 +58,10 @@ class mod_contract_olive extends ModelNumRefContracts */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $code_auto = 0; // Numerotation automatique + /** + * @var int Automatic numbering + */ + public $code_auto = 0; /** diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index 9477e79b96f..f8f287d3dd6 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -53,6 +53,9 @@ class mod_contract_serpis extends ModelNumRefContracts */ public $name='Serpis'; + /** + * @var int Automatic numbering + */ public $code_auto=1; diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 311f1d8f813..bcda35459f6 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -322,82 +322,80 @@ class html_cerfafr extends ModeleDon } elseif ($dix[$i]==2) { if ($unite[$i]==1) { - $secon[$i]='vingt et'; - $prim[$i]=$chif[$unite[$i]]; - } - else { - $secon[$i]='vingt'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='vingt et'; + $prim[$i]=$chif[$unite[$i]]; + } else { + $secon[$i]='vingt'; + $prim[$i]=$chif[$unite[$i]]; } } elseif ($dix[$i]==3) { if ($unite[$i]==1) { - $secon[$i]='trente et'; - $prim[$i]=$chif[$unite[$i]]; - } - else { - $secon[$i]='trente'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='trente et'; + $prim[$i]=$chif[$unite[$i]]; + } else { + $secon[$i]='trente'; + $prim[$i]=$chif[$unite[$i]]; } } elseif ($dix[$i]==4) { if ($unite[$i]==1) { - $secon[$i]='quarante et'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='quarante et'; + $prim[$i]=$chif[$unite[$i]]; } else { - $secon[$i]='quarante'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='quarante'; + $prim[$i]=$chif[$unite[$i]]; } } elseif ($dix[$i]==5) { if ($unite[$i]==1) { - $secon[$i]='cinquante et'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='cinquante et'; + $prim[$i]=$chif[$unite[$i]]; } else { - $secon[$i]='cinquante'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='cinquante'; + $prim[$i]=$chif[$unite[$i]]; } } elseif ($dix[$i]==6) { if ($unite[$i]==1) { - $secon[$i]='soixante et'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='soixante et'; + $prim[$i]=$chif[$unite[$i]]; } else { - $secon[$i]='soixante'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='soixante'; + $prim[$i]=$chif[$unite[$i]]; } } elseif ($dix[$i]==7) { if ($unite[$i]==1) { - $secon[$i]='soixante et'; - $prim[$i]=$chif[$unite[$i]+10]; + $secon[$i]='soixante et'; + $prim[$i]=$chif[$unite[$i]+10]; } else { - $secon[$i]='soixante'; - $prim[$i]=$chif[$unite[$i]+10]; + $secon[$i]='soixante'; + $prim[$i]=$chif[$unite[$i]+10]; } } elseif ($dix[$i]==8) { if ($unite[$i]==1) { - $secon[$i]='quatre-vingts et'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='quatre-vingts et'; + $prim[$i]=$chif[$unite[$i]]; } else { - $secon[$i]='quatre-vingt'; - $prim[$i]=$chif[$unite[$i]]; + $secon[$i]='quatre-vingt'; + $prim[$i]=$chif[$unite[$i]]; } } elseif ($dix[$i]==9) { if ($unite[$i]==1) { - $secon[$i]='quatre-vingts et'; - $prim[$i]=$chif[$unite[$i]+10]; + $secon[$i]='quatre-vingts et'; + $prim[$i]=$chif[$unite[$i]+10]; } else { - $secon[$i]='quatre-vingts'; - $prim[$i]=$chif[$unite[$i]+10]; + $secon[$i]='quatre-vingts'; + $prim[$i]=$chif[$unite[$i]+10]; } } if($cent[$i]==1) $trio[$i]='cent'; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 797049e8f57..7dbd3002e33 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -562,7 +562,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } else { try { - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e) { $this->error=$e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 8d29edec7d8..9235cddc90f 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -146,7 +146,7 @@ class pdf_espadon extends ModelePdfExpedition /** * Function to build pdf onto disk * - * @param Object $object Object expedition to generate (or id if old method) + * @param Object $object Object expedition to generate (or id if old method) * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -218,7 +218,7 @@ class pdf_espadon extends ModelePdfExpedition if ($conf->expedition->dir_output) { - // Definition de $dir et $file + // Definition of $dir and $file if ($object->specimen) { $dir = $conf->expedition->dir_output."/sending"; @@ -370,7 +370,7 @@ class pdf_espadon extends ModelePdfExpedition // Notes if (! empty($object->note_public)) { - $pdf->SetFont('', '', $default_font_size - 1); // Dans boucle pour gerer multi-page + $pdf->SetFont('', '', $default_font_size - 1); // In loop to manage multi-page $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top_alt, dol_htmlentitiesbr($object->note_public), 0, 1); } @@ -390,10 +390,10 @@ class pdf_espadon extends ModelePdfExpedition } - // Use new auto collum system + // Use new auto column system $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); - // Simulation de tableau pour connaitre la hauteur de la ligne de titre + // Table simulation to know the height of the title line $pdf->startTransaction(); $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); $pdf->rollbackTransaction(true); @@ -502,19 +502,19 @@ class pdf_espadon extends ModelePdfExpedition $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // weight $weighttxt=''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight) { - $weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->weight_units, "weight"); + $weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units); } $voltxt=''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume) { - $voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0, "volume"); + $voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0); } @@ -606,10 +606,10 @@ class pdf_espadon extends ModelePdfExpedition $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - // Affiche zone totaux + // Display total area $posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs); - // Pied de page + // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -653,12 +653,12 @@ class pdf_espadon extends ModelePdfExpedition /** * Show total to pay * - * @param PDF $pdf Object PDF + * @param PDF $pdf Object PDF * @param Facture $object Object invoice - * @param int $deja_regle Montant deja regle - * @param int $posy Position depart + * @param int $deja_regle Amount already paid + * @param int $posy Start Position * @param Translate $outputlangs Objet langs - * @return int Position pour suite + * @return int Position for suite */ protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) { @@ -673,7 +673,7 @@ class pdf_espadon extends ModelePdfExpedition $tab2_hl = 4; $pdf->SetFont('', 'B', $default_font_size - 1); - // Tableau total + // Total table $col1x = $this->posxweightvol-50; $col2x = $this->posxweightvol; /*if ($this->page_largeur < 210) // To work with US executive format { @@ -824,7 +824,7 @@ class pdf_espadon extends ModelePdfExpedition pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK); } - //Prepare la suite + //Prepare next $pdf->SetTextColor(0, 0, 60); $pdf->SetFont('', 'B', $default_font_size + 3); @@ -1006,7 +1006,7 @@ class pdf_espadon extends ModelePdfExpedition } //Recipient name - // On peut utiliser le nom de la societe du contact + // You can use the name of the contact company if ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) { $thirdparty = $object->contact; } else { diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index ad676dba22e..53f46ccc861 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -174,20 +174,20 @@ class pdf_merou extends ModelePdfExpedition $origin = $object->origin; - //Creation de l expediteur + //Create sender $this->expediteur = $mysoc; - //Creation du destinataire + //Create recipient $idcontact = $object->$origin->getIdContact('external', 'SHIPPING'); $this->destinataire = new Contact($this->db); if (! empty($idcontact[0])) $this->destinataire->fetch($idcontact[0]); - //Creation du livreur + //Create deliverer $idcontact = $object->$origin->getIdContact('internal', 'LIVREUR'); $this->livreur = new User($this->db); if (! empty($idcontact[0])) $this->livreur->fetch($idcontact[0]); - // Definition de $dir et $file + // Definition of $dir and $file if ($object->specimen) { $dir = $conf->expedition->dir_output."/sending"; @@ -273,7 +273,7 @@ class pdf_merou extends ModelePdfExpedition $tab_height = $this->page_hauteur - $tab_top - $heightforfooter; $tab_height_newpage = $this->page_hauteur - $tab_top_newpage - $heightforfooter; - // Affiche notes + // Display notes if (! empty($object->note_public)) { $pdf->SetFont('', '', $default_font_size - 1); @@ -314,7 +314,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); - // Description de la ligne produit + // Description of product line $libelleproduitservice = pdf_writelinedesc($pdf, $object, $i, $outputlangs, 90, 3, 50, $curY, 0, 1); $nexY = $pdf->GetY(); @@ -335,7 +335,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->Rect(10+3, $curY, 3, 3); $pdf->Rect(20+3, $curY, 3, 3); - //Insertion de la reference du produit + //Inserting the product reference $pdf->SetXY(30, $curY); $pdf->SetFont('', 'B', $default_font_size - 3); $pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'L', 0); @@ -404,7 +404,7 @@ class pdf_merou extends ModelePdfExpedition $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - // Pied de page + // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -579,11 +579,11 @@ class pdf_merou extends ModelePdfExpedition } //*********************Entete**************************** - //Nom du Document + //Document name $pdf->SetXY($Xoff, 7); $pdf->SetFont('', 'B', $default_font_size + 2); $pdf->SetTextColor(0, 0, 0); - $pdf->MultiCell(0, 3, $outputlangs->transnoentities("SendingSheet"), '', 'L'); // Bordereau expedition + $pdf->MultiCell(0, 3, $outputlangs->transnoentities("SendingSheet"), '', 'L'); // Sending sheet //Num Expedition $Yoff = $Yoff+7; $Xoff = 142; @@ -601,7 +601,7 @@ class pdf_merou extends ModelePdfExpedition $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size - 1, $hookmanager); //$this->Code39($Xoff+43, $Yoff+1, $object->commande->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true); - //Definition Emplacement du bloc Societe + //Definition Location of the Company block $Xoff = 110; $blSocX=90; $blSocY=24; @@ -632,7 +632,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R'); } - // Date Expedition + // Date delivery $Yoff = $Yoff+7; $pdf->SetXY($blSocX-80, $blSocY+17); @@ -698,7 +698,7 @@ class pdf_merou extends ModelePdfExpedition } // Recipient name - // On peut utiliser le nom de la societe du contact + // You can use the name of the contact company if ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) { $thirdparty = $object->contact; } else { diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 983c0c502ae..25b691aaa70 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -218,26 +218,25 @@ class pdf_rouget extends ModelePdfExpedition $realpath=''; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { + // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { - $filename= $obj['photo_vignette']; - } - else - { - $filename=$obj['photo']; - } - } - else - { - $filename=$obj['photo']; - } + $filename= $obj['photo_vignette']; + } + else + { + $filename=$obj['photo']; + } + } + else + { + $filename=$obj['photo']; + } - $realpath = $dir.$filename; - break; + $realpath = $dir.$filename; + break; } if ($realpath) $realpatharray[$i]=$realpath; @@ -525,12 +524,12 @@ class pdf_rouget extends ModelePdfExpedition $weighttxt=''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight) { - $weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->weight_units, "weight"); + $weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units); } $voltxt=''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume) { - $voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0, "volume"); + $voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0); } if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) @@ -541,8 +540,8 @@ class pdf_rouget extends ModelePdfExpedition if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) { - $pdf->SetXY($this->posxqtyordered, $curY); - $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C'); + $pdf->SetXY($this->posxqtyordered, $curY); + $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C'); } if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP)) @@ -844,7 +843,6 @@ class pdf_rouget extends ModelePdfExpedition } if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) { - $pdf->line($this->posxpuht-1, $tab_top, $this->posxpuht-1, $tab_top + $tab_height); if (empty($hidetop)) { diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 412446166d7..f703561ea03 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -139,19 +139,19 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport $result = $db->query($sql); - if($db->num_rows($result) > 0): - $objp = $db->fetch_object($result); - $newref = $objp->max; - $newref++; - while(strlen($newref) < $num_car): - $newref = "0".$newref; - endwhile; - else: - $newref = 1; - while(strlen($newref) < $num_car): - $newref = "0".$newref; - endwhile; - endif; + if ($db->num_rows($result) > 0) { + $objp = $db->fetch_object($result); + $newref = $objp->max; + $newref++; + while (strlen($newref) < $num_car) { + $newref = "0".$newref; + } + } else { + $newref = 1; + while (strlen($newref) < $num_car) { + $newref = "0".$newref; + } + } $ref_number_int = ($newref+1)-1; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 008b9a191c2..bb39f88c45d 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -344,7 +344,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->facture->dir_temp, diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 1768a0b1950..8ee898b5a4e 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; /** - * Class to manage PDF invoice template Crabe + * Class to generate the customer invoice PDF with template Crabe */ class pdf_crabe extends ModelePDFFactures { @@ -149,7 +149,7 @@ class pdf_crabe extends ModelePDFFactures $this->description = $langs->trans('PDFCrabeDescription'); $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template - // Dimensiont page + // Dimension page $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -235,7 +235,7 @@ class pdf_crabe extends ModelePDFFactures public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; + global $user,$langs,$conf,$mysoc,$hookmanager,$nblines; dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); @@ -243,7 +243,7 @@ class pdf_crabe extends ModelePDFFactures // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files required by page + // Load translation files required by the page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); $nblines = count($object->lines); @@ -359,7 +359,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right - // Positionne $this->atleastonediscount si on a au moins une remise + // Set $this->atleastonediscount if you have at least one discount for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) @@ -428,7 +428,7 @@ class pdf_crabe extends ModelePDFFactures } } - // Affiche notes + // Display notes $notetoshow=empty($object->note_public)?'':$object->note_public; if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { @@ -554,7 +554,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) @@ -606,7 +606,7 @@ class pdf_crabe extends ModelePDFFactures $sign=1; if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1; - // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva + // Collection of totals by value of VAT in $this->tva["taux"]=total_tva $prev_progress = $object->lines[$i]->get_prev_progress($object->id); if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation { @@ -712,19 +712,19 @@ class pdf_crabe extends ModelePDFFactures $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - // Affiche zone infos + // Display info area $posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs); - // Affiche zone totaux + // Display total area $posy=$this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); - // Affiche zone versements + // Display Payments area if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { $posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs, $heightforfooter); } - // Pied de page + // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -769,7 +769,7 @@ class pdf_crabe extends ModelePDFFactures /** * Show payments table * - * @param PDF $pdf Object PDF + * @param PDF $pdf Object PDF * @param Object $object Object invoice * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output @@ -1046,7 +1046,7 @@ class pdf_crabe extends ModelePDFFactures // Show payment mode CHQ if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { - // Si mode reglement non force ou si force a CHQ + // If unregulated or forced payment mode to CHQ if (! empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE); @@ -1116,9 +1116,9 @@ class pdf_crabe extends ModelePDFFactures /** * Show total to pay * - * @param PDF $pdf Object PDF + * @param PDF $pdf Object PDF * @param Facture $object Object invoice - * @param int $deja_regle Montant deja regle + * @param int $deja_regle Amount already paid (in the currency of invoice) * @param int $posy Position depart * @param Translate $outputlangs Objet langs * @return int Position pour suite @@ -1137,7 +1137,7 @@ class pdf_crabe extends ModelePDFFactures $tab2_hl = 4; $pdf->SetFont('', '', $default_font_size - 1); - // Tableau total + // Total table $col1x = 120; $col2x = 170; if ($this->page_largeur < 210) // To work with US executive format { @@ -1177,69 +1177,69 @@ class pdf_crabe extends ModelePDFFactures //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} @@ -1271,43 +1271,12 @@ class pdf_crabe extends ModelePDFFactures //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } - } - } - //} - //Local tax 2 after VAT - //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') - //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { //$this->atleastoneratenotnull++; @@ -1320,15 +1289,45 @@ class pdf_crabe extends ModelePDFFactures $tvakey=str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } + //} + //Local tax 2 after VAT + //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') + //{ + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) + { + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) + { + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; + } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + } + } //} // Revenue stamp @@ -1403,7 +1402,7 @@ class pdf_crabe extends ModelePDFFactures $depositsamount=$object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if ($object->paye) $resteapayer=0; + if (! empty($object->paye)) $resteapayer=0; if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 9e0fad32172..07ed5f5783c 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -149,7 +149,7 @@ class pdf_sponge extends ModelePDFFactures $this->description = $langs->trans('PDFSpongeDescription'); $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template - // Dimensiont page + // Dimension page $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -371,10 +371,10 @@ class pdf_sponge extends ModelePDFFactures // Does we have at least one line with discount $this->atleastonediscount foreach ($object->lines as $line) { - if ($line->remise_percent){ + if ($line->remise_percent) { $this->atleastonediscount = true; break; - } + } } @@ -423,7 +423,7 @@ class pdf_sponge extends ModelePDFFactures } } - // Affiche notes + // Display notes $notetoshow=empty($object->note_public)?'':$object->note_public; if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { @@ -462,7 +462,7 @@ class pdf_sponge extends ModelePDFFactures { $pdf->rollbackTransaction(true); - // prepar pages to receive notes + // prepare pages to receive notes while ($pagenb < $pageposafternote) { $pdf->AddPage(); $pagenb++; @@ -496,7 +496,7 @@ class pdf_sponge extends ModelePDFFactures } - // apply note frame to previus pages + // apply note frame to previous pages $i = $pageposbeforenote; while ($i < $pageposafternote) { $pdf->setPage($i); @@ -557,24 +557,23 @@ class pdf_sponge extends ModelePDFFactures $height_note=0; } - // Use new auto collum system + // Use new auto column system $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); - // Simulation de tableau pour connaitre la hauteur de la ligne de titre - $pdf->startTransaction(); - $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); - $pdf->rollbackTransaction(true); + // Table simulation to know the height of the title line + $pdf->startTransaction(); + $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); + $pdf->rollbackTransaction(true); - $iniY = $tab_top + $this->tabTitleHeight + 2; - $curY = $tab_top + $this->tabTitleHeight + 2; - $nexY = $tab_top + $this->tabTitleHeight + 2; + $iniY = $tab_top + $this->tabTitleHeight + 2; + $curY = $tab_top + $this->tabTitleHeight + 2; + $nexY = $tab_top + $this->tabTitleHeight + 2; // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; for ($i = 0; $i < $nblines; $i++) { - $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); @@ -770,65 +769,62 @@ class pdf_sponge extends ModelePDFFactures } // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) - $this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) - $this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne; + if ($localtax1_type && $localtax1ligne != 0) { + $this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne; + } + if ($localtax2_type && $localtax2ligne != 0) { + $this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne; + } - if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*'; - if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]=0; - $this->tva[$vatrate] += $tvaligne; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*'; + if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]=0; + $this->tva[$vatrate] += $tvaligne; - $nexY = max($nexY, $posYAfterImage); + $nexY = max($nexY, $posYAfterImage); - // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { - $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); - //$pdf->SetDrawColor(190,190,200); - $pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1); - $pdf->SetLineStyle(array('dash'=>0)); - } + // Add line + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { + $pdf->setPage($pageposafter); + $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); + //$pdf->SetDrawColor(190,190,200); + $pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1); + $pdf->SetLineStyle(array('dash'=>0)); + } - $nexY+=2; // Add space between lines + $nexY+=2; // Add space between lines - // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { - $pdf->setPage($pagenb); - if ($pagenb == $pageposbeforeprintlines) - { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code); - } - else - { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); - } - $this->_pagefoot($pdf, $object, $outputlangs, 1); - $pagenb++; - $pdf->setPage($pagenb); - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); - } + // Detect if some page were added automatically and output _tableau for past pages + while ($pagenb < $pageposafter) { + $pdf->setPage($pagenb); + if ($pagenb == $pageposbeforeprintlines) { + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code); + } + else + { + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); + } + $this->_pagefoot($pdf, $object, $outputlangs, 1); + $pagenb++; + $pdf->setPage($pagenb); + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + } - if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak) - { - if ($pagenb == $pageposafter) - { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code); - } - else - { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); - } - $this->_pagefoot($pdf, $object, $outputlangs, 1); - // New page - $pdf->AddPage(); - if (! empty($tplidx)) $pdf->useTemplate($tplidx); - $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); - } + if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak) { + if ($pagenb == $pageposafter) { + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code); + } + else + { + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); + } + $this->_pagefoot($pdf, $object, $outputlangs, 1); + // New page + $pdf->AddPage(); + if (! empty($tplidx)) $pdf->useTemplate($tplidx); + $pagenb++; + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + } } // Show square @@ -843,19 +839,19 @@ class pdf_sponge extends ModelePDFFactures $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - // Affiche zone infos + // Display infos area $posy=$this->drawInfoTable($pdf, $object, $bottomlasttab, $outputlangs); - // Affiche zone totaux + // Display total zone $posy=$this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); - // Affiche zone versements + // Display payment area if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { $posy=$this->drawPaymentsTable($pdf, $object, $posy, $outputlangs); } - // Pied de page + // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -1126,7 +1122,7 @@ class pdf_sponge extends ModelePDFFactures // Show payment mode CHQ if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { - // Si mode reglement non force ou si force a CHQ + // If payment mode not forced or forced to CHQ if (! empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE); @@ -1214,7 +1210,7 @@ class pdf_sponge extends ModelePDFFactures $tab2_hl = 4; $pdf->SetFont('', '', $default_font_size - 1); - // Tableau total + // Total table $col1x = 120; $col2x = 170; if ($this->page_largeur < 210) // To work with US executive format { @@ -1227,7 +1223,7 @@ class pdf_sponge extends ModelePDFFactures - // pourcentage global d'avancement + // overall percentage of advancement $percent = 0; $i=0; foreach ($object->lines as $line) @@ -1267,16 +1263,11 @@ class pdf_sponge extends ModelePDFFactures $deja_paye = 0; $i = 1; - if(!empty($TPreviousIncoice)){ - + if (!empty($TPreviousIncoice)) { $pdf->setY($tab2_top); $posy = $pdf->GetY(); - - - - foreach ($TPreviousIncoice as &$fac){ - + foreach ($TPreviousIncoice as &$fac) { if($posy > $this->page_hauteur - 4 ) { $this->_pagefoot($pdf, $object, $outputlangs, 1); $pdf->addPage(); @@ -1293,8 +1284,8 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($col2x, $posy); $facSign = ''; - if($i>1){ - $facSign = $fac->total_ht>=0?'+':''; + if ($i>1) { + $facSign = $fac->total_ht>=0?'+':''; } $displayAmount = ' '.$facSign.' '.price($fac->total_ht, 0, $outputlangs); @@ -1308,18 +1299,18 @@ class pdf_sponge extends ModelePDFFactures $pdf->setY($posy); } - // Display curent total + // Display current total $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $posy); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("PDFSituationTitle", $object->situation_counter).' '.$outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $pdf->SetXY($col2x, $posy); $facSign = ''; - if($i>1){ - $facSign = $object->total_ht>=0?'+':''; // gestion d'un cas particulier client + if ($i>1) { + $facSign = $object->total_ht>=0?'+':''; // management of a particular customer case } - if($fac->type === facture::TYPE_CREDIT_NOTE){ + if ($fac->type === facture::TYPE_CREDIT_NOTE) { $facSign = '-'; // les avoirs } @@ -1378,7 +1369,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount"), 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + 0); + $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_line_remise + $total_ht, 0, $outputlangs), 0, 'R', 1); $index++; @@ -1413,76 +1404,72 @@ class pdf_sponge extends ModelePDFFactures //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } - + } //} // VAT // Situations totals migth be wrong on huge amounts if ($object->situation_cycle_ref && $object->situation_counter > 1) { - $sum_pdf_tva = 0; foreach($this->tva as $tvakey => $tvaval){ $sum_pdf_tva+=$tvaval; // sum VAT amounts to compare to object @@ -1531,68 +1518,68 @@ class pdf_sponge extends ModelePDFFactures //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + // retrieve global local tax + if ($tvakey != 0) // On affiche pas taux 0 { - // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } // Revenue stamp diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 3528b4eae3e..3ef5fd0c7ac 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; /** - * Classe du modele de numerotation de reference de facture Mars + * Class to manage invoice numbering rules Mars */ class mod_facture_mars extends ModeleNumRefFactures { @@ -159,7 +159,7 @@ class mod_facture_mars extends ModeleNumRefFactures elseif ($invoice->type == 3) $prefix=$this->prefixdeposit; else $prefix=$this->prefixinvoice; - // D'abord on recupere la valeur max + // First we get the max value $posindice=8; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL $sql.= " FROM ".MAIN_DB_PREFIX."facture"; diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 44efad2ef92..bb8f94d43a1 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -74,7 +74,7 @@ class mod_facture_mercure extends ModeleNumRefFactures $tooltip.=$langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip.=$langs->trans("GenericMaskCodes5"); - // Parametrage du prefix + // Setting the prefix $texte.= '
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'.$form->textwithpicto('', $tooltip, 1, 1).'
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'.$form->textwithpicto('', $tooltip, 1, 1).'
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'.$form->textwithpicto('', $tooltip, 1, 1).'
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'.$form->textwithpicto('', $tooltip, 1, 1).'
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'
'; + + // List of directories area + $texte.= ''; + + $texte.= ''; + $texte.= ''; + + $texte.= '
'; + $texttitle=$langs->trans("ListOfDirectories"); + $listofdir=explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->MRP_MO_ADDON_PDF_ODT_PATH))); + $listoffiles=array(); + foreach($listofdir as $key=>$tmpdir) + { + $tmpdir=trim($tmpdir); + $tmpdir=preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); + if (! $tmpdir) { + unset($listofdir[$key]); continue; + } + if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); + else + { + $tmpfiles=dol_dir_list($tmpdir, 'files', 0, '\.(ods|odt)'); + if (count($tmpfiles)) $listoffiles=array_merge($listoffiles, $tmpfiles); + } + } + $texthelp=$langs->trans("ListOfDirectoriesForModelGenODT"); + // Add list of substitution keys + $texthelp.='
'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'
'; + $texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it + + $texte.= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1); + $texte.= '
'; + $texte.= ''; + $texte.= '
'; + $texte.= ''; + $texte.= '
'; + + // Scan directories + $nbofiles=count($listoffiles); + if (! empty($conf->global->MRP_MO_ADDON_PDF_ODT_PATH)) + { + $texte.=$langs->trans("NumberOfModelFilesFound").': '; + //$texte.=$nbofiles?'':''; + $texte.=count($listoffiles); + //$texte.=$nbofiles?'':''; + $texte.=''; + } + + if ($nbofiles) + { + $texte.='
'; + $texte.= $langs->trans("ExampleOfDirectoriesForModelGen"); + $texte.= '
'; + $texte.= ''; + + return $texte; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to build a document on disk using the generic odt module. + * + * @param MO $object Object source to build document + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int $hidedetails Do not show line details + * @param int $hidedesc Do not show desc + * @param int $hideref Do not show ref + * @return int 1 if OK, <=0 if KO + */ + public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) + { + // phpcs:enable + global $user,$langs,$conf,$mysoc,$hookmanager; + + if (empty($srctemplatepath)) + { + dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); + return -1; + } + + // Add odtgeneration hook + if (! is_object($hookmanager)) + { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($this->db); + } + $hookmanager->initHooks(array('odtgeneration')); + global $action; + + if (! is_object($outputlangs)) $outputlangs=$langs; + $sav_charset_output=$outputlangs->charset_output; + $outputlangs->charset_output='UTF-8'; + + $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); + + if ($conf->mrp->dir_output) + { + // If $object is id instead of object + if (! is_object($object)) + { + $id = $object; + $object = new MO($this->db); + $result=$object->fetch($id); + if ($result < 0) + { + dol_print_error($this->db, $object->error); + return -1; + } + } + + $dir = $conf->mrp->multidir_output[$object->entity]; + $objectref = dol_sanitizeFileName($object->ref); + if (! preg_match('/specimen/i', $objectref)) $dir.= "/" . $objectref; + $file = $dir . "/" . $objectref . ".odt"; + + if (! file_exists($dir)) + { + if (dol_mkdir($dir) < 0) + { + $this->error=$langs->transnoentities("ErrorCanNotCreateDir", $dir); + return -1; + } + } + + if (file_exists($dir)) + { + //print "srctemplatepath=".$srctemplatepath; // Src filename + $newfile=basename($srctemplatepath); + $newfiletmp=preg_replace('/\.od(t|s)/i', '', $newfile); + $newfiletmp=preg_replace('/template_/i', '', $newfiletmp); + $newfiletmp=preg_replace('/modele_/i', '', $newfiletmp); + $newfiletmp=$objectref.'_'.$newfiletmp; + //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; + // Get extension (ods or odt) + $newfileformat=substr($newfile, strrpos($newfile, '.')+1); + if ( ! empty($conf->global->MAIN_DOC_USE_TIMING)) + { + $format=$conf->global->MAIN_DOC_USE_TIMING; + if ($format == '1') $format='%Y%m%d%H%M%S'; + $filename=$newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + } + else + { + $filename=$newfiletmp.'.'.$newfileformat; + } + $file=$dir.'/'.$filename; + //print "newdir=".$dir; + //print "newfile=".$newfile; + //print "file=".$file; + //print "conf->societe->dir_temp=".$conf->societe->dir_temp; + + dol_mkdir($conf->bom->dir_temp); + + + // If CUSTOMER contact defined on order, we use it + $usecontact=false; + $arrayidcontact=$object->getIdContact('external', 'CUSTOMER'); + if (count($arrayidcontact) > 0) + { + $usecontact=true; + $result=$object->fetch_contact($arrayidcontact[0]); + } + + // Recipient name + $contactobject=null; + if (! empty($usecontact)) + { + // On peut utiliser le nom de la societe du contact + if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; + else { + $socobject = $object->thirdparty; + // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use + $contactobject = $object->contact; + } + } + else + { + $socobject=$object->thirdparty; + } + + // Make substitution + $substitutionarray=array( + '__QTY_TO_PRODUCE__' => $object->qty, + ); + complete_substitutions_array($substitutionarray, $langs, $object); + // Call the ODTSubstitution hook + $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$substitutionarray); + $reshook=$hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + // Line of free text + $newfreetext=''; + $paramfreetext='MRP_MO_FREE_TEXT'; + if (! empty($conf->global->$paramfreetext)) + { + $newfreetext=make_substitutions($conf->global->$paramfreetext, $substitutionarray); + } + + // Open and load template + require_once ODTPHP_PATH.'odf.php'; + try { + $odfHandler = new odf( + $srctemplatepath, + array( + 'PATH_TO_TMP' => $conf->mrp->dir_temp, + 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. + 'DELIMITER_LEFT' => '{', + 'DELIMITER_RIGHT' => '}' + ) + ); + } + catch(Exception $e) + { + $this->error=$e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); + return -1; + } + // After construction $odfHandler->contentXml contains content and + // [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by + // [!-- BEGIN lines --]*[!-- END lines --] + //print html_entity_decode($odfHandler->__toString()); + //print exit; + + + // Make substitutions into odt of freetext + try { + $odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8'); + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + + // Define substitution array + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); + $array_object_from_properties=$this->get_substitutionarray_each_var_object($object, $outputlangs); + $array_objet=$this->get_substitutionarray_object($object, $outputlangs); + $array_user=$this->get_substitutionarray_user($user, $outputlangs); + $array_soc=$this->get_substitutionarray_mysoc($mysoc, $outputlangs); + $array_thirdparty=$this->get_substitutionarray_thirdparty($socobject, $outputlangs); + $array_other=$this->get_substitutionarray_other($outputlangs); + // retrieve contact information for use in object as contact_xxx tags + $array_thirdparty_contact = array(); + if ($usecontact && is_object($contactobject)) $array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + + $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); + complete_substitutions_array($tmparray, $outputlangs, $object); + + // Call the ODTSubstitution hook + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + foreach($tmparray as $key=>$value) + { + try { + if (preg_match('/logo$/', $key)) // Image + { + if (file_exists($value)) $odfHandler->setImage($key, $value); + else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } + else // Text + { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + } + // Replace tags of lines + try + { + $foundtagforlines = 1; + try { + $listlines = $odfHandler->setSegment('lines'); + } + catch(OdfException $e) + { + // We may arrive here if tags for lines not present into template + $foundtagforlines = 0; + dol_syslog($e->getMessage(), LOG_INFO); + } + if ($foundtagforlines) + { + foreach ($object->lines as $line) + { + $tmparray=$this->get_substitutionarray_lines($line, $outputlangs); + complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); + // Call the ODTSubstitutionLine hook + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray,'line'=>$line); + $reshook=$hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + foreach($tmparray as $key => $val) + { + try + { + $listlines->setVars($key, $val, true, 'UTF-8'); + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + catch(SegmentException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + } + $listlines->merge(); + } + $odfHandler->mergeSegment($listlines); + } + } + catch(OdfException $e) + { + $this->error=$e->getMessage(); + dol_syslog($this->error, LOG_WARNING); + return -1; + } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + dol_syslog($e->getMessage(), LOG_INFO); + } + } + + // Call the beforeODTSave hook + + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + // Write new file + if (!empty($conf->global->MAIN_ODT_AS_PDF)) { + try { + $odfHandler->exportAsAttachedPDF($file); + }catch (Exception $e){ + $this->error=$e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); + return -1; + } + } + else { + try { + $odfHandler->saveToDisk($file); + } catch (Exception $e) { + $this->error=$e->getMessage(); + dol_syslog($e->getMessage(), LOG_INFO); + return -1; + } + } + + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $odfHandler=null; // Destroy object + + $this->result = array('fullpath'=>$file); + + return 1; // Success + } + else + { + $this->error=$langs->transnoentities("ErrorCanNotCreateDir", $dir); + return -1; + } + } + + return -1; + } +} diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php new file mode 100644 index 00000000000..42c506194f3 --- /dev/null +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -0,0 +1,146 @@ + + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2019 Frédéric France + * + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/mrp/mod_mo_advanced.php + * \ingroup mrp + * \brief File containing class for numbering model of MOs advanced + */ + +require_once DOL_DOCUMENT_ROOT .'/core/modules/mrp/modules_mrp.php'; + + +/** + * Class to manage MO numbering rules advanced + */ +class mod_mo_advanced extends ModeleNumRefMos +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var string Error message + */ + public $error = ''; + + /** + * @var string name + */ + public $name='advanced'; + + + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $conf, $langs, $db; + + $langs->load("bills"); + + $form = new Form($db); + + $texte = $langs->trans('GenericNumRefModelDesc')."
\n"; + $texte.= '
'; + $texte.= ''; + $texte.= ''; + $texte.= ''; + $texte.= ''; + + $tooltip=$langs->trans("GenericMaskCodes", $langs->transnoentities("Mo"), $langs->transnoentities("Mo")); + $tooltip.=$langs->trans("GenericMaskCodes2"); + $tooltip.=$langs->trans("GenericMaskCodes3"); + $tooltip.=$langs->trans("GenericMaskCodes4a", $langs->transnoentities("Mo"), $langs->transnoentities("Mo")); + $tooltip.=$langs->trans("GenericMaskCodes5"); + + // Parametrage du prefix + $texte.= ''; + $texte.= ''; + + $texte.= ''; + + $texte.= ''; + + $texte.= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).' 
'; + $texte.= '
'; + + return $texte; + } + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf,$langs,$mysoc; + + $old_code_client=$mysoc->code_client; + $old_code_type=$mysoc->typent_code; + $mysoc->code_client='CCCCCCCCCC'; + $mysoc->typent_code='TTTTTTTTTT'; + $numExample = $this->getNextValue($mysoc, ''); + $mysoc->code_client=$old_code_client; + $mysoc->typent_code=$old_code_type; + + if (! $numExample) + { + $numExample = $langs->trans('NotConfigured'); + } + return $numExample; + } + + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($objprod, $object) + { + global $db,$conf; + + require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php'; + + // We get cursor rule + $mask=$conf->global->MRP_MO_ADVANCED_MASK; + + if (! $mask) + { + $this->error='NotConfigured'; + return 0; + } + + $date = ($object->date_mo ? $object->date_mo : $object->date); + + $numFinal=get_next_value($db, $mask, 'mrp_mo', 'ref', '', null, $date); + + return $numFinal; + } +} diff --git a/htdocs/core/modules/mrp/mod_mo_standard.php b/htdocs/core/modules/mrp/mod_mo_standard.php new file mode 100644 index 00000000000..6d392a6b74c --- /dev/null +++ b/htdocs/core/modules/mrp/mod_mo_standard.php @@ -0,0 +1,149 @@ + + * Copyright (C) 2005-2009 Regis Houssin + * + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/mrp/mod_mo_standard.php + * \ingroup mrp + * \brief File of class to manage MO numbering rules standard + */ +require_once DOL_DOCUMENT_ROOT .'/core/modules/mrp/modules_mrp.php'; + +/** + * Class to manage MO numbering rules standard + */ +class mod_mo_standard extends ModeleNumRefMos +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='MO'; + + /** + * @var string Error code (or message) + */ + public $error=''; + + /** + * @var string name + */ + public $name='standard'; + + + /** + * Return description of numbering module + * + * @return string Text with description + */ + public function info() + { + global $langs; + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + } + + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + return $this->prefix."0501-0001"; + } + + + /** + * Checks if the numbers already in force in the data base do not + * cause conflicts that would prevent this numbering from working. + * + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + global $conf,$langs,$db; + + $coyymm=''; $max=''; + + $posindice=8; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql.= " FROM ".MAIN_DB_PREFIX."mrp_mo"; + $sql.= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql.= " AND entity = ".$conf->entity; + + $resql=$db->query($sql); + if ($resql) + { + $row = $db->fetch_row($resql); + if ($row) { $coyymm = substr($row[0], 0, 6); $max=$row[0]; } + } + if ($coyymm && ! preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) + { + $langs->load("errors"); + $this->error=$langs->trans('ErrorNumRefModel', $max); + return false; + } + + return true; + } + + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($objprod, $object) + { + global $db,$conf; + + // D'abord on recupere la valeur max + $posindice=9; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql.= " FROM ".MAIN_DB_PREFIX."mrp_mo"; + $sql.= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql.= " AND entity = ".$conf->entity; + + $resql=$db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + if ($obj) $max = intval($obj->max); + else $max=0; + } + else + { + dol_syslog("mod_mo_standard::getNextValue", LOG_DEBUG); + return -1; + } + + //$date=time(); + $date=$object->date_creation; + $yymm = strftime("%y%m", $date); + + if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is + else $num = sprintf("%04s", $max+1); + + dol_syslog("mod_mo_standard::getNextValue return ".$this->prefix.$yymm."-".$num); + return $this->prefix.$yymm."-".$num; + } +} diff --git a/htdocs/core/modules/mrp/modules_mo.php b/htdocs/core/modules/mrp/modules_mo.php new file mode 100644 index 00000000000..76d204a9826 --- /dev/null +++ b/htdocs/core/modules/mrp/modules_mo.php @@ -0,0 +1,151 @@ + + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/mrp/modules_mo.php + * \ingroup mrp + * \brief File that contains parent class for MOs models + * and parent class for MOs numbering models + */ + +require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit + + +/** + * Parent class for mos models + */ +abstract class ModelePDFMo extends CommonDocGenerator +{ + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return list of active generation modules + * + * @param DoliDB $db Database handler + * @param integer $maxfilenamelength Max length of value to show + * @return array List of templates + */ + public static function liste_modeles($db, $maxfilenamelength = 0) + { + // phpcs:enable + global $conf; + + $type = 'mo'; + $list = array(); + + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $list = getListOfModels($db, $type, $maxfilenamelength); + + return $list; + } +} + + + +/** + * Parent class to manage numbering of MOs + */ +abstract class ModeleNumRefMos +{ + /** + * @var string Error code (or message) + */ + public $error=''; + + /** + * Return if a module can be used or not + * + * @return boolean true if module can be used + */ + public function isEnabled() + { + return true; + } + + /** + * Returns the default description of the numbering template + * + * @return string Texte descripif + */ + public function info() + { + global $langs; + $langs->load("mrp"); + return $langs->trans("NoDescription"); + } + + /** + * Returns an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $langs; + $langs->load("mrp"); + return $langs->trans("NoExample"); + } + + /** + * Checks if the numbers already in force in the data base do not + * cause conflicts that would prevent this numbering from working. + * + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + return true; + } + + /** + * Returns next assigned value + * + * @param Societe $objsoc Object thirdparty + * @param Object $object Object we need next value for + * @return string Valeur + */ + public function getNextValue($objsoc, $object) + { + global $langs; + return $langs->trans("NotAvailable"); + } + + /** + * Returns version of numbering module + * + * @return string Valeur + */ + public function getVersion() + { + global $langs; + $langs->load("admin"); + + if ($this->version == 'development') return $langs->trans("VersionDevelopment"); + if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); + if ($this->version == 'dolibarr') return DOL_VERSION; + if ($this->version) return $this->version; + return $langs->trans("NotAvailable"); + } +} diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index e70db46aefa..1477f4d65f3 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -37,6 +37,10 @@ class printing_printgcp extends PrintingDriver { public $name = 'printgcp'; public $desc = 'PrintGCPDesc'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'printer'; public $active = 'PRINTING_PRINTGCP'; public $conf = array(); @@ -88,7 +92,6 @@ class printing_printgcp extends PrintingDriver 'type'=>'info', ); } else { - $this->google_id = $conf->global->OAUTH_GOOGLE_ID; $this->google_secret = $conf->global->OAUTH_GOOGLE_SECRET; // Token storage diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index 1d76fe6f574..37659cec199 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -32,6 +32,10 @@ class printing_printipp extends PrintingDriver { public $name = 'printipp'; public $desc = 'PrintIPPDesc'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'printer'; public $active = 'PRINTING_PRINTIPP'; public $conf = array(); diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index ca0fbd50333..b5e857866b5 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -668,8 +668,7 @@ class pdf_standard extends ModelePDFProduct $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); - $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', - 'C'); + $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C'); } } diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 18d91631d3c..523dc8bd7c4 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -60,7 +60,10 @@ class mod_codeproduct_elephant extends ModeleProductCode */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $code_auto; // Numerotation automatique + /** + * @var int Automatic numbering + */ + public $code_auto; public $searchcode; // String de recherche diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 77e14200264..04a15c9b8a5 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -65,7 +65,10 @@ class mod_codeproduct_leopard extends ModeleProductCode */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $code_auto; // Numerotation automatique + /** + * @var int Automatic numbering + */ + public $code_auto; /** diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index a9593c6bbef..b26b46604ff 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -107,7 +107,7 @@ class pdf_beluga extends ModelePDFProjects $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined - // Define position of columns + // Define position of columns if ($this->orientation == 'L' || $this->orientation == 'Landscape') { $this->posxref=$this->marge_gauche+1; $this->posxdate=$this->marge_gauche+105; diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index 5ccac833601..d73ee22fbae 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -116,13 +116,13 @@ class mod_project_simple extends ModeleNumRefProjects } - /** - * Return next value - * - * @param Societe $objsoc Object third party - * @param Project $project Object project - * @return string Value if OK, 0 if KO - */ + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string Value if OK, 0 if KO + */ public function getNextValue($objsoc, $project) { global $db,$conf; diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index edd90585089..342eaa26320 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -116,13 +116,13 @@ class mod_project_universal extends ModeleNumRefProjects return $numExample; } - /** - * Return next value - * - * @param Societe $objsoc Object third party - * @param Project $project Object project - * @return string Value if OK, 0 if KO - */ + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string Value if OK, 0 if KO + */ public function getNextValue($objsoc, $project) { global $db,$conf; diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index 811d5b1c97b..65c7deb8edf 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -117,13 +117,13 @@ class mod_task_simple extends ModeleNumRefTask } - /** - * Return next value - * - * @param Societe $objsoc Object third party - * @param Task $object Object Task - * @return string Value if OK, 0 if KO - */ + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Task $object Object Task + * @return string Value if OK, 0 if KO + */ public function getNextValue($objsoc, $object) { global $db,$conf; diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index cfba42090d1..018a10c80a2 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -116,13 +116,13 @@ class mod_task_universal extends ModeleNumRefTask return $numExample; } - /** - * Return next value - * - * @param Societe $objsoc Object third party - * @param Task $object Object task - * @return string Value if OK, 0 if KO - */ + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Task $object Object task + * @return string Value if OK, 0 if KO + */ public function getNextValue($objsoc, $object) { global $db,$conf; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index c7303683d5c..5412343941c 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -515,7 +515,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales } else { try { - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e) { $this->error=$e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index d8aed4f67cf..a79c17b47ca 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -756,8 +756,6 @@ class pdf_azur extends ModelePDFPropales if (count($filetomerge->lines) > 0) { foreach ($filetomerge->lines as $linefile) { if (! empty($linefile->id) && ! empty($linefile->file_name)) { - - if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { if (! empty($conf->product->enabled)) { @@ -1090,68 +1088,68 @@ class pdf_azur extends ModelePDFPropales //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // VAT foreach($this->tva as $tvakey => $tvaval) @@ -1181,68 +1179,68 @@ class pdf_azur extends ModelePDFPropales //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + // retrieve global local tax + if ($tvakey != 0) // On affiche pas taux 0 { - // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // Total TTC diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index c678f0380fd..7db062d3cbc 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -199,12 +199,8 @@ class pdf_cyan extends ModelePDFPropales // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - $outputlangs->load("main"); - $outputlangs->load("dict"); - $outputlangs->load("companies"); - $outputlangs->load("bills"); - $outputlangs->load("propal"); - $outputlangs->load("products"); + // Translations + $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal")); $nblines = count($object->lines); @@ -871,8 +867,6 @@ class pdf_cyan extends ModelePDFPropales if (count($filetomerge->lines) > 0) { foreach ($filetomerge->lines as $linefile) { if (! empty($linefile->id) && ! empty($linefile->file_name)) { - - if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { if (! empty($conf->product->enabled)) { @@ -1197,68 +1191,68 @@ class pdf_cyan extends ModelePDFPropales //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // VAT foreach($this->tva as $tvakey => $tvaval) @@ -1288,68 +1282,68 @@ class pdf_cyan extends ModelePDFPropales //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + // retrieve global local tax + if ($tvakey != 0) // On affiche pas taux 0 { - // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // Total TTC diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 2eaaef08447..7393f0e198d 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -101,7 +101,7 @@ class pdf_paiement global $conf, $hookmanager, $langs, $user; $socid=0; - if ($user->societe_id) $socid=$user->societe_id; + if ($user->socid) $socid=$user->socid; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 9741a8fbfc5..0cd252924f3 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -497,7 +497,7 @@ class doc_generic_reception_odt extends ModelePdfReception } else { try { - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e){ $this->error=$e->getMessage(); return -1; diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index f8c0b06e514..9dffb0eee69 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -72,7 +72,6 @@ class pdf_squille extends ModelePdfReception $this->posxpuht=$this->page_largeur - $this->marge_droite; if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { - $this->posxweightvol=$this->page_largeur - $this->marge_droite - 118; $this->posxqtyordered=$this->page_largeur - $this->marge_droite - 96; $this->posxqtytoship=$this->page_largeur - $this->marge_droite - 68; @@ -143,26 +142,25 @@ class pdf_squille extends ModelePdfReception $realpath=''; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { + // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { - $filename= $obj['photo_vignette']; - } - else - { - $filename=$obj['photo']; - } - } - else - { - $filename=$obj['photo']; - } + $filename= $obj['photo_vignette']; + } + else + { + $filename=$obj['photo']; + } + } + else + { + $filename=$obj['photo']; + } - $realpath = $dir.$filename; - break; + $realpath = $dir.$filename; + break; } if ($realpath) $realpatharray[$i]=$realpath; @@ -451,25 +449,24 @@ class pdf_squille extends ModelePdfReception $weighttxt=''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->weight) { - $weighttxt=round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuring_units_string($object->lines[$i]->product->weight_units, "weight"); + $weighttxt=round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->product->weight_units); } $voltxt=''; if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->volume) { - $voltxt=round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuring_units_string($object->lines[$i]->product->volume_units?$object->lines[$i]->product->volume_units:0, "volume"); + $voltxt=round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->product->volume_units?$object->lines[$i]->product->volume_units:0); } $pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'
':'').$voltxt, 0, 0, false, true, 'C'); //$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'
':'').$voltxt,'','C'); - if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) - { - $pdf->SetXY($this->posxqtyordered, $curY); - if($object->lines[$i]->fk_commandefourndet!=$fk_commandefourndet){ - $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C'); - $totalOrdered+=$object->lines[$i]->qty_asked; - } - $fk_commandefourndet = $object->lines[$i]->fk_commandefourndet; + if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { + $pdf->SetXY($this->posxqtyordered, $curY); + if($object->lines[$i]->fk_commandefourndet!=$fk_commandefourndet){ + $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C'); + $totalOrdered+=$object->lines[$i]->qty_asked; + } + $fk_commandefourndet = $object->lines[$i]->fk_commandefourndet; } $pdf->SetXY($this->posxqtytoship, $curY); @@ -658,7 +655,6 @@ class pdf_squille extends ModelePdfReception $pdf->MultiCell($this->posxpuht - $this->posxqtytoship, $tab2_hl, $totalToShip, 0, 'C', 1); if(!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { - $pdf->SetXY($this->posxpuht, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxtotalht - $this->posxpuht, $tab2_hl, '', 0, 'C', 1); @@ -754,7 +750,6 @@ class pdf_squille extends ModelePdfReception } if(!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { - $pdf->line($this->posxpuht-1, $tab_top, $this->posxpuht-1, $tab_top + $tab_height); if (empty($hidetop)) { diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index 4c02d40cc6b..8abcc41c263 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -177,7 +177,7 @@ class modGeneratePassPerso extends ModeleGenPassword * Validate a password * * @param string $password Password to check - * @return int 0 if KO, >0 if OK + * @return bool false if KO, true if OK */ public function validatePassword($password) { @@ -187,31 +187,31 @@ class modGeneratePassPerso extends ModeleGenPassword $spe = str_split($this->Spe); if (count(array_intersect($password_a, $maj)) < $this->NbMaj) { - return 0; + return false; } if (count(array_intersect($password_a, $num)) < $this->NbNum) { - return 0; + return false; } if (count(array_intersect($password_a, $spe)) < $this->NbSpe) { - return 0; + return false; } if (!$this->consecutiveInterationSameCharacter($password)) { - return 0; + return false; } - return 1; + return true; } /** - * Consecutive iterations of the same character + * Check the consecutive iterations of the same character. Return false if the number doesn't match the maximum consecutive value allowed. * * @param string $password Password to check - * @return int 0 if KO, >0 if OK + * @return bool */ - public function consecutiveInterationSameCharacter($password) + private function consecutiveInterationSameCharacter($password) { $last = ""; @@ -224,14 +224,16 @@ class modGeneratePassPerso extends ModeleGenPassword if($c != $last) { $last = $c; $count = 0; - } else { - $count++; + + continue; } - if ($count >= $this->NbRepeat) { - return 0; + $count++; + if ($count > $this->NbRepeat) { + return false; } } - return 1; + + return true; } } diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index 8a7d3e9e58a..1c634023b80 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -107,7 +107,6 @@ class modGeneratePassStandard extends ModeleGenPassword // add random characters to $password until $length is reached while ($i < $this->length) { - // pick a random character from the possible ones $char = substr($possible, mt_rand(0, dol_strlen($possible)-1), 1); diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index c389a6f77ed..2f78deefe68 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -197,14 +197,13 @@ class doc_generic_odt extends ModeleThirdPartyDoc return -1; } - // Add odtgeneration hook - if (! is_object($hookmanager)) - { - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($this->db); - } - $hookmanager->initHooks(array('odtgeneration')); - global $action; + // Add odtgeneration hook + if (! is_object($hookmanager)) { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($this->db); + } + $hookmanager->initHooks(array('odtgeneration')); + global $action; if (! is_object($outputlangs)) $outputlangs=$langs; $sav_charset_output=$outputlangs->charset_output; @@ -408,17 +407,16 @@ class doc_generic_odt extends ModeleThirdPartyDoc } else { try { - $odfHandler->creator = $user->getFullName($outputlangs); - $odfHandler->title = $object->builddoc_filename; - $odfHandler->subject = $object->builddoc_filename; + $odfHandler->creator = $user->getFullName($outputlangs); + $odfHandler->title = $object->builddoc_filename; + $odfHandler->subject = $object->builddoc_filename; - if (! empty($conf->global->ODT_ADD_DOLIBARR_ID)) - { - $odfHandler->userdefined['dol_id'] = $object->id; - $odfHandler->userdefined['dol_element'] = $object->element; - } + if (! empty($conf->global->ODT_ADD_DOLIBARR_ID)) { + $odfHandler->userdefined['dol_id'] = $object->id; + $odfHandler->userdefined['dol_element'] = $object->element; + } - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e){ $this->error=$e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 430c50fb401..3a7d2c00613 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -53,7 +53,10 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $code_auto; // Numerotation automatique + /** + * @var int Automatic numbering + */ + public $code_auto; public $searchcode; // String de recherche diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 4ba5e490b07..80bb3013904 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -57,7 +57,10 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $code_auto; // Numerotation automatique + /** + * @var int Automatic numbering + */ + public $code_auto; /** diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 89774161635..6273f5e74ef 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -51,7 +51,10 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $code_auto; // Numerotation automatique + /** + * @var int Automatic numbering + */ + public $code_auto; public $prefixcustomer='CU'; diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index e19814c3cd4..0d6d2e3d420 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -495,7 +495,7 @@ class doc_generic_stock_odt extends ModelePDFStock } else { try { - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e) { $this->error=$e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 3cc964f9456..97c0744c121 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -276,7 +276,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetSubject($outputlangs->transnoentities("Stock")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->libelle)); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->label)); if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -334,7 +334,7 @@ class pdf_standard extends ModelePDFStock $sql = "SELECT label"; $sql.= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql.= " WHERE fk_product=".$objp->rowid; - $sql.= " AND lang='". $langs->getDefaultLang() ."'"; + $sql.= " AND lang='". $db->escape($langs->getDefaultLang()) ."'"; $sql.= " LIMIT 1"; $result = $db->query($sql); @@ -934,7 +934,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->libelle), '', 'R'); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->label), '', 'R'); $posy+=5; $pdf->SetFont('', '', $default_font_size - 1); @@ -958,7 +958,7 @@ class pdf_standard extends ModelePDFStock $e = new Entrepot($db); if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) { - $pdf->MultiCell(150, 3, $e->libelle, '', 'R'); + $pdf->MultiCell(150, 3, $e->label, '', 'R'); } else { diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 2a5f797147e..9adc6afad9d 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -253,16 +253,19 @@ class pdf_stdmovement extends ModelePDFMovement $warehousestatic=new Entrepot($db); $movement=new MouvementStock($db); $userstatic=new User($db); + $element = 'movement'; $sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,"; - $sql.= " e.ref as stock, e.rowid as entrepot_id, e.lieu,"; + $sql.= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu,"; $sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,"; $sql.= " m.batch, m.price,"; $sql.= " m.type_mouvement,"; $sql.= " pl.rowid as lotid, pl.eatby, pl.sellby,"; $sql.= " u.login, u.photo, u.lastname, u.firstname"; // Add fields from extrafields - foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); + if (! empty($extrafields->attributes[$element]['label'])) { + foreach ($extrafields->attributes[$element]['label'] as $key => $val) $sql.=($extrafields->attributes[$element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + } // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -335,7 +338,6 @@ class pdf_stdmovement extends ModelePDFMovement if ($conf->stock->dir_output) { - if ($resql) { $product = new Product($db); @@ -441,7 +443,7 @@ class pdf_stdmovement extends ModelePDFMovement $pdf->SetSubject($outputlangs->transnoentities("Stock")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->libelle)); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->label)); if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -585,7 +587,7 @@ class pdf_stdmovement extends ModelePDFMovement $productlot->sellby= $objp->sellby; $warehousestatic->id=$objp->entrepot_id; - $warehousestatic->libelle=$objp->stock; + $warehousestatic->label=$objp->warehouse_ref; $warehousestatic->lieu=$objp->lieu; $arrayofuniqueproduct[$objp->rowid]=$objp->produit; @@ -1013,7 +1015,7 @@ class pdf_stdmovement extends ModelePDFMovement $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->libelle), '', 'R'); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->label), '', 'R'); $posy+=5; $pdf->SetFont('', '', $default_font_size - 1); @@ -1037,7 +1039,7 @@ class pdf_stdmovement extends ModelePDFMovement $e = new MouvementStock($db); if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) { - $pdf->MultiCell(150, 3, $e->libelle, '', 'R'); + $pdf->MultiCell(150, 3, $e->label, '', 'R'); } else { diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index dd002a95766..415ebf3c34c 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; /** - * Class to generate the supplier invoices with the canelle model + * Class to generate the supplier invoices PDF with the template canelle */ class pdf_canelle extends ModelePDFSuppliersInvoices { @@ -53,6 +53,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices public $description; /** + * @var int Save the name of generated file as the main doc when generating a doc with this template + */ + public $update_main_doc_field; + + /** * @var string document type */ public $type; @@ -121,14 +126,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { global $conf, $langs, $mysoc; - // Load translation files required by the page + // Translations $langs->loadLangs(array("main", "bills")); $this->db = $db; $this->name = "canelle"; $this->description = $langs->trans('SuppliersInvoiceModel'); - // Page size for A4 format + // Dimension page $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -188,7 +193,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * Function to build pdf onto disk * - * @param FactureFournisseur $object Id of object to generate + * @param FactureFournisseur $object Object to generate * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -214,13 +219,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products")); + $nblines = count($object->lines); + if ($conf->fournisseur->facture->dir_output) { $object->fetch_thirdparty(); - $deja_regle = $object->getSommePaiement(); - //$amount_credit_notes_included = $object->getSumCreditNotesUsed(); - //$amount_deposits_included = $object->getSumDepositsUsed(); + $deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file if ($object->specimen) @@ -259,15 +266,19 @@ class pdf_canelle extends ModelePDFSuppliersInvoices global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + // Set nblines with the new facture lines content after hook $nblines = count($object->lines); - + $nbpayments = count($object->getListOfPayments()); + + // Create pdf instance $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance - $heightforinfotot = 50; // Height reserved to output the info and total part + $pdf->SetAutoPageBreak(1, 0); + + $heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; - $pdf->SetAutoPageBreak(1, 0); if (class_exists('TCPDF')) { @@ -278,7 +289,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Set path to the background PDF File if (! empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -287,15 +298,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetDrawColor(128, 128, 128); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("Invoice")); + $pdf->SetSubject($outputlangs->transnoentities("PdfInvoiceTitle")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right - // Positionne $this->atleastonediscount si on a au moins une remise + // Set $this->atleastonediscount if you have at least one discount for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) @@ -348,11 +359,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } } - // Affiche notes + // Display notes if (! empty($object->note_public)) { $tab_top -= 2; + $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); @@ -376,13 +392,18 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); + // Define size of image if we need it + $imglinesize=array(); + if (! empty($realpatharray[$i])) $imglinesize=pdf_getSizeForImage($realpatharray[$i]); + $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); + $showpricebeforepagebreak=1; + // Description of product line $curX = $this->posxdesc-1; - $showpricebeforepagebreak=1; $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva-$curX, 3, $curX, $curY, $hideref, $hidedesc, 1); @@ -415,19 +436,20 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { $pdf->commitTransaction(); } - + $posYAfterDescription=$pdf->GetY(); + $nexY = $pdf->GetY(); $pageposafter=$pdf->getPage(); $pdf->setPage($pageposbefore); $pdf->setTopMargin($this->marge_haute); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - // We suppose that a too long description is moved completely on next page + // We suppose that a too long description or photo were moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) @@ -442,18 +464,13 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($this->posxup, $curY); $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0); - // Unit price before discount - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); - $pdf->SetXY($this->posxup, $curY); - $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0); - // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit - if($conf->global->PRODUCT_USE_UNITS) + if (! empty($conf->global->PRODUCT_USE_UNITS)) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxunit, $curY); @@ -461,15 +478,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } // Discount on line - $pdf->SetXY($this->posxdiscount, $curY); if ($object->lines[$i]->remise_percent) { + $pdf->SetXY($this->posxdiscount-2, $curY); $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R'); } - + // Total HT line - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs); + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->postotalht, $curY); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0); @@ -494,6 +511,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->localtax1[$localtax1rate]+=$localtax1ligne; $this->localtax2[$localtax2rate]+=$localtax2ligne; + if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; + // Add line if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { @@ -555,18 +574,19 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - // Affiche zone totaux + // Display total area $posy=$this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); $amount_credit_notes_included=0; $amount_deposits_included=0; - if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included) + // Display Payments area + if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->SUPPLIER_INVOICE_NO_PAYMENT_DETAILS)) { - $posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs); + $posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs, $heightforfooter); } - // Pied de page + // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -594,13 +614,13 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } else { - $this->error=$langs->trans("ErrorCanNotCreateDir", $dir); + $this->error=$langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } else { - $this->error=$langs->trans("ErrorConstantNotDefined", "SUPPLIER_OUTPUTDIR"); + $this->error=$langs->transnoentities("ErrorConstantNotDefined", "SUPPLIER_OUTPUTDIR"); return 0; } } @@ -610,9 +630,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * Show total to pay * - * @param PDF $pdf Object PDF - * @param Facture $object Object invoice - * @param int $deja_regle Montant deja regle + * @param PDF $pdf Object PDF + * @param Object $object Object invoice + * @param int $deja_regle Amount already paid (in the currency of invoice) * @param int $posy Position depart * @param Translate $outputlangs Objet langs * @return int Position pour suite @@ -622,20 +642,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // phpcs:enable global $conf,$mysoc; - $default_font_size = pdf_getPDFFontSize($outputlangs); + $sign=1; + if ($object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1; + + $default_font_size = pdf_getPDFFontSize($outputlangs); $tab2_top = $posy; $tab2_hl = 4; $pdf->SetFont('', '', $default_font_size - 1); - $pdf->SetXY($this->marge_gauche, $tab2_top + 0); - // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && $this->franchise == 1) - { - $pdf->MultiCell(100, $tab2_hl, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); - } - - // Tableau total + // Total table $col1x = 120; $col2x = 170; if ($this->page_largeur < 210) // To work with US executive format { @@ -643,6 +659,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); + $useborder=0; $index=0; // Total HT @@ -652,11 +669,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); - $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + $object->remise), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); + $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + + $this->atleastoneratenotnull=0; foreach($this->tva as $tvakey => $tvaval) { if ($tvakey > 0) // On affiche pas taux 0 @@ -674,12 +694,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } - $totalvat =$outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).' '; + $totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).' '; $totalvat.=vatrate($tvakey, 1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } if (! $this->atleastoneratenotnull) // If no vat at all @@ -688,7 +708,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva, 0, $outputlangs), 0, 'R', 1); // Total LocalTax1 if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on' && $object->total_localtax1>0) @@ -697,7 +717,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1, 0, $outputlangs), 0, 'R', 1); } // Total LocalTax2 @@ -707,70 +727,66 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2, 0, $outputlangs), 0, 'R', 1); } } else { //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - //Local tax 1 - foreach($this->localtax1 as $tvakey => $tvaval) + //Local tax 1 + foreach ($this->localtax1 as $tvakey => $tvaval) { + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.= vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.= vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } + } //} //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - //Local tax 2 - foreach($this->localtax2 as $tvakey => $tvaval) + //Local tax 2 + foreach($this->localtax2 as $tvakey => $tvaval) { + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.= vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.= vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } + } //} } - $useborder=0; - // Total TTC $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -778,35 +794,58 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetFillColor(224, 224, 224); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1); - $creditnoteamount=0; - $depositsamount=0; - //$creditnoteamount=$object->getSumCreditNotesUsed(); - //$depositsamount=$object->getSumDepositsUsed(); + $pdf->SetTextColor(0, 0, 0); + $creditnoteamount=$object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received + $depositsamount=$object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); if (! empty($object->paye)) $resteapayer=0; - if ($deja_regle > 0) + if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { + // Already paid + Deposits $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0); - + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("Paid"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0); - + $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', 0); + + // Credit note + if ($creditnoteamount) + { + $labeltouse = ($outputlangs->transnoentities("CreditNotesOrExcessReceived") != "CreditNotesOrExcessReceived") ? $outputlangs->transnoentities("CreditNotesOrExcessReceived") : $outputlangs->transnoentities("CreditNotes"); + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $labeltouse, 0, 'L', 0); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount, 0, $outputlangs), 0, 'R', 0); + } + + // Escompte + if ($object->close_code == Facture::CLOSECODE_DISCOUNTVAT) + { + $index++; + $pdf->SetFillColor(255, 255, 255); + + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 0, $outputlangs), $useborder, 'R', 1); + + $resteapayer=0; + } + $index++; $pdf->SetTextColor(0, 0, 60); + $pdf->SetFillColor(224, 224, 224); $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1); $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetTextColor(0, 0, 0); } @@ -824,7 +863,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param string $tab_height Height of table (rectangle) * @param int $nexY Y (not used) * @param Translate $outputlangs Langs object - * @param int $hidetop Hide top bar of array + * @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title * @param int $hidebottom Hide bottom bar of array * @param string $currency Currency code * @return void @@ -868,7 +907,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height); if (empty($hidetop)) @@ -892,7 +931,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($this->posxunit-$this->posxqty-1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } - if($conf->global->PRODUCT_USE_UNITS) { + if (! empty($conf->global->PRODUCT_USE_UNITS)) + { $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); @@ -901,20 +941,17 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } } - $pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height); - if (empty($hidetop)) + if ($this->atleastonediscount) { - if ($this->atleastonediscount) + $pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height); + if (empty($hidetop)) { $pdf->SetXY($this->posxdiscount-1, $tab_top+1); $pdf->MultiCell($this->postotalht-$this->posxdiscount+1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } - if ($this->atleastonediscount) - { - $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); - } + $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->postotalht-1, $tab_top+1); @@ -928,7 +965,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * Show payments table * * @param PDF $pdf Object PDF - * @param FactureFournisseur $object Object invoice + * @param Object $object Object to show * @param int $posy Position y in PDF * @param Translate $outputlangs Object langs for output * @return int <0 if KO, >0 if OK diff --git a/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php index b139f0330a1..bdb5e88bdb8 100644 --- a/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php @@ -4,7 +4,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2019 Philippe Grand - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2019 Tim Otte * * This program is free software; you can redistribute it and/or modify @@ -485,7 +485,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders } else { try { - $odfHandler->saveToDisk($file); + $odfHandler->saveToDisk($file); } catch (Exception $e) { $this->error=$e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php index 04a62d3d924..ee858c35cf7 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php @@ -1625,7 +1625,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders */ /** - * uasort callback function to Sort colums fields + * uasort callback function to Sort columns fields * * @param array $a PDF lines array fields configs * @param array $b PDF lines array fields configs @@ -1663,7 +1663,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Positionning $curX = $this->page_largeur-$this->marge_droite; // start from right - // Array witdh + // Array width $arrayWidth = $this->page_largeur-$this->marge_droite-$this->marge_gauche; // Count flexible column @@ -1671,7 +1671,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $countFlexCol = 0; foreach ($this->cols as $colKey => &$colDef) { - if (!$this->getColumnStatus($colKey)) continue; // continue if desable + if (!$this->getColumnStatus($colKey)) continue; // continue if disabled if (!empty($colDef['scale'])){ // In case of column widht is defined by percentage diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 5977764ca8a..f9b0d1b106c 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -674,7 +674,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $text=$this->emetteur->name; $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } -/* + /* $pdf->SetFont('','B', $default_font_size + 3); $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); @@ -734,7 +734,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Show list of linked objects $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); -*/ + */ if ($showaddress) { // Sender properties diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index eb53b7b74be..95f7b0e45d0 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -365,7 +365,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Open and load template require_once ODTPHP_PATH.'odf.php'; try { - $odfHandler = new odf( + $odfHandler = new odf( $srctemplatepath, array( 'PATH_TO_TMP' => $conf->supplier_proposal->dir_temp, diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 7e23b6b8c91..ff8ab76c674 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -941,68 +941,68 @@ class pdf_aurore extends ModelePDFSupplierProposal //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('1','3','5'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('1','3','5'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey!=0) // On affiche pas taux 0 { - if ($tvakey!=0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // VAT foreach($this->tva as $tvakey => $tvaval) @@ -1032,68 +1032,68 @@ class pdf_aurore extends ModelePDFSupplierProposal //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach($this->localtax1 as $localtax_type => $localtax_rate) + foreach($this->localtax1 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + if ($tvakey != 0) // On affiche pas taux 0 { - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach($this->localtax2 as $localtax_type => $localtax_rate) + foreach($this->localtax2 as $localtax_type => $localtax_rate) + { + if (in_array((string) $localtax_type, array('2','4','6'))) continue; + + foreach($localtax_rate as $tvakey => $tvaval) { - if (in_array((string) $localtax_type, array('2','4','6'))) continue; - - foreach($localtax_rate as $tvakey => $tvaval) + // retrieve global local tax + if ($tvakey != 0) // On affiche pas taux 0 { - // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 + //$this->atleastoneratenotnull++; + + $index++; + $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); + + $tvacompl=''; + if (preg_match('/\*/', $tvakey)) { - //$this->atleastoneratenotnull++; - - $index++; - $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - - $tvacompl=''; - if (preg_match('/\*/', $tvakey)) - { - $tvakey=str_replace('*', '', $tvakey); - $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; - } - $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; - - $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); - - $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $tvakey=str_replace('*', '', $tvakey); + $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } + $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' '; + + $totalvat.=vatrate(abs($tvakey), 1).$tvacompl; + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); + + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } + } //} // Total TTC @@ -1240,7 +1240,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); - $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C'); + $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C'); } } @@ -1345,12 +1345,12 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } -/* PHFAVRE + /* PHFAVRE $posy+=4; $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierProposalDate")." : " . dol_print_date($object->date_livraison,"day",false,$outputlangs,true), '', 'R'); -*/ + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierProposalDate")." : " . dol_print_date($object->date_livraison, "day", false, $outputlangs, true), '', 'R'); + */ if ($object->thirdparty->code_fournisseur) { diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 3bb59685449..826ed5fdd45 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -55,22 +55,10 @@ elseif ($modulepart == 'project') } elseif ($modulepart == 'bom') { - $result=restrictedArea($user, 'bom', $id, 'bom_bom'); + $result=restrictedArea($user, $modulepart, $id, 'bom_bom'); if (! $user->rights->bom->read) accessforbidden(); $accessallowed=1; } -elseif ($modulepart == 'expensereport') -{ - $result=restrictedArea($user, 'expensereport', $id, 'expensereport'); - if (! $user->rights->expensereport->lire) accessforbidden(); - $accessallowed=1; -} -elseif ($modulepart == 'holiday') -{ - $result=restrictedArea($user, 'holiday', $id, 'holiday'); - if (! $user->rights->holiday->read) accessforbidden(); - $accessallowed=1; -} elseif ($modulepart == 'member') { $result=restrictedArea($user, 'adherent', $id, '', '', 'fk_soc', 'rowid'); @@ -79,26 +67,26 @@ elseif ($modulepart == 'member') } elseif ($modulepart == 'user') { - $result=restrictedArea($user, 'user', $id, 'user'); + $result=restrictedArea($user, $modulepart, $id, $modulepart); if (! $user->rights->user->user->lire) accessforbidden(); $accessallowed=1; } -elseif ($modulepart == 'societe') -{ - $result=restrictedArea($user, 'societe', $id, 'societe'); - if (! $user->rights->societe->lire) accessforbidden(); - $accessallowed=1; -} elseif ($modulepart == 'tax') { - $result=restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); + $result=restrictedArea($user, $modulepart, $id, 'chargesociales', 'charges'); if (! $user->rights->tax->charges->lire) accessforbidden(); $accessallowed=1; } -elseif ($modulepart == 'ticket') +elseif ($modulepart == 'bank') { - $result=restrictedArea($user, 'ticket', $id, 'ticket'); - if (! $user->rights->ticket->read) accessforbidden(); + $result=restrictedArea($user, 'banque', $id, 'bank_account'); + if (! $user->rights->banque->lire) accessforbidden(); + $accessallowed=1; +} +else // ticket, holiday, expensereport, societe... +{ + $result=restrictedArea($user, $modulepart, $id, $modulepart); + if (empty($user->rights->$modulepart->read) && empty($user->rights->$modulepart->lire)) accessforbidden(); $accessallowed=1; } @@ -142,7 +130,7 @@ elseif ($modulepart == 'holiday') { $result = $object->fetch($id); if ($result <= 0) dol_print_error($db, 'Failed to load object'); - $dir=$conf->holiday->dir_output; // By default + $dir=$conf->$modulepart->dir_output; // By default } } elseif ($modulepart == 'member') @@ -164,7 +152,7 @@ elseif ($modulepart == 'societe') { $result = $object->fetch($id); if ($result <= 0) dol_print_error($db, 'Failed to load object'); - $dir=$conf->societe->dir_output; + $dir=$conf->$modulepart->dir_output; } } elseif ($modulepart == 'user') @@ -175,7 +163,7 @@ elseif ($modulepart == 'user') { $result = $object->fetch($id); if ($result <= 0) dol_print_error($db, 'Failed to load object'); - $dir=$conf->user->dir_output; // By default + $dir=$conf->$modulepart->dir_output; // By default } } elseif ($modulepart == 'expensereport') @@ -197,7 +185,7 @@ elseif ($modulepart == 'tax') { $result = $object->fetch($id); if ($result <= 0) dol_print_error($db, 'Failed to load object'); - $dir=$conf->tax->dir_output; // By default + $dir=$conf->$modulepart->dir_output; // By default } } elseif ($modulepart == 'ticket') @@ -208,7 +196,7 @@ elseif ($modulepart == 'ticket') { $result = $object->fetch($id); if ($result <= 0) dol_print_error($db, 'Failed to load object'); - $dir=$conf->ticket->dir_output; // By default + $dir=$conf->$modulepart->dir_output; // By default } } elseif ($modulepart == 'bom') @@ -219,7 +207,18 @@ elseif ($modulepart == 'bom') { $result = $object->fetch($id); if ($result <= 0) dol_print_error($db, 'Failed to load object'); - $dir=$conf->bom->dir_output; // By default + $dir=$conf->$modulepart->dir_output; // By default + } +} +elseif ($modulepart == 'bank') +{ + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $object = new Account($db); + if ($id > 0) + { + $result = $object->fetch($id); + if ($result <= 0) dol_print_error($db, 'Failed to load object'); + $dir=$conf->banque->dir_output; // By default } } else { @@ -237,6 +236,7 @@ if (empty($backtourl)) elseif (in_array($modulepart, array('tax'))) $backtourl=DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]); elseif (in_array($modulepart, array('ticket'))) $backtourl=DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]); elseif (in_array($modulepart, array('user'))) $backtourl=DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($_POST["file"]); + elseif (in_array($modulepart, array('bank'))) $backtourl=DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($_POST["file"]); else $backtourl=DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($_POST["file"]); } @@ -422,6 +422,7 @@ print '
'."\n"; print ''."\n"; print '
'; +print ''; print '
'; print ''.$langs->trans("Resize").''; @@ -472,7 +473,9 @@ if (! empty($conf->use_javascript_ajax)) print ''; print '
'; print '
'; - print ' + print ''; + print ''; + print '
'.$langs->trans("NewSizeAfterCropping").': diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php index 4f517603d63..f598bd31d83 100644 --- a/htdocs/core/tools.php +++ b/htdocs/core/tools.php @@ -29,7 +29,7 @@ $langs->loadLangs(array("companies","other")); // Security check $socid=0; -if ($user->societe_id > 0) $socid=$user->societe_id; +if ($user->socid > 0) $socid=$user->socid; diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index b103ee9676c..7f3c4d7c8e5 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -46,7 +46,7 @@ print '
'; $extrafields->fetch_name_optionals_label($elementtype); print '
'; -print ''; +print '
'; print ''; print '' . "\n"; - print ''; - print ''; - print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere")); - print '
'.$langs->trans("Position"); diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index ee050d44b21..edb45a8e86a 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -47,503 +47,492 @@ print ''; - print load_fiche_titre($langs->trans("AdvTgtTitle")); +print load_fiche_titre($langs->trans("AdvTgtTitle")); - print '
' . "\n"; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; +print '
' . "\n"; +print '' . "\n"; +print '' . "\n"; +print '' . "\n"; +print '
' . "\n"; - print '' . "\n"; - print '' . "\n"; +print '' . "\n"; - print '' . "\n"; +print '' . "\n"; +print '' . "\n"; - print '' . "\n"; +print '' . "\n"; - print '' . "\n"; +print '' . "\n"; - // Customer name - print '' . "\n"; +// Customer name +print '' . "\n"; - // Code Client - print '' . "\n"; +// Code Client +print '' . "\n"; - // Address Client - print '' . "\n"; +// Address Client +print '' . "\n"; - // Zip Client - print '' . "\n"; +// Zip Client +print '' . "\n"; - // City Client - print '' . "\n"; +// City Client +print '' . "\n"; - // Customer Country - print '' . "\n"; +// Customer Country +print '' . "\n"; - // State Customer - print '' . "\n"; +// State Customer +print '' . "\n"; - // Mother Company - print '' . "\n"; +// Mother Company +print '' . "\n"; - // Prospect/Customer - $selected = $array_query['cust_typecust']; - print '' . "\n"; +// Prospect/Customer +$selected = $array_query['cust_typecust']; +print '' . "\n"; - // Prospection status - print '' . "\n"; +// Prospection status +print '' . "\n"; - // Prospection comm status - print '' . "\n"; +// Prospection comm status +print '' . "\n"; - // Customer Type - print '' . "\n"; +// Customer Type +print '' . "\n"; - // Staff number - print '' . "\n"; +// Staff number +print '' . "\n"; - // Sales manager - print '' . "\n"; +// Sales manager +print '' . "\n"; - // Customer Default Langauge - if (! empty($conf->global->MAIN_MULTILANGS)) { +// Customer Default Langauge +if (! empty($conf->global->MAIN_MULTILANGS)) { + print '' . "\n"; +} - print '' . "\n"; +} + +// Standard Extrafield feature +if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { + $elementtype = Societe::$table_element; + // fetch optionals attributes and labels + dol_include_once('/core/class/extrafields.class.php'); + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label($elementtype); + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) { + if ($key != 'ts_nameextra' && $key != 'ts_payeur') { + print '' . "\n"; - } + print '' . "\n"; - } - - // Standard Extrafield feature - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementtype = Societe::$table_element; - // fetch optionals attributes and labels - dol_include_once('/core/class/extrafields.class.php'); - $extrafields = new ExtraFields($db); - $extrafields->fetch_name_optionals_label($elementtype); - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) { - if ($key != 'ts_nameextra' && $key != 'ts_payeur') { - print '' . "\n"; - } - } - } else { - $std_soc = new Societe($db); - $action_search = 'query'; - - // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context - include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; - $hookmanager = new HookManager($db); - $hookmanager->initHooks(array ('thirdpartycard')); - - $parameters=array(); - if (! empty($advTarget->id)) { - $parameters = array('array_query' => $advTarget->filtervalue); - } - // Other attributes - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $std_soc, $action_search); - print $hookmanager->resPrint; - } - - // State Contact - print '' . "\n"; - - // Civility - print ''; - - // contact name - print '' . "\n"; - print '' . "\n"; - - // Contact Country - print '' . "\n"; - - // Never send mass mailing - print '' . "\n"; - - // Contact Date Create - print '' . "\n"; - - // Contact update Create - print '' . "\n"; - - if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) { - // Customer Categories - print '' . "\n"; - } - - // Standard Extrafield feature - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementype=Contact::$table_element; - // fetch optionals attributes and labels - dol_include_once('/core/class/extrafields.class.php'); - $extrafields = new ExtraFields($db); - $extrafields->fetch_name_optionals_label($elementype); - foreach($extrafields->attributes[$elementtype]['type'] as $key=>&$value) { - if($value == 'radio')$value = 'select'; - } - - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) - { - print '' . "\n"; } + } +} else { + $std_soc = new Societe($db); + $action_search = 'query'; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; - print '
' . "\n"; +print '
' . "\n"; - print '' . "\n"; +print '' . "\n"; - print '
' . $langs->trans('AdvTgtNameTemplate') . ''; - if (! empty($template_id)) { - $default_template = $template_id; - } else { - $default_template = $advTarget->id; - } - print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element); - print ''; - print ''; - print ''; - print $langs->trans('AdvTgtOrCreateNewFilter'); - print ''; - print ''; - print '' . "\n"; - print '
' . $langs->trans('AdvTgtNameTemplate') . ''; +if (! empty($template_id)) { + $default_template = $template_id; +} else { + $default_template = $advTarget->id; +} +print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element); +print ''; +print ''; +print ''; +print $langs->trans('AdvTgtOrCreateNewFilter'); +print ''; +print ''; +print '' . "\n"; +print '
' . $langs->trans('AdvTgtTypeOfIncude') . ''; - print $form->selectarray('type_of_target', $advTarget->select_target_type, $array_query['type_of_target']); - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtTypeOfIncudeHelp"), 1, 'help'); - print '
' . $langs->trans('AdvTgtTypeOfIncude') . ''; +print $form->selectarray('type_of_target', $advTarget->select_target_type, $array_query['type_of_target']); +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtTypeOfIncudeHelp"), 1, 'help'); +print '
' . $langs->trans('ThirdPartyName'); - if (! empty($array_query['cust_name'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans('ThirdPartyName'); +if (! empty($array_query['cust_name'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans('CustomerCode'); - if (! empty($array_query['cust_code'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans('CustomerCode'); +if (! empty($array_query['cust_code'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans('Address'); - if (! empty($array_query['cust_adress'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans('Address'); +if (! empty($array_query['cust_adress'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans('Zip'); - if (! empty($array_query['cust_zip'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans('Zip'); +if (! empty($array_query['cust_zip'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans('Town'); - if (! empty($array_query['cust_city'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans('Town'); +if (! empty($array_query['cust_city'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans("Country"); - if (count($array_query['cust_country']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $formadvtargetemaling->multiselectCountry('cust_country', $array_query['cust_country']); - print '' . "\n"; - print '
' . $langs->trans("Country"); +if (count($array_query['cust_country']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $formadvtargetemaling->multiselectCountry('cust_country', $array_query['cust_country']); +print '' . "\n"; +print '
' . $langs->trans('Status') . ' ' . $langs->trans('ThirdParty'); - if (count($array_query['cust_status']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - print $formadvtargetemaling->advMultiselectarray( - 'cust_status', array ( - '0' => $langs->trans('ActivityCeased'), - '1' => $langs->trans('InActivity') - ), - $array_query['cust_status'] - ); - print '' . "\n"; - print '
' . $langs->trans('Status') . ' ' . $langs->trans('ThirdParty'); +if (count($array_query['cust_status']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print ''; +print $formadvtargetemaling->advMultiselectarray( + 'cust_status', array ( + '0' => $langs->trans('ActivityCeased'), + '1' => $langs->trans('InActivity') + ), + $array_query['cust_status'] +); +print '' . "\n"; +print '
' . $langs->trans("Maison mère"); - if (! empty($array_query['cust_mothercompany'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print ''; - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans("Maison mère"); +if (! empty($array_query['cust_mothercompany'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print ''; +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans('ProspectCustomer') . ' ' . $langs->trans('ThirdParty'); - if (count($array_query['cust_typecust']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - $options_array = array ( - 2 => $langs->trans('Prospect'), - 3 => $langs->trans('ProspectCustomer'), - 1 => $langs->trans('Customer'), - 0 => $langs->trans('NorProspectNorCustomer') - ); - print $formadvtargetemaling->advMultiselectarray('cust_typecust', $options_array, $array_query['cust_typecust']); - print '' . "\n"; - print '
' . $langs->trans('ProspectCustomer') . ' ' . $langs->trans('ThirdParty'); +if (count($array_query['cust_typecust']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print ''; +$options_array = array ( + 2 => $langs->trans('Prospect'), + 3 => $langs->trans('ProspectCustomer'), + 1 => $langs->trans('Customer'), + 0 => $langs->trans('NorProspectNorCustomer') +); +print $formadvtargetemaling->advMultiselectarray('cust_typecust', $options_array, $array_query['cust_typecust']); +print '' . "\n"; +print '
' . $langs->trans('ProspectLevel'); - if (count($array_query['cust_prospect_status']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status', 1); - print '' . "\n"; - print '
' . $langs->trans('ProspectLevel'); +if (count($array_query['cust_prospect_status']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print ''; +print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status', 1); +print '' . "\n"; +print '
' . $langs->trans('StatusProsp'); - if (count($array_query['cust_comm_status']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - print $formadvtargetemaling->advMultiselectarray('cust_comm_status', $advTarget->type_statuscommprospect, $array_query['cust_comm_status']); - print '' . "\n"; - print '
' . $langs->trans('StatusProsp'); +if (count($array_query['cust_comm_status']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print ''; +print $formadvtargetemaling->advMultiselectarray('cust_comm_status', $advTarget->type_statuscommprospect, $array_query['cust_comm_status']); +print '' . "\n"; +print '
' . $langs->trans("ThirdPartyType"); - if (count($array_query['cust_typeent']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $formadvtargetemaling->advMultiselectarray('cust_typeent', $formcompany->typent_array(0, " AND id <> 0"), $array_query['cust_typeent']); - print '' . "\n"; - print '
' . $langs->trans("ThirdPartyType"); +if (count($array_query['cust_typeent']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $formadvtargetemaling->advMultiselectarray('cust_typeent', $formcompany->typent_array(0, " AND id <> 0"), $array_query['cust_typeent']); +print '' . "\n"; +print '
' . $langs->trans("Staff"); - if (count($array_query['cust_effectif_id']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - print $formadvtargetemaling->advMultiselectarray("cust_effectif_id", $formcompany->effectif_array(0, " AND id <> 0"), $array_query['cust_effectif_id']); - print '' . "\n"; - print '
' . $langs->trans("Staff"); +if (count($array_query['cust_effectif_id']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print ''; +print $formadvtargetemaling->advMultiselectarray("cust_effectif_id", $formcompany->effectif_array(0, " AND id <> 0"), $array_query['cust_effectif_id']); +print '' . "\n"; +print '
' . $langs->trans("SalesRepresentatives"); - if (count($array_query['cust_saleman']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $formadvtargetemaling->multiselectselectSalesRepresentatives('cust_saleman', $array_query['cust_saleman'], $user); - print '' . "\n"; - print '
' . $langs->trans("SalesRepresentatives"); +if (count($array_query['cust_saleman']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $formadvtargetemaling->multiselectselectSalesRepresentatives('cust_saleman', $array_query['cust_saleman'], $user); +print '' . "\n"; +print '
' . $langs->trans("DefaultLang"); + if (count($array_query['cust_language']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); + } + print '' . "\n"; + print $formadvtargetemaling->multiselectselectLanguage('cust_language', $array_query['cust_language']); + print '' . "\n"; + print '
' . $langs->trans("DefaultLang"); - if (count($array_query['cust_language']) > 0) { +if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + // Customer Categories + print '
' . $langs->trans("CustomersCategoryShort"); + if (count($array_query['cust_categ']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); + } + print '' . "\n"; + print $formadvtargetemaling->multiselectCustomerCategories('cust_categ', $array_query['cust_categ']); + print '' . "\n"; + print '
' . $extrafields->attributes[$elementtype]['label'][$key]; + if (! empty($array_query['options_' . $key]) || (is_array($array_query['options_' . $key]) && count($array_query['options_' . $key]) > 0)) { print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); } - print '' . "\n"; - print $formadvtargetemaling->multiselectselectLanguage('cust_language', $array_query['cust_language']); - print '' . "\n"; - print '
'; + if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { + print '' . "\n"; + print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { + print $langs->trans("AdvTgtMinVal") . ''; + print $langs->trans("AdvTgtMaxVal") . ''; + print '' . "\n"; + print $form->textwithpicto('', $langs->trans("AdvTgtSearchIntHelp"), 1, 'help'); + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { + print ''; + print '
' . $langs->trans("AdvTgtStartDt") . ''; + print $form->selectDate('', 'options_' . $key . '_st_dt'); + print '' . $langs->trans("AdvTgtEndDt") . ''; + print $form->selectDate('', 'options_' . $key . '_end_dt'); + print '
'; - if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) { - // Customer Categories - print '
' . $langs->trans("CustomersCategoryShort"); - if (count($array_query['cust_categ']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $formadvtargetemaling->multiselectCustomerCategories('cust_categ', $array_query['cust_categ']); - print '' . "\n"; - print '
' . $extrafields->attributes[$elementtype]['label'][$key]; - if (! empty($array_query['options_' . $key]) || (is_array($array_query['options_' . $key]) && count($array_query['options_' . $key]) > 0)) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { - print $langs->trans("AdvTgtMinVal") . ''; - print $langs->trans("AdvTgtMaxVal") . ''; - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchIntHelp"), 1, 'help'); - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { - - print ''; - print '
' . $langs->trans("AdvTgtStartDt") . ''; - print $form->selectDate('', 'options_' . $key . '_st_dt'); - print '' . $langs->trans("AdvTgtEndDt") . ''; - print $form->selectDate('', 'options_' . $key . '_end_dt'); - print '
'; - - print '
' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help'); - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) { - print $form->selectarray( - 'options_' . $key, - array ( - '' => '', - '1' => $langs->trans('Yes'), - '0' => $langs->trans('No') - ), - $array_query['options_' . $key] - ); - print '' . "\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) { - print $formadvtargetemaling->advMultiselectarray('options_' . $key, $extrafields->attribute_param[$key]['options'], $array_query['options_' . $key]); - print '' . "\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) { - print $formadvtargetemaling->advMultiselectarraySelllist('options_' . $key, $extrafields->attribute_param[$key]['options'], $array_query['options_' . $key]); - print '' . "\n"; - } else { - print ''; - print '
'; - if (is_array($array_query['options_' . $key])) { - print $extrafields->showInputField($key, implode(',', $array_query['options_' . $key])); - } else { - print $extrafields->showInputField($key, $array_query['options_' . $key]); - } - print '
'; - - print '
' . "\n"; - } - print '
' . $langs->trans('Status') . ' ' . $langs->trans('Contact'); - if (count($array_query['contact_status']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - print $formadvtargetemaling->advMultiselectarray( - 'contact_status', - array ( - '0' => $langs->trans('ActivityCeased'), - '1' => $langs->trans('InActivity') - ), - $array_query['contact_status'] - ); - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtContactHelp"), 1, 'help'); - print '
' . $langs->trans("UserTitle"); - if (count($array_query['contact_civility']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - print $formadvtargetemaling->multiselectCivility('contact_civility', $array_query['contact_civility']); - print '
' . $langs->trans('Contact') . ' ' . $langs->trans('Lastname'); - if (! empty($array_query['contact_lastname'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans('Contact') . ' ' . $langs->trans('Firstname'); - if (! empty($array_query['contact_firstname'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - print '
' . $langs->trans('Contact') . ' ' . $langs->trans("Country"); - if (count($array_query['contact_country']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $formadvtargetemaling->multiselectCountry('contact_country', $array_query['contact_country']); - print '' . "\n"; - print '
' . $langs->trans('Contact') . ' ' . $langs->trans("No_Email"); - if (! empty($array_query['contact_no_email'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $form->selectarray( - 'contact_no_email', - array ( - '' => '', - '1' => $langs->trans('Yes'), - '0' => $langs->trans('No') - ), - $array_query['contact_no_email'] - ); - print '' . "\n"; - print '
' . $langs->trans('Contact') . ' ' . $langs->trans("DateCreation"); - if (! empty($array_query['contact_create_st_dt'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print ''; - print '
' . $langs->trans("AdvTgtStartDt") . ''; - print $form->selectDate($array_query['contact_create_st_dt'], 'contact_create_st_dt', 0, 0, 1, 'find_customer', 1, 1); - print '' . $langs->trans("AdvTgtEndDt") . ''; - print $form->selectDate($array_query['contact_create_end_dt'], 'contact_create_end_dt', 0, 0, 1, 'find_customer', 1, 1); - print '
'; - print '
' . "\n"; - print '
' . $langs->trans('Contact') . ' ' . $langs->trans("DateLastModification"); - if (! empty($array_query['contact_update_st_dt'])) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print ''; - print '
' . $langs->trans("AdvTgtStartDt") . ''; - print $form->selectDate($array_query['contact_update_st_dt'], 'contact_update_st_dt', 0, 0, 1, 'find_customer', 1, 1); - print '' . $langs->trans("AdvTgtEndDt") . ''; - print $form->selectDate($array_query['contact_update_end_dt'], 'contact_update_end_dt', 0, 0, 1, 'find_customer', 1, 1); - print '
'; - print '
' . "\n"; - print '
' . $langs->trans("ContactCategoriesShort"); - if (count($array_query['contact_categ']) > 0) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print '' . "\n"; - print $formadvtargetemaling->multiselectContactCategories('contact_categ', $array_query['contact_categ']); - print '' . "\n"; - print '
' . $extrafields->attributes[$elementtype]['label'][$key]; - if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) { - print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } - print ''; - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { - print $langs->trans("AdvTgtMinVal") . ''; - print $langs->trans("AdvTgtMaxVal") . ''; - print '' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchIntHelp"), 1, 'help'); - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { - - print ''; - print '
' . $langs->trans("AdvTgtStartDt") . ''; - print $form->selectDate('', 'options_' . $key . '_st_dt' . '_cnct'); - print '' . $langs->trans("AdvTgtEndDt") . ''; - print $form->selectDate('', 'options_' . $key . '_end_dt' . '_cnct'); - print '
'; - - print '
' . "\n"; - print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help'); - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) { - print $form->selectarray( - 'options_' . $key . '_cnct', - array ( - '' => '', - '1' => $langs->trans('Yes'), - '0' => $langs->trans('No') - ), - $array_query['options_' . $key . '_cnct'] - ); - print '' . "\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) { - print $formadvtargetemaling->advMultiselectarray('options_' . $key . '_cnct', $extrafields->attribute_param[$key]['options'], $array_query['options_' . $key . '_cnct']); - print '' . "\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) { - print $formadvtargetemaling->advMultiselectarraySelllist('options_' . $key . '_cnct', $extrafields->attribute_param[$key]['options'], $array_query['options_' . $key . '_cnct']); - print '' . "\n"; + print '' . "\n"; + print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help'); + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) { + print $form->selectarray( + 'options_' . $key, + array ( + '' => '', + '1' => $langs->trans('Yes'), + '0' => $langs->trans('No') + ), + $array_query['options_' . $key] + ); + print '' . "\n"; + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) { + print $formadvtargetemaling->advMultiselectarray('options_' . $key, $extrafields->attributes[$key]['param']['options'], $array_query['options_' . $key]); + print '' . "\n"; + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) { + print $formadvtargetemaling->advMultiselectarraySelllist('options_' . $key, $extrafields->attributes[$key]['param']['options'], $array_query['options_' . $key]); + print '' . "\n"; + } else { + print ''; + print '' . "\n"; + print '
'; + if (is_array($array_query['options_' . $key])) { + print $extrafields->showInputField($key, implode(',', $array_query['options_' . $key])); } else { - - print ''; - print '
'; - if (is_array($array_query['options_' . $key . '_cnct'])) { - print $extrafields->showInputField($key, implode(',', $array_query['options_' . $key . '_cnct']), '', '_cnct'); - } else { - print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct'); - } - print '
'; - - print '
' . "\n"; + print $extrafields->showInputField($key, $array_query['options_' . $key]); } - print '
'; + + print '
' . "\n"; } + print '
' . "\n"; + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context + include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; + $hookmanager = new HookManager($db); + $hookmanager->initHooks(array ('thirdpartycard')); - print '' . "\n"; + $parameters=array(); + if (! empty($advTarget->id)) { + $parameters = array('array_query' => $advTarget->filtervalue); + } + // Other attributes + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $std_soc, $action_search); + print $hookmanager->resPrint; +} - print '
' . "\n"; - print '' . "\n"; - print '
' . "\n"; +// State Contact +print '
' . $langs->trans('Status') . ' ' . $langs->trans('Contact'); +if (count($array_query['contact_status']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print ''; +print $formadvtargetemaling->advMultiselectarray( + 'contact_status', + array ( + '0' => $langs->trans('ActivityCeased'), + '1' => $langs->trans('InActivity') + ), + $array_query['contact_status'] +); +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtContactHelp"), 1, 'help'); +print '
'; - print ''; - print ''; - print ''; - print '
'; - print ''; - print '
'; +// Civility +print '
' . $langs->trans("UserTitle"); +if (count($array_query['contact_civility']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print ''; +print $formadvtargetemaling->multiselectCivility('contact_civility', $array_query['contact_civility']); +print '
' . $langs->trans('Contact') . ' ' . $langs->trans('Lastname'); +if (! empty($array_query['contact_lastname'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans('Contact') . ' ' . $langs->trans('Firstname'); +if (! empty($array_query['contact_firstname'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); +print '
' . $langs->trans('Contact') . ' ' . $langs->trans("Country"); +if (count($array_query['contact_country']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $formadvtargetemaling->multiselectCountry('contact_country', $array_query['contact_country']); +print '' . "\n"; +print '
' . $langs->trans('Contact') . ' ' . $langs->trans("No_Email"); +if (! empty($array_query['contact_no_email'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print $form->selectarray( + 'contact_no_email', + array ( + '' => '', + '1' => $langs->trans('Yes'), + '0' => $langs->trans('No') + ), + $array_query['contact_no_email'] +); +print '' . "\n"; +print '
' . $langs->trans('Contact') . ' ' . $langs->trans("DateCreation"); +if (! empty($array_query['contact_create_st_dt'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print ''; +print '
' . $langs->trans("AdvTgtStartDt") . ''; +print $form->selectDate($array_query['contact_create_st_dt'], 'contact_create_st_dt', 0, 0, 1, 'find_customer', 1, 1); +print '' . $langs->trans("AdvTgtEndDt") . ''; +print $form->selectDate($array_query['contact_create_end_dt'], 'contact_create_end_dt', 0, 0, 1, 'find_customer', 1, 1); +print '
'; +print '
' . "\n"; +print '
' . $langs->trans('Contact') . ' ' . $langs->trans("DateLastModification"); +if (! empty($array_query['contact_update_st_dt'])) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); +} +print '' . "\n"; +print ''; +print '
' . $langs->trans("AdvTgtStartDt") . ''; +print $form->selectDate($array_query['contact_update_st_dt'], 'contact_update_st_dt', 0, 0, 1, 'find_customer', 1, 1); +print '' . $langs->trans("AdvTgtEndDt") . ''; +print $form->selectDate($array_query['contact_update_end_dt'], 'contact_update_end_dt', 0, 0, 1, 'find_customer', 1, 1); +print '
'; +print '
' . "\n"; +print '
' . $langs->trans("ContactCategoriesShort"); + if (count($array_query['contact_categ']) > 0) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); + } + print '' . "\n"; + print $formadvtargetemaling->multiselectContactCategories('contact_categ', $array_query['contact_categ']); + print '' . "\n"; + print '
' . $extrafields->attributes[$elementtype]['label'][$key]; + if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) { + print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); + } + print ''; + if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { + print '' . "\n"; + print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help'); + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { + print $langs->trans("AdvTgtMinVal") . ''; + print $langs->trans("AdvTgtMaxVal") . ''; + print '' . "\n"; + print $form->textwithpicto('', $langs->trans("AdvTgtSearchIntHelp"), 1, 'help'); + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { + print ''; + print '
' . $langs->trans("AdvTgtStartDt") . ''; + print $form->selectDate('', 'options_' . $key . '_st_dt' . '_cnct'); + print '' . $langs->trans("AdvTgtEndDt") . ''; + print $form->selectDate('', 'options_' . $key . '_end_dt' . '_cnct'); + print '
'; + print '
' . "\n"; + print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help'); + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) { + print $form->selectarray( + 'options_' . $key . '_cnct', + array ( + '' => '', + '1' => $langs->trans('Yes'), + '0' => $langs->trans('No') + ), + $array_query['options_' . $key . '_cnct'] + ); + print '' . "\n"; + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) { + print $formadvtargetemaling->advMultiselectarray('options_' . $key . '_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_' . $key . '_cnct']); + print '' . "\n"; + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) { + print $formadvtargetemaling->advMultiselectarraySelllist('options_' . $key . '_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_' . $key . '_cnct']); + print '' . "\n"; + } else { + print ''; + print '
'; + if (is_array($array_query['options_' . $key . '_cnct'])) { + print $extrafields->showInputField($key, implode(',', $array_query['options_' . $key . '_cnct']), '', '_cnct'); + } else { + print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct'); + } + print '
'; + print '
' . "\n"; + } + print '
' . "\n"; +print '' . "\n"; +print '
' . "\n"; +print '' . "\n"; +print '
' . "\n"; +print '
'; +print ''; +print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere")); +print ''; +print ''; +print ''; +print ''; +print '
'; +print '
'; +print '
'; diff --git a/htdocs/core/tpl/bloc_comment.tpl.php b/htdocs/core/tpl/bloc_comment.tpl.php index fba0810e7cd..1a1b9023a98 100644 --- a/htdocs/core/tpl/bloc_comment.tpl.php +++ b/htdocs/core/tpl/bloc_comment.tpl.php @@ -27,7 +27,7 @@ print ''; print ''; print ''; -print ''; +print '
'; print ''; print ''; @@ -36,21 +36,25 @@ print ''; print ''; print "\n"; -print ''; +if ($action !== 'editcomment') +{ + print ''; -// Description -print ''; + print ''; + + print ''; +} -print ''; print '
'.$langs->trans("Comments").'
'; + // Description + print ''; -$desc = GETPOST('comment_description'); + $desc = GETPOST('comment_description'); -$doleditor = new DolEditor('comment_description', $desc, '', 80, 'dolibarr_notes', 'In', 0, true, true, ROWS_3, '100%'); -print $doleditor->Create(1); + $doleditor = new DolEditor('comment_description', $desc, '', 80, 'dolibarr_notes', 'In', 0, true, true, ROWS_3, '100%'); + print $doleditor->Create(1); -print ''; + print ''; + print '
'; -print ''; -print '
'; // List of comments @@ -91,15 +95,52 @@ if (!empty($object->comments)) print '
'; print '
'; - print '
'; - print $comment->description; + + if ($action === 'editcomment' && $comment->id == $idcomment) + { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + } + + print '
'; + if ($action === 'editcomment' && $comment->id == $idcomment) + { + $doleditor = new DolEditor('comment_description', $comment->description, '', 80, 'dolibarr_notes', 'In', 0, true, true, ROWS_3, '100%'); + print $doleditor->Create(1); + } + else + { + print $comment->description; + } print '
'; // End comment-description - if(($first && $fk_user == $user->id) || $user->admin == 1) { - print ''; - print img_picto('', 'delete.png'); - print ''; - } - print '
'; // End comment-table + + if ($action === 'editcomment' && $comment->id == $idcomment) + { + print ''; + print ''; + + print ''; + } + else + { + if ($fk_user == $user->id || $user->admin == 1) + { + print ''; + print img_picto('', 'edit.png'); + print ''; + } + if(($first && $fk_user == $user->id) || $user->admin == 1) { + print ''; + print img_picto('', 'delete.png'); + print ''; + } + } + + print '
'; // End comment-table print '
'; // End comment-right print ''; // End comment diff --git a/htdocs/core/tpl/commonfields_add.tpl.php b/htdocs/core/tpl/commonfields_add.tpl.php index ffc18853af7..5f17b3e2c68 100644 --- a/htdocs/core/tpl/commonfields_add.tpl.php +++ b/htdocs/core/tpl/commonfields_add.tpl.php @@ -56,7 +56,7 @@ foreach($object->fields as $key => $val) if (in_array($val['type'], array('int', 'integer'))) $value = GETPOST($key, 'int'); elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOST($key, 'none'); else $value = GETPOST($key, 'alpha'); - print $object->showInputField($val, $key, $value, '', '', '', 0); + print $object->showInputField($val, $key, $value, '', '', '', 0, $object->table_element); print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
trans('SupplierRef'); ?> trans('VAT'); ?> - rights->margins->creer)) { + $colspan++; + } + else { + print ''; + if ($conf->global->MARGIN_TYPE == "1") + echo $langs->trans('BuyingPrice'); + else + echo $langs->trans('CostPrice'); + echo ''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').' 
- global->MAIN_DISABLE_FREE_LINES)) +$freelines = false; +if (empty($conf->global->MAIN_DISABLE_FREE_LINES)) +{ + $freelines = true; + $forceall=1; // We always force all type for free lines (module product or service means we use predefined product or service) + if ($object->element == 'contrat') { - $freelines = true; - $forceall=1; // We always force all type for free lines (module product or service means we use predefined product or service) - if ($object->element == 'contrat') - { - if (empty($conf->product->enabled) && empty($conf->service->enabled) && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=-1; // With contract, by default, no choice at all, except if CONTRACT_SUPPORT_PRODUCTS is set - elseif (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=3; - } - - // Free line - echo ''; - // Show radio free line - if ($forceall >= 0 && (! empty($conf->product->enabled) || ! empty($conf->service->enabled))) - { - echo ''; - echo ' '; - } - else - { - echo ''; - // Show type selector - if ($forceall >= 0) - { - if (empty($conf->product->enabled) || empty($conf->service->enabled)) echo $langs->trans("Type"); - else echo $langs->trans("FreeLineOfType"); - echo ' '; - } - } - - echo $form->select_type_of_lines(isset($_POST["type"])?GETPOST("type", 'alpha', 2):-1, 'type', 1, 1, $forceall); - - echo ''; + if (empty($conf->product->enabled) && empty($conf->service->enabled) && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=-1; // With contract, by default, no choice at all, except if CONTRACT_SUPPORT_PRODUCTS is set + elseif (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $forceall=3; } - // Predefined product/service - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) + // Free line + echo ''; + // Show radio free line + if ($forceall >= 0 && (! empty($conf->product->enabled) || ! empty($conf->service->enabled))) { - if ($forceall >= 0 && $freelines) echo '
'; - echo ''; - echo ''; +} + +// Predefined product/service +if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) +{ + if ($forceall >= 0 && $freelines) echo '
'; + echo ''; + echo ''; + echo ' '; + + $filtertype=''; + if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1'; + + if (empty($senderissupplier)) + { + $statustoshow = 1; + if (! empty($conf->global->ENTREPOT_EXTRA_STATUS)) + { + // hide products in closed warehouse, but show products for internal transfer + $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth300', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); } else { - if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase'); - elseif (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase'); - else echo $langs->trans('PredefinedProductsAndServicesToPurchase'); + $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth300', 0, '', GETPOST('combinations', 'array')); } - echo ''; - echo ' '; - $filtertype=''; - if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1'; - - if (empty($senderissupplier)) + if (! empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_CUSTOMER_PRODUCTS)) { - if (! empty($conf->global->ENTREPOT_EXTRA_STATUS)) - { - // hide products in closed warehouse, but show products for internal transfer - $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, -1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth300', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); - } - else - { - $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, -1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth300', 0, '', GETPOST('combinations', 'array')); - } - - if (! empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_CUSTOMER_PRODUCTS)) - { - ?> + ?> - array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key - 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done - 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo) - ); - $alsoproductwithnosupplierprice=0; - } - else - { - $ajaxoptions = array( - 'update' => array('remise_percent' => 'discount') // html id tags that will be edited with each ajax json response key - ); - $alsoproductwithnosupplierprice=1; - } + array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key + 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done + 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo) + ); + $alsoproductwithnosupplierprice=0; + } + else + { + $ajaxoptions = array( + 'update' => array('remise_percent' => 'discount') // html id tags that will be edited with each ajax json response key + ); + $alsoproductwithnosupplierprice=1; + } - $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'maxwidth300'); + $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'maxwidth300'); - if (! empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS)) - { - ?> + if (! empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS)) + { + ?> - '; - echo ''; + '; + echo '
'; +} + +if (is_object($hookmanager) && empty($senderissupplier)) +{ + $parameters=array('fk_parent_line'=>GETPOST('fk_parent_line', 'int')); + $reshook=$hookmanager->executeHooks('formCreateProductOptions', $parameters, $object, $action); + if (!empty($hookmanager->resPrint)) { + print $hookmanager->resPrint; + } +} +if (is_object($hookmanager) && ! empty($senderissupplier)) +{ + $parameters=array('htmlname'=>'addproduct'); + $reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions', $parameters, $object, $action); + if (!empty($hookmanager->resPrint)) { + print $hookmanager->resPrint; + } +} + + +if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { + if (!empty($conf->variants->enabled)) { + echo '
'; } - if (is_object($hookmanager) && empty($senderissupplier)) - { - $parameters=array('fk_parent_line'=>GETPOST('fk_parent_line', 'int')); - $reshook=$hookmanager->executeHooks('formCreateProductOptions', $parameters, $object, $action); - if (!empty($hookmanager->resPrint)) { - print $hookmanager->resPrint; - } - } - if (is_object($hookmanager) && ! empty($senderissupplier)) - { - $parameters=array('htmlname'=>'addproduct'); - $reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions', $parameters, $object, $action); - if (!empty($hookmanager->resPrint)) { - print $hookmanager->resPrint; - } - } + echo '
'; +} +// Editor wysiwyg +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; +$nbrows=ROWS_2; +$enabled=(! empty($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0); +if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; +$toolbarname='dolibarr_details'; +if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes'; +$doleditor=new DolEditor('dp_desc', GETPOST('dp_desc', 'none'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%'); +$doleditor->Create(); - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { +// Show autofill date for recurring invoices +if (! empty($conf->service->enabled) && $object->element == 'facturerec') +{ + echo '

'; + echo $langs->trans('AutoFillDateFrom').' '; + echo $form->selectyesno('date_start_fill', $line->date_start_fill, 1); + echo ' - '; + echo $langs->trans('AutoFillDateTo').' '; + echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1); + echo '
'; +} +echo '
">element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines +{ $coldisplay++; - if ($seller->tva_assuj == "0") echo ''.vatrate(0, true); - else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1); - ?> + ?> + "> "> "> "> "> '; - print $form->selectUnits($line->fk_unit, "units"); - print ''; + print $form->selectUnits($line->fk_unit, "units"); + print '">%%% - - product->enabled) || ! empty($conf->service->enabled)) { ?> - - - - "> - + + product->enabled) || ! empty($conf->service->enabled)) { ?> + + + + "> + %%%%
'; - + print '
'; // Load shipments already done for same order $object->loadExpeditions(); @@ -1371,7 +1366,7 @@ if ($action == 'create') print ''; print ''; } } @@ -1553,7 +1548,7 @@ if ($action == 'create') { $warehouseObject=new Entrepot($db); $warehouseObject->fetch($warehouse_selected_id); - print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->libelle); + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); } else { @@ -1575,11 +1570,9 @@ if ($action == 'create') { //var_dump($line); $colspan=5; - $extrafields->fetch_name_optionals_label($expe->table_element_line); $expLine = new ExpeditionLigne($db); $srcLine = new OrderLine($db); - $extrafields->fetch_name_optionals_label($srcLine->table_element); $srcLine->fetch_optionals($line->id); // fetch extrafields also available in orderline //$line->fetch_optionals($line->id); $line->array_options = array_merge($line->array_options, $srcLine->array_options); @@ -1707,7 +1700,6 @@ elseif ($id || $ref) // Print form confirm print $formconfirm; - // Calculate totalWeight and totalVolume for all products // by adding weight and volume of each product line. $tmparray=$object->getTotalWeightVolume(); @@ -1850,16 +1842,14 @@ elseif ($id || $ref) else { print $object->trueWeight; - print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string(0, "weight", $object->weight_units):''; + print ($object->trueWeight && $object->weight_units!='')?' '.measuringUnitString(0, "weight", $object->weight_units):''; } // Calculated if ($totalWeight > 0) { if (!empty($object->trueWeight)) print ' ('.$langs->trans("SumOfProductWeights").': '; - //print $totalWeight.' '.measuring_units_string(0, "weight"); print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no'); - //if (empty($object->trueWeight)) print ' ('.$langs->trans("Calculated").')'; if (!empty($object->trueWeight)) print ')'; } print ''; @@ -1867,7 +1857,7 @@ elseif ($id || $ref) // Width print ''; // Height @@ -1887,7 +1877,7 @@ elseif ($id || $ref) else { print $object->trueHeight; - print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string(0, "size", $object->height_units):''; + print ($object->trueHeight && $object->height_units!='')?' '.measuringUnitString(0, "size", $object->height_units):''; } print ''; @@ -1895,7 +1885,7 @@ elseif ($id || $ref) // Depth print ''; // Volume @@ -1915,15 +1905,13 @@ elseif ($id || $ref) { if ($volumeUnit < 50) { - //print $calculatedVolume.' '.measuring_units_string($volumeUnit, "volume"); print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no'); } - else print $calculatedVolume.' '.measuring_units_string($volumeUnit, "volume"); + else print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); } if ($totalVolume > 0) { if ($calculatedVolume) print ' ('.$langs->trans("SumOfProductVolumes").': '; - //print $totalVolume.' '.measuring_units_string(0, "volume"); print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no'); //if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')'; if ($calculatedVolume) print ')'; @@ -2199,6 +2187,20 @@ elseif ($id || $ref) $product_static->id=$lines[$i]->fk_product; $product_static->ref=$lines[$i]->ref; $product_static->status_batch=$lines[$i]->product_tobatch; + + $product_static->weight=$lines[$i]->weight; + $product_static->weight_units=$lines[$i]->weight_units; + $product_static->length=$lines[$i]->length; + $product_static->length_units=$lines[$i]->length_units; + $product_static->width=$lines[$i]->width; + $product_static->width_units=$lines[$i]->width_units; + $product_static->height=$lines[$i]->height; + $product_static->height_units=$lines[$i]->height_units; + $product_static->surface=$lines[$i]->surface; + $product_static->surface_units=$lines[$i]->surface_units; + $product_static->volume=$lines[$i]->volume; + $product_static->volume_units=$lines[$i]->volume_units; + $text=$product_static->getNomUrl(1); $text.= ' - '.$label; $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($lines[$i]->description)); @@ -2252,7 +2254,7 @@ elseif ($id || $ref) if (! empty($conf->stock->enabled) && $shipmentline_var['warehouse'] > 0) { $warehousestatic->fetch($shipmentline_var['warehouse']); - $htmltext .= '
'.$langs->trans("From").' : '.$warehousestatic->getNomUrl(1); + $htmltext .= '
'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); } print ' '.$form->textwithpicto('', $htmltext, 1); } @@ -2409,18 +2411,18 @@ elseif ($id || $ref) // Weight print ''; // Volume print ''; // Size - //print ''; + //print ''; if ($action == 'editline' && $lines[$i]->id == $line_id) { @@ -2433,10 +2435,10 @@ elseif ($id || $ref) { // edit-delete buttons print ''; print ''; // Display lines extrafields @@ -2458,8 +2460,6 @@ elseif ($id || $ref) $lines[$i]->fetch_optionals($lines[$i]->id); - $extrafields->fetch_name_optionals_label($lines[$i]->table_element); - print ''; if ($action == 'editline' && $lines[$i]->id == $line_id) { @@ -2492,7 +2492,7 @@ elseif ($id || $ref) * Boutons actions */ - if (($user->societe_id == 0) && ($action!='presend')) + if (($user->socid == 0) && ($action!='presend')) { print '
'; @@ -2501,7 +2501,6 @@ elseif ($id || $ref) // modified by hook if (empty($reshook)) { - if ($object->statut == Expedition::STATUS_DRAFT && $num_prod > 0) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expedition->creer)) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index b3cab414ccc..8ec0cd64ec6 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -143,7 +143,12 @@ class Expedition extends CommonObject */ public $date_shipping; + /** + * @var integer|string date_creation + */ public $date_creation; + + public $date_valid; public $meths; @@ -192,13 +197,6 @@ class Expedition extends CommonObject $this->statutshorts[0] = 'StatusSendingDraftShort'; $this->statutshorts[1] = 'StatusSendingValidatedShort'; $this->statutshorts[2] = 'StatusSendingProcessedShort'; - - /* Status "billed" or not is managed by another field than status - if (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) - { - $this->statuts[2] = 'StatusSendingBilled'; - $this->statutshorts[2] = 'StatusSendingBilledShort'; - }*/ } /** @@ -223,7 +221,6 @@ class Expedition extends CommonObject $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/expedition/"); // Load file with numbering class (if found) @@ -325,8 +322,8 @@ class Expedition extends CommonObject $sql.= ", ".$this->sizeS; // TODO Should use this->trueDepth $sql.= ", ".$this->sizeW; // TODO Should use this->trueWidth $sql.= ", ".$this->sizeH; // TODO Should use this->trueHeight - $sql.= ", ".$this->weight_units; - $sql.= ", ".$this->size_units; + $sql.= ", ".($this->weight_units != '' ? (int) $this->weight_units : 'NULL'); + $sql.= ", ".($this->size_units != '' ? (int) $this->size_units : 'NULL'); $sql.= ", ".(!empty($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null"); $sql.= ", ".(!empty($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ", ".(!empty($this->model_pdf)?"'".$this->db->escape($this->model_pdf)."'":"null"); @@ -1669,45 +1666,23 @@ class Expedition extends CommonObject /** * Return label of a status * - * @param int $statut Id statut - * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto - * @return string Label of status + * @param int $status Id statut + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto + * @return string Label of status */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { // phpcs:enable - global $langs; + global $langs; - if ($mode==0) - { - if ($statut==0) return $langs->trans($this->statuts[$statut]); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]); - } - elseif ($mode==1) - { - if ($statut==0) return $langs->trans($this->statutshorts[$statut]); - elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]); - elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]); - } - elseif ($mode == 3) - { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - } - elseif ($mode == 4) - { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); - } - elseif ($mode == 5) - { - if ($statut==0) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - } + $labelStatus = $langs->trans($this->statuts[$status]); + $labelStatusShort = $langs->trans($this->statutshorts[$status]); + + $statusType = 'status'.$status; + if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } /** @@ -1778,7 +1753,8 @@ class Expedition extends CommonObject { $line=new ExpeditionLigne($this->db); $line->desc=$langs->trans("Description")." ".$xnbp; - $line->libelle=$langs->trans("Description")." ".$xnbp; + $line->libelle=$langs->trans("Description")." ".$xnbp; // deprecated + $line->label=$langs->trans("Description")." ".$xnbp; $line->qty=10; $line->qty_asked=5; $line->qty_shipped=4; @@ -1837,7 +1813,7 @@ class Expedition extends CommonObject global $langs; $this->meths = array(); - $sql = "SELECT em.rowid, em.code, em.libelle"; + $sql = "SELECT em.rowid, em.code, em.libelle as label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; $sql.= " WHERE em.active = 1"; $sql.= " ORDER BY em.libelle ASC"; @@ -1848,7 +1824,7 @@ class Expedition extends CommonObject while ($obj = $this->db->fetch_object($resql)) { $label=$langs->trans('SendingMethod'.$obj->code); - $this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle); + $this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label); } } } @@ -1868,7 +1844,7 @@ class Expedition extends CommonObject $this->listmeths = array(); $i=0; - $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.tracking, em.active"; + $sql = "SELECT em.rowid, em.code, em.libelle as label, em.description, em.tracking, em.active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; if ($id!='') $sql.= " WHERE em.rowid=".$id; @@ -1880,7 +1856,7 @@ class Expedition extends CommonObject $this->listmeths[$i]['rowid'] = $obj->rowid; $this->listmeths[$i]['code'] = $obj->code; $label=$langs->trans('SendingMethod'.$obj->code); - $this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle); + $this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label); $this->listmeths[$i]['description'] = $obj->description; $this->listmeths[$i]['tracking'] = $obj->tracking; $this->listmeths[$i]['active'] = $obj->active; @@ -2333,7 +2309,6 @@ class Expedition extends CommonObject $langs->load("sendings"); if (! dol_strlen($modele)) { - $modele = 'rouget'; if ($this->modelpdf) { diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index b8e6af1db85..1cd050cb89e 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -42,7 +42,7 @@ $ref=GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expedition', $id, ''); $object = new Expedition($db); diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php index 9faaaf1f88e..0018ba3cd06 100644 --- a/htdocs/expedition/document.php +++ b/htdocs/expedition/document.php @@ -46,9 +46,9 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref'); // Security check -if ($user->societe_id) +if ($user->socid) { - $socid = $user->societe_id; + $socid = $user->socid; } $result=restrictedArea($user, 'expedition', $id, ''); diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 217497a962e..a1d3c2a579c 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -57,11 +57,12 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; - print '
'; - print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->libelle); + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); print '
'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer).''; print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer); - print ($object->trueWidth && $object->width_units!='')?' '.measuring_units_string(0, "size", $object->width_units):''; + print ($object->trueWidth && $object->width_units!='')?' '.measuringUnitString(0, "size", $object->width_units):''; print '
'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer).''; print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer); - print ($object->trueDepth && $object->depth_units!='')?' '.measuring_units_string(0, "size", $object->depth_units):''; + print ($object->trueDepth && $object->depth_units!='')?' '.measuringUnitString(0, "size", $object->depth_units):''; print '
'; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string(0, "weight", $lines[$i]->weight_units); + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units); else print ' '; print ''; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string(0, "volume", $lines[$i]->volume_units); + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units); else print ' '; print ''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units, "volume").''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units).''; - print 'id . '">' . img_edit() . ''; + print 'id . '">' . img_edit() . ''; print ''; - print 'id . '">' . img_delete() . ''; + print 'id . '">' . img_delete() . ''; print '
'; + print '
'; + print '
'; print ''; print ''; - print "
'.$langs->trans("Search").'
'; print $langs->trans("Shipment").':

\n"; + print "

\n"; } /* @@ -92,7 +93,8 @@ if ($resql) $num = $db->num_rows($resql); if ($num) { - print ''; + print '
'; + print '
'; print ''; print ''; $i = 0; @@ -115,7 +117,7 @@ if ($resql) print ''; $i++; } - print "
'.$langs->trans("SendingsToValidate").'

"; + print "

"; } } @@ -143,7 +145,8 @@ if ($resql) $langs->load("orders"); $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; while ($i < $num) @@ -172,7 +175,7 @@ if ($resql) print ''; $i++; } - print "
'.$langs->trans("OrdersToProcess").'

"; + print "

"; } } @@ -203,7 +206,8 @@ if ( $resql ) if ($num) { $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; while ($i < $num) @@ -231,7 +235,7 @@ if ( $resql ) print ''; $i++; } - print "
'.$langs->trans("OrdersInProcess").'

"; + print "

"; } } else dol_print_error($db); @@ -262,7 +266,8 @@ if ($resql) if ($num) { $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; while ($i < $num) @@ -288,7 +293,7 @@ if ($resql) print ''; $i++; } - print "
'.$langs->trans("LastSendings", $num).'

"; + print "

"; } $db->free($resql); } diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index ebe0bcfd8df..eeb05e8926c 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -46,7 +46,7 @@ $toselect = GETPOST('toselect', 'array'); // Security check $expeditionid = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expedition', $expeditionid, ''); $search_ref_exp = GETPOST("search_ref_exp", 'alpha'); @@ -165,9 +165,9 @@ if (empty($reshook)) { $objectclass = 'Expedition'; $objectlabel = 'Sendings'; - $permtoread = $user->rights->expedition->lire; - $permtocreate = $user->rights->expedition->creer; - $permtodelete = $user->rights->expedition->supprimer; + $permissiontoread = $user->rights->expedition->lire; + $permissiontoadd = $user->rights->expedition->creer; + $permissiontodelete = $user->rights->expedition->supprimer; $uploaddir = $conf->expedition->dir_output . '/sending'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -192,7 +192,9 @@ $sql.= " typent.code as typent_code,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= ' e.date_creation as date_creation, e.tms as date_update'; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index c77bfc98efd..1ae26471eb8 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -41,7 +41,7 @@ $action=GETPOST('action', 'alpha'); // Security check $socid=''; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, $origin, $origin_id); $object = new Expedition($db); @@ -90,7 +90,6 @@ $form = new Form($db); if ($id > 0 || ! empty($ref)) { - $head=shipping_prepare_head($object); dol_fiche_head($head, 'note', $langs->trans("Shipment"), -1, 'sending'); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 34a89233f1e..2bd6e67b595 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -42,7 +42,7 @@ if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propa if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; // Load translation files required by the page -$langs->loadLangs(array('orders',"companies","bills",'propal','deliveries','stocks',"productbatch",'incoterm')); +$langs->loadLangs(array('orders',"companies","bills",'propal','deliveries','stocks',"productbatch",'incoterm','other')); $id = GETPOST('id', 'int'); // id of order $ref = GETPOST('ref', 'alpha'); @@ -53,7 +53,7 @@ $hookmanager->initHooks(array('ordershipmentcard')); // Security check $socid=0; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result=restrictedArea($user, 'commande', $id); $object = new Commande($db); @@ -288,19 +288,20 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->commande->creer) { - if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); @@ -618,7 +619,9 @@ if ($id > 0 || ! empty($ref)) $sql.= ' cd.date_start,'; $sql.= ' cd.date_end,'; $sql.= ' cd.special_code,'; - $sql.= ' p.rowid as prodid, p.label as product_label, p.entity, p.ref, p.fk_product_type as product_type, p.description as product_desc'; + $sql.= ' p.rowid as prodid, p.label as product_label, p.entity, p.ref, p.fk_product_type as product_type, p.description as product_desc,'; + $sql.= ' p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units,'; + $sql.= ' p.surface, p.surface_units, p.volume, p.volume_units'; $sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; $sql.= " WHERE cd.fk_commande = ".$object->id; @@ -705,6 +708,20 @@ if ($id > 0 || ! empty($ref)) $product_static->id=$objp->fk_product; $product_static->ref=$objp->ref; $product_static->entity = $objp->entity; + + $product_static->weight=$objp->weight; + $product_static->weight_units=$objp->weight_units; + $product_static->length=$objp->length; + $product_static->length_units=$objp->length_units; + $product_static->width=$objp->width; + $product_static->width_units=$objp->width_units; + $product_static->height=$objp->height; + $product_static->height_units=$objp->height_units; + $product_static->surface=$objp->surface; + $product_static->surface_units=$objp->surface_units; + $product_static->volume=$objp->volume; + $product_static->volume_units=$objp->volume_units; + $text=$product_static->getNomUrl(1); $text.= ' - '.$label; $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description)).'
'; @@ -839,7 +856,7 @@ if ($id > 0 || ! empty($ref)) * Boutons Actions */ - if (empty($user->societe_id)) + if (empty($user->socid)) { print '
'; @@ -884,7 +901,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; - //print ''; + //print '
'; $langs->load("stocks"); diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index b6c3f7355a9..ebede918552 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -34,10 +34,10 @@ $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); $userid=GETPOST('userid', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $nowyear=strftime("%Y", dol_now()); @@ -71,7 +71,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/shipmentsnbinyear-'.$user->id.'-'.$year.'.png'; } @@ -111,7 +111,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/shipmentsamountinyear-'.$user->id.'-'.$year.'.png'; } @@ -149,7 +149,7 @@ if (! $mesg) /* $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/shipmentsaverage-'.$user->id.'-'.$year.'.png'; } @@ -218,7 +218,7 @@ print '
'; print '
'; print ''; - print '
'; + print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -243,7 +243,7 @@ print '
'; print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -289,7 +289,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").'
'; } @@ -574,12 +579,12 @@ if ($resql) } if (! empty($arrayfields['d.total_vat']['checked'])) { - print ''; + print ''; } // Amount with all taxes if (! empty($arrayfields['d.total_ttc']['checked'])) { - print ''; + print ''; } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -733,24 +738,24 @@ if ($resql) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; - $totalarray['totalht'] += $obj->total_ht; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='d.total_ht'; + $totalarray['val']['d.total_ht'] += $obj->total_ht; } // Amount VAT if (! empty($arrayfields['d.total_vat']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; - $totalarray['totalvat'] += $obj->total_tva; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='d.total_tva'; + $totalarray['val']['d.total_tva'] += $obj->total_tva; } // Amount TTC if (! empty($arrayfields['d.total_ttc']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; - $totalarray['totalttc'] += $obj->total_ttc; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='d.total_ttc'; + $totalarray['val']['d.total_ttc'] += $obj->total_ttc; } // Extra fields @@ -810,25 +815,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield'])) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index b29e24d4374..a5038b32b0e 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -39,7 +39,7 @@ $action=GETPOST('action', 'alpha'); // Security check $socid=0; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'expensereport', $id, 'expensereport'); diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index e168c1aa5b8..830349dbdcd 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -36,7 +36,7 @@ $action=GETPOST('action', 'aZ09'); $confirm=GETPOST('confirm'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; // TODO Add rule to restrict access payment //$result = restrictedArea($user, 'facture', $id,''); @@ -162,8 +162,8 @@ print ''; -// Note -print ''; +// Note public +print ''; $disable_delete = 0; // Bank account @@ -225,7 +225,7 @@ if ($resql) print '
'; print '
'; - print '
'; +print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); @@ -310,7 +310,7 @@ dol_fiche_end(); // TODO USe code similar to commande/stats/index.php instead of this one. /* -print ''; +print '
'; print ''; print ''; diff --git a/htdocs/expedition/stats/month.php b/htdocs/expedition/stats/month.php index 97e11b7f38c..c0f3b1b3030 100644 --- a/htdocs/expedition/stats/month.php +++ b/htdocs/expedition/stats/month.php @@ -64,7 +64,7 @@ if (! $mesg) { $px->draw($filename, $fileurl); } -print '
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").'
'; +print '
'; print ''; print ' + if ($user->rights->expedition->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> - 1) { ?> @@ -81,6 +80,5 @@ if (count($linkedObjectBlock) > 1) { - +print "\n"; diff --git a/htdocs/expensereport/ajax/ajaxprojet.php b/htdocs/expensereport/ajax/ajaxprojet.php index e3872577473..77b6968a38a 100644 --- a/htdocs/expensereport/ajax/ajaxprojet.php +++ b/htdocs/expensereport/ajax/ajaxprojet.php @@ -69,8 +69,8 @@ if (GETPOST('fk_projet') != '') { $label=$row['ref'].' - '.$row['title']; $row_array['label'] = $label; - $row_array['value'] = $label; - $row_array['key'] = $row['rowid']; + $row_array['value'] = $label; + $row_array['key'] = $row['rowid']; array_push($return_arr, $row_array); } diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 95b9e0cd1f5..258f87d2d9f 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -57,7 +57,7 @@ $confirm = GETPOST('confirm', 'alpha'); $date_start = dol_mktime(0, 0, 0, GETPOST('date_debutmonth', 'int'), GETPOST('date_debutday', 'int'), GETPOST('date_debutyear', 'int')); $date_end = dol_mktime(0, 0, 0, GETPOST('date_finmonth', 'int'), GETPOST('date_finday', 'int'), GETPOST('date_finyear', 'int')); $date = dol_mktime(0, 0, 0, GETPOST('datemonth', 'int'), GETPOST('dateday', 'int'), GETPOST('dateyear', 'int')); -$fk_projet=GETPOST('fk_projet', 'int'); +$fk_project=GETPOST('fk_project', 'int'); $vatrate=GETPOST('vatrate', 'alpha'); $ref=GETPOST("ref", 'alpha'); $comments=GETPOST('comments', 'none'); @@ -68,7 +68,7 @@ $childids = $user->getAllChildIds(1); // Security check $id=GETPOST("id", 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); @@ -107,7 +107,7 @@ $hookmanager->initHooks(array('expensereportcard','globalcard')); $permissionnote = $user->rights->expensereport->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php -$permissionedit = $user->rights->expensereport->creer; // Used by the include of actions_lineupdown.inc.php +$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref); @@ -145,7 +145,7 @@ if (empty($reshook)) } $action=''; - $fk_projet=''; + $fk_project=''; $date_start=''; $date_end=''; $date=''; @@ -1232,7 +1232,7 @@ if (empty($reshook)) $type = 0; // TODO What if service ? We should take the type product/service from the type of expense report llx_c_type_fees // Insert line - $result = $object->addline($qty, $value_unit, $fk_c_type_fees, $vatrate, $date, $comments, $fk_projet, $fk_c_exp_tax_cat, $type, $fk_ecm_files); + $result = $object->addline($qty, $value_unit, $fk_c_type_fees, $vatrate, $date, $comments, $fk_project, $fk_c_exp_tax_cat, $type, $fk_ecm_files); if ($result > 0) { $ret = $object->fetch($object->id); // Reload to get new records @@ -1257,7 +1257,7 @@ if (empty($reshook)) unset($vatrate); unset($comments); unset($fk_c_type_fees); - unset($fk_projet); + unset($fk_project); unset($date); } else { @@ -1334,7 +1334,7 @@ if (empty($reshook)) $rowid = $_POST['rowid']; $type_fees_id = GETPOST('fk_c_type_fees', 'int'); $fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat', 'int'); - $projet_id = $fk_projet; + $projet_id = $fk_project; $comments = GETPOST('comments', 'none'); $qty = GETPOST('qty', 'int'); $vatrate = GETPOST('vatrate', 'alpha'); @@ -1418,7 +1418,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->expensereport->dir_output; - $permissioncreate = $user->rights->expensereport->creer; + $permissiontoadd = $user->rights->expensereport->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -1450,7 +1450,7 @@ if ($action == 'create') dol_fiche_head(''); - print '
'.$langs->trans("NbOfSendingsByMonth").''; print $px->show(); diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index a632584a510..8e27db03b45 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -23,11 +23,9 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - +print "\n"; -load("sendings"); -$total=0; $ilink=0; +$total=0; +$ilink=0; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> + ?>
trans("Shipment"); ?> getNomUrl(1); ?> date_delivery, 'day'); ?> rights->expedition->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> getLibStatut(3); ?> $objectlink) } ?>
'; + print '
'; print ''; // Date start @@ -1506,7 +1506,7 @@ if ($action == 'create') print ''; print ''; print ''; print ''; } @@ -1521,7 +1521,7 @@ if ($action == 'create') print ''; // Private note - if (empty($user->societe_id)) { + if (empty($user->socid)) { print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; } @@ -2108,7 +2108,7 @@ else print ''; print '
'; - print '
'.$langs->trans("ModePaiement").''; - $form->select_types_paiements(2, 'fk_c_paiement'); + $form->select_types_paiements('', 'fk_c_paiement'); print '
' . $langs->trans('NotePrivate') . ''; @@ -1832,7 +1832,7 @@ else { print '
'.$langs->trans("ModePaiement").''.$object->libelle_paiement.''.$object->fk_c_paiement.'
'; + print '
'; if (!empty($object->lines)) { @@ -2372,7 +2372,7 @@ else if (! empty($conf->projet->enabled)) { print ''; } @@ -2527,7 +2527,7 @@ else if (! empty($conf->projet->enabled)) { print ''; } diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 5994425ff41..91c69b0f3b3 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -46,6 +46,10 @@ class ExpenseReport extends CommonObject public $table_element_line = 'expensereport_det'; public $fk_element = 'fk_expensereport'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'trip'; public $lines=array(); @@ -101,9 +105,6 @@ class ExpenseReport extends CommonObject // Paiement public $user_paid_infos; - /* - END ACTIONS - */ /** * Draft status @@ -136,6 +137,51 @@ class ExpenseReport extends CommonObject const STATUS_CLOSED = 6; + public $fields=array( + 'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), + 'ref' =>array('type'=>'varchar(50)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>15), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>20), + 'ref_number_int' =>array('type'=>'integer', 'label'=>'Ref number int', 'enabled'=>1, 'visible'=>-1, 'position'=>25), + 'ref_ext' =>array('type'=>'integer', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>-1, 'position'=>30), + 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'Total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>35), + 'total_tva' =>array('type'=>'double(24,8)', 'label'=>'Total tva', 'enabled'=>1, 'visible'=>-1, 'position'=>40), + 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>45), + 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>50), + 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>55), + 'date_debut' =>array('type'=>'date', 'label'=>'Date debut', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>60), + 'date_fin' =>array('type'=>'date', 'label'=>'Date fin', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>65), + 'date_valid' =>array('type'=>'datetime', 'label'=>'Date valid', 'enabled'=>1, 'visible'=>-1, 'position'=>75), + 'date_approve' =>array('type'=>'datetime', 'label'=>'Date approve', 'enabled'=>1, 'visible'=>-1, 'position'=>80), + 'date_refuse' =>array('type'=>'datetime', 'label'=>'Date refuse', 'enabled'=>1, 'visible'=>-1, 'position'=>85), + 'date_cancel' =>array('type'=>'datetime', 'label'=>'Date cancel', 'enabled'=>1, 'visible'=>-1, 'position'=>90), + 'fk_user_author' =>array('type'=>'integer', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>100), + 'fk_user_modif' =>array('type'=>'integer', 'label'=>'Fk user modif', 'enabled'=>1, 'visible'=>-1, 'position'=>105), + 'fk_user_valid' =>array('type'=>'integer', 'label'=>'Fk user valid', 'enabled'=>1, 'visible'=>-1, 'position'=>110), + 'fk_user_validator' =>array('type'=>'integer', 'label'=>'Fk user validator', 'enabled'=>1, 'visible'=>-1, 'position'=>115), + 'fk_user_approve' =>array('type'=>'integer', 'label'=>'Fk user approve', 'enabled'=>1, 'visible'=>-1, 'position'=>120), + 'fk_user_refuse' =>array('type'=>'integer', 'label'=>'Fk user refuse', 'enabled'=>1, 'visible'=>-1, 'position'=>125), + 'fk_user_cancel' =>array('type'=>'integer', 'label'=>'Fk user cancel', 'enabled'=>1, 'visible'=>-1, 'position'=>130), + 'fk_c_paiement' =>array('type'=>'integer', 'label'=>'Fk c paiement', 'enabled'=>1, 'visible'=>-1, 'position'=>140), + 'paid' =>array('type'=>'integer', 'label'=>'Paid', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>145), + 'note_public' =>array('type'=>'text', 'label'=>'Note public', 'enabled'=>1, 'visible'=>0, 'position'=>150), + 'note_private' =>array('type'=>'text', 'label'=>'Note private', 'enabled'=>1, 'visible'=>0, 'position'=>155), + 'detail_refuse' =>array('type'=>'varchar(255)', 'label'=>'Detail refuse', 'enabled'=>1, 'visible'=>-1, 'position'=>160), + 'detail_cancel' =>array('type'=>'varchar(255)', 'label'=>'Detail cancel', 'enabled'=>1, 'visible'=>-1, 'position'=>165), + 'integration_compta' =>array('type'=>'integer', 'label'=>'Integration compta', 'enabled'=>1, 'visible'=>-1, 'position'=>170), + 'fk_bank_account' =>array('type'=>'integer', 'label'=>'Fk bank account', 'enabled'=>1, 'visible'=>-1, 'position'=>175), + 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>185), + 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>190), + 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency tx', 'enabled'=>1, 'visible'=>-1, 'position'=>195), + 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>200), + 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total tva', 'enabled'=>1, 'visible'=>-1, 'position'=>205), + 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>210), + 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>220), + 'date_create' =>array('type'=>'datetime', 'label'=>'Date create', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>300), + 'tms' =>array('type'=>'timestamp', 'label'=>'Tms', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>305), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportKey', 'enabled'=>1, 'visible'=>-1, 'position'=>1000), + 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>1010), + 'fk_statut' =>array('type'=>'integer', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500), + ); /** * Constructor @@ -153,7 +199,7 @@ class ExpenseReport extends CommonObject // List of language codes for status $this->statuts_short = array(0 => 'Draft', 2 => 'Validated', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused'); $this->statuts = array(0 => 'Draft', 2 => 'ValidatedWaitingApproval', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused'); - $this->statuts_logo = array(0 => 'statut0', 2 => 'statut1', 4 => 'statut5', 5 => 'statut3', 6 => 'statut6', 99 => 'statut5'); + $this->statuts_logo = array(0 => 'status0', 2 => 'status1', 4 => 'status6', 5 => 'status4', 6 => 'status6', 99 => 'status5'); } /** @@ -266,7 +312,6 @@ class ExpenseReport extends CommonObject $result=$this->update_price(); if ($result > 0) { - if (!$notrigger) { // Call trigger @@ -470,7 +515,7 @@ class ExpenseReport extends CommonObject $sql.= " d.fk_user_author, d.fk_user_modif, d.fk_user_validator,"; $sql.= " d.fk_user_valid, d.fk_user_approve,"; $sql.= " d.fk_statut as status, d.fk_c_paiement, d.paid,"; - $sql.= " dp.libelle as libelle_paiement, dp.code as code_paiement"; // INNER JOIN paiement + $sql.= " dp.libelle as label_payment, dp.code as code_paiement"; // INNER JOIN paiement $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as dp ON d.fk_c_paiement = dp.id"; if ($ref) $sql.= " WHERE d.ref = '".$this->db->escape($ref)."'"; @@ -526,15 +571,13 @@ class ExpenseReport extends CommonObject $this->fk_c_paiement = $obj->fk_c_paiement; $this->paid = $obj->paid; - if ($this->fk_statut==5 || $this->fk_statut==6) + if ($this->fk_statut == self::STATUS_APPROVED || $this->fk_statut == self::STATUS_CLOSED) { $user_valid = new User($this->db); if ($this->fk_user_valid > 0) $user_valid->fetch($this->fk_user_valid); $this->user_valid_infos = dolGetFirstLastname($user_valid->firstname, $user_valid->lastname); } - $this->libelle_statut = $obj->libelle_statut; - $this->libelle_paiement = $obj->libelle_paiement; $this->code_statut = $obj->code_statut; $this->code_paiement = $obj->code_paiement; @@ -639,29 +682,15 @@ class ExpenseReport extends CommonObject */ public function LibStatut($status, $mode = 0) { - // phpcs:enable - global $langs; + // phpcs:enable + global $langs; - if ($mode == 0) - return $langs->transnoentities($this->statuts[$status]); + $labelStatus = $langs->trans($this->statuts[$status]); + $labelStatusShort = $langs->trans($this->statuts_short[$status]); - elseif ($mode == 1) - return $langs->transnoentities($this->statuts_short[$status]); + $statusType = $this->statuts_logo[$status]; - elseif ($mode == 2) - return img_picto($langs->transnoentities($this->statuts_short[$status]), $this->statuts_logo[$status]).' '.$langs->transnoentities($this->statuts_short[$status]); - - elseif ($mode == 3) - return img_picto($langs->transnoentities($this->statuts_short[$status]), $this->statuts_logo[$status]); - - elseif ($mode == 4) - return img_picto($langs->transnoentities($this->statuts_short[$status]), $this->statuts_logo[$status]).' '.$langs->transnoentities($this->statuts[$status]); - - elseif ($mode == 5) - return ''.$langs->transnoentities($this->statuts_short[$status]).' '.img_picto($langs->transnoentities($this->statuts_short[$status]), $this->statuts_logo[$status]); - - elseif ($mode == 6) - return $langs->transnoentities($this->statuts[$status]).' '.img_picto($langs->transnoentities($this->statuts_short[$status]), $this->statuts_logo[$status]); + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } @@ -819,7 +848,6 @@ class ExpenseReport extends CommonObject $langs->load('trips'); if ($user->rights->expensereport->lire) { - $sql = "SELECT de.fk_expensereport, de.date, de.comments, de.total_ht, de.total_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport_det as de"; $sql.= " WHERE de.fk_projet = ".$projectid; @@ -835,7 +863,6 @@ class ExpenseReport extends CommonObject while ($i < $num) { - $objp = $db->fetch_object($result); $sql2 = "SELECT d.rowid, d.fk_user_author, d.ref, d.fk_statut"; @@ -930,10 +957,10 @@ class ExpenseReport extends CommonObject $num = $this->db->num_rows($result); $i = 0; while ($i < $num): - $objp = $this->db->fetch_object($result); - $total_ht+=$objp->total_ht; - $total_tva+=$objp->total_tva; - $i++; + $objp = $this->db->fetch_object($result); + $total_ht+=$objp->total_ht; + $total_tva+=$objp->total_tva; + $i++; endwhile; $total_ttc = $total_ht + $total_tva; @@ -943,13 +970,13 @@ class ExpenseReport extends CommonObject $sql.= " , total_tva = ".$total_tva; $sql.= " WHERE rowid = ".$id; $result = $this->db->query($sql); - if($result): - $this->db->free($result); - return 1; + if ($result): + $this->db->free($result); + return 1; else: - $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR); - return -3; + $this->error=$this->db->lasterror(); + dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR); + return -3; endif; } else @@ -1234,10 +1261,10 @@ class ExpenseReport extends CommonObject $this->date_debut = $this->db->jdate($objp->date_debut); - if ($this->fk_statut != 2) + if ($this->fk_statut != self::STATUS_VALIDATED) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql.= " SET fk_statut = 2"; + $sql.= " SET fk_statut = ".self::STATUS_VALIDATED; $sql.= ' WHERE rowid = '.$this->id; dol_syslog(get_class($this)."::set_save_from_refuse sql=".$sql, LOG_DEBUG); @@ -1272,11 +1299,12 @@ class ExpenseReport extends CommonObject // date approval $this->date_approve = $now; - if ($this->fk_statut != 5) { - $this->db->begin(); + if ($this->fk_statut != self::STATUS_APPROVED) + { + $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql.= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = 5, fk_user_approve = ".$fuser->id.","; + $sql.= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = ".self::STATUS_APPROVED.", fk_user_approve = ".$fuser->id.","; $sql.= " date_approve='".$this->db->idate($this->date_approve)."'"; $sql.= ' WHERE rowid = '.$this->id; if ($this->db->query($sql)) @@ -1333,10 +1361,10 @@ class ExpenseReport extends CommonObject $error = 0; // date de refus - if ($this->fk_statut != 99) + if ($this->fk_statut != self::STATUS_REFUSED) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql.= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = 99, fk_user_refuse = ".$fuser->id.","; + $sql.= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = ".self::STATUS_REFUSED.", fk_user_refuse = ".$fuser->id.","; $sql.= " date_refuse='".$this->db->idate($now)."',"; $sql.= " detail_refuse='".$this->db->escape($details)."',"; $sql.= " fk_user_approve = NULL"; @@ -1402,7 +1430,7 @@ class ExpenseReport extends CommonObject $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql.= " SET paid = 0"; + $sql.= " SET paid = 0, fk_statut = ".self::STATUS_APPROVED; $sql.= ' WHERE rowid = '.$this->id; dol_syslog(get_class($this)."::set_unpaid sql=".$sql, LOG_DEBUG); @@ -1459,12 +1487,12 @@ class ExpenseReport extends CommonObject // phpcs:enable $error = 0; $this->date_cancel = $this->db->idate(gmmktime()); - if ($this->fk_statut != ExpenseReport::STATUS_CANCELED) + if ($this->fk_statut != self::STATUS_CANCELED) { $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql.= " SET fk_statut = ".ExpenseReport::STATUS_CANCELED.", fk_user_cancel = ".$fuser->id; + $sql.= " SET fk_statut = ".self::STATUS_CANCELED.", fk_user_cancel = ".$fuser->id; $sql.= ", date_cancel='".$this->db->idate($this->date_cancel)."'"; $sql.= " ,detail_cancel='".$this->db->escape($detail)."'"; $sql.= ' WHERE rowid = '.$this->id; @@ -1653,10 +1681,10 @@ class ExpenseReport extends CommonObject $result = $this->db->query($sql); if ($result): - return 1; + return 1; else: - $this->error=$this->db->error(); - return -1; + $this->error=$this->db->error(); + return -1; endif; } @@ -1683,10 +1711,10 @@ class ExpenseReport extends CommonObject $result = $this->db->query($sql); if ($result): - return 1; + return 1; else: - $this->error=$this->db->error(); - return -1; + $this->error=$this->db->error(); + return -1; endif; } @@ -2214,7 +2242,6 @@ class ExpenseReport extends CommonObject $langs->load("trips"); if (! dol_strlen($modele)) { - $modele = 'standard'; if ($this->modelpdf) { @@ -2309,7 +2336,7 @@ class ExpenseReport extends CommonObject // phpcs:enable global $conf, $langs; - if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe + if ($user->socid) return -1; // protection pour eviter appel par utilisateur externe $now=dol_now(); @@ -2331,10 +2358,10 @@ class ExpenseReport extends CommonObject $response = new WorkboardResponse(); if ($option == 'toapprove') { - $response->warning_delay=$conf->expensereport->approve->warning_delay/60/60/24; - $response->label=$langs->trans("ExpenseReportsToApprove"); - $response->labelShort=$langs->trans("ToApprove"); - $response->url=DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&statut=2'; + $response->warning_delay=$conf->expensereport->approve->warning_delay/60/60/24; + $response->label=$langs->trans("ExpenseReportsToApprove"); + $response->labelShort=$langs->trans("ToApprove"); + $response->url=DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&statut=2'; } else { diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 5c72dd18528..156bd329d49 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -25,8 +25,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -/** \class PaymentExpenseReport - * \brief Class to manage payments of expense report +/** + * Class to manage payments of expense report */ class PaymentExpenseReport extends CommonObject { @@ -83,9 +83,9 @@ class PaymentExpenseReport extends CommonObject */ public $fk_user_modif; - //Unknow field - public $chid; - public $total; + public $type_code; + public $type_label; + /** * Constructor @@ -124,10 +124,10 @@ class PaymentExpenseReport extends CommonObject if (isset($this->fk_typepayment)) $this->fk_typepayment=trim($this->fk_typepayment); if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment); if (isset($this->note)) $this->note=trim($this->note); + if (isset($this->note_public)) $this->note_public=trim($this->note_public); if (isset($this->fk_bank)) $this->fk_bank=trim($this->fk_bank); if (isset($this->fk_user_creat)) $this->fk_user_creat=trim($this->fk_user_creat); if (isset($this->fk_user_modif)) $this->fk_user_modif=trim($this->fk_user_modif); - if (! empty($this->fk_expensereport)) $this->chid = $this->fk_expensereport; $totalamount = 0; foreach ($this->amounts as $key => $value) // How payment is dispatch @@ -148,10 +148,10 @@ class PaymentExpenseReport extends CommonObject { $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_expensereport (fk_expensereport, datec, datep, amount,"; $sql.= " fk_typepayment, num_payment, note, fk_user_creat, fk_bank)"; - $sql.= " VALUES ($this->chid, '".$this->db->idate($now)."',"; + $sql.= " VALUES ($this->fk_expensereport, '".$this->db->idate($now)."',"; $sql.= " '".$this->db->idate($this->datepaid)."',"; $sql.= " ".$totalamount.","; - $sql.= " ".$this->fk_typepayment.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note)."', ".$user->id.","; + $sql.= " ".$this->fk_typepayment.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note_public)."', ".$user->id.","; $sql.= " 0)"; dol_syslog(get_class($this)."::create", LOG_DEBUG); @@ -188,7 +188,6 @@ class PaymentExpenseReport extends CommonObject */ public function fetch($id) { - global $langs; $sql = "SELECT"; $sql.= " t.rowid,"; $sql.= " t.fk_expensereport,"; @@ -198,11 +197,11 @@ class PaymentExpenseReport extends CommonObject $sql.= " t.amount,"; $sql.= " t.fk_typepayment,"; $sql.= " t.num_payment,"; - $sql.= " t.note,"; + $sql.= " t.note as note_public,"; $sql.= " t.fk_bank,"; $sql.= " t.fk_user_creat,"; $sql.= " t.fk_user_modif,"; - $sql.= " pt.code as type_code, pt.libelle as type_libelle,"; + $sql.= " pt.code as type_code, pt.libelle as type_label,"; $sql.= ' b.fk_account'; $sql.= " FROM ".MAIN_DB_PREFIX."payment_expensereport as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepayment = pt.id"; @@ -227,13 +226,13 @@ class PaymentExpenseReport extends CommonObject $this->amount = $obj->amount; $this->fk_typepayment = $obj->fk_typepayment; $this->num_payment = $obj->num_payment; - $this->note = $obj->note; + $this->note_public = $obj->note_public; $this->fk_bank = $obj->fk_bank; $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_modif = $obj->fk_user_modif; $this->type_code = $obj->type_code; - $this->type_libelle = $obj->type_libelle; + $this->type_label = $obj->type_label; $this->bank_account = $obj->fk_account; $this->bank_line = $obj->fk_bank; @@ -476,11 +475,11 @@ class PaymentExpenseReport extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -540,8 +539,7 @@ class PaymentExpenseReport extends CommonObject $acc->fetch($accountid); //Fix me field - $this->total = $this->amount; - $total = $this->total; + $total = $this->amount; if ($mode == 'payment_expensereport') $amount=$total; @@ -665,7 +663,7 @@ class PaymentExpenseReport extends CommonObject $result=''; - if (empty($this->ref)) $this->ref=$this->lib; + if (empty($this->ref)) $this->ref=$this->label; $label = $langs->trans("ShowPayment").': '.$this->ref; if (!empty($this->id)) diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index 6a8bd90f95f..1bf2c0db8da 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -43,7 +43,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); diff --git a/htdocs/expensereport/export_csv.php b/htdocs/expensereport/export_csv.php deleted file mode 100644 index 536f21ee4e4..00000000000 --- a/htdocs/expensereport/export_csv.php +++ /dev/null @@ -1,197 +0,0 @@ - - * Copyright (C) 2018 Frédéric France - * - * 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 . - */ - -/** - * \file htdocs/expensereport/index.php - * \ingroup expensereport - * \brief Page list of expenses - */ - -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; - -// Load translation files required by the page -$langs->loadlangs(array('users', 'trips')); - -if(!$user->rights->expensereport->export_csv) { - accessforbidden(); - exit(); -} - -// Security check -$socid = $_GET["socid"]?$_GET["socid"]:''; -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'expensereport', '', ''); - -$req = "SELECT * FROM ".MAIN_DB_PREFIX."rights_def WHERE id = '178'"; -$result = $db->query($req); -$num = $db->num_rows($result); - -if($num < 1) { - - $insert = "INSERT INTO ".MAIN_DB_PREFIX."rights_def ("; - $insert.= "`id` ,"; - $insert.= "`libelle` ,"; - $insert.= "`module` ,"; - $insert.= "`entity` ,"; - $insert.= "`perms` ,"; - $insert.= "`subperms` ,"; - $insert.= "`type` ,"; - $insert.= "`bydefault`"; - $insert.= ")"; - $insert.= "VALUES ("; - $insert.= "'178', 'Exporter les notes de frais au format CSV', 'expensereport', '1', 'export_csv', NULL , 'r', '0'"; - $insert.= ")"; - - $req = $db->query($insert); -} - - -/* - * View - */ - -llxHeader(); - -print load_fiche_titre($langs->trans("ExportTripCSV")); - -print '
'; - -print ''; -print ''; -print '

Choisir le mois à exporter : '; - -$year = date('Y', time()); -$month = date('m', time()); - -print ' '; - -print ' '; - -print ''; -print '

'; -print ''."\n"; - -// Si c'est une action -if (isset($_POST['action'])) -{ - if($_POST['action'] == 'export') - { - $dateselected = $_POST['annee'].'-'.$_POST['mois']; - - //var_dump($conf->expensereport->dir_output.'/export/'); - if (!file_exists($conf->expensereport->dir_output.'/export/')) - { - dol_mkdir($conf->expensereport->dir_output.'/export/'); - } - - $dir = $conf->expensereport->dir_output.'/export/expensereport-'.$dateselected.'.csv'; - $outputlangs = $langs; - $outputlangs->charset_output = 'UTF-8'; - - $sql = "SELECT d.rowid, d.ref, d.total_ht, d.total_tva, d.total_ttc"; - $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d"; - $sql.= ' AND d.entity IN ('.getEntity('expensereport').')'; - $sql.= " ORDER BY d.rowid"; - - $result = $db->query($sql); - $num = $db->num_rows($result); - if ($num) - { - $open = fopen($dir, "w+"); - - $ligne = "ID, Référence, ----, Date paiement, Montant HT, TVA, Montant TTC\n"; - for ($i = 0; $i < $num; $i++) - { - $ligne.= "----, ----, ----, ----, ----, ----, ----\n"; - $objet = $db->fetch_object($result); - $objet->total_ht = number_format($objet->total_ht, 2); - $objet->total_tva = number_format($objet->total_tva, 2); - $objet->total_ttc = number_format($objet->total_ttc, 2); - $objet->ref = trim($objet->ref); - $ligne.= "{$objet->rowid}, {$objet->ref}, ----, {$objet->total_ht}, {$objet->total_tva}, {$objet->total_ttc}\n"; - - $ligne.= "--->, Ligne, Type, Description, ----, ----, ----\n"; - - - $sql2 = "SELECT de.rowid, t.label as libelle, de.comments, de.total_ht, de.total_tva, de.total_ttc"; - $sql2.= " FROM ".MAIN_DB_PREFIX."expensereport_det as de,"; - $sql2.= " ".MAIN_DB_PREFIX."c_type_fees as t"; - $sql2.= " WHERE de.fk_c_type_fees = t.id"; - $sql2.= " AND de.fk_expensereport = '".$objet->rowid."'"; - $sql2.= " ORDER BY de.date"; - - $result2 = $db->query($sql2); - $num2 = $db->num_rows($result2); - - if($num2) { - for ($a = 0; $a < $num2; $a++) - { - $objet2 = $db->fetch_object($result2); - $objet2->total_ht = number_format($objet2->total_ht, 2); - $objet2->total_tva = number_format($objet2->total_tva, 2); - $objet2->total_ttc = number_format($objet2->total_ttc, 2); - $objet2->comments = str_replace(',', ';', $objet2->comments); - $objet2->comments = str_replace("\r\n", ' ', $objet2->comments); - $objet2->comments = str_replace("\n", ' ', $objet2->comments); - - $ligne.= "--->, {$objet2->rowid}, {$objet2->libelle}, {$objet2->comments}, {$objet2->total_ht}, {$objet2->total_tva}, {$objet2->total_ttc}\n"; - } - } - } - - $ligne = $outputlangs->convToOutputCharset($ligne); - - fwrite($open, $ligne); - fclose($open); - - print 'Télécharger le fichier expensereport-'.$dateselected.'.csv'; - } else { - - print ''.$langs->trans('NoTripsToExportCSV').''; - } - } -} - -print '
'; - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index cecbae9757a..2acae4fb03c 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -3,8 +3,9 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro - * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2019 Frédéric FRANCE * * 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 @@ -41,7 +42,7 @@ $langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expensereport', '', ''); $sortfield = GETPOST("sortfield", 'alpha'); @@ -114,8 +115,8 @@ print load_fiche_titre($langs->trans("ExpensesArea")); print '
'; - -print '
'; - $formproject->select_projects(-1, $line->fk_project, 'fk_projet', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth300'); + $formproject->select_projects(-1, $line->fk_project, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth300'); print ''; - $formproject->select_projects(-1, $fk_projet, 'fk_projet', 0, 0, 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300'); + $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300'); print '
'; +print '
'; +print '
'; print ''; print ''; print "\n"; @@ -133,6 +134,8 @@ if ($conf->use_javascript_ajax) include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $dolgraph = new DolGraph(); $dolgraph->SetData($dataseries); + $dolgraph->setHeight(350); + $dolgraph->combine = empty($conf->global->MAIN_EXPENSEREPORT_COMBINE_GRAPH_STAT)?0.05:$conf->global->MAIN_EXPENSEREPORT_COMBINE_GRAPH_STAT; $dolgraph->setShowLegend(1); $dolgraph->setShowPercent(1); $dolgraph->SetType(array('pie')); @@ -149,6 +152,7 @@ print ''; print '
'.$langs->trans("Statistics").'
'.price($totalsum, 1, $langs, 0, 0, 0, $con print '
'; +print ''; @@ -160,9 +164,10 @@ $max=10; $langs->load("boxes"); -$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as fk_status"; +$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, u.email, u.admin"; +$sql.= ", d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as fk_status"; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d, ".MAIN_DB_PREFIX."user as u"; -if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE u.rowid = d.fk_user_author"; // RESTRICT RIGHTS if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous) @@ -173,7 +178,7 @@ if (empty($user->rights->expensereport->readall) && empty($user->rights->expense $sql.= " AND d.fk_user_author IN (".join(',', $childids).")\n"; } $sql.= ' AND d.entity IN ('.getEntity('expensereport').')'; -if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_user_author = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; +if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND d.fk_user_author = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND d.fk_user_author = ".$socid; $sql.= $db->order($sortfield, $sortorder); $sql.= $db->plimit($max, 0); @@ -186,7 +191,8 @@ if ($result) $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; print ''; @@ -206,6 +212,8 @@ if ($result) $expensereportstatic->id=$obj->rowid; $expensereportstatic->ref=$obj->ref; $userstatic->id=$obj->uid; + $userstatic->admin = $obj->admin; + $userstatic->email = $obj->email; $userstatic->lastname=$obj->lastname; $userstatic->firstname=$obj->firstname; $userstatic->login=$obj->login; @@ -218,7 +226,6 @@ if ($result) print ''; print ''; print ''; print ''; @@ -230,7 +237,7 @@ if ($result) { print ''; } - print '
'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''.$langs->trans("AmountHT").''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->dm), 'day').''; - //print $obj->libelle; print $expensereportstatic->LibStatut($obj->fk_status, 3); print '
'.$langs->trans("None").'

'; + print '

'; } else dol_print_error($db); diff --git a/htdocs/expensereport/info.php b/htdocs/expensereport/info.php index b9605a92eec..715530e9199 100644 --- a/htdocs/expensereport/info.php +++ b/htdocs/expensereport/info.php @@ -33,7 +33,7 @@ $langs->load("trips"); // Security check $id = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index daadfa913ec..91d0efec9cc 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -7,6 +7,7 @@ * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Charlene Benke * Copyright (C) 2019 Juanjo Menent + * Copyright (C) 2019 Frédéric France * * 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 @@ -52,7 +53,7 @@ $childids = $user->getAllChildIds(1); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expensereport', '', ''); $id = GETPOST('id', 'int'); // If we are on the view of a specific user @@ -194,8 +195,8 @@ if (empty($reshook)) // Mass actions $objectclass='ExpenseReport'; $objectlabel='ExpenseReport'; - $permtoread = $user->rights->expensereport->lire; - $permtodelete = $user->rights->expensereport->supprimer; + $permissiontoread = $user->rights->expensereport->lire; + $permissiontodelete = $user->rights->expensereport->supprimer; $uploaddir = $conf->expensereport->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -279,7 +280,9 @@ $sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.tota $sql.= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_valid, d.date_approve, d.note_private, d.note_public,"; $sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.email, u.statut, u.photo"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -534,8 +537,9 @@ if ($resql) if (! empty($arrayfields['d.date_debut']['checked'])) { print '
'; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) - print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print ''; + } print ''; $formother->select_year($year_start, 'year_start', 1, $min_year, $max_year); @@ -545,9 +549,10 @@ if ($resql) if (! empty($arrayfields['d.date_fin']['checked'])) { print ''; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) - print ''; - print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print ''; + } + print ''; $formother->select_year($year_end, 'year_end', 1, $min_year, $max_year); print ''.price($obj->total_ht)."'.price($obj->total_tva)."'.price($obj->total_ttc)."
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).'
'.$langs->trans('Numero').''.$object->num_pa // Amount print '
'.$langs->trans('Amount').''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans('Note').''.nl2br($object->note).'
'.$langs->trans('Note').''.nl2br($object->note_public).'
'; + print '
'; print ''; print ''; @@ -258,7 +258,7 @@ if ($resql) print ''; // Remain to pay - print ''; + print ''; // Status print ''; diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 8d1c568332d..b7a0d4f4c78 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -39,9 +39,9 @@ $accountid=GETPOST('accountid', 'int'); // Security check $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } @@ -113,13 +113,13 @@ if ($action == 'add_payment') // Create a line of payments $payment = new PaymentExpenseReport($db); - $payment->chid = $expensereport->id; + $payment->fk_expensereport = $expensereport->id; $payment->datepaid = $datepaid; $payment->amounts = $amounts; // Tableau de montant $payment->total = $total; - $payment->fk_typepayment = $_POST["fk_typepayment"]; - $payment->num_payment = $_POST["num_payment"]; - $payment->note = $_POST["note"]; + $payment->fk_typepayment = GETPOST("fk_typepayment", 'int'); + $payment->num_payment = GETPOST("num_payment", 'alphanothtml'); + $payment->note_public = GETPOST("note_public", 'none'); if (! $error) { @@ -239,9 +239,11 @@ if ($action == 'create' || empty($action)) print '
'.$langs->trans('ExpenseReport').''.price($objp->amount).''.price($remaintopay).''.price($objp->total_ttc - $objp->amount).''.$expensereport->getLibStatut(4, $objp->amount).'
'; - print '
'; + print '
'; - print '
'; + dol_fiche_end(); + + dol_fiche_head(); print ''."\n"; @@ -274,21 +276,22 @@ if ($action == 'create' || empty($action)) print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("Comments").'
'; - print '
'; + dol_fiche_end(); - dol_fiche_end(); + print '
'; // List of expenses ereport not already paid completely $num = 1; $i = 0; - print ''; + print '
'; print ''; + print ''; print ''; print ''; print ''; @@ -304,6 +307,7 @@ if ($action == 'create' || empty($action)) print ''; + print '"; print '"; print '"; print '"; diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index 670142836cd..de2c6ba3132 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -42,12 +42,12 @@ $socid=GETPOST('socid', 'int'); if ($socid < 0) $socid=0; $id = GETPOST('id', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'expensereport', $id, ''); $nowyear=strftime("%Y", dol_now()); @@ -146,7 +146,7 @@ if (! $mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; @@ -212,7 +212,7 @@ print '
'; // Show filter box print '
'; print ''; -print '
'.$langs->trans("ExpenseReport").''.$langs->trans("Amount").''.$langs->trans("AlreadyPaid").''.$langs->trans("RemainderToPay").'
'.$expensereport->getNomUrl(1)."'.price($objp->total_ttc)."'.price($sumpaid)."'.price($objp->total_ttc - $sumpaid)."
'; +print '
'; print ''; // Company /* @@ -243,7 +243,7 @@ print ''; print '

'; print '
'; -print '
'.$langs->trans("Filter").'
'; +print '
'; print ''; print ''; print ''; @@ -284,7 +284,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("Number").'
'; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totaldurationfield']=$totalarray['nbfield']; - $totalarray['totalduration']+=$obj->duree; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='fd.duree'; + $totalarray['val']['fd.duree'] += $obj->duree; } // Action column print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totaldurationfield'] == $i) print ''; - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index d7ba3a3c178..2982a0ea8c8 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -39,7 +39,7 @@ $ref = GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); @@ -86,20 +86,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->commande->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 326901728da..78f3289d638 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -35,10 +35,10 @@ if (! $user->rights->ficheinter->lire) accessforbidden(); $userid=GETPOST('userid', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $nowyear=strftime("%Y", dol_now()); @@ -77,7 +77,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/interventionsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$user->id.'-'.$year.'.png'; @@ -117,7 +117,7 @@ if (! $mesg) $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/interventionsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$user->id.'-'.$year.'.png'; @@ -156,7 +156,7 @@ if (! $mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/interventionsaverage-'.$user->id.'-'.$year.'.png'; $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$user->id.'-'.$year.'.png'; @@ -226,7 +226,7 @@ print '
'; // Show filter box print '
'; print ''; - print '
'; +print ' > + if ($user->rights->expensereport->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> - - +print "\n"; diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index cd4d70c2518..d6b6a8676ae 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -399,8 +399,7 @@ class Export $szFilterField=''; break; case 'Status': - if (! empty($conf->global->MAIN_ACTIVATE_HTML5)) $szFilterField=''; - else $szFilterField=''; + $szFilterField=''; break; case 'Boolean': $szFilterField='
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php index f207c0617b9..009b1b9ea75 100644 --- a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php @@ -24,38 +24,34 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - +print "\n"; - $objectlink) { - -?> + ?>
trans("ExpenseReport"); ?> getNomUrl(1); ?> date_debut, 'day'); ?> rights->expensereport->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> getLibStatut(3); ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'; + print '
'; print ''; print ''; print ''; @@ -548,7 +552,7 @@ if ($step == 2 && $datatoexport) print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'.$langs->trans("Module").''.$langs->trans("ExportableDatas").'
'; + print '
'; print ''; print ''; print ''; @@ -747,7 +751,7 @@ if ($step == 3 && $datatoexport) print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'.$langs->trans("Entities").''.$langs->trans("ExportableFields").'
'; + print '
'; print ''; print ''; //print ''; @@ -951,7 +955,7 @@ if ($step == 4 && $datatoexport) print '
'.$langs->trans("ChooseFieldsOrdersAndTitle").'
'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'.$langs->trans("Entities").''.$langs->trans("ExportableFields").'
'; + print '
'; print ''; print ''; print ''; @@ -1053,7 +1057,7 @@ if ($step == 4 && $datatoexport) print ''; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'.$langs->trans("Entities").''.$langs->trans("ExportedFields").'
'; + print '
'; print ''; print ''; print ''; @@ -1198,7 +1202,7 @@ if ($step == 5 && $datatoexport) } } } - print ''; + print ''; print ''; } @@ -1208,7 +1212,7 @@ if ($step == 5 && $datatoexport) print '
'; // List of available export formats - $htmltabloflibs = '
'.$langs->trans("ExportModelName").' '.(! empty($list)?$list:$langs->trans("None")).''.(! empty($list)?$list:''.$langs->trans("None").'').'
'; + $htmltabloflibs = '
'; $htmltabloflibs.= ''; $htmltabloflibs.= ''; $htmltabloflibs.= ''; diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 7236a3f45dc..c7e58916be1 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -60,7 +60,7 @@ print '
'; // List of available export formats print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table -print '
'.$langs->trans("AvailableFormats").''.$langs->trans("LibraryUsed").'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 5afe8c79284..c836f4d73be 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -52,7 +52,7 @@ $langs->loadLangs(array("interventions","admin","compta","bills")); // Security check $id=(GETPOST('fichinterid', 'int')?GETPOST('fichinterid', 'int'):GETPOST('id', 'int')); $action=GETPOST('action', 'alpha'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $objecttype = 'fichinter_rec'; if ($action == "create" || $action == "add") $objecttype = ''; $result = restrictedArea($user, 'ficheinter', $id, $objecttype); @@ -158,12 +158,10 @@ if ($action == 'add') { // on récupère les enregistrements $object->fetch($id); - // on transfert les données de l'un vers l'autre if ($object->socid > 0) { $newinter->socid=$object->socid; - $newinter->fk_projet=$object->fk_projet; - $newinter->fk_project=$object->fk_projet; + $newinter->fk_project=$object->fk_project; $newinter->fk_contrat=$object->fk_contrat; } else { $newinter->socid=GETPOST("socid"); @@ -264,7 +262,7 @@ if ($action == 'create') { if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++; if (! empty($conf->contrat->enabled) && $object->fk_contrat > 0) $rowspan++; - print '
'.$langs->trans("AvailableFormats").''.$langs->trans("LibraryShort").'
'; + print '
'; $object->fetch_thirdparty(); @@ -329,7 +327,7 @@ if ($action == 'create') { $title = $langs->trans("Recurrence"); print load_fiche_titre($title, '', 'calendar'); - print '
'; + print '
'; // Frequency print '
'; @@ -383,7 +381,7 @@ if ($action == 'create') { $i = 0; $total = 0; - echo ''; + echo '
'; if ($num) { print ''; print ''; @@ -435,7 +433,7 @@ if ($action == 'create') { dol_fiche_head(''); print ''; - print '
'.$langs->trans("Description").'
'; + print '
'; print ''; @@ -514,7 +512,7 @@ if ($action == 'create') { print '
'; print '
'; - print '
'.$langs->trans("ThirdParty").''; print $form->select_company('', 'socid', '', 1, 1); print '
'; + print '
'; print ""; @@ -571,7 +569,7 @@ if ($action == 'create') { $title = $langs->trans("Recurrence"); print load_fiche_titre($title, '', 'calendar'); - print '
".$langs->trans("Author").''.$author->getFullName($langs)."
'; + print '
'; // if "frequency" is empty or = 0, the reccurence is disabled print '
'; @@ -683,7 +681,7 @@ if ($action == 'create') { print load_fiche_titre($title); - print ''; + print '
'; print ''; print ''; print ''; @@ -692,7 +690,6 @@ if ($action == 'create') { $num = count($object->lines); $i = 0; while ($i < $num) { - // Show product and description if (isset($object->lines[$i]->product_type)) $type=$object->lines[$i]->product_type; @@ -783,7 +780,7 @@ if ($action == 'create') { print $langs->trans("ToCreateAPredefinedInterventional").'

'; $i = 0; - print '
'.$langs->trans("Description").''.$langs->trans("Duration").'
'; + print '
'; print ''; print_liste_field_titre("Ref", $_SERVER['PHP_SELF'], "f.titre", "", "", 'width="200px"', $sortfield, $sortorder, 'left '); print_liste_field_titre("Company", $_SERVER['PHP_SELF'], "s.nom", "", "", 'width="200px"', $sortfield, $sortorder, 'left '); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index f260ec07491..9447b7e15ea 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -74,7 +74,7 @@ $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (! empt $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -728,7 +728,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->ficheinter->dir_output; - $permissioncreate = $user->rights->ficheinter->creer; + $permissiontoadd = $user->rights->ficheinter->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'update_extras') @@ -909,7 +909,7 @@ if ($action == 'create') dol_fiche_head(''); - print '
'; + print '
'; print ''; print ''; @@ -978,7 +978,7 @@ if ($action == 'create') print ''; // Private note - if (empty($user->societe_id)) + if (empty($user->socid)) { print ''; print ''; @@ -1055,7 +1055,7 @@ if ($action == 'create') $title = $langs->trans('Services'); print load_fiche_titre($title); - print '
'.$langs->trans("ThirdParty").''.$soc->getNomUrl(1).'
'.$langs->trans('NotePrivate').'
'; + print '
'; $objectsrc->printOriginLinesList(empty($conf->global->FICHINTER_PRINT_PRODUCTS)?'services':''); // Show only service, except if option FICHINTER_PRINT_PRODUCTS is on @@ -1074,7 +1074,7 @@ if ($action == 'create') } elseif ($origin == 'project' && !empty($projectid)) { print ''; } - print '
'; + print '
'; print ''; @@ -1196,19 +1196,20 @@ elseif ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->ficheinter->creer) { - if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); @@ -1271,12 +1272,12 @@ elseif ($id > 0 || ! empty($ref)) print ''; print '
'.$langs->trans("ThirdParty").''; print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); print '
'; - print '
'; + print ''; if ($action != 'contrat') { - print ''; } @@ -1383,7 +1384,7 @@ elseif ($id > 0 || ! empty($ref)) if ($num) { print '
'; - print '
'; print $langs->trans('Contract'); print 'id.'">'; + print 'id.'">'; print img_edit($langs->trans('SetContract'), 1); print '
'; + print '
'; print ''; print ''; @@ -1518,7 +1519,7 @@ elseif ($id > 0 || ! empty($ref)) { if (! $num) { - print '
'.$langs->trans('Description').'
'; + print '
'; print ''; print '
'; @@ -1607,7 +1608,7 @@ elseif ($id > 0 || ! empty($ref)) // modified by hook if (empty($reshook)) { - if ($user->societe_id == 0) + if ($user->socid == 0) { if ($action != 'editdescription' && ($action != 'presend')) { // Validate diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 08bf2c35e53..380204c2b0d 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -160,7 +160,7 @@ class Fichinter extends CommonObject $sql = "SELECT count(fi.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter as fi"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON fi.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -674,7 +674,6 @@ class Fichinter extends CommonObject $langs->load("interventions"); if (! dol_strlen($modele)) { - $modele = 'soleil'; if ($this->modelpdf) { @@ -702,51 +701,36 @@ class Fichinter extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Returns the label of a statut + * Returns the label of a status * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable // Init/load array of translation of status - if (empty($this->statuts) || empty($this->statuts_short)) + if (empty($this->statuts) || empty($this->statuts_short) || empty($this->statuts_logo)) { global $langs; $langs->load("fichinter"); - $this->statuts[0]=$langs->trans('Draft'); - $this->statuts[1]=$langs->trans('Validated'); - $this->statuts[2]=$langs->trans('StatusInterInvoiced'); - $this->statuts[3]=$langs->trans('Done'); - $this->statuts_short[0]=$langs->trans('Draft'); - $this->statuts_short[1]=$langs->trans('Validated'); - $this->statuts_short[2]=$langs->trans('StatusInterInvoiced'); - $this->statuts_short[3]=$langs->trans('Done'); - $this->statuts_logo[0]='statut0'; - $this->statuts_logo[1]='statut1'; - $this->statuts_logo[2]='statut6'; - $this->statuts_logo[3]='statut6'; + $this->statuts[self::STATUS_DRAFT]=$langs->trans('Draft'); + $this->statuts[self::STATUS_VALIDATED]=$langs->trans('Validated'); + $this->statuts[self::STATUS_BILLED]=$langs->trans('StatusInterInvoiced'); + $this->statuts[self::STATUS_CLOSED]=$langs->trans('Done'); + $this->statuts_short[self::STATUS_DRAFT]=$langs->trans('Draft'); + $this->statuts_short[self::STATUS_VALIDATED]=$langs->trans('Validated'); + $this->statuts_short[self::STATUS_BILLED]=$langs->trans('StatusInterInvoiced'); + $this->statuts_short[self::STATUS_CLOSED]=$langs->trans('Done'); + $this->statuts_logo[self::STATUS_DRAFT]='status0'; + $this->statuts_logo[self::STATUS_VALIDATED]='status1'; + $this->statuts_logo[self::STATUS_BILLED]='status6'; + $this->statuts_logo[self::STATUS_CLOSED]='status6'; } - if ($mode == 0) - return $this->statuts[$statut]; - elseif ($mode == 1) - return $this->statuts_short[$statut]; - elseif ($mode == 2) - return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]).' '.$this->statuts_short[$statut]; - elseif ($mode == 3) - return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]); - elseif ($mode == 4) - return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]).' '.$this->statuts[$statut]; - elseif ($mode == 5) - return ''.$this->statuts_short[$statut].' '.img_picto($this->statuts[$statut], $this->statuts_logo[$statut]); - elseif ($mode == 6) - return ''.$this->statuts[$statut].' '.img_picto($this->statuts[$statut], $this->statuts_logo[$statut]); - - return ''; + return dolGetStatus($this->statuts[$status], $this->statuts_short[$status], '', $this->statuts_logo[$status], $mode); } /** @@ -840,7 +824,6 @@ class Fichinter extends CommonObject $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/fichinter/"); // Load file with numbering class (if found) @@ -1334,7 +1317,7 @@ class Fichinter extends CommonObject // phpcs:enable $this->lines = array(); - $sql = 'SELECT rowid, description, duree, date, rang'; + $sql = 'SELECT rowid, fk_fichinter, description, duree, date, rang'; $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet'; $sql.=' WHERE fk_fichinter = '.$this->id .' ORDER BY rang ASC, date ASC' ; @@ -1350,6 +1333,7 @@ class Fichinter extends CommonObject $line = new FichinterLigne($this->db); $line->id = $objp->rowid; + $line->fk_fichinter = $objp->fk_fichinter; $line->desc = $objp->description; $line->duration = $objp->duree; //For invoicing we calculing hours @@ -1600,7 +1584,6 @@ class FichinterLigne extends CommonObjectLine $resql=$this->db->query($sql); if ($resql) { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used { $result=$this->insertExtraFields(); @@ -1613,7 +1596,6 @@ class FichinterLigne extends CommonObjectLine $result=$this->update_total(); if ($result > 0) { - if (! $notrigger) { // Call trigger diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index f88653e70eb..f599cccf801 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -42,6 +42,10 @@ class FichinterRec extends Fichinter public $table_element = 'fichinter_rec'; public $table_element_line = 'fichinter_rec'; public $fk_element = 'fk_fichinter'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'intervention'; public $title; @@ -342,12 +346,11 @@ class FichinterRec extends Fichinter $objp = $this->db->fetch_object($result); $line = new FichinterLigne($this->db); - $line->rowid = $objp->rowid; + $line->id = $objp->rowid; $line->label = $objp->custom_label; // Label line $line->desc = $objp->description; // Description line $line->product_type = $objp->product_type; // Type of line $line->product_ref = $objp->product_ref; // Ref product - $line->libelle = $objp->product_label; // deprecated $line->product_label = $objp->product_label; // Label product $line->product_desc = $objp->product_desc; // Description product $line->fk_product_type = $objp->fk_product_type; // Type of product diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index d762657caec..98eb218e9ef 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -200,7 +200,7 @@ class FichinterStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, 0 as total, 0 as avg"; $sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; $sql.= " AND c.rowid = tl.fk_fichinter AND tl.fk_product = product.rowid"; $sql.= " AND c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 494a1156b4f..562a38f7ea8 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -39,7 +39,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); @@ -141,20 +141,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->ficheinter->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index b6d70669cc7..3b6b2bd6299 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -47,7 +47,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); @@ -120,21 +120,22 @@ if ($object->id) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->commande->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 178a7597626..8c1540a61fd 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -42,10 +42,10 @@ $langs->load("interventions"); // Security check $socid=GETPOST('socid', 'int'); -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } @@ -69,13 +69,14 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { // Search ficheinter $var=false; - print ''; print ''; print ''; + print '
'; + print '
'; print ''; print ''; - print "
'.$langs->trans("Search").'
'; print $langs->trans("Intervention").':

\n"; + print "

\n"; } @@ -89,7 +90,7 @@ $sql.= ", ".MAIN_DB_PREFIX."fichinter as f"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE f.entity IN (".getEntity('intervention').")"; $sql.= " AND f.fk_soc = s.rowid"; -if ($user->societe_id) $sql.=' AND f.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND f.fk_soc = '.$user->socid; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " GROUP BY f.fk_statut"; $resql = $db->query($sql); @@ -121,7 +122,8 @@ if ($resql) $i++; } $db->free($resql); - print ''; + print '
'; + print '
'; print ''."\n"; $listofstatus=array(0,1,2); $bool=false; @@ -167,7 +169,7 @@ if ($resql) //if ($totalinprocess != $total) //print ''; print ''; - print "
'.$langs->trans("Statistics").' - '.$langs->trans("Interventions").'
'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; + print "

"; } else { @@ -193,7 +195,8 @@ if (! empty($conf->ficheinter->enabled)) $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; + print '
'; print ''; print ''; $langs->load("fichinter"); @@ -211,7 +214,7 @@ if (! empty($conf->ficheinter->enabled)) $i++; } } - print "
'.$langs->trans("DraftFichinter").'

"; + print "

"; } } @@ -241,7 +244,8 @@ $sql.= $db->plimit($max, 0); $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; + print '
'; print ''; print ''; @@ -284,7 +288,7 @@ if ($resql) $i++; } } - print "
'.$langs->trans("LastModifiedInterventions", $max).'

"; + print "

"; } else dol_print_error($db); @@ -311,7 +315,8 @@ if (! empty($conf->ficheinter->enabled)) { $num = $db->num_rows($resql); - print ''; + print '
'; + print '
'; print ''; print ''; @@ -354,7 +359,7 @@ if (! empty($conf->ficheinter->enabled)) } } - print "
'.$langs->trans("FichinterToProcess").' '.$num.'

"; + print "

"; } else dol_print_error($db); } diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php index 30aec089ee6..3261ce84d89 100644 --- a/htdocs/fichinter/info.php +++ b/htdocs/fichinter/info.php @@ -40,7 +40,7 @@ $id = GETPOST('id', 'int'); $ref=GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 7160eb8152c..eeebd317977 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -59,7 +59,7 @@ $socid=GETPOST('socid', 'int'); // Security check $id = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $diroutputmassaction=$conf->ficheinter->dir_output . '/temp/massgeneration/'.$user->id; @@ -116,13 +116,16 @@ $arrayfields=array( 'fd.duree'=>array('label'=>'DurationOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS)?1:0), ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); /* @@ -157,8 +160,8 @@ if (empty($reshook)) // Mass actions $objectclass='Fichinter'; $objectlabel='Interventions'; - $permtoread = $user->rights->ficheinter->lire; - $permtodelete = $user->rights->ficheinter->supprimer; + $permissiontoread = $user->rights->ficheinter->lire; + $permissiontodelete = $user->rights->ficheinter->supprimer; $uploaddir = $conf->ficheinter->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -209,7 +212,9 @@ if (!empty($conf->contrat->enabled)) { $sql .= ", c.rowid as contrat_id, c.ref as contrat_ref, c.ref_customer as contrat_ref_supplier, c.ref_supplier as contrat_ref_supplier"; } // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -597,8 +602,8 @@ if ($resql) { print '
'.convertSecondToTime($obj->duree, 'allhourmin').''; @@ -618,23 +623,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalduration'])) - { - print '
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'
'; + print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -257,7 +257,7 @@ print '
'; //} print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -310,7 +310,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("NbOfinterventions").'
'; +print ' @@ -54,8 +52,7 @@ foreach($linkedObjectBlock as $key => $objectlink) - - +print "\n"; diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 49e305449ac..f52f5b089fd 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -52,7 +52,7 @@ $cancelbutton = GETPOST('cancel', 'alpha'); // Security check $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); -if ($user->societe_id) $id=$user->societe_id; +if ($user->socid) $id=$user->socid; $result = restrictedArea($user, 'societe&fournisseur', $id, '&societe', '', 'rowid'); $object = new Fournisseur($db); @@ -85,10 +85,7 @@ if (empty($reshook)) $result=$object->fetch($id); $object->code_compta_fournisseur=$_POST["supplieraccountancycode"]; $result=$object->update($object->id, $user, 1, 0, 1); - if ($result < 0) - { - $mesg=join(',', $object->errors); - } + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // terms of the settlement if ($action == 'setconditions' && $user->rights->societe->creer) @@ -165,7 +162,7 @@ if ($object->id > 0) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -269,7 +266,7 @@ if ($object->id > 0) print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index ea69d287880..95c67f987f5 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -22,11 +22,9 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - +print "\n"; -load("interventions"); $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); -$ilink=0; +$ilink = 0; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> + ?>
trans("Intervention"); ?> getNomUrl(1); ?>getLibStatut(3); ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'; // Multicurrency rate - print ''; - print ''; + print ''; } - print ''; } // Bank Account @@ -2311,7 +2336,7 @@ elseif (! empty($object->id)) * Boutons actions */ - if ($user->societe_id == 0 && $action != 'editline' && $action != 'delete') + if ($user->socid == 0 && $action != 'editline' && $action != 'delete') { print '
'; @@ -2483,13 +2508,13 @@ elseif (! empty($object->id)) // Create bill //if (! empty($conf->facture->enabled)) //{ - if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled + if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled + { + if ($user->rights->fournisseur->facture->creer) { - if ($user->rights->fournisseur->facture->creer) - { - print ''.$langs->trans("CreateBill").''; - } + print ''.$langs->trans("CreateBill").''; } + } //} // Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not) @@ -2873,8 +2898,6 @@ elseif (! empty($object->id)) } } - - // End of page llxFooter(); $db->close(); diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index ca5ad3988fc..63a2935212e 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -41,7 +41,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); $object = new CommandeFournisseur($db); @@ -157,20 +157,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->fournisseur->commande->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index ad9f0018412..f7ade86eb64 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -51,8 +51,8 @@ $id = GETPOST("id", 'int'); $ref = GETPOST('ref'); $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); -if ($user->societe_id) - $socid = $user->societe_id; +if ($user->socid) + $socid = $user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); if (empty($conf->stock->enabled)) { @@ -407,20 +407,21 @@ if ($id > 0 || ! empty($ref)) { $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->fournisseur->commande->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); @@ -462,8 +463,8 @@ if ($id > 0 || ! empty($ref)) { print '
'; print ''; - $parameters=array(); - $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + $parameters = array(); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print "
'; print $langs->trans("CustomerRelativeDiscountShort"); print ''; - if ($user->rights->societe->creer && !$user->societe_id > 0) + if ($user->rights->societe->creer && !$user->socid > 0) { print ''.img_edit($langs->trans("Modify")).''; } @@ -283,7 +280,7 @@ if ($object->id > 0) print '
'; print $langs->trans("CustomerAbsoluteDiscountShort"); print ''; - if ($user->rights->societe->creer && !$user->societe_id > 0) + if ($user->rights->societe->creer && !$user->socid > 0) { print ''.img_edit($langs->trans("Modify")).''; } @@ -438,7 +435,7 @@ if ($object->id > 0) // Lien recap /* - print ''; + print '
'; print ''; print ''; @@ -709,7 +706,7 @@ if ($object->id > 0) if ($user->rights->fournisseur->facture->lire) { // TODO move to DAO class - $sql = 'SELECT f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,'; + $sql = 'SELECT f.rowid, f.libelle as label, f.ref, f.ref_supplier, f.fk_statut, f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,'; $sql.= ' SUM(pf.amount) as am'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn'; @@ -744,13 +741,14 @@ if ($object->id > 0) $facturestatic->id=$obj->rowid; $facturestatic->ref=($obj->ref?$obj->ref:$obj->rowid); $facturestatic->ref_supplier = $obj->ref_supplier; - $facturestatic->libelle = $obj->libelle; + $facturestatic->libelle = $obj->label; // deprecated + $facturestatic->label = $obj->label; $facturestatic->total_ht = $obj->total_ht; $facturestatic->total_tva = $obj->total_tva; $facturestatic->total_ttc = $obj->total_ttc; print $facturestatic->getNomUrl(1); print $obj->ref_supplier?' - '.$obj->ref_supplier:''; - print ($obj->libelle?' - ':'').dol_trunc($obj->libelle, 14); + print ($obj->label?' - ':'').dol_trunc($obj->label, 14); print ''; print ''; print ''; @@ -793,48 +791,40 @@ if ($object->id > 0) if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer) { $langs->load("supplier_proposal"); - if ($object->status == 1) - { - print ''.$langs->trans("AddSupplierProposal").''; - } - else - { - print ''.$langs->trans("AddSupplierProposal").''; - } + if ($object->status == 1) { + print ''.$langs->trans("AddSupplierProposal").''; + } else { + print ''.$langs->trans("AddSupplierProposal").''; + } } if ($user->rights->fournisseur->commande->creer) { $langs->load("orders"); - if ($object->status == 1) - { - print ''.$langs->trans("AddOrder").''; - } - else - { - print ''.$langs->trans("AddOrder").''; - } + if ($object->status == 1) { + print ''.$langs->trans("AddOrder").''; + } else { + print ''.$langs->trans("AddOrder").''; + } } if ($user->rights->fournisseur->facture->creer) { $langs->load("bills"); - if ($object->status == 1) - { - print ''.$langs->trans("AddBill").''; - } - else - { - print ''.$langs->trans("AddBill").''; - } + if ($object->status == 1) { + print ''.$langs->trans("AddBill").''; + } else { + print ''.$langs->trans("AddBill").''; + } } if ($user->rights->fournisseur->facture->creer) { if (! empty($orders2invoice) && $orders2invoice > 0) { - if ($object->status == 1) // Company is open + if ($object->status == 1) { + // Company is open print ''; } else diff --git a/htdocs/fourn/class/api_supplier_orders.class.php b/htdocs/fourn/class/api_supplier_orders.class.php index c09c62a4714..37ac4c55e9d 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -28,180 +28,180 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; */ class SupplierOrders extends DolibarrApi { - /** - * - * @var array $FIELDS Mandatory fields, checked when create and update object - */ - static $FIELDS = array( - 'socid' - ); + /** + * + * @var array $FIELDS Mandatory fields, checked when create and update object + */ + static $FIELDS = array( + 'socid' + ); - /** - * @var CommandeFournisseur $order {@type CommandeFournisseur} - */ - public $order; + /** + * @var CommandeFournisseur $order {@type CommandeFournisseur} + */ + public $order; - /** - * Constructor - */ - public function __construct() - { - global $db, $conf; - $this->db = $db; - $this->order = new CommandeFournisseur($this->db); - } + /** + * Constructor + */ + public function __construct() + { + global $db, $conf; + $this->db = $db; + $this->order = new CommandeFournisseur($this->db); + } - /** - * Get properties of a supplier order object - * - * Return an array with supplier order information - * - * @param int $id ID of supplier order - * @return array|mixed data without useless information - * - * @throws RestException - */ - public function get($id) - { - if(! DolibarrApiAccess::$user->rights->fournisseur->commande->lire) { - throw new RestException(401); - } + /** + * Get properties of a supplier order object + * + * Return an array with supplier order information + * + * @param int $id ID of supplier order + * @return array|mixed data without useless information + * + * @throws RestException + */ + public function get($id) + { + if(! DolibarrApiAccess::$user->rights->fournisseur->commande->lire) { + throw new RestException(401); + } - $result = $this->order->fetch($id); - if ( ! $result ) { - throw new RestException(404, 'Supplier order not found'); - } + $result = $this->order->fetch($id); + if ( ! $result ) { + throw new RestException(404, 'Supplier order not found'); + } - if ( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if ( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - $this->order->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->order); - } + $this->order->fetchObjectLinked(); + return $this->_cleanObjectDatas($this->order); + } - /** - * List orders - * - * Get a list of supplier orders - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} - * @param string $status Filter by order status : draft | validated | approved | running | received_start | received_end | cancelled | refused - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.datec:<:'20160101')" - * @return array Array of order objects - * - * @throws RestException - */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') - { - global $db, $conf; + /** + * List orders + * + * Get a list of supplier orders + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} + * @param string $status Filter by order status : draft | validated | approved | running | received_start | received_end | cancelled | refused + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.datec:<:'20160101')" + * @return array Array of order objects + * + * @throws RestException + */ + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') + { + global $db, $conf; - $obj_ret = array(); + $obj_ret = array(); - // case of external user, $thirdparty_ids param is ignored and replaced by user's socid - $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; + // case of external user, $thirdparty_ids param is ignored and replaced by user's socid + $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; - // If the internal user must only see his customers, force searching by him - $search_sale = 0; - if (! DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) $search_sale = DolibarrApiAccess::$user->id; + // If the internal user must only see his customers, force searching by him + $search_sale = 0; + if (! DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) $search_sale = DolibarrApiAccess::$user->id; - $sql = "SELECT t.rowid"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) - $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as t"; + $sql = "SELECT t.rowid"; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) + $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as t"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale - $sql.= ' WHERE t.entity IN ('.getEntity('supplier_order').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND t.fk_soc = sc.fk_soc"; - if ($socids) $sql.= " AND t.fk_soc IN (".$socids.")"; - if ($search_sale > 0) $sql.= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + $sql.= ' WHERE t.entity IN ('.getEntity('supplier_order').')'; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND t.fk_soc = sc.fk_soc"; + if ($socids) $sql.= " AND t.fk_soc IN (".$socids.")"; + if ($search_sale > 0) $sql.= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale - // Filter by status - if ($status == 'draft') $sql.= " AND t.fk_statut IN (0)"; - if ($status == 'validated') $sql.= " AND t.fk_statut IN (1)"; - if ($status == 'approved') $sql.= " AND t.fk_statut IN (2)"; - if ($status == 'running') $sql.= " AND t.fk_statut IN (3)"; - if ($status == 'received_start') $sql.= " AND t.fk_statut IN (4)"; - if ($status == 'received_end') $sql.= " AND t.fk_statut IN (5)"; - if ($status == 'cancelled') $sql.= " AND t.fk_statut IN (6,7)"; - if ($status == 'refused') $sql.= " AND t.fk_statut IN (9)"; - // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; - } - // Add sql filters - if ($sqlfilters) - { - if (! DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } + // Filter by status + if ($status == 'draft') $sql.= " AND t.fk_statut IN (0)"; + if ($status == 'validated') $sql.= " AND t.fk_statut IN (1)"; + if ($status == 'approved') $sql.= " AND t.fk_statut IN (2)"; + if ($status == 'running') $sql.= " AND t.fk_statut IN (3)"; + if ($status == 'received_start') $sql.= " AND t.fk_statut IN (4)"; + if ($status == 'received_end') $sql.= " AND t.fk_statut IN (5)"; + if ($status == 'cancelled') $sql.= " AND t.fk_statut IN (6,7)"; + if ($status == 'refused') $sql.= " AND t.fk_statut IN (9)"; + // Insert sale filter + if ($search_sale > 0) + { + $sql .= " AND sc.fk_user = ".$search_sale; + } + // Add sql filters + if ($sqlfilters) + { + if (! DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } - $sql.= $db->order($sortfield, $sortorder); - if ($limit) { - if ($page < 0) - { - $page = 0; - } - $offset = $limit * $page; + $sql.= $db->order($sortfield, $sortorder); + if ($limit) { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; - $sql.= $db->plimit($limit + 1, $offset); - } + $sql.= $db->plimit($limit + 1, $offset); + } - $result = $db->query($sql); - if ($result) - { - $i = 0; - $num = $db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { - $obj = $db->fetch_object($result); - $order_static = new CommandeFournisseur($db); - if($order_static->fetch($obj->rowid)) { - $obj_ret[] = $this->_cleanObjectDatas($order_static); - } - $i++; - } - } - else { - throw new RestException(503, 'Error when retrieve supplier order list : '.$db->lasterror()); - } - if( ! count($obj_ret)) { - throw new RestException(404, 'No supplier order found'); - } - return $obj_ret; - } + $result = $db->query($sql); + if ($result) + { + $i = 0; + $num = $db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + while ($i < $min) + { + $obj = $db->fetch_object($result); + $order_static = new CommandeFournisseur($db); + if($order_static->fetch($obj->rowid)) { + $obj_ret[] = $this->_cleanObjectDatas($order_static); + } + $i++; + } + } + else { + throw new RestException(503, 'Error when retrieve supplier order list : '.$db->lasterror()); + } + if( ! count($obj_ret)) { + throw new RestException(404, 'No supplier order found'); + } + return $obj_ret; + } - /** - * Create supplier order object - * - * @param array $request_data Request datas - * @return int ID of supplier order - */ - public function post($request_data = null) - { - if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { - throw new RestException(401, "Insuffisant rights"); - } - // Check mandatory fields - $result = $this->_validate($request_data); + /** + * Create supplier order object + * + * @param array $request_data Request datas + * @return int ID of supplier order + */ + public function post($request_data = null) + { + if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { + throw new RestException(401, "Insuffisant rights"); + } + // Check mandatory fields + $result = $this->_validate($request_data); - foreach($request_data as $field => $value) { - $this->order->$field = $value; - } - if(! array_keys($request_data, 'date')) { - $this->order->date = dol_now(); - } - /* We keep lines as an array + foreach($request_data as $field => $value) { + $this->order->$field = $value; + } + if(! array_keys($request_data, 'date')) { + $this->order->date = dol_now(); + } + /* We keep lines as an array if (isset($request_data["lines"])) { $lines = array(); foreach ($request_data["lines"] as $line) { @@ -210,163 +210,163 @@ class SupplierOrders extends DolibarrApi $this->order->lines = $lines; }*/ - if ($this->order->create(DolibarrApiAccess::$user) < 0) { - throw new RestException(500, "Error creating order", array_merge(array($this->order->error), $this->order->errors)); - } - return $this->order->id; - } + if ($this->order->create(DolibarrApiAccess::$user) < 0) { + throw new RestException(500, "Error creating order", array_merge(array($this->order->error), $this->order->errors)); + } + return $this->order->id; + } - /** - * Update supplier order - * - * @param int $id Id of supplier order to update - * @param array $request_data Datas - * @return int - */ - public function put($id, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { - throw new RestException(401); - } + /** + * Update supplier order + * + * @param int $id Id of supplier order to update + * @param array $request_data Datas + * @return int + */ + public function put($id, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { + throw new RestException(401); + } - $result = $this->order->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Supplier order not found'); - } + $result = $this->order->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Supplier order not found'); + } - if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - foreach($request_data as $field => $value) { - if ($field == 'id') continue; - $this->order->$field = $value; - } + foreach($request_data as $field => $value) { + if ($field == 'id') continue; + $this->order->$field = $value; + } - if($this->order->update($id, DolibarrApiAccess::$user)) - return $this->get($id); + if($this->order->update($id, DolibarrApiAccess::$user)) + return $this->get($id); - return false; - } + return false; + } - /** - * Delete supplier order - * - * @param int $id Supplier order ID - * @return type - */ - public function delete($id) - { - if (! DolibarrApiAccess::$user->rights->fournisseur->commande->supprimer) { - throw new RestException(401); - } - $result = $this->order->fetch($id); - if ( ! $result) { - throw new RestException(404, 'Supplier order not found'); - } + /** + * Delete supplier order + * + * @param int $id Supplier order ID + * @return type + */ + public function delete($id) + { + if (! DolibarrApiAccess::$user->rights->fournisseur->commande->supprimer) { + throw new RestException(401); + } + $result = $this->order->fetch($id); + if ( ! $result) { + throw new RestException(404, 'Supplier order not found'); + } - if ( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if ( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ( $this->order->delete(DolibarrApiAccess::$user) < 0) { - throw new RestException(500); - } + if ( $this->order->delete(DolibarrApiAccess::$user) < 0) { + throw new RestException(500); + } - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Supplier order deleted' - ) - ); - } + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Supplier order deleted' + ) + ); + } - /** - * Validate an order - * - * @param int $id Order ID - * @param int $idwarehouse Warehouse ID - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * - * @url POST {id}/validate - * - * @return array - * FIXME An error 403 is returned if the request has an empty body. - * Error message: "Forbidden: Content type `text/plain` is not supported." - * Workaround: send this in the body - * { - * "idwarehouse": 0, - * "notrigger": 0 - * } - */ - public function validate($id, $idwarehouse = 0, $notrigger = 0) - { - if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { - throw new RestException(401); - } - $result = $this->order->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Order not found'); - } + /** + * Validate an order + * + * @param int $id Order ID + * @param int $idwarehouse Warehouse ID + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * + * @url POST {id}/validate + * + * @return array + * FIXME An error 403 is returned if the request has an empty body. + * Error message: "Forbidden: Content type `text/plain` is not supported." + * Workaround: send this in the body + * { + * "idwarehouse": 0, + * "notrigger": 0 + * } + */ + public function validate($id, $idwarehouse = 0, $notrigger = 0) + { + if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { + throw new RestException(401); + } + $result = $this->order->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Order not found'); + } - if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - $result = $this->order->valid(DolibarrApiAccess::$user, $idwarehouse, $notrigger); - if ($result == 0) { - throw new RestException(304, 'Error nothing done. May be object is already validated'); - } - if ($result < 0) { - throw new RestException(500, 'Error when validating Order: '.$this->order->error); - } + $result = $this->order->valid(DolibarrApiAccess::$user, $idwarehouse, $notrigger); + if ($result == 0) { + throw new RestException(304, 'Error nothing done. May be object is already validated'); + } + if ($result < 0) { + throw new RestException(500, 'Error when validating Order: '.$this->order->error); + } - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Order validated (Ref='.$this->order->ref.')' - ) - ); - } + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Order validated (Ref='.$this->order->ref.')' + ) + ); + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore - /** - * Clean sensible object datas - * - * @param Object $object Object to clean - * @return array Array of cleaned object properties - */ - protected function _cleanObjectDatas($object) - { - // phpcs:enable - $object = parent::_cleanObjectDatas($object); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Clean sensible object datas + * + * @param Object $object Object to clean + * @return array Array of cleaned object properties + */ + protected function _cleanObjectDatas($object) + { + // phpcs:enable + $object = parent::_cleanObjectDatas($object); - unset($object->rowid); - unset($object->barcode_type); - unset($object->barcode_type_code); - unset($object->barcode_type_label); - unset($object->barcode_type_coder); + unset($object->rowid); + unset($object->barcode_type); + unset($object->barcode_type_code); + unset($object->barcode_type_label); + unset($object->barcode_type_coder); - return $object; - } + return $object; + } - /** - * Validate fields before create or update object - * - * @param array $data Datas to validate - * @return array - * - * @throws RestException - */ - private function _validate($data) - { - $order = array(); - foreach (SupplierOrders::$FIELDS as $field) { - if (!isset($data[$field])) - throw new RestException(400, "$field field missing"); - $order[$field] = $data[$field]; - } - return $order; - } + /** + * Validate fields before create or update object + * + * @param array $data Datas to validate + * @return array + * + * @throws RestException + */ + private function _validate($data) + { + $order = array(); + foreach (SupplierOrders::$FIELDS as $field) { + if (!isset($data[$field])) + throw new RestException(400, "$field field missing"); + $order[$field] = $data[$field]; + } + return $order; + } } diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index c0473759a6d..711261a161b 100644 --- a/htdocs/fourn/class/fournisseur.class.php +++ b/htdocs/fourn/class/fournisseur.class.php @@ -118,7 +118,7 @@ class Fournisseur extends Societe $sql = "SELECT count(s.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -191,10 +191,10 @@ class Fournisseur extends Societe $sql = "SELECT s.rowid, s.nom as name"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fournisseur = 1"; $sql.= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $resql=$this->db->query($sql); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 4536cdc5bbd..b46077ee930 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -62,7 +62,10 @@ class CommandeFournisseur extends CommonOrder */ public $fk_element = 'fk_commande'; - public $picto='order'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='order'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -439,7 +442,7 @@ class CommandeFournisseur extends CommonOrder $line->fk_product = $objp->fk_product; - $line->libelle = $objp->product_label; + $line->libelle = $objp->product_label; // deprecated $line->product_label = $objp->product_label; $line->product_desc = $objp->product_desc; @@ -684,7 +687,7 @@ class CommandeFournisseur extends CommonOrder $billedtext = ' - '.$langs->trans("Billed"); } - $statusLong = $langs->trans($this->statuts_long[$status]).$billedtext; + $statusLong = $langs->trans($this->statuts[$status]).$billedtext; $statusShort = $langs->trans($this->statutshort[$status]); return dolGetStatus($statusLong, $statusShort, '', $statusClass, $mode); @@ -776,7 +779,6 @@ class CommandeFournisseur extends CommonOrder $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/supplier_order/"); // Load file with numbering class (if found) @@ -1271,10 +1273,10 @@ class CommandeFournisseur extends CommonOrder // insert products details into database for ($i=0;$i<$num;$i++) { - $this->special_code = $this->lines[$i]->special_code; // TODO : remove this in 9.0 and add special_code param to addline() - $result = $this->addline( // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set + // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set + $result = $this->addline( $this->lines[$i]->desc, $this->lines[$i]->subprice, $this->lines[$i]->qty, @@ -1391,19 +1393,41 @@ class CommandeFournisseur extends CommonOrder * Load an object from its id and create a new one in database * * @param User $user User making the clone + * @param int $socid Id of thirdparty * @return int New id of clone */ - public function createFromClone(User $user) + public function createFromClone(User $user, $socid = 0) { - global $hookmanager; + global $conf, $user,$hookmanager; $error=0; $this->db->begin(); + // get lines so they will be clone + foreach($this->lines as $line) + $line->fetch_optionals(); + // Load source object $objFrom = clone $this; + // Change socid if needed + if (! empty($socid) && $socid != $this->socid) + { + $objsoc = new Societe($this->db); + + if ($objsoc->fetch($socid)>0) + { + $this->socid = $objsoc->id; + $this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); + $this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); + $this->fk_project = 0; + $this->fk_delivery_address = 0; + } + + // TODO Change product price if multi-prices + } + $this->id=0; $this->statut=self::STATUS_DRAFT; @@ -1540,7 +1564,7 @@ class CommandeFournisseur extends CommonOrder { // Check quantity is enough dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_prod_fourn_price=".$fk_prod_fourn_price." qty=".$qty." ref_supplier=".$ref_supplier); - $prod = new Product($this->db, $fk_product); + $prod = new Product($this->db); if ($prod->fetch($fk_product) > 0) { $product_type = $prod->type; @@ -2350,17 +2374,17 @@ class CommandeFournisseur extends CommonOrder for ($i = 0; $i < $num; $i++) { $prod = new Product($this->db); - $libelle = ''; + $label = ''; $ref = ''; if ($prod->fetch($comclient->lines[$i]->fk_product) > 0) { - $libelle = $prod->libelle; - $ref = $prod->ref; + $label = $prod->label; + $ref = $prod->ref; } $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet"; - $sql .= " (fk_commande,label,description,fk_product, price, qty, tva_tx, localtax1_tx, localtax2_tx, remise_percent, subprice, remise, ref)"; - $sql .= " VALUES (".$idc.", '" . $this->db->escape($libelle) . "','" . $this->db->escape($comclient->lines[$i]->desc) . "'"; + $sql .= " (fk_commande, label, description, fk_product, price, qty, tva_tx, localtax1_tx, localtax2_tx, remise_percent, subprice, remise, ref)"; + $sql .= " VALUES (".$idc.", '" . $this->db->escape($label) . "','" . $this->db->escape($comclient->lines[$i]->desc) . "'"; $sql .= ",".$comclient->lines[$i]->fk_product.",'".price2num($comclient->lines[$i]->price)."'"; $sql .= ", '".$comclient->lines[$i]->qty."', ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->localtax1_tx.", ".$comclient->lines[$i]->localtax2_tx.", ".$comclient->lines[$i]->remise_percent; $sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0','".$ref."');"; @@ -2750,7 +2774,7 @@ class CommandeFournisseur extends CommonOrder $sql = "SELECT count(co.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as co"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON co.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -2793,7 +2817,7 @@ class CommandeFournisseur extends CommonOrder $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date"; $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON c.fk_soc = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -2806,7 +2830,7 @@ class CommandeFournisseur extends CommonOrder else{ $sql.= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; } - if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id; + if ($user->socid) $sql.=" AND c.fk_soc = ".$user->socid; $resql=$this->db->query($sql); if ($resql) @@ -2903,7 +2927,6 @@ class CommandeFournisseur extends CommonOrder $langs->load("suppliers"); if (! dol_strlen($modele)) { - $modele = 'muscadet'; if ($this->modelpdf) { @@ -3588,7 +3611,7 @@ class CommandeFournisseurLigne extends CommonOrderLine * @param int $notrigger 1=Disable call to triggers * @return int <0 if KO, >0 if OK */ - public function delete($notrigger) + public function delete($notrigger = 0) { global $user; @@ -3596,13 +3619,12 @@ class CommandeFournisseurLigne extends CommonOrderLine $this->db->begin(); - $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid=".$this->rowid; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid=".$this->id; dol_syslog(__METHOD__, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { - if (!$notrigger) { // Call trigger diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index d31c6fd77cc..b453653c681 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -505,7 +505,6 @@ class CommandeFournisseurDispatch extends CommonObject if (! $error) { - } unset($object->context['createfromclone']); @@ -540,11 +539,11 @@ class CommandeFournisseurDispatch extends CommonObject /** * Return label of a status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -552,33 +551,33 @@ class CommandeFournisseurDispatch extends CommonObject if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statutshort[$statut]); + return $langs->trans($this->statutshort[$status]); } elseif ($mode == 2) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut8').' '.$langs->trans($this->statuts[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); } } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 19a65abdfd9..4cc39f781df 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -63,6 +63,9 @@ class FactureFournisseur extends CommonInvoice */ public $fk_element='fk_facture_fourn'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='bill'; /** @@ -637,6 +640,7 @@ class FactureFournisseur extends CommonInvoice $this->libelle = $obj->label; // deprecated $this->label = $obj->label; $this->paye = $obj->paye; + $this->paid = $obj->paye; $this->amount = $obj->amount; $this->remise = $obj->remise; $this->close_code = $obj->close_code; @@ -2187,12 +2191,12 @@ class FactureFournisseur extends CommonInvoice $sql = 'SELECT ff.rowid, ff.date_lim_reglement as datefin, ff.fk_statut'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as ff'; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ' WHERE ff.paye=0'; $sql.= ' AND ff.fk_statut > 0'; $sql.= " AND ff.entity = ".$conf->entity; - if ($user->societe_id) $sql.=' AND ff.fk_soc = '.$user->societe_id; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND ff.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($user->socid) $sql.=' AND ff.fk_soc = '.$user->socid; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND ff.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; $resql=$this->db->query($sql); if ($resql) @@ -2205,7 +2209,7 @@ class FactureFournisseur extends CommonInvoice $response->label=$langs->trans("SupplierBillsToPay"); $response->labelShort=$langs->trans("StatusToPay"); - $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?search_status=1&mainmenu=billing&leftmenu=suppliers_bills'; + $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?search_status=1&mainmenu=billing&leftmenu=suppliers_bills'; $response->img=img_object($langs->trans("Bills"), "bill"); $facturestatic = new FactureFournisseur($this->db); @@ -2341,7 +2345,6 @@ class FactureFournisseur extends CommonInvoice $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/supplier_invoice/"); // Load file with numbering class (if found) @@ -2362,10 +2365,10 @@ class FactureFournisseur extends CommonInvoice return $numref; } else - { - $this->error=$obj->error; - //dol_print_error($db,get_class($this)."::getNextNumRef ".$obj->error); - return false; + { + $this->error=$obj->error; + //dol_print_error($db,get_class($this)."::getNextNumRef ".$obj->error); + return false; } } @@ -2491,7 +2494,7 @@ class FactureFournisseur extends CommonInvoice $sql = "SELECT count(f.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; @@ -2575,7 +2578,6 @@ class FactureFournisseur extends CommonInvoice if (! $error) { - } unset($object->context['createfromclone']); diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 5eaafeabad3..8c750f2f425 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -180,7 +180,6 @@ class ProductFournisseur extends Product if (empty($error)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; $sql.= " WHERE rowid = ".$rowid; @@ -300,7 +299,6 @@ class ProductFournisseur extends Product // Check parameters if ($buyprice != '' && ! is_numeric($buyprice)) { - } $this->db->begin(); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index dd497888987..b18b054a65b 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -46,6 +46,9 @@ class PaiementFourn extends Paiement */ public $table_element='paiementfourn'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'payment'; public $statut; //Status of payment. 0 = unvalidated; 1 = validated @@ -56,7 +59,7 @@ class PaiementFourn extends Paiement * Label of payment type * @var string */ - public $type_libelle; + public $type_label; /** * Code of Payment type @@ -123,7 +126,7 @@ class PaiementFourn extends Paiement $this->note = $obj->note; $this->note_private = $obj->note; $this->type_code = $obj->paiement_code; - $this->type_libelle = $obj->paiement_type; + $this->type_label = $obj->paiement_type; $this->statut = $obj->statut; $error = 1; } @@ -655,7 +658,6 @@ class PaiementFourn extends Paiement $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/supplier_payment/"); // Load file with numbering class (if found) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 7fe73ab425e..4c6e98eda78 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2012-2016 Marcos García * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ion Agorria - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -81,7 +81,7 @@ $datelivraison=dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -647,95 +647,96 @@ if (empty($reshook)) // Define info_bits $info_bits = 0; - if (preg_match('/\*/', $vat_rate)) - $info_bits |= 0x01; + if (preg_match('/\*/', $vat_rate)) { + $info_bits |= 0x01; + } - // Define vat_rate - $vat_rate = str_replace('*', '', $vat_rate); - $localtax1_rate = get_localtax($vat_rate, 1, $mysoc, $object->thirdparty); - $localtax2_rate = get_localtax($vat_rate, 2, $mysoc, $object->thirdparty); + // Define vat_rate + $vat_rate = str_replace('*', '', $vat_rate); + $localtax1_rate = get_localtax($vat_rate, 1, $mysoc, $object->thirdparty); + $localtax2_rate = get_localtax($vat_rate, 2, $mysoc, $object->thirdparty); - if (GETPOST('price_ht') != '') + if (GETPOST('price_ht') != '') + { + $price_base_type = 'HT'; + $ht = price2num(GETPOST('price_ht')); + } + else + { + $vatratecleaned = $vat_rate; + if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) // If vat is "xx (yy)" { - $price_base_type = 'HT'; - $ht = price2num(GETPOST('price_ht')); - } - else - { - $vatratecleaned = $vat_rate; - if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) // If vat is "xx (yy)" - { - $vatratecleaned = trim($reg[1]); - $vatratecode = $reg[2]; - } - - $ttc = price2num(GETPOST('price_ttc')); - $ht = $ttc / (1 + ($vatratecleaned / 100)); - $price_base_type = 'HT'; + $vatratecleaned = trim($reg[1]); + $vatratecode = $reg[2]; } - $pu_ht_devise = GETPOST('multicurrency_subprice'); + $ttc = price2num(GETPOST('price_ttc')); + $ht = $ttc / (1 + ($vatratecleaned / 100)); + $price_base_type = 'HT'; + } - // Extrafields Lines - $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); - // Unset extrafield POST Data - if (is_array($extralabelsline)) { - foreach ($extralabelsline as $key => $value) { - unset($_POST["options_" . $key]); - } + $pu_ht_devise = GETPOST('multicurrency_subprice'); + + // Extrafields Lines + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); + // Unset extrafield POST Data + if (is_array($extralabelsline)) { + foreach ($extralabelsline as $key => $value) { + unset($_POST["options_" . $key]); } + } - $result = $object->updateline( - $lineid, - $_POST['product_desc'], - $ht, - $_POST['qty'], - $_POST['remise_percent'], - $vat_rate, - $localtax1_rate, - $localtax2_rate, - $price_base_type, - 0, - isset($_POST["type"])?$_POST["type"]:$line->product_type, - false, - $date_start, - $date_end, - $array_options, - $_POST['units'], - $pu_ht_devise, - GETPOST('fourn_ref', 'alpha') - ); - unset($_POST['qty']); - unset($_POST['type']); - unset($_POST['idprodfournprice']); - unset($_POST['remmise_percent']); - unset($_POST['dp_desc']); - unset($_POST['np_desc']); - unset($_POST['pu']); - unset($_POST['fourn_ref']); - unset($_POST['tva_tx']); - unset($_POST['date_start']); - unset($_POST['date_end']); - unset($_POST['units']); - unset($localtax1_tx); - unset($localtax2_tx); + $result = $object->updateline( + $lineid, + $_POST['product_desc'], + $ht, + $_POST['qty'], + $_POST['remise_percent'], + $vat_rate, + $localtax1_rate, + $localtax2_rate, + $price_base_type, + 0, + isset($_POST["type"])?$_POST["type"]:$line->product_type, + false, + $date_start, + $date_end, + $array_options, + $_POST['units'], + $pu_ht_devise, + GETPOST('fourn_ref', 'alpha') + ); + unset($_POST['qty']); + unset($_POST['type']); + unset($_POST['idprodfournprice']); + unset($_POST['remmise_percent']); + unset($_POST['dp_desc']); + unset($_POST['np_desc']); + unset($_POST['pu']); + unset($_POST['fourn_ref']); + unset($_POST['tva_tx']); + unset($_POST['date_start']); + unset($_POST['date_end']); + unset($_POST['units']); + unset($localtax1_tx); + unset($localtax2_tx); - unset($_POST['date_starthour']); - unset($_POST['date_startmin']); - unset($_POST['date_startsec']); - unset($_POST['date_startday']); - unset($_POST['date_startmonth']); - unset($_POST['date_startyear']); - unset($_POST['date_endhour']); - unset($_POST['date_endmin']); - unset($_POST['date_endsec']); - unset($_POST['date_endday']); - unset($_POST['date_endmonth']); - unset($_POST['date_endyear']); + unset($_POST['date_starthour']); + unset($_POST['date_startmin']); + unset($_POST['date_startsec']); + unset($_POST['date_startday']); + unset($_POST['date_startmonth']); + unset($_POST['date_startyear']); + unset($_POST['date_endhour']); + unset($_POST['date_endmin']); + unset($_POST['date_endsec']); + unset($_POST['date_endday']); + unset($_POST['date_endmonth']); + unset($_POST['date_endyear']); - if ($result >= 0) - { + if ($result >= 0) + { // Define output language if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { @@ -753,12 +754,12 @@ if (empty($reshook)) $result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) dol_print_error($db, $result); } - } - else - { + } + else + { dol_print_error($db, $object->error); exit; - } + } } // Remove a product line @@ -962,7 +963,9 @@ if (empty($reshook)) { if ($object->id > 0) { - $result=$object->createFromClone($user); + $orig = clone $object; + + $result=$object->createFromClone($user, $socid); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); @@ -971,6 +974,7 @@ if (empty($reshook)) else { setEventMessages($object->error, $object->errors, 'errors'); + $object = $orig; $action=''; } } @@ -1031,7 +1035,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->fournisseur->commande->dir_output; - $permissioncreate = $user->rights->fournisseur->commande->creer; + $permissiontoadd = $user->rights->fournisseur->commande->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -1106,12 +1110,19 @@ if (empty($reshook)) // If creation from another object of another module (Example: origin=propal, originid=1) if (! empty($origin) && ! empty($originid)) { - if ($origin == 'order' || $origin == 'commande') + if ($origin == 'propal' || $origin == 'proposal') { + $classname = 'Propal'; + $element = 'comm/propal'; $subelement = 'propal'; + } + elseif ($origin == 'order' || $origin == 'commande') + { + $classname = 'Commande'; $element = $subelement = 'commande'; } else { + $classname = 'SupplierProposal'; $element = 'supplier_proposal'; $subelement = 'supplier_proposal'; } @@ -1131,7 +1142,6 @@ if (empty($reshook)) { dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); - $classname = 'SupplierProposal'; $srcobject = new $classname($db); dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); @@ -1153,7 +1163,6 @@ if (empty($reshook)) for($i = 0; $i < $num; $i ++) { - if (empty($lines[$i]->subprice) || $lines[$i]->qty <= 0) continue; @@ -1168,7 +1177,6 @@ if (empty($reshook)) // Extrafields if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if - // trigger used { $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_option = $lines[$i]->array_options; @@ -1443,7 +1451,7 @@ llxHeader('', $langs->trans("Order"), $help_url); $now=dol_now(); if ($action=='create') { - print load_fiche_titre($langs->trans('NewOrder')); + print load_fiche_titre($langs->trans('NewOrderSupplier')); dol_htmloutput_events(); @@ -1460,17 +1468,31 @@ if ($action=='create') { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; + $regs=array(); if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { - $element = $regs [1]; - $subelement = $regs [2]; + $element = $regs[1]; + $subelement = $regs[2]; } - $element = 'supplier_proposal'; - $subelement = 'supplier_proposal'; + if ($origin == 'propal' || $origin == 'proposal') + { + $classname = 'Propal'; + $element = 'comm/propal'; $subelement = 'propal'; + } + elseif ($origin == 'order' || $origin == 'commande') + { + $classname = 'Commande'; + $element = $subelement = 'commande'; + } + else + { + $classname = 'SupplierProposal'; + $element = 'supplier_proposal'; + $subelement = 'supplier_proposal'; + } dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); - $classname = 'SupplierProposal'; $objectsrc = new $classname($db); $objectsrc->fetch($originid); if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) @@ -1669,7 +1691,6 @@ if ($action=='create') print ''; if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) { - print "\n"; print "\n"; print '' . "\n"; @@ -1771,7 +1792,7 @@ elseif (! empty($object->id)) { // Create an array for form $formquestion=array( - //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1) + array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.fournisseur=1)')) ); // Paiement incomplet. On demande si motif = escompte ou autre $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); @@ -2050,7 +2071,7 @@ elseif (! empty($object->id)) print '
'; print '
'.$langs->trans("Summary").''.$langs->trans("ShowSupplierPreview").'
'.dol_print_date($db->jdate($obj->df), 'day').''.price($obj->amount).'
'; - if ($action != 'editmulticurrencycode' && $object->statut == CommandeFournisseur::STATUS_DRAFT) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT) print ''; print '
'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; print '
'; @@ -2062,29 +2083,33 @@ elseif (! empty($object->id)) print '
'; - print ''; - if ($action != 'editmulticurrencyrate' && $object->statut == CommandeFournisseur::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) - print ''; - print '
'; - print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; - print '
'; - if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { - if($action == 'actualizemulticurrencyrate') { - list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); - } - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); - } else { - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); - if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { - print '
        '; - print ''.$langs->trans("ActualizeCurrency").''; - print '
'; + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) + { + print '
'; + print ''; + print ''; + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) + print ''; + print '
'; + print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { + if($action == 'actualizemulticurrencyrate') { + list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); + } + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); + if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { + print '
        '; + print ''.$langs->trans("ActualizeCurrency").''; + print '
'; + } } + print '
' . $author->getNomUrl(1, '', 0, 0, 0) . '
"; @@ -495,7 +496,7 @@ if ($id > 0 || ! empty($ref)) { else print ''; print '
'; - print ''; + print '
'; // Set $products_dispatched with qty dispatched for each product id $products_dispatched = array(); @@ -733,7 +734,6 @@ if ($id > 0 || ! empty($ref)) { print ''; print ''; // Supplier ref + Qty ordered + qty already dispatched } else { - $type = 'dispatch'; print ''; // Qty to dispatch @@ -922,7 +922,7 @@ if ($id > 0 || ! empty($ref)) { print load_fiche_titre($langs->trans("ReceivingForSameOrder")); print '
'; - print '
 '; print '
'; + print '
'; print ''; if($conf->reception->enabled)print ''; @@ -960,7 +960,6 @@ if ($id > 0 || ! empty($ref)) { if(!empty($conf->reception->enabled) ){ print '
' . $langs->trans("Reception") . ''; if (!empty($objp->fk_reception)){ - $reception = new Reception($db); $reception->fetch($objp->fk_reception); print $reception->getNomUrl(1); diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index aece9d02014..8fbe54e8580 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -47,7 +47,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); // Get parameters @@ -126,20 +126,21 @@ if ($object->id > 0) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->fournisseur->commande->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index a5a9a1e47a3..f872207221d 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; // Security check $orderid = GETPOST('orderid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); $hookmanager = new HookManager($db); @@ -63,11 +63,12 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; - print ''; + print '
'; + print '
'; print ''; print ''; - print "
'.$langs->trans("Search").'
'; print $langs->trans("SupplierOrder").':

\n"; + print "

\n"; } @@ -81,7 +82,7 @@ $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE cf.fk_soc = s.rowid"; $sql.= " AND cf.entity = ".$conf->entity; -if ($user->societe_id) $sql.=' AND cf.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND cf.fk_soc = '.$user->socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " GROUP BY cf.fk_statut"; @@ -114,18 +115,18 @@ if ($resql) } $db->free($resql); - print ''; + print '
'; + print '
'; print ''; print "\n"; - foreach (array(0,1,2,3,4,5,6) as $statut) + foreach (array(0,1,2,3,4,5,6) as $status) { - $dataseries[]=array($commandestatic->LibStatut($statut, 1), (isset($vals[$statut])?(int) $vals[$statut]:0)); + $dataseries[]=array($commandestatic->LibStatut($status, 1), (isset($vals[$status])?(int) $vals[$status]:0)); if (! $conf->use_javascript_ajax) { - print ''; - print ''; - print ''; + print ''; + print ''; print "\n"; } } @@ -149,7 +150,7 @@ if ($resql) //print ''; print ''; - print "
'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'
'.$commandestatic->LibStatut($statut, 0).''.(isset($vals[$statut])?$vals[$statut]:0).''.$commandestatic->LibStatut($status, 0).''.(isset($vals[$status])?$vals[$status]:0).'
'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; + print "

"; } else { @@ -169,7 +170,7 @@ $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE cf.fk_soc = s.rowid"; $sql.= " AND s.entity = ".$conf->entity; -if ($user->societe_id) $sql.=' AND cf.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND cf.fk_soc = '.$user->socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " GROUP BY cf.fk_statut"; @@ -179,7 +180,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; @@ -196,7 +198,7 @@ if ($resql) print "\n"; $i++; } - print "
'.$langs->trans("Status").''.$langs->trans("Nb").'

"; + print "

"; $db->free($resql); } else @@ -224,7 +226,8 @@ if (! empty($conf->fournisseur->enabled)) $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; + print '
'; print ''; print ''; $langs->load("orders"); @@ -243,7 +246,7 @@ if (! empty($conf->fournisseur->enabled)) $i++; } } - print "
'.$langs->trans("DraftOrders").'

"; + print "

"; } } @@ -269,7 +272,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ''; + print '
'; + print '
'; print ''; print "\n"; @@ -288,7 +292,7 @@ if ($resql) print "\n"; $i++; } - print "
'.$langs->trans("UserWithApproveOrderGrant").'

"; + print "

"; $db->free($resql); } else @@ -320,7 +324,8 @@ $sql.= $db->plimit($max, 0); $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; + print '
'; print ''; print ''; @@ -363,7 +368,7 @@ if ($resql) $i++; } } - print "
'.$langs->trans("LastModifiedOrders", $max).'

"; + print "

"; } else dol_print_error($db); @@ -388,7 +393,8 @@ if ($resql) { $num = $db->num_rows($resql); -print ''; +print '
'; +print '
'; print ''; print ''; @@ -432,7 +438,7 @@ $i++; } } -print "
'.$langs->trans("OrdersToProcess").' ('.$num.')

"; +print "

"; } */ diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index 45f04b865ea..4f73b373589 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -53,7 +53,7 @@ $search_agenda_label=GETPOST('search_agenda_label'); // Security check $socid=0; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); if (!$user->rights->fournisseur->commande->lire) accessforbidden(); @@ -122,20 +122,21 @@ if (! empty($conf->projet->enabled)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->fournisseur->commande->creer) { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 14ac029bb27..197d4562114 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -91,7 +91,7 @@ $viewstatut=GETPOST('viewstatut'); // Security check $orderid = GETPOST('orderid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); $diroutputmassaction=$conf->fournisseur->commande->dir_output . '/temp/massgeneration/'.$user->id; @@ -223,8 +223,8 @@ if (empty($reshook)) // Mass actions $objectclass='CommandeFournisseur'; $objectlabel='SupplierOrders'; - $permtoread = $user->rights->fournisseur->commande->lire; - $permtodelete = $user->rights->fournisseur->commande->supprimer; + $permissiontoread = $user->rights->fournisseur->commande->lire; + $permissiontodelete = $user->rights->fournisseur->commande->supprimer; $uploaddir = $conf->fournisseur->commande->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -243,14 +243,12 @@ if (empty($reshook)) $db->begin(); foreach($orders as $id_order) { - $cmd = new Commande($db); if($cmd->fetch($id_order) <= 0) continue; $object = new Facture($db); if(!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $object = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. else { - $object->socid = $cmd->socid; $object->type = Facture::TYPE_STANDARD; $object->cond_reglement_id = $cmd->cond_reglement_id; @@ -349,7 +347,7 @@ if (empty($reshook)) { $fk_parent_line = 0; } - $result = $object->addline( + $result = $object->addline( $desc, $lines[$i]->subprice, $lines[$i]->qty, @@ -406,7 +404,6 @@ if (empty($reshook)) $toselect = array(); if (! $error && $validate_invoices) { - $massaction = $action = 'builddoc'; foreach($TAllFact as &$object) @@ -424,7 +421,7 @@ if (empty($reshook)) // Fac builddoc $donotredirect = 1; $upload_dir = $conf->facture->dir_output; - $permissioncreate=$user->rights->facture->creer; + $permissiontoadd=$user->rights->facture->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -484,15 +481,17 @@ $help_url=''; $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; -$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; +$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,'; $sql.= " typent.code as typent_code,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_delivery,"; $sql.= ' cf.date_creation as date_creation, cf.tms as date_update,'; $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_title,"; -$sql.= " u.firstname, u.lastname, u.photo, u.login"; +$sql.= " u.firstname, u.lastname, u.photo, u.login, u.email as user_email"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -946,20 +945,12 @@ if ($resql) { print '
'; - print ''; // Picto + Ref - print ''; - // Warning - //print ''; // Other picto tool - print '
'; print $objectstatic->getNomUrl(1); - print ''; - //print ''; $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->fournisseur->commande->dir_output.'/' . dol_sanitizeFileName($obj->ref); print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - print '
'; print '
"; + print ''; if ($userstatic->id) print $userstatic->getNomUrl(1); - else print " "; print "'; + print ''; $thirdpartytmp->id = $obj->socid; $thirdpartytmp->name = $obj->name; + $thirdpartytmp->email = $obj->email; print $thirdpartytmp->getNomUrl(1, 'supplier'); print ''.price($obj->total_ht)."'.price($obj->total_tva)."'.price($obj->total_ttc)."
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).'
'; + print '
'; // Ref print ''; @@ -400,7 +398,7 @@ if ($action == 'create' && !$error) { print ''; // Private note - if (empty($user->societe_id)) { + if (empty($user->socid)) { print ''; print ''; print ''; // Multicurrency rate - print ''; - print ''; + print ''; } - print ''; } // Bank Account @@ -2774,7 +2788,7 @@ else } print ''; print ' +if (empty($dolibarr_main_url_root)) { + $dolibarr_main_document_root = detect_dolibarr_main_document_root(); +} +?> - @@ -245,9 +244,7 @@ if (! empty($force_install_message)) id="db_name" name="db_name" value="" - + > @@ -324,9 +321,7 @@ if (! empty($force_install_message)) ?> @@ -343,9 +338,7 @@ if (! empty($force_install_message)) id="db_host" name="db_host" value="" - + > @@ -391,12 +380,8 @@ if (! empty($force_install_message)) - + + > @@ -424,17 +407,16 @@ if (! empty($force_install_message)) + value=" + " + > @@ -446,12 +428,8 @@ if (! empty($force_install_message)) - + + > '; +} + +/** + * Migrate members fields facebook and co to socialnetworks + * + * @return void + */ +function migrate_members_socialnetworks() +{ + global $db, $langs; + + print ''; +} + +/** + * Migrate contacts fields facebook and co to socialnetworks + * + * @return void + */ +function migrate_contacts_socialnetworks() +{ + global $db, $langs; + // jabberid,skype,twitter,facebook,linkedin,instagram,snapchat,googleplus,youtube,whatsapp + $error = 0; + $db->begin(); + print ''; +} + +/** + * Migrate thirdparties fields facebook and co to socialnetworks + * + * @return void + */ +function migrate_thirdparties_socialnetworks() +{ + global $db, $langs; + // skype,twitter,facebook,linkedin,instagram,snapchat,googleplus,youtube,whatsapp + $error = 0; + $db->begin(); + print ''; +} diff --git a/htdocs/langs/de_DE/products.lang b/htdocs/langs/de_DE/products.lang index 6b163a857c8..13c61b3fa67 100644 --- a/htdocs/langs/de_DE/products.lang +++ b/htdocs/langs/de_DE/products.lang @@ -341,3 +341,4 @@ ErrorDestinationProductNotFound=Zielprodukt nicht gefunden ErrorProductCombinationNotFound=Produktvariante nicht gefunden ActionAvailableOnVariantProductOnly=Action only available on the variant of product ProductsPricePerCustomer=Product prices per customers +ProductSupplierExtraFields=Ergänzende Attribute (Lieferantenpreise) \ No newline at end of file diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index a76e79aa701..45133632481 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -98,6 +98,8 @@ MenuExpenseReportAccounts=Expense report accounts MenuLoanAccounts=Loan accounts MenuProductsAccounts=Product accounts MenuClosureAccounts=Closure accounts +MenuAccountancyClosure=Closure +MenuAccountancyValidationMovements=Validate movements ProductsBinding=Products accounts TransferInAccounting=Transfer in accounting RegistrationInAccounting=Registration in accounting @@ -243,6 +245,12 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or DescVentilExpenseReportMore=If you setup accounting account on type of expense report lines, the application will be able to make all the binding between your expense report lines and the accounting account of your chart of accounts, just in one click with the button "%s". If account was not set on fees dictionary or if you still have some lines not bound to any account, you will have to make a manual binding from the menu "%s". DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account +DescClosure=Consult here the number of movements by month who are not validated & fiscal years already open +OverviewOfMovementsNotValidated=Step 1/ Overview of movements not validated. (Necessary to close a fiscal year) +ValidateMovements=Validate movements +DescValidateMovements=Any modification or deletion of writing, lettering and deletes will be prohibited. All entries for an exercise must be validated otherwise closing will not be possible +SelectMonthAndValidate=Select month and validate movements + ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index afce2e4fa34..ebc8431f5e3 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -149,7 +149,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not normally necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server. PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: %s.
This will delete all generated documents related to elements (third parties, invoices etc...), files uploaded into the ECM module, database backup dumps and temporary files. PurgeRunNow=Purge now @@ -277,7 +277,7 @@ MAIN_MAIL_ERRORS_TO=Email used for error returns emails (fields 'Errors-To' in e MAIN_MAIL_AUTOCOPY_TO= Copy (Bcc) all sent emails to MAIN_DISABLE_ALL_MAILS=Disable all email sending (for test purposes or demos) MAIN_MAIL_FORCE_SENDTO=Send all emails to (instead of real recipients, for test purposes) -MAIN_MAIL_ENABLED_USER_DEST_SELECT=Add employee users with email into allowed recipient list +MAIN_MAIL_ENABLED_USER_DEST_SELECT=Suggest emails of employees (if defined) into the list of predefined recipient when writing a new email MAIN_MAIL_SENDMODE=Email sending method MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication) MAIN_MAIL_SMTPS_PW=SMTP Password (if sending server requires authentication) @@ -476,7 +476,7 @@ TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. Technical knowled PageUrlForDefaultValues=You must enter the relative path of the page URL. If you include parameters in URL, the default values will be effective if all parameters are set to same value. PageUrlForDefaultValuesCreate=
Example:
For the form to create a new third party, it is %s.
For URL of external modules installed into custom directory, do not include the "custom/", so use path like mymodule/mypage.php and not custom/mymodule/mypage.php.
If you want default value only if url has some parameter, you can use %s PageUrlForDefaultValuesList=
Example:
For the page that lists third parties, it is %s.
For URL of external modules installed into custom directory, do not include the "custom/" so use a path like mymodule/mypagelist.php and not custom/mymodule/mypagelist.php.
If you want default value only if url has some parameter, you can use %s -AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...) +AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...) EnableDefaultValues=Enable customization of default values EnableOverwriteTranslation=Enable usage of overwritten translation GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code. To change this value, you must edit it from Home-Setup-translation. @@ -875,9 +875,9 @@ Permission1251=Run mass imports of external data into database (data load) Permission1321=Export customer invoices, attributes and payments Permission1322=Reopen a paid bill Permission1421=Export sales orders and attributes -Permission2401=Read actions (events or tasks) linked to his account -Permission2402=Create/modify actions (events or tasks) linked to his account -Permission2403=Delete actions (events or tasks) linked to his account +Permission2401=Read actions (events or tasks) linked to his user account (if owner of event) +Permission2402=Create/modify actions (events or tasks) linked to his user account (if owner of event) +Permission2403=Delete actions (events or tasks) linked to his user account (if owner of event) Permission2411=Read actions (events or tasks) of others Permission2412=Create/modify actions (events or tasks) of others Permission2413=Delete actions (events or tasks) of others @@ -917,7 +917,7 @@ Permission50414=Delete operations in ledger Permission50415=Delete all operations by year and journal in ledger Permission50418=Export operations of the ledger Permission50420=Report and export reports (turnover, balance, journals, ledger) -Permission50430=Define and close a fiscal period +Permission50430=Define fiscal periods. Validate transactions and close fiscal periods. Permission50440=Manage chart of accounts, setup of accountancy Permission51001=Read assets Permission51002=Create/Update assets @@ -964,6 +964,7 @@ DictionaryAccountancyJournal=Accounting journals DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units +DictionarySocialNetworks=Social Networks DictionaryProspectStatus=Prospect status DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead @@ -1069,7 +1070,11 @@ CompanyTown=Town CompanyCountry=Country CompanyCurrency=Main currency CompanyObject=Object of the company +IDCountry=ID country Logo=Logo +LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...) +LogoSquarred=Logo (squarred) +LogoSquarredDesc=Must be a squarred icon (width = height). This logo will be used as the favorite icon or other need like for the top menu bar (if not disabled into display setup). DoNotSuggestPaymentMode=Do not suggest NoActiveBankAccountDefined=No active bank account defined OwnerOfBankAccount=Owner of bank account %s @@ -1115,7 +1120,7 @@ LogEventDesc=Enable logging for specific security events. Administrators the log AreaForAdminOnly=Setup parameters can be set by administrator users only. SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only. SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. -CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" or "%s" button at the bottom of the page. +CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" button at the bottom of the page. AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. AccountantFileNumber=Accountant code DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. @@ -1792,6 +1797,8 @@ FixTZ=TimeZone fix FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced) ExpectedChecksum=Expected Checksum CurrentChecksum=Current Checksum +ExpectedSize=Expected size +CurrentSize=Current size ForcedConstants=Required constant values MailToSendProposal=Customer proposals MailToSendOrder=Sales orders diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 8ad19e06695..42e8aef5b54 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -76,6 +76,7 @@ ContractSentByEMail=Contract %s sent by email OrderSentByEMail=Sales order %s sent by email InvoiceSentByEMail=Customer invoice %s sent by email SupplierOrderSentByEMail=Purchase order %s sent by email +ORDER_SUPPLIER_DELETEInDolibarr=Purchase order %s deleted SupplierInvoiceSentByEMail=Vendor invoice %s sent by email ShippingSentByEMail=Shipment %s sent by email ShippingValidated= Shipment %s validated @@ -103,6 +104,14 @@ TICKET_MODIFYInDolibarr=Ticket %s modified TICKET_ASSIGNEDInDolibarr=Ticket %s assigned TICKET_CLOSEInDolibarr=Ticket %s closed TICKET_DELETEInDolibarr=Ticket %s deleted +BOM_VALIDATEInDolibarr=BOM validated +BOM_UNVALIDATEInDolibarr=BOM unvalidated +BOM_CLOSEInDolibarr=BOM disabled +BOM_REOPENInDolibarr=BOM reopen +BOM_DELETEInDolibarr=BOM deleted +MO_VALIDATEInDolibarr=MO validated +MO_PRODUCEDInDolibarr=MO produced +MO_DELETEInDolibarr=MO deleted ##### End agenda events ##### AgendaModelModule=Document templates for event DateActionStart=Start date diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 484ad5f7867..f7ed7bcade0 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -151,7 +151,7 @@ ErrorBillNotFound=Invoice %s does not exist ErrorInvoiceAlreadyReplaced=Error, you tried to validate an invoice to replace invoice %s. But this one has already been replaced by invoice %s. ErrorDiscountAlreadyUsed=Error, discount already used ErrorInvoiceAvoirMustBeNegative=Error, correct invoice must have a negative amount -ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have a positive amount +ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) ErrorCantCancelIfReplacementInvoiceNotValidated=Error, can't cancel an invoice that has been replaced by another invoice that is still in draft status ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed. BillFrom=From @@ -175,6 +175,7 @@ DraftBills=Draft invoices CustomersDraftInvoices=Customer draft invoices SuppliersDraftInvoices=Vendor draft invoices Unpaid=Unpaid +ErrorNoPaymentDefined=Error No payment defined ConfirmDeleteBill=Are you sure you want to delete this invoice? ConfirmValidateBill=Are you sure you want to validate this invoice with reference %s? ConfirmUnvalidateBill=Are you sure you want to change invoice %s to draft status? @@ -295,7 +296,8 @@ AddGlobalDiscount=Create absolute discount EditGlobalDiscounts=Edit absolute discounts AddCreditNote=Create credit note ShowDiscount=Show discount -ShowReduc=Show the deduction +ShowReduc=Show the discount +ShowSourceInvoice=Show the source invoice RelativeDiscount=Relative discount GlobalDiscount=Global discount CreditNote=Credit note diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 84815016b7d..a55a0194632 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -44,6 +44,8 @@ BoxTitleLastActionsToDo=Latest %s actions to do BoxTitleLastContracts=Latest %s modified contracts BoxTitleLastModifiedDonations=Latest %s modified donations BoxTitleLastModifiedExpenses=Latest %s modified expense reports +BoxTitleLatestModifiedBoms=Latest %s modified BOMs +BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders BoxGlobalActivity=Global activity (invoices, proposals, orders) BoxGoodCustomers=Good customers BoxTitleGoodCustomers=%s Good customers @@ -66,6 +68,7 @@ NoContractedProducts=No products/services contracted NoRecordedContracts=No recorded contracts NoRecordedInterventions=No recorded interventions BoxLatestSupplierOrders=Latest purchase orders +BoxLatestSupplierOrdersAwaitingReception=Latest Purchase Orders (with a pending reception) NoSupplierOrder=No recorded purchase order BoxCustomersInvoicesPerMonth=Customer Invoices per month BoxSuppliersInvoicesPerMonth=Vendor Invoices per month @@ -88,7 +91,7 @@ ChooseBoxToAdd=Add widget to your dashboard BoxAdded=Widget was added in your dashboard BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s last manual entries +BoxTitleLastManualEntries=%s latest manual entries NoRecordedManualEntries=No manual entries record in accountancy BoxSuspenseAccount=Count accountancy operation with suspense account BoxTitleSuspenseAccount=Number of unallocated lines diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index a4ab22d47c5..31b0634f579 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -438,5 +438,6 @@ PaymentTypeCustomer=Payment Type - Customer PaymentTermsCustomer=Payment Terms - Customer PaymentTypeSupplier=Payment Type - Vendor PaymentTermsSupplier=Payment Term - Vendor +PaymentTypeBoth=Payment Type - Customer and Vendor MulticurrencyUsed=Use Multicurrency -MulticurrencyCurrency=Currency \ No newline at end of file +MulticurrencyCurrency=Currency diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 42d88f3f722..eb76d9c64a2 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -112,7 +112,7 @@ ShowVatPayment=Show VAT payment TotalToPay=Total to pay BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account CustomerAccountancyCode=Customer accounting code -SupplierAccountancyCode=vendor accounting code +SupplierAccountancyCode=Vendor accounting code CustomerAccountancyCodeShort=Cust. account. code SupplierAccountancyCodeShort=Sup. account. code AccountNumber=Account number diff --git a/htdocs/langs/en_US/donations.lang b/htdocs/langs/en_US/donations.lang index 5edc8d62033..a810c61c8f4 100644 --- a/htdocs/langs/en_US/donations.lang +++ b/htdocs/langs/en_US/donations.lang @@ -17,6 +17,7 @@ DonationStatusPromiseNotValidatedShort=Draft DonationStatusPromiseValidatedShort=Validated DonationStatusPaidShort=Received DonationTitle=Donation receipt +DonationDate=Donation date DonationDatePayment=Payment date ValidPromess=Validate promise DonationReceipt=Donation receipt diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index f8c3c1a1aee..2b23fc6d19e 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -196,6 +196,7 @@ ErrorPhpMailDelivery=Check that you don't use a too high number of recipients an ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed. ErrorTaskAlreadyAssigned=Task already assigned to user ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format. +ErrorModuleFileSeemsToHaveAWrongFormat2=At least one mandatory directory must exists into zip of module: %s or %s ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (%s) does not match expected name syntax: %s ErrorDuplicateTrigger=Error, duplicate trigger name %s. Already loaded from %s. ErrorNoWarehouseDefined=Error, no warehouses defined. @@ -219,6 +220,9 @@ ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// ErrorNewRefIsAlreadyUsed=Error, the new reference is already used ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, delete payment linked to a closed invoice is not possible. ErrorSearchCriteriaTooSmall=Search criteria too small. +ErrorObjectMustHaveStatusActiveToBeDisabled=Objects must have status 'Active' to be disabled +ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Objects must have status 'Draft' or 'Disabled' to be enabled +ErrorNoFieldWithAttributeShowoncombobox=No fields has property 'showoncombobox' into definition of object '%s'. No way to show the combolist. # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index 3ef3532a08e..cfd95d879b7 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -205,6 +205,10 @@ MigrationRemiseExceptEntity=Update entity field value of llx_societe_remise_exce MigrationUserRightsEntity=Update entity field value of llx_user_rights MigrationUserGroupRightsEntity=Update entity field value of llx_usergroup_rights MigrationUserPhotoPath=Migration of photo paths for users +MigrationUsersSocialNetworks=Migration of users fields social networks +MigrationMembersSocialNetworks=Migration of members fields social networks +MigrationContactsSocialNetworks=Migration of contacts fields social networks +MigrationThirdpartiesSocialNetworks=Migration of thirdparties fields social networks MigrationReloadModule=Reload module %s MigrationResetBlockedLog=Reset module BlockedLog for v7 algorithm ShowNotAvailableOptions=Show unavailable options diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang index e7667ef6946..e65b966ea09 100644 --- a/htdocs/langs/en_US/interventions.lang +++ b/htdocs/langs/en_US/interventions.lang @@ -60,6 +60,7 @@ InterDateCreation=Date creation intervention InterDuration=Duration intervention InterStatus=Status intervention InterNote=Note intervention +InterLine=Line of intervention InterLineId=Line id intervention InterLineDate=Line date intervention InterLineDuration=Line duration intervention diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 04f45f8de4b..6e3ba31d36c 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -114,6 +114,7 @@ InformationToHelpDiagnose=This information can be useful for diagnostic purposes MoreInformation=More information TechnicalInformation=Technical information TechnicalID=Technical ID +LineID=Line ID NotePublic=Note (public) NotePrivate=Note (private) PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to %s decimals. @@ -169,6 +170,7 @@ ToValidate=To validate NotValidated=Not validated Save=Save SaveAs=Save As +SaveAndStay=Save and stay TestConnection=Test connection ToClone=Clone ConfirmClone=Choose data you want to clone: @@ -182,6 +184,7 @@ Hide=Hide ShowCardHere=Show card Search=Search SearchOf=Search +SearchMenuShortCut=Ctrl + shift + f Valid=Valid Approve=Approve Disapprove=Disapprove @@ -475,7 +478,9 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromLocation=From to=to +To=to and=and or=or Other=Other diff --git a/htdocs/langs/en_US/margins.lang b/htdocs/langs/en_US/margins.lang index d4545b8e75f..76ea8ad5c4d 100644 --- a/htdocs/langs/en_US/margins.lang +++ b/htdocs/langs/en_US/margins.lang @@ -16,6 +16,7 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service AllProducts=All products and services @@ -36,7 +37,7 @@ CostPrice=Cost price UnitCharges=Unit charges Charges=Charges AgentContactType=Commercial agent contact type -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per sale representative +AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per contact/address. Note that reading statistics on a contact is not reliable since in most cases the contact may not be defined explicitely on the invoices. rateMustBeNumeric=Rate must be a numeric value markRateShouldBeLesserThan100=Mark rate should be lower than 100 ShowMarginInfos=Show margin infos diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index a1c35515f9d..d14aa8a3c71 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -6,7 +6,7 @@ ModuleBuilderDesc2=Path where modules are generated/edited (first directory for ModuleBuilderDesc3=Generated/editable modules found: %s ModuleBuilderDesc4=A module is detected as 'editable' when the file %s exists in root of module directory NewModule=New module -NewObject=New object +NewObjectInModulebuilder=New object ModuleKey=Module key ObjectKey=Object key ModuleInitialized=Module initialized @@ -60,12 +60,14 @@ HooksFile=File for hooks code ArrayOfKeyValues=Array of key-val ArrayOfKeyValuesDesc=Array of keys and values if field is a combo list with fixed values WidgetFile=Widget file +CSSFile=CSS file +JSFile=Javascript file ReadmeFile=Readme file ChangeLog=ChangeLog file TestClassFile=File for PHP Unit Test class SqlFile=Sql file -PageForLib=File for PHP library -PageForObjLib=File for PHP library dedicated to object +PageForLib=File for the common PHP library +PageForObjLib=File for the PHP library dedicated to object SqlFileExtraFields=Sql file for complementary attributes SqlFileKey=Sql file for keys SqlFileKeyExtraFields=Sql file for keys of complementary attributes @@ -77,6 +79,7 @@ NoTrigger=No trigger NoWidget=No widget GoToApiExplorer=Go to API explorer ListOfMenusEntries=List of menu entries +ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions SeeExamples=See examples here EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) @@ -86,8 +89,10 @@ SearchAllDesc=Is the field used to make a search from the quick search tool? (Ex SpecDefDesc=Enter here all documentation you want to provide with your module that is not already defined by other tabs. You can use .md or better, the rich .asciidoc syntax. LanguageDefDesc=Enter in this files, all the key and the translation for each language file. MenusDefDesc=Define here the menus provided by your module +DictionariesDefDesc=Define here the dictionaries provided by your module PermissionsDefDesc=Define here the new permissions provided by your module MenusDefDescTooltip=The menus provided by your module/application are defined into the array $this->menus into the module descriptor file. You can edit manually this file or use the embedded editor.

Note: Once defined (and module re-activated), menus are also visible into the menu editor available to administrator users on %s. +DictionariesDefDescTooltip=The dictionaries provided by your module/application are defined into the array $this->dictionaries into the module descriptor file. You can edit manually this file or use the embedded editor.

Note: Once defined (and module re-activated), dictionaries are also visible into the setup area to administrator users on %s. PermissionsDefDescTooltip=The permissions provided by your module/application are defined into the array $this->rights into the module descriptor file. You can edit manually this file or use the embedded editor.

Note: Once defined (and module re-activated), permissions are visible into the default permissions setup %s. HooksDefDesc=Define in the module_parts['hooks'] property, in the module descriptor, the context of hooks you want to manage (list of contexts can be found by a search on 'initHooks(' in core code).
Edit the hook file to add code of your hooked functions (hookable functions can be found by a search on 'executeHooks' in core code). TriggerDefDesc=Define in the trigger file the code you want to execute for each business event executed. @@ -109,6 +114,8 @@ ContentOfREADMECustomized=Note: The content of the README.md file has been repla RealPathOfModule=Real path of module ContentCantBeEmpty=Content of file can't be empty WidgetDesc=You can generate and edit here the widgets that will be embedded with your module. +CSSDesc=You can generate and edit here a file with personalized CSS embedded with your module. +JSDesc=You can generate and edit here a file with personalized Javascript embedded with your module. CLIDesc=You can generate here some command line scripts you want to provide with your module. CLIFile=CLI File NoCLIFile=No CLI files @@ -117,4 +124,14 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first \ No newline at end of file +ModuleMustBeEnabled=The module/application must be enabled first +IncludeRefGeneration=The reference of object must be generated automatically +IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference +IncludeDocGeneration=I want to generate some documents from the object +IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record. +ShowOnCombobox=Show value into combobox +KeyForTooltip=Key for tooltip +CSSClass=CSS Class +NotEditable=Not editable +ForeignKey=Foreign key +TypeOfFieldsHelp=Type of fields:
varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example) \ No newline at end of file diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 29bb88a80a4..fd89d8c8e38 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -1,24 +1,51 @@ +Mrp=Manufacturing Orders +MO=Manufacturing Order +MRPDescription=Module to manage Manufacturing Orders (MO). MRPArea=MRP Area +MrpSetupPage=Setup of module MRP MenuBOM=Bills of material LatestBOMModified=Latest %s Bills of materials modified +LatestMOModified=Latest %s Manufacturing Orders modified +Bom=Bills of Material BillOfMaterials=Bill of Material BOMsSetup=Setup of module BOM ListOfBOMs=List of bills of material - BOM ListOfManufacturingOrders=List of Manufacturing Orders NewBOM=New bill of material -ProductBOMHelp=Product to create with this BOM +ProductBOMHelp=Product to create with this BOM.
Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list. BOMsNumberingModules=BOM numbering templates -BOMsModelModule=BOMS document templates +BOMsModelModule=BOM document templates +MOsNumberingModules=MO numbering templates +MOsModelModule=MO document templates FreeLegalTextOnBOMs=Free text on document of BOM WatermarkOnDraftBOMs=Watermark on draft BOM -ConfirmCloneBillOfMaterials=Are you sure you want to clone this bill of material ? +FreeLegalTextOnMOs=Free text on document of MO +WatermarkOnDraftMOs=Watermark on draft MO +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ? ManufacturingEfficiency=Manufacturing efficiency ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the production DeleteBillOfMaterials=Delete Bill Of Materials +DeleteMo=Delete Manufacturing Order ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? MenuMRP=Manufacturing Orders NewMO=New Manufacturing Order QtyToProduce=Qty to produce DateStartPlannedMo=Date start planned DateEndPlannedMo=Date end planned -KeepEmptyForAsap=Empty means 'As Soon As Possible' \ No newline at end of file +KeepEmptyForAsap=Empty means 'As Soon As Possible' +EstimatedDuration=Estimated duration +EstimatedDurationDesc=Estimated duration to manufacture this product using this BOM +ConfirmValidateBom=Are you sure you want to validate the BOM with the reference %s (you will be able to use it to build new Manufacturing Orders) +ConfirmCloseBom=Are you sure you want to cancel this BOM (you won't be able to use it to build new Manufacturing Orders anymore) ? +ConfirmReopenBom=Are you sure you want to re-open this BOM (you will be able to use it to build new Manufacturing Orders) +StatusMOProduced=Produced +QtyFrozen=Frozen Qty +QuantityFrozen=Frozen Quantity +QuantityConsumedInvariable=When this flag is set, the quantity consumed is always the value defined and is not relative to the quantity produced. +DisableStockChange=Disable stock change +DisableStockChangeHelp=When this flag is set, there is no stock change on this product, whatever is the quantity produced +BomAndBomLines=Bills Of Material and lines +BOMLine=Line of BOM +WarehouseForProduction=Warehouse for production \ No newline at end of file diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index a010a64b907..3d22b338166 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -11,6 +11,7 @@ OrderDate=Order date OrderDateShort=Order date OrderToProcess=Order to process NewOrder=New order +NewOrderSupplier=New Purchase Order ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order @@ -70,6 +71,7 @@ DeleteOrder=Delete order CancelOrder=Cancel order OrderReopened= Order %s Reopened AddOrder=Create order +AddPurchaseOrder=Create purchase order AddToDraftOrders=Add to draft order ShowOrder=Show order OrdersOpened=Orders to process diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 34590a924be..6e9b6d66f32 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -252,6 +252,7 @@ ThirdPartyCreatedByEmailCollector=Third party created by email collector from em ContactCreatedByEmailCollector=Contact/address created by email collector from email MSGID %s ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s +OpeningHoursFormatDesc=Use a - to separate opening and closing hours.
Use a space to enter different ranges.
Example: 8-12 14-18 ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 9919767db0f..1ca335da637 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -213,8 +213,8 @@ UseMultipriceRules=Use price segment rules (defined into product module setup) t PercentVariationOver=%% variation over %s PercentDiscountOver=%% discount over %s KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products -VariantRefExample=Example: COL -VariantLabelExample=Example: Color +VariantRefExample=Examples: COL, SIZE +VariantLabelExample=Examples: Color, Size ### composition fabrication Build=Produce ProductsMultiPrice=Products and prices for each price segment @@ -292,6 +292,7 @@ ProductWeight=Weight for 1 product ProductVolume=Volume for 1 product WeightUnits=Weight unit VolumeUnits=Volume unit +SurfaceUnits=Surface unit SizeUnits=Size unit DeleteProductBuyPrice=Delete buying price ConfirmDeleteProductBuyPrice=Are you sure you want to delete this buying price? @@ -346,3 +347,4 @@ ErrorDestinationProductNotFound=Destination product not found ErrorProductCombinationNotFound=Product variant not found ActionAvailableOnVariantProductOnly=Action only available on the variant of product ProductsPricePerCustomer=Product prices per customers +ProductSupplierExtraFields=Additional Attributes (Supplier Prices) \ No newline at end of file diff --git a/htdocs/langs/en_US/receiptprinter.lang b/htdocs/langs/en_US/receiptprinter.lang index 756461488cc..5714ba78151 100644 --- a/htdocs/langs/en_US/receiptprinter.lang +++ b/htdocs/langs/en_US/receiptprinter.lang @@ -26,9 +26,10 @@ PROFILE_P822D=P822D Profile PROFILE_STAR=Star Profile PROFILE_DEFAULT_HELP=Default Profile suitable for Epson printers PROFILE_SIMPLE_HELP=Simple Profile No Graphics -PROFILE_EPOSTEP_HELP=Epos Tep Profile Help +PROFILE_EPOSTEP_HELP=Epos Tep Profile PROFILE_P822D_HELP=P822D Profile No Graphics PROFILE_STAR_HELP=Star Profile +DOL_LINE_FEED=Skip line DOL_ALIGN_LEFT=Left align text DOL_ALIGN_CENTER=Center text DOL_ALIGN_RIGHT=Right align text @@ -42,3 +43,5 @@ DOL_CUT_PAPER_PARTIAL=Cut ticket partially DOL_OPEN_DRAWER=Open cash drawer DOL_ACTIVATE_BUZZER=Activate buzzer DOL_PRINT_QRCODE=Print QR Code +DOL_PRINT_LOGO=Print logo of my company +DOL_PRINT_LOGO_OLD=Print logo of my company (old printers) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index a98d4e18cbf..18dc7faaeb9 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -212,3 +212,6 @@ StockIncreaseAfterCorrectTransfer=Increase by correction/transfer StockDecreaseAfterCorrectTransfer=Decrease by correction/transfer StockIncrease=Stock increase StockDecrease=Stock decrease +InventoryForASpecificWarehouse=Inventory for a specific warehouse +InventoryForASpecificProduct=Inventory for a specific product + diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 4bc40e19555..7a408e8952a 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -139,7 +139,7 @@ TicketViewNonClosedOnly=View only open tickets TicketStatByStatus=Tickets by status OrderByDateAsc=Sort by ascending date OrderByDateDesc=Sort by descending date -MessagingViewType=Show as messaging list +ShowAsConversation=Show as conversation list MessageListViewType=Show as table list # @@ -228,6 +228,7 @@ TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. PublicInterfaceNotEnabled=Public interface was not enabled +ErrorTicketRefRequired=Ticket reference name is required # # Logs diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index be758c04890..62ce5a23531 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -117,4 +117,5 @@ ImportSite=Import site EditInLineOnOff=Mode 'Edit inline' is %s ShowSubContainersOnOff=Mode to execute 'dynamic content' is %s GlobalCSSorJS=Global CSS/JS/Header file of web site -BackToHomePage=Back to home page... \ No newline at end of file +BackToHomePage=Back to home page... +TranslationLinks=Translation links \ No newline at end of file diff --git a/htdocs/langs/en_US/zapier.lang b/htdocs/langs/en_US/zapier.lang index 2699f54b721..07eb8460efa 100644 --- a/htdocs/langs/en_US/zapier.lang +++ b/htdocs/langs/en_US/zapier.lang @@ -18,36 +18,11 @@ # # Module label 'ModuleZapierForDolibarrName' -ModuleZapierForDolibarrName = ZapierForDolibarr +ModuleZapierForDolibarrName = Zapier for Dolibarr # Module description 'ModuleZapierForDolibarrDesc' -ModuleZapierForDolibarrDesc = ZapierForDolibarr description +ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # # Admin page # -ZapierForDolibarrSetup = ZapierForDolibarr setup -Settings = Settings -ZapierForDolibarrSetupPage = ZapierForDolibarr setup page -ZAPIERFORDOLIBARR_MYPARAM1 = My param 1 -ZAPIERFORDOLIBARR_MYPARAM1Tooltip = My param 1 tooltip -ZAPIERFORDOLIBARR_MYPARAM2=My param 2 -ZAPIERFORDOLIBARR_MYPARAM2Tooltip=My param 2 tooltip - - -# -# About page -# -About = About -ZapierForDolibarrAbout = About ZapierForDolibarr -ZapierForDolibarrAboutPage = ZapierForDolibarr about page - -# -# Sample page -# -MyPageName = My page name - -# -# Sample widget -# -MyWidget = My widget -MyWidgetDescription = My widget description +ZapierForDolibarrSetup = Setup of Zapier for Dolibarr \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index b375a3e16e0..afeed4b318d 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -476,6 +476,7 @@ Category=Tag/catégorie By=Par From=Du to=au +To=à and=et or=ou Other=Autre diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index f4d7e789ff5..5e87961493e 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -64,7 +64,7 @@ OrderDispatch=Réceptions RuleForStockManagementDecrease=Règle de gestion des décrémentations automatiques de stock (la décrémentation manuelle est toujours possible, même si une décrémentation automatique est activée) RuleForStockManagementIncrease=Règle de gestion des incrémentations de stock (l'incrémentation manuelle est toujours possible, même si une incrémentation automatique est activée) DeStockOnBill=Décrémenter les stocks physiques sur validation des factures/avoirs clients -DeStockOnValidateOrder=Décrémenterr les stocks physiques sur validation des commandes clients +DeStockOnValidateOrder=Décrémenter les stocks physiques sur validation des commandes clients DeStockOnShipment=Décrémenter les stocks physiques sur validation des expéditions DeStockOnShipmentOnClosing=Décrémente les stocks physiques au classement "clôturée" de l'expédition ReStockOnBill=Incrémenter les stocks physiques sur validation des factures/avoirs fournisseurs diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index fe3edc6fef4..3ef71743318 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -56,7 +56,7 @@ $backtopage=GETPOST('backtopage', 'alpha'); // Security check $id = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'expedition', $id, 'livraison', 'livraison'); $object = new Livraison($db); @@ -244,7 +244,7 @@ if ($action == 'update_extras_line') // Actions to build doc $upload_dir = $conf->expedition->dir_output.'/receipt'; -$permissioncreate = $user->rights->expedition->creer; +$permissiontoadd = $user->rights->expedition->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -307,8 +307,6 @@ $formfile = new FormFile($db); *********************************************************************/ if ($action == 'create') // Seems to no be used { - - } else /* *************************************************************************** */ @@ -561,7 +559,7 @@ else $entrepot = new Entrepot($db); $entrepot->fetch($object->entrepot_id); print ''; - print ''; + print ''; print ''; } @@ -588,7 +586,7 @@ else $num_prod = count($object->lines); $i = 0; $total = 0; - print '
' . $langs->trans('Ref') . '' . $langs->trans('Draft') . '
' . $langs->trans('NotePrivate') . ''; @@ -439,7 +437,7 @@ if (($action != 'create' && $action != 'add') && !$error) { }); }); -'; - print ''; + print '
'; print ''; print_liste_field_titre('Ref', 'orderstoinvoice.php', 'c.ref', '', '&socid=' . $socid, '', $sortfield, $sortorder); print_liste_field_titre('RefSupplier', 'orderstoinvoice.php', 'c.ref_supplier', '', '&socid=' . $socid, '', $sortfield, $sortorder); diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index 10ccf3a08bc..2af9de7223d 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php @@ -23,11 +23,9 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - +print "\n"; -load("orders"); -$total=0; $ilink=0; +$total=0; +$ilink=0; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> + ?> + if ($user->rights->fournisseur->commande->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> - 1) { @@ -74,6 +73,5 @@ if (count($linkedObjectBlock) > 1) - +print "\n"; diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 99a1c85902a..1b2005cf690 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -35,10 +35,10 @@ $langs->load("companies"); llxHeader(); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $sortfield = GETPOST("sortfield", 'alpha'); @@ -96,7 +96,7 @@ if ($result) $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); print_barre_liste($title." (".$langs->trans("Suppliers").")", $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num); - print '
trans("SupplierOrder"); ?> trans("ShowOrder"), "order").' '.$objectlink->ref; ?> ref_supplier; ?> date, 'day'); ?> rights->fournisseur->commande->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> getLibStatut(3); ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'; + print '
'; print ''; print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.name", $begin, "", "", $sortfield, $sortorder); print_liste_field_titre("Firstname", $_SERVER["PHP_SELF"], "p.firstname", $begin, "", "", $sortfield, $sortorder); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 369ab812d4e..3dc6e0383b0 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005 Marc Barilley @@ -9,7 +9,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2016-2017 Alexandre Spangaro - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2019 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -95,14 +95,13 @@ if ($id > 0 || ! empty($ref)) // Security check $socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $isdraft = (($object->statut == FactureFournisseur::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture', 'fk_soc', 'rowid', $isdraft); $permissionnote=$user->rights->fournisseur->facture->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink=$user->rights->fournisseur->facture->creer; // Used by the include of actions_dellink.inc.php -$permissionedit=$user->rights->fournisseur->facture->creer; // Used by the include of actions_lineupdown.inc.php -$permissiontoadd=$user->rights->fournisseur->facture->creer; // Used by the include of actions_addupdatedelete.inc.php +$permissiontoadd=$user->rights->fournisseur->facture->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php /* @@ -308,18 +307,20 @@ if (empty($reshook)) // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) - $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + $newlang = $object->thirdparty->default_lang; + } + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $ret = $object->fetch($object->id); // Reload to get new records + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } } } @@ -634,10 +635,10 @@ if (empty($reshook)) $result = $object->fetch(GETPOST('fac_replacement'), 'int'); $object->fetch_thirdparty(); - $object->ref = GETPOST('ref'); + $object->ref = GETPOST('ref', 'nohtml'); $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); $object->socid = GETPOST('socid', 'int'); - $object->libelle = GETPOST('label'); + $object->libelle = GETPOST('label', 'nohtml'); $object->date = $datefacture; $object->date_echeance = $datedue; $object->note_public = GETPOST('note_public', 'none'); @@ -666,7 +667,6 @@ if (empty($reshook)) // Credit note invoice if ($_POST['type'] == FactureFournisseur::TYPE_CREDIT_NOTE) { - $sourceinvoice = GETPOST('fac_avoir', 'int'); if (! ($sourceinvoice > 0) && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) { @@ -699,10 +699,11 @@ if (empty($reshook)) $tmpproject = GETPOST('projectid', 'int'); // Creation facture - $object->ref = $_POST['ref']; - $object->ref_supplier = $_POST['ref_supplier']; - $object->socid = $_POST['socid']; - $object->libelle = $_POST['label']; + $object->ref = GETPOST('ref', 'nohtml'); + $object->ref_supplier = GETPOST('ref_supplier', 'nohtml'); + $object->socid = GETPOST('socid', 'int'); + $object->libelle = GETPOST('label', 'nohtml'); + $object->label = GETPOST('label', 'nohtml'); $object->date = $datefacture; $object->date_echeance = $datedue; $object->note_public = GETPOST('note_public', 'none'); @@ -1018,97 +1019,97 @@ if (empty($reshook)) { $db->begin(); - $object->fetch($id); - $object->fetch_thirdparty(); + $object->fetch($id); + $object->fetch_thirdparty(); - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - if (GETPOST('price_ht') != '') - { - $up = price2num(GETPOST('price_ht')); - $price_base_type = 'HT'; - } - else - { - $up = price2num(GETPOST('price_ttc')); - $price_base_type = 'TTC'; - } + if (GETPOST('price_ht') != '') + { + $up = price2num(GETPOST('price_ht')); + $price_base_type = 'HT'; + } + else + { + $up = price2num(GETPOST('price_ttc')); + $price_base_type = 'TTC'; + } - if (GETPOST('productid') > 0) + if (GETPOST('productid') > 0) + { + $productsupplier = new ProductFournisseur($db); + if (! empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) { - $productsupplier = new ProductFournisseur($db); - if (! empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) + if (GETPOST('productid') > 0 && $productsupplier->get_buyprice(0, price2num($_POST['qty']), GETPOST('productid'), 'none', GETPOST('socid', 'int')) < 0 ) { - if (GETPOST('productid') > 0 && $productsupplier->get_buyprice(0, price2num($_POST['qty']), GETPOST('productid'), 'none', GETPOST('socid', 'int')) < 0 ) - { - setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'warnings'); - } - } - - $prod = new Product($db); - $prod->fetch(GETPOST('productid')); - $label = $prod->description; - if (trim($_POST['product_desc']) != trim($label)) $label=$_POST['product_desc']; - - $type = $prod->type; - } - else - { - $label = $_POST['product_desc']; - $type = $_POST["type"]?$_POST["type"]:0; - } - - $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); - $date_end=dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - - // Define info_bits - $info_bits = 0; - if (preg_match('/\*/', $tva_tx)) - $info_bits |= 0x01; - - // Define vat_rate - $tva_tx = str_replace('*', '', $tva_tx); - $localtax1_tx= get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); - $localtax2_tx= get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); - - $remise_percent=GETPOST('remise_percent'); - $pu_ht_devise = GETPOST('multicurrency_subprice'); - - // Extrafields Lines - $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); - // Unset extrafield POST Data - if (is_array($extralabelsline)) { - foreach ($extralabelsline as $key => $value) { - unset($_POST["options_" . $key]); + setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'warnings'); } } - $result=$object->updateline(GETPOST('lineid'), $label, $up, $tva_tx, $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('productid'), $price_base_type, $info_bits, $type, $remise_percent, 0, $date_start, $date_end, $array_options, $_POST['units'], $pu_ht_devise, GETPOST('fourn_ref', 'alpha')); - if ($result >= 0) - { - unset($_POST['label']); - unset($_POST['fourn_ref']); - unset($_POST['date_starthour']); - unset($_POST['date_startmin']); - unset($_POST['date_startsec']); - unset($_POST['date_startday']); - unset($_POST['date_startmonth']); - unset($_POST['date_startyear']); - unset($_POST['date_endhour']); - unset($_POST['date_endmin']); - unset($_POST['date_endsec']); - unset($_POST['date_endday']); - unset($_POST['date_endmonth']); - unset($_POST['date_endyear']); + $prod = new Product($db); + $prod->fetch(GETPOST('productid')); + $label = $prod->description; + if (trim($_POST['product_desc']) != trim($label)) $label=$_POST['product_desc']; - $db->commit(); - } - else - { - $db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); + $type = $prod->type; + } + else + { + $label = $_POST['product_desc']; + $type = $_POST["type"]?$_POST["type"]:0; + } + + $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); + $date_end=dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); + + // Define info_bits + $info_bits = 0; + if (preg_match('/\*/', $tva_tx)) + $info_bits |= 0x01; + + // Define vat_rate + $tva_tx = str_replace('*', '', $tva_tx); + $localtax1_tx= get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); + $localtax2_tx= get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); + + $remise_percent=GETPOST('remise_percent'); + $pu_ht_devise = GETPOST('multicurrency_subprice'); + + // Extrafields Lines + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); + // Unset extrafield POST Data + if (is_array($extralabelsline)) { + foreach ($extralabelsline as $key => $value) { + unset($_POST["options_" . $key]); } + } + + $result=$object->updateline(GETPOST('lineid'), $label, $up, $tva_tx, $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('productid'), $price_base_type, $info_bits, $type, $remise_percent, 0, $date_start, $date_end, $array_options, $_POST['units'], $pu_ht_devise, GETPOST('fourn_ref', 'alpha')); + if ($result >= 0) + { + unset($_POST['label']); + unset($_POST['fourn_ref']); + unset($_POST['date_starthour']); + unset($_POST['date_startmin']); + unset($_POST['date_startsec']); + unset($_POST['date_startday']); + unset($_POST['date_startmonth']); + unset($_POST['date_startyear']); + unset($_POST['date_endhour']); + unset($_POST['date_endmin']); + unset($_POST['date_endsec']); + unset($_POST['date_endday']); + unset($_POST['date_endmonth']); + unset($_POST['date_endyear']); + + $db->commit(); + } + else + { + $db->rollback(); + setEventMessages($object->error, $object->errors, 'errors'); + } } elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) @@ -1504,7 +1505,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->fournisseur->facture->dir_output; - $permissioncreate = $user->rights->fournisseur->facture->creer; + $permissiontoadd = $user->rights->fournisseur->facture->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Make calculation according to calculationrule @@ -1655,52 +1656,52 @@ if ($action == 'create') $element = 'projet'; } - // For compatibility - if ($element == 'order') { - $element = $subelement = 'commande'; - } - if ($element == 'propal') { - $element = 'comm/propal'; $subelement = 'propal'; - } - if ($element == 'contract') { - $element = $subelement = 'contrat'; - } - if ($element == 'order_supplier') { - $element = 'fourn'; $subelement = 'fournisseur.commande'; - } + // For compatibility + if ($element == 'order') { + $element = $subelement = 'commande'; + } + if ($element == 'propal') { + $element = 'comm/propal'; $subelement = 'propal'; + } + if ($element == 'contract') { + $element = $subelement = 'contrat'; + } + if ($element == 'order_supplier') { + $element = 'fourn'; $subelement = 'fournisseur.commande'; + } - require_once DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'; - $classname = ucfirst($subelement); - if ($classname == 'Fournisseur.commande') $classname='CommandeFournisseur'; - $objectsrc = new $classname($db); - $objectsrc->fetch($originid); - $objectsrc->fetch_thirdparty(); + require_once DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'; + $classname = ucfirst($subelement); + if ($classname == 'Fournisseur.commande') $classname='CommandeFournisseur'; + $objectsrc = new $classname($db); + $objectsrc->fetch($originid); + $objectsrc->fetch_thirdparty(); - $projectid = (!empty($objectsrc->fk_project)?$objectsrc->fk_project:''); - //$ref_client = (!empty($objectsrc->ref_client)?$object->ref_client:''); + $projectid = (!empty($objectsrc->fk_project)?$objectsrc->fk_project:''); + //$ref_client = (!empty($objectsrc->ref_client)?$object->ref_client:''); - $soc = $objectsrc->thirdparty; - $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_supplier_id)?$soc->cond_reglement_supplier_id:0)); // TODO maybe add default value option - $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_supplier_id)?$soc->mode_reglement_supplier_id:0)); - $fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0)); - $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_supplier_percent)?$soc->remise_supplier_percent:0)); - $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; + $soc = $objectsrc->thirdparty; + $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_supplier_id)?$soc->cond_reglement_supplier_id:0)); // TODO maybe add default value option + $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_supplier_id)?$soc->mode_reglement_supplier_id:0)); + $fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0)); + $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_supplier_percent)?$soc->remise_supplier_percent:0)); + $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; - if (!empty($conf->multicurrency->enabled)) - { - if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; - if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; - } + if (!empty($conf->multicurrency->enabled)) + { + if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + } - $datetmp=dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - $dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datetmp); - $datetmp=dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); - $datedue=($datetmp==''?-1:$datetmp); + $datetmp=dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datetmp); + $datetmp=dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); + $datedue=($datetmp==''?-1:$datetmp); - // Replicate extrafields - $objectsrc->fetch_optionals($originid); - $object->array_options = $objectsrc->array_options; + // Replicate extrafields + $objectsrc->fetch_optionals($originid); + $object->array_options = $objectsrc->array_options; } else { @@ -1725,7 +1726,7 @@ if ($action == 'create') dol_fiche_head(); - print '
'; + print '
'; // Ref print ''; @@ -1996,17 +1997,17 @@ if ($action == 'create') // Payment term print ''; // Payment mode print ''; // Bank Account print ''; // Multicurrency @@ -2015,7 +2016,7 @@ if ($action == 'create') print ''; print ''; print ''; } @@ -2036,7 +2037,7 @@ if ($action == 'create') print ''; print ''; print ''; } @@ -2045,10 +2046,10 @@ if ($action == 'create') print ''; - // print ''; + // print ''; print ''; // Private note @@ -2057,7 +2058,7 @@ if ($action == 'create') $note_private = $object->getDefaultCreateValueFor('note_private'); if(empty($note_private))$note_private = $objectsrc->note_private; - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', (GETPOSTISSET('note_private')?GETPOST('note_private', 'none'):$note_private), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print ''; // print ''; @@ -2086,12 +2087,21 @@ if ($action == 'create') print ''; print ''; print '"; @@ -2141,7 +2151,7 @@ if ($action == 'create') $title=$langs->trans('ProductsAndServices'); print load_fiche_titre($title); - print '
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('PaymentConditionsShort').''; - $form->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id, 'cond_reglement_id'); + $form->select_conditions_paiements(GETPOSTISSET('cond_reglement_id')?GETPOST('cond_reglement_id', 'int'):$cond_reglement_id, 'cond_reglement_id'); print '
'.$langs->trans('PaymentMode').''; - $form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id, 'mode_reglement_id', 'DBIT'); + $form->select_types_paiements(GETPOSTISSET('mode_reglement_id')?GETPOST('mode_reglement_id', 'int'):$mode_reglement_id, 'mode_reglement_id', 'DBIT'); print '
'.$langs->trans('BankAccount').''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + $form->select_comptes((GETPOSTISSET('fk_account')?GETPOST('fk_account', 'alpha'):$fk_account), 'fk_account', 0, '', 1); print '
'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).''; - print $form->selectMultiCurrency($currency_code, 'multicurrency_code'); + print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code')?GETPOST('multicurrency_code', 'alpha'):$currency_code), 'multicurrency_code'); print '
'; - print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); + print $form->select_incoterms(GETPOSTISSET('incoterm_id') ? GETPOST('incoterm_id', 'alphanohtml') : (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), GETPOSTISSET('location_incoterms') ? GETPOST('location_incoterms', 'alphanohtml') : (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); print '
'; $note_public = $object->getDefaultCreateValueFor('note_public'); if(empty($note_public))$note_public = $objectsrc->note_public; - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', (GETPOSTISSET('note_public')?GETPOST('note_public', 'none'):$note_public), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print '
'.$txt.''.$objectsrc->getNomUrl(1); // We check if Origin document (id and type is known) has already at least one invoice attached to it $objectsrc->fetchObjectLinked($originid, $origin, '', 'invoice_supplier'); - $cntinvoice=count($objectsrc->linkedObjects['invoice_supplier']); - if ($cntinvoice>=1) + + $invoice_supplier = $objectsrc->linkedObjects['invoice_supplier']; + + // count function need a array as argument (Note: the array must implement Countable too) + if(is_array($invoice_supplier)) { - setEventMessages('WarningBillExist', null, 'warnings'); - echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['invoice_supplier'])->getNomUrl(1).')'; + $cntinvoice = count($invoice_supplier); + + if ($cntinvoice >= 1) + { + setEventMessages('WarningBillExist', null, 'warnings'); + echo ' ('.$langs->trans('LatestRelatedBill').end($invoice_supplier)->getNomUrl(1).')'; + } } + echo '
'.$langs->trans('AmountHT').''.price($objectsrc->total_ht).'
'.$langs->trans('AmountVAT').''.price($objectsrc->total_tva)."
'; + print '
'; $objectsrc->printOriginLinesList(); @@ -2377,19 +2387,20 @@ else $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->fournisseur->facture->creer) { - if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:-1), $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + if ($action != 'classify') { + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:-1), $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); @@ -2545,7 +2556,7 @@ else print '
'; - if ($action != 'editmulticurrencycode' && $object->statut == FactureFournisseur::STATUS_DRAFT) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT) print ''; print '
'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; print '
'; @@ -2557,29 +2568,32 @@ else print '
'; - print ''; - if ($action != 'editmulticurrencyrate' && $object->statut == FactureFournisseur::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) - print ''; - print '
'; - print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; - print '
'; - if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { - if ($action == 'actualizemulticurrencyrate') { - list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); - } - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); - } else { - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); - if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { - print '
        '; - print ''.$langs->trans("ActualizeCurrency").''; - print '
'; + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) + { + print '
'; + print ''; + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) + print ''; + print '
'; + print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { + if ($action == 'actualizemulticurrencyrate') { + list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); + } + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); + if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { + print '
        '; + print ''.$langs->trans("ActualizeCurrency").''; + print '
'; + } } + print '
' . price($sign * $objp->amount) . ''; - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0) + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { print 'rowid.'">'; print img_delete(); @@ -3077,13 +3091,13 @@ else } // Make payments - if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0) + if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { print ''; // must use facid because id is for payment id not invoice } // Classify paid - if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0) + if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { print ''; diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 2d2f9006632..33263e79cb6 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -41,7 +41,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); @@ -193,7 +193,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print ''; + print '
'; // Type print '' . "\n"; -// Show dashboard + // Show dashboard $nbworkboardempty = 0; $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array(); if (!empty($valid_dashboardlines)) { @@ -656,7 +657,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { foreach ($dashboardgroup as $groupKey => $groupElement) { $boards = array(); - if (!empty($conf->global->MAIN_DISPLAY_NEW_OPENED_DASH_BOARD) || !empty($conf->global->MAIN_FEATURES_LEVEL)) { + if (empty($conf->global->MAIN_DISABLE_NEW_OPENED_DASH_BOARD)) { foreach ($groupElement['stats'] as $infoKey) { if (!empty($valid_dashboardlines[$infoKey])) { $boards[] = $valid_dashboardlines[$infoKey]; @@ -886,7 +887,7 @@ $boxlist.=$resultboxes['boxlista']; $boxlist.= ''; -if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) +if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { // Remove allready present info in new dash board if(!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0){ @@ -1001,7 +1002,7 @@ function showWeather($totallate, $text, $options, $morecss = '') { global $conf; - $weather = getWeatherStatus($totallate); + $weather = getWeatherStatus($totallate); return img_weather($text, $weather->picto, $options, 0, $morecss); } diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 6dfc7c2546e..7644dbc1748 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -389,7 +389,7 @@ else // Show title if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ! empty($conf->global->MAIN_VERSION_LAST_INSTALL)) { - print $langs->trans("VersionLastUpgrade").': '.(empty($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_INSTALL:$conf->global->MAIN_VERSION_LAST_UPGRADE).'
'; + print $langs->trans("VersionLastUpgrade").': '.(empty($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_INSTALL:$conf->global->MAIN_VERSION_LAST_UPGRADE).' - '; print $langs->trans("VersionProgram").': '.DOL_VERSION.''; //print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired")); print '
'; @@ -397,18 +397,17 @@ else } else print "
\n"; - print $langs->trans("InstallEasy")." "; - print $langs->trans("ChooseYourSetupMode"); - - print '
'; + //print $langs->trans("InstallEasy")." "; + print '

'.$langs->trans("ChooseYourSetupMode").'

'; $foundrecommandedchoice=0; $available_choices = array(); $notavailable_choices = array(); - // Show first install line - $choice = "\n".''."\n"; + $choice .= ''; $choice .= ''; + $choice .= ''."\n"; $choice .= ''."\n"; + $positionkey = ($foundrecommandedchoice ? 999 : 0); if ($allowinstall) { - $available_choices[] = $choice; + $available_choices[$positionkey] = $choice; } else { - $notavailable_choices[] = $choice; + $notavailable_choices[$positionkey] = $choice; } // Show upgrade lines @@ -470,7 +470,6 @@ else $count=0; foreach ($migrationscript as $migarray) { - $choice = ''; $count++; @@ -509,7 +508,8 @@ else } } - $choice .= "\n".''; + $choice .= "\n".''."\n"; + $choice .= ''; $choice .= ''; $choice .= ''."\n"; if ($allowupgrade) { - $available_choices[] = $choice; + $available_choices[$count] = $choice; } else { - $notavailable_choices[] = $choice; + $notavailable_choices[$count] = $choice; } } @@ -571,6 +571,7 @@ else } // Array of install choices + krsort($available_choices, SORT_NATURAL); print"\n"; print '
'.$langs->trans('Type').''; diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d8cf1ecda27..087325e3de0 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -46,7 +46,7 @@ $confirm=GETPOST('confirm', 'alpha'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); // Get parameters diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 78abccdc250..4d6e85006c3 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -39,10 +39,10 @@ $socid=GETPOST('socid', 'int'); $option = GETPOST('option'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $sortfield = GETPOST("sortfield", 'alpha'); @@ -185,7 +185,7 @@ if ($user->rights->fournisseur->facture->lire) $i = 0; print '
'; - print ''; + print '
'; print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "f.rowid", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("RefSupplier", $_SERVER["PHP_SELF"], "f.ref_supplier", "", $param, "", $sortfield, $sortorder); diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index 6b4af5dd290..8f10fd94dc4 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -40,7 +40,7 @@ $id = GETPOST("facid", 'int')?GETPOST("facid", 'int'):GETPOST("id", 'int'); $ref = GETPOST("ref", 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 3dcc2880f34..db1fba3001a 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -11,7 +11,7 @@ * Copyright (C) 2015-2016 Ferran Marcet * Copyright (C) 2017 Josep Lluís Amador * Copyright (C) 2018 Charlene Benke - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -60,11 +60,11 @@ $contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'supplier $socid = GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action=''; $_GET["action"] = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $mode=GETPOST("mode"); @@ -241,9 +241,9 @@ if (empty($reshook)) // Mass actions $objectclass='FactureFournisseur'; $objectlabel='SupplierInvoices'; - $permtoread = $user->rights->fournisseur->facture->lire; - $permtocreate = $user->rights->fournisseur->facture->creer; - $permtodelete = $user->rights->fournisseur->facture->supprimer; + $permissiontoread = $user->rights->fournisseur->facture->lire; + $permissiontoadd = $user->rights->fournisseur->facture->creer; + $permissiontodelete = $user->rights->fournisseur->facture->supprimer; $uploaddir = $conf->fournisseur->facture->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -277,7 +277,9 @@ $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label"; // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. if (! $search_all) $sql.= ', SUM(pf.amount) as dynamount_payed'; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -373,10 +375,11 @@ if (! $search_all) $sql.= " state.code_departement, state.nom,"; $sql.= ' country.code,'; $sql.= " p.rowid, p.ref, p.title"; - - foreach ($extrafields->attribute_label as $key => $val) //prevent error with sql_mode=only_full_group_by - { - $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key : ''); + if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + //prevent error with sql_mode=only_full_group_by + $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key : ''); + } } } else @@ -612,12 +615,12 @@ if ($resql) FactureFournisseur::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"), FactureFournisseur::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"), ); -/* + /* if (! empty($conf->global->INVOICE_USE_SITUATION)) { $listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation"); } -*/ + */ //$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order. print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100'); print ''; @@ -785,7 +788,7 @@ if ($resql) if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder); - if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, '', $sortfield, $sortorder, 'right '); @@ -844,7 +847,6 @@ if ($resql) //If invoice has been converted and the conversion has been used, we dont have remain to pay on invoice if($facturestatic->type == FactureFournisseur::TYPE_CREDIT_NOTE) { - if($facturestatic->isCreditNoteUsed()){ $remaintopay=-$facturestatic->getSumFromThisCreditNotesNotUsed(); } @@ -1001,56 +1003,56 @@ if ($resql) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; - $totalarray['totalht'] += $obj->total_ht; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total_ht'; + $totalarray['val']['f.total_ht'] += $obj->total_ht; } // Amount VAT if (! empty($arrayfields['f.total_vat']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; - $totalarray['totalvat'] += $obj->total_vat; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total_vat'; + $totalarray['val']['f.total_vat'] += $obj->total_vat; } // Amount LocalTax1 if (! empty($arrayfields['f.total_localtax1']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totallocaltax1field']=$totalarray['nbfield']; - $totalarray['totallocaltax1'] += $obj->total_localtax1; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total_localtax1'; + $totalarray['val']['f.total_localtax1'] += $obj->total_localtax1; } // Amount LocalTax2 if (! empty($arrayfields['f.total_localtax2']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totallocaltax2field']=$totalarray['nbfield']; - $totalarray['totallocaltax2'] += $obj->total_localtax2; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total_localtax2'; + $totalarray['val']['f.total_localtax2'] += $obj->total_localtax2; } // Amount TTC if (! empty($arrayfields['f.total_ttc']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; - $totalarray['totalttc'] += $obj->total_ttc; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total_ttc'; + $totalarray['val']['f.total_ttc'] += $obj->total_ttc; } if (! empty($arrayfields['dynamount_payed']['checked'])) { print ''; // TODO Use a denormalized field if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalamfield']=$totalarray['nbfield']; - $totalarray['totalam'] += $totalpay; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalam'; + $totalarray['val']['totalam'] += $totalpay; } if (! empty($arrayfields['rtp']['checked'])) { print ''; // TODO Use a denormalized field if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalrtpfield']=$totalarray['nbfield']; - $totalarray['totalrtp'] += $remaintopay; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='rtp'; + $totalarray['val']['rtp'] += $remaintopay; } @@ -1103,36 +1105,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield']) - || isset($totalarray['totalvatfield']) - || isset($totalarray['totallocaltax1field']) - || isset($totalarray['totallocaltax2field']) - || isset($totalarray['totalttcfield']) - || isset($totalarray['totalamfield']) - || isset($totalarray['totalrtpfield']) - ) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totallocaltax1field'] == $i) print ''; - elseif ($totalarray['totallocaltax2field'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - elseif ($totalarray['totalamfield'] == $i) print ''; - elseif ($totalarray['totalrtpfield'] == $i) print ''; - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; } $db->free($resql); diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index ba51b4688a9..a55dd9ba7d7 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -40,7 +40,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); @@ -102,20 +102,21 @@ if ($object->id > 0) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->fournisseur->commande->creer) { - if ($action != 'classify') + if ($action != 'classify') { // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); @@ -137,7 +138,7 @@ if ($object->id > 0) print '
'; print '
'; - print '
'.price($obj->total_ht)."'.price($obj->total_vat)."'.price($obj->total_localtax1)."'.price($obj->total_localtax2)."'.price($obj->total_ttc)."'.(! empty($totalpay)?price($totalpay, 0, $langs):' ').''.(! empty($remaintopay)?price($remaintopay, 0, $langs):' ').'
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totallocaltax1']).''.price($totalarray['totallocaltax2']).''.price($totalarray['totalttc']).''.price($totalarray['totalam']).''.price($totalarray['totalrtp']).'
'; + print '
'; // Type print ' + if ($user->rights->fournisseur->facture->lire) { + $sign = 1; + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1; + if ($objectlink->statut != 3) + { + // If not abandonned + $total = $total + $sign * $objectlink->total_ht; + echo price($objectlink->total_ht); + } + else + { + echo ''.price($objectlink->total_ht).''; + } + } ?> - 1) { @@ -85,6 +84,5 @@ if (count($linkedObjectBlock) > 1) - +print "\n"; diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index d551944ec05..aeb945bc220 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -32,7 +32,7 @@ $langs->loadLangs(array("suppliers", "orders", "companies")); // Security check $socid = GETPOST("socid", 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $socid, ''); @@ -70,7 +70,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print '
'.$langs->trans('Type').''; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index c68dcd98752..b9961f56206 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -78,9 +78,9 @@ $multicurrency_amounts=array(); $multicurrency_amountsresttopay=array(); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } $object = new PaiementFourn($db); @@ -467,7 +467,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie dol_fiche_head(null); - print ''; + print '
'; print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; print "
'.$langs->trans('Company').''; $supplierstatic->id=$obj->socid; @@ -506,7 +506,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie /* * All unpayed supplier invoices */ - $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 = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ht, f.total_ttc,'; + $sql.= ' f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc,'; + $sql.= ' 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'; @@ -755,7 +757,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $db->free($resql); } else - { + { dol_print_error($db); } } @@ -1024,26 +1026,7 @@ if (empty($action) || $action == 'list') } // Show total line - if (isset($totalarray['pos'])) - { - print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
"; print ""; diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index 94ef53f2372..59ad242fa05 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -30,16 +30,16 @@ $langs->loadLangs(array('bills')); // Security check $socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $action=GETPOST('action', 'aZ09'); $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $dir = $conf->fournisseur->facture->dir_output.'/payments'; diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index ed94fdf23d4..cc3d3084464 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -25,11 +25,9 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - +print "\n"; - $objectlink) $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> + ?>
trans("SupplierInvoice"); ?> trans("ShowBill"), "bill").' '.$objectlink->ref; ?> ref_supplier; ?> date, 'day'); ?> rights->fournisseur->facture->lire) { - $sign = 1; - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1; - if ($objectlink->statut != 3) // If not abandonned - { - $total = $total + $sign * $objectlink->total_ht; - echo price($objectlink->total_ht); - } - else - { - echo ''.price($objectlink->total_ht).''; - } - } ?> getLibStatut(3); ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'; + print '
'; print ''; print "\n"; @@ -119,9 +119,9 @@ if (! empty($conf->fournisseur->enabled)) $num = $db->num_rows($resql); if ($num) { - print '
'.$langs->trans("Orders").''.$langs->trans("Nb").' 
'; + print '
'; print ''; - print ''; + print ''; $i = 0; while ($i < $num) @@ -145,7 +145,6 @@ if (! empty($conf->fournisseur->enabled)) } if ($total>0) { - print '"; } print "
'.$langs->trans("DraftOrders").' '.$num.'
'.$langs->trans("DraftOrders").''.$num.'
'.$langs->trans("Total").''.price($total)."
"; @@ -175,9 +174,9 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $num = $db->num_rows($resql); if ($num) { - print ''; + print '
'; print ''; - print ''; + print ''; $i = 0; $tot_ttc = 0; @@ -247,7 +246,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print '
'.$langs->trans("DraftBills").' '.$num.'
'.$langs->trans("DraftBills").''.$num.'
'; + print '
'; print ''; print '\n"; print '\n"; @@ -282,7 +281,7 @@ if (count($companystatic->SupplierCategories)) { print '
'; - print '
'.$langs->trans("BoxTitleLastSuppliers", min($max, $num))."'.$langs->trans("DateModification")."
'; + print '
'; print '\n"; diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 8b65d8be7c0..d20f4e5d6ed 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -139,7 +139,7 @@ if ($action == 'setdatep' && ! empty($_POST['datepday'])) // Build document $upload_dir = $conf->fournisseur->payment->dir_output; // TODO: get the appropriate permisson -$permissioncreate = true; +$permissiontoadd = true; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -184,7 +184,7 @@ if ($result > 0) print '
'; print '
'; - print '
'; print $langs->trans("Category"); print "
'; + print '
'; /*print ''; print ''; // Payment mode - $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$object->type_code)?$langs->trans("PaymentType".$object->type_code):$object->type_libelle; + $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$object->type_code)?$langs->trans("PaymentType".$object->type_code):$object->type_label; print ''; @@ -275,7 +275,7 @@ if ($result > 0) $i = 0; $total = 0; print ''.$langs->trans("Invoices").'
'; - print '
'.$langs->trans('Ref').''; @@ -197,7 +197,7 @@ if ($result > 0) print '
'.$langs->trans('PaymentMode').''.$labeltype; print $object->num_paiement?' - '.$object->num_paiement:''; print '
'; + print '
'; print ''; print ''; print ''; @@ -342,7 +342,7 @@ if ($result > 0) print '
'; if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { - if ($user->societe_id == 0 && $object->statut == 0 && $action == '') + if ($user->socid == 0 && $object->statut == 0 && $action == '') { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->facture->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->supplier_invoice_advance->validate))) @@ -351,7 +351,7 @@ if ($result > 0) } } } - if ($user->societe_id == 0 && $action == '') + if ($user->socid == 0 && $action == '') { if ($user->rights->fournisseur->facture->supprimer) { diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index b7119e3ae67..133fa4fd3d6 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -54,7 +54,7 @@ if (! $sortfield) $sortfield="p.ref"; // Set here default search field if (! $sortorder) $sortorder="ASC"; $fourn_id = GETPOST('fourn_id', 'intcomma'); -if ($user->societe_id) $fourn_id=$user->societe_id; +if ($user->socid) $fourn_id=$user->socid; $catid = GETPOST('catid', 'intcomma'); @@ -238,7 +238,7 @@ if ($resql) $trackid='prod'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - print '
'.$langs->trans('Ref').''.$langs->trans('RefSupplier').'
'; + print '
'; // Fields title search print ''; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index db2a3bdc38a..7a586c7ee2d 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -32,10 +32,10 @@ $langs->loadLangs(array('bills', 'companies')); // Security check $socid = GETPOST("socid", 'int'); -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } @@ -62,7 +62,7 @@ if ($socid > 0) $head = societe_prepare_head($societe); dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"), 0, 'company'); - dol_banner_tab($societe, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($societe, 'socid', '', ($user->socid?0:1), 'rowid', 'nom'); dol_fiche_end(); if (! empty($conf->fournisseur->enabled) && $user->rights->facture->lire) @@ -70,14 +70,14 @@ if ($socid > 0) // Invoice list print load_fiche_titre($langs->trans("SupplierPreview")); - print '
'; + print '
'; $sql = "SELECT s.nom, s.rowid as socid, f.ref_supplier, f.amount, f.datef as df,"; $sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,"; $sql.= " u.login, u.rowid as userid"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$societe->id; - $sql.= " AND f.entity IN (".getEntity("facture_fourn").")"; // Reconaissance de l'entité attribuée à cette facture pour Multicompany + $sql.= " AND f.entity IN (".getEntity("facture_fourn").")"; // Reconaissance de l'entité attribuée à cette facture pour Multicompany $sql.= " AND f.fk_user_valid = u.rowid"; $sql.= " ORDER BY f.datef DESC"; diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 3dde193d0ac..1b79f55d51d 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -151,12 +151,11 @@ if (! function_exists('ftp_connect')) } else { - // Formulaire ajout print ''; print ''; - print '
'; + print '
'; print ''; print ''; print ''; @@ -237,7 +236,7 @@ else print ''; print ''; - print '
'.$langs->trans("NewFTPClient").''.$langs->trans("Example").'
'."\n"; + print '
'."\n"; print ''; print '"; diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index de1228ab095..354fa5c0921 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; $langs->loadLangs(array('ftp', 'companies', 'other')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'ftp', ''); // Get parameters @@ -359,7 +359,7 @@ llxHeader(); // Add logic to shoow/hide buttons if ($conf->use_javascript_ajax) { -?> + ?> -global->FTP_CONNECT_WITH_SFTP)) { - } elseif (! empty($conf->global->FTP_CONNECT_WITH_SSL)) { diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index b464d336fd2..113f4b4f655 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -48,10 +48,6 @@ $id=GETPOST('id', 'int'); $ref=GETPOST('ref', 'alpha'); $fuserid = (GETPOST('fuserid', 'int')?GETPOST('fuserid', 'int'):$user->id); -// Protection if external user -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'holiday', $id, 'holiday'); - // Load translation files required by the page $langs->loadLangs(array("holiday","mails")); @@ -65,14 +61,15 @@ if (! empty($conf->global->HOLIDAY_FOR_NON_SALARIES_TOO)) $morefilter = ''; $error = 0; $object = new Holiday($db); + $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -if ($id > 0) +if (($id > 0) || $ref) { - $object->fetch($id); + $object->fetch($id, $ref); // Check current user can read this leave request $canread = 0; @@ -92,6 +89,10 @@ $candelete = 0; if (! empty($user->rights->holiday->delete)) $candelete=1; if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write && in_array($object->fk_user, $childids)) $candelete=1; +// Protection if external user +if ($user->socid) $socid=$user->socid; +$result = restrictedArea($user, 'holiday', $object->id, 'holiday'); + /* * Actions @@ -103,7 +104,6 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - if ($cancel) { if (! empty($backtopage)) @@ -117,7 +117,6 @@ if (empty($reshook)) // If create a request if ($action == 'create') { - // If no right to create a request if (! $cancreate) { @@ -880,7 +879,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->holiday->dir_output; - $permissioncreate = $user->rights->holiday->creer; + $permissiontoadd = $user->rights->holiday->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; */ } @@ -912,7 +911,6 @@ if ((empty($id) && empty($ref)) || $action == 'add' || $action == 'request' || $ // Si il y a une erreur if (GETPOST('error')) { - switch(GETPOST('error')) { case 'datefin' : $errors[] = $langs->trans('ErrorEndDateCP'); @@ -1009,7 +1007,7 @@ if ((empty($id) && empty($ref)) || $action == 'add' || $action == 'request' || $ //print ''.$langs->trans('DelayToRequestCP',$object->getConfCP('delayForRequest')).'

'; - print '
'.$langs->trans("FTP")." ".($idrss)."
'; + print '
'; print ''; // User for leave request diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 756cc7cd5d2..37d38ea69eb 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -54,6 +54,9 @@ class Holiday extends CommonObject */ public $fk_element = 'fk_holiday'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'holiday'; /** @@ -478,7 +481,6 @@ class Holiday extends CommonObject // If no SQL error if ($resql) { - $i = 0; $tab_result = $this->holiday; $num = $this->db->num_rows($resql); @@ -490,7 +492,6 @@ class Holiday extends CommonObject // List the records and add them to the table while($i < $num) { - $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; @@ -606,7 +607,6 @@ class Holiday extends CommonObject // If no SQL error if ($resql) { - $i = 0; $tab_result = $this->holiday; $num = $this->db->num_rows($resql); @@ -618,7 +618,6 @@ class Holiday extends CommonObject // List the records and add them to the table while($i < $num) { - $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; @@ -1221,68 +1220,40 @@ class Holiday extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Returns the label of a statut + * Returns the label of a status * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @param integer $startdate Date holiday should start * @return string Label */ - public function LibStatut($statut, $mode = 0, $startdate = '') + public function LibStatut($status, $mode = 0, $startdate = '') { - // phpcs:enable - global $langs; - - if ($mode == 0) + // phpcs:enable + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { - if ($statut == 1) return $langs->trans('DraftCP'); - elseif ($statut == 2) return $langs->trans('ToReviewCP'); - elseif ($statut == 3) return $langs->trans('ApprovedCP'); - elseif ($statut == 4) return $langs->trans('CancelCP'); - elseif ($statut == 5) return $langs->trans('RefuseCP'); - } - elseif ($mode == 2) - { - $pictoapproved='statut6'; - if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; - if ($statut == 1) return img_picto($langs->trans('DraftCP'), 'statut0').' '.$langs->trans('DraftCP'); // Draft - elseif ($statut == 2) return img_picto($langs->trans('ToReviewCP'), 'statut1').' '.$langs->trans('ToReviewCP'); // Waiting approval - elseif ($statut == 3) return img_picto($langs->trans('ApprovedCP'), $pictoapproved).' '.$langs->trans('ApprovedCP'); - elseif ($statut == 4) return img_picto($langs->trans('CancelCP'), 'statut5').' '.$langs->trans('CancelCP'); - elseif ($statut == 5) return img_picto($langs->trans('RefuseCP'), 'statut5').' '.$langs->trans('RefuseCP'); - } - elseif ($mode == 3) - { - $pictoapproved='statut6'; - if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; - if ($statut == 1) return img_picto($langs->trans('DraftCP'), 'statut0'); - elseif ($statut == 2) return img_picto($langs->trans('ToReviewCP'), 'statut1'); - elseif ($statut == 3) return img_picto($langs->trans('ApprovedCP'), $pictoapproved); - elseif ($statut == 4) return img_picto($langs->trans('CancelCP'), 'statut5'); - elseif ($statut == 5) return img_picto($langs->trans('RefuseCP'), 'statut5'); - } - elseif ($mode == 5) - { - $pictoapproved='statut6'; - if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; - if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'), 'statut0'); // Draft - elseif ($statut == 2) return $langs->trans('ToReviewCP').' '.img_picto($langs->trans('ToReviewCP'), 'statut1'); // Waiting approval - elseif ($statut == 3) return $langs->trans('ApprovedCP').' '.img_picto($langs->trans('ApprovedCP'), $pictoapproved); - elseif ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'), 'statut5'); - elseif ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'), 'statut5'); - } - elseif ($mode == 6) - { - $pictoapproved='statut6'; - if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; - if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'), 'statut0'); // Draft - elseif ($statut == 2) return $langs->trans('ToReviewCP').' '.img_picto($langs->trans('ToReviewCP'), 'statut1'); // Waiting approval - elseif ($statut == 3) return $langs->trans('ApprovedCP').' '.img_picto($langs->trans('ApprovedCP'), $pictoapproved); - elseif ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'), 'statut5'); - elseif ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'), 'statut5'); + global $langs; + //$langs->load("mymodule"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('DraftCP'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP'); + $this->labelStatus[self::STATUS_APPROVED] = $langs->trans('ApprovedCP'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('CancelCP'); + $this->labelStatus[self::STATUS_REFUSED] = $langs->trans('RefuseCP'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('DraftCP'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP'); + $this->labelStatusShort[self::STATUS_APPROVED] = $langs->trans('ApprovedCP'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('CancelCP'); + $this->labelStatusShort[self::STATUS_REFUSED] = $langs->trans('RefuseCP'); } - else return $statut; + $statusType = 'status6'; + if (! empty($startdate) && $startdate > dol_now()) $statusType = 'status4'; + if ($status == self::STATUS_DRAFT) $statusType = 'status0'; + if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; + if ($status == self::STATUS_CANCELED) $statusType = 'status5'; + if ($status == self::STATUS_REFUSED) $statusType = 'status5'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -1361,7 +1332,6 @@ class Holiday extends CommonObject $result = $this->db->query($sql); if($result) { - $obj = $this->db->fetch_object($result); // Return value if (empty($obj)) @@ -1391,7 +1361,6 @@ class Holiday extends CommonObject return $obj->value; } } else { - // Erreur SQL $this->error=$this->db->lasterror(); return -1; @@ -1682,7 +1651,6 @@ class Holiday extends CommonObject // Si pas d'erreur SQL if ($resql) { - $i = 0; $num = $this->db->num_rows($resql); $stringlist = ''; @@ -1722,7 +1690,6 @@ class Holiday extends CommonObject // Si pas d'erreur SQL if ($resql) { - $i = 0; $num = $this->db->num_rows($resql); $stringlist = ''; @@ -1752,8 +1719,8 @@ class Holiday extends CommonObject } } else - { // Si faux donc return array - + { + // Si faux donc return array // List for Dolibarr users if ($type) { @@ -1766,50 +1733,47 @@ class Holiday extends CommonObject $sql.= " WHERE (ug.fk_user = u.rowid"; $sql.= " AND ug.entity = ".$conf->entity.")"; $sql.= " OR u.admin = 1"; - } - else + } else { $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; + } - $sql.= " AND u.statut > 0"; - if ($filters) $sql.=$filters; + $sql.= " AND u.statut > 0"; + if ($filters) $sql.=$filters; - $resql=$this->db->query($sql); + $resql=$this->db->query($sql); - // Si pas d'erreur SQL - if ($resql) - { - $i = 0; - $tab_result = $this->holiday; - $num = $this->db->num_rows($resql); + // Si pas d'erreur SQL + if ($resql) + { + $i = 0; + $tab_result = $this->holiday; + $num = $this->db->num_rows($resql); - // Boucles du listage des utilisateurs - while($i < $num) { + // Boucles du listage des utilisateurs + while($i < $num) { + $obj = $this->db->fetch_object($resql); - $obj = $this->db->fetch_object($resql); + $tab_result[$i]['rowid'] = $obj->rowid; // rowid of user + $tab_result[$i]['name'] = $obj->lastname; // deprecated + $tab_result[$i]['lastname'] = $obj->lastname; + $tab_result[$i]['firstname'] = $obj->firstname; + $tab_result[$i]['gender'] = $obj->gender; + $tab_result[$i]['status'] = $obj->statut; + $tab_result[$i]['employee'] = $obj->employee; + $tab_result[$i]['photo'] = $obj->photo; + $tab_result[$i]['fk_user'] = $obj->fk_user; // rowid of manager + //$tab_result[$i]['type'] = $obj->type; + //$tab_result[$i]['nb_holiday'] = $obj->nb_holiday; - $tab_result[$i]['rowid'] = $obj->rowid; // rowid of user - $tab_result[$i]['name'] = $obj->lastname; // deprecated - $tab_result[$i]['lastname'] = $obj->lastname; - $tab_result[$i]['firstname'] = $obj->firstname; - $tab_result[$i]['gender'] = $obj->gender; - $tab_result[$i]['status'] = $obj->statut; - $tab_result[$i]['employee'] = $obj->employee; - $tab_result[$i]['photo'] = $obj->photo; - $tab_result[$i]['fk_user'] = $obj->fk_user; // rowid of manager - //$tab_result[$i]['type'] = $obj->type; - //$tab_result[$i]['nb_holiday'] = $obj->nb_holiday; - - $i++; - } - // Retoune le tableau des utilisateurs - return $tab_result; - } - else - { - // Erreur SQL - $this->errors[]="Error ".$this->db->lasterror(); - return -1; + $i++; } + // Retoune le tableau des utilisateurs + return $tab_result; + } else { + // Erreur SQL + $this->errors[]="Error ".$this->db->lasterror(); + return -1; + } } else { @@ -2064,7 +2028,6 @@ class Holiday extends CommonObject // Si pas d'erreur SQL if ($resql) { - $i = 0; $tab_result = $this->logs; $num = $this->db->num_rows($resql); @@ -2076,7 +2039,6 @@ class Holiday extends CommonObject // On liste les résultats et on les ajoutent dans le tableau while($i < $num) { - $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; @@ -2210,7 +2172,7 @@ class Holiday extends CommonObject // phpcs:enable global $conf, $langs; - if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe + if ($user->socid) return -1; // protection pour eviter appel par utilisateur externe $now=dol_now(); @@ -2232,7 +2194,7 @@ class Holiday extends CommonObject $response->warning_delay=$conf->holiday->approve->warning_delay/60/60/24; $response->label=$langs->trans("HolidaysToApprove"); $response->labelShort=$langs->trans("ToApprove"); - $response->url=DOL_URL_ROOT.'/holiday/list.php?search_statut=2&mainmenu=hrm&leftmenu=holiday'; + $response->url=DOL_URL_ROOT.'/holiday/list.php?search_statut=2&mainmenu=hrm&leftmenu=holiday'; $response->img=img_object('', "holiday"); while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 9add71da395..586617a79d6 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -53,7 +53,7 @@ if (! $sortorder) $sortorder="ASC"; // Protection if external user -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); // If the user does not have perm to read the page if (!$user->rights->holiday->read) accessforbidden(); @@ -95,8 +95,8 @@ if (empty($reshook)) /* $objectclass='Skeleton'; $objectlabel='Skeleton'; - $permtoread = $user->rights->skeleton->read; - $permtodelete = $user->rights->skeleton->delete; + $permissiontoread = $user->rights->skeleton->read; + $permissiontodelete = $user->rights->skeleton->delete; $uploaddir = $conf->skeleton->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; */ @@ -173,6 +173,10 @@ llxHeader('', $langs->trans('CPTitreMenu')); $typeleaves=$holiday->getTypes(1, 1); +$result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user. +if ($result < 0) { + setEventMessages($holiday->error, $holiday->errors, 'errors'); +} print ''; @@ -189,21 +193,14 @@ print load_fiche_titre($langs->trans('MenuConfCP'), '', 'title_hrm.png'); print '
'.$langs->trans('LastUpdateCP').': '."\n"; $lastUpdate = $holiday->getConfCP('lastUpdate'); -if ($lastUpdate) -{ - $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; - $yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3]; - print ''.dol_print_date($db->jdate($holiday->getConfCP('lastUpdate')), 'dayhour', 'tzuser').''; - print '
'.$langs->trans("MonthOfLastMonthlyUpdate").': '.$yearLastUpdate.'-'.$monthLastUpdate.''."\n"; +if ($lastUpdate) { + print ''.dol_print_date($db->jdate($lastUpdate), 'dayhour').''; + print '
'.$langs->trans("MonthOfLastMonthlyUpdate").': '.$langs->trans('Month'.substr($lastUpdate, 4, 2)).' '.substr($lastUpdate, 0, 4).''."\n"; +} else { + print $langs->trans('None'); } -else print $langs->trans('None'); print "

\n"; -$result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user. -if ($result < 0) -{ - setEventMessages($holiday->error, $holiday->errors, 'errors'); -} $filters = ''; diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index 05ddf164105..bbf6cac4c87 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -45,7 +45,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'holiday', $id, 'holiday'); // Get parameters @@ -213,7 +213,7 @@ if ($object->id) print ''; print '
'."\n"; -/* + /* print ''; print '
'; print '
'; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 1854cce2800..4262280233c 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2018 Laurent Destailleur * Copyright (C) 2012-2016 Regis Houssin * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; $langs->loadLangs(array('users', 'holiday', 'hrm')); // Protection if external user -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); $action = GETPOST('action', 'aZ09'); // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) @@ -58,9 +59,9 @@ $childids = $user->getAllChildIds(1); // Security check $socid=0; -if ($user->societe_id > 0) // Protection if external user +if ($user->socid > 0) // Protection if external user { - //$socid = $user->societe_id; + //$socid = $user->socid; accessforbidden(); } $result = restrictedArea($user, 'holiday', '', ''); @@ -120,6 +121,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, // List of fields to search into when doing a "search in all" $fieldstosearchall = array( + 'cp.ref'=>'Ref', 'cp.description'=>'Description', 'uu.lastname'=>'EmployeeLastname', 'uu.firstname'=>'EmployeeFirstname', @@ -194,8 +196,8 @@ if (empty($reshook)) // Mass actions $objectclass='Holiday'; $objectlabel='Holiday'; - $permtoread = $user->rights->holiday->read; - $permtodelete = $user->rights->holiday->delete; + $permissiontoread = $user->rights->holiday->read; + $permissiontodelete = $user->rights->holiday->delete; $uploaddir = $conf->holiday->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -263,17 +265,23 @@ $sql.= " cp.detail_refuse,"; $sql.= " uu.lastname as user_lastname,"; $sql.= " uu.firstname as user_firstname,"; +$sql.= " uu.admin as user_admin,"; +$sql.= " uu.email as user_email,"; $sql.= " uu.login as user_login,"; $sql.= " uu.statut as user_statut,"; $sql.= " uu.photo as user_photo,"; $sql.= " ua.lastname as validator_lastname,"; $sql.= " ua.firstname as validator_firstname,"; +$sql.= " ua.admin as validator_admin,"; +$sql.= " ua.email as validator_email,"; $sql.= " ua.login as validator_login,"; $sql.= " ua.statut as validator_statut,"; $sql.= " ua.photo as validator_photo"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -286,10 +294,7 @@ $sql.= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pou // Search all if (!empty($sall)) $sql.= natural_search(array_keys($fieldstosearchall), $sall); // Ref -if(!empty($search_ref)) -{ - $sql.= " AND cp.rowid = ".(int) $db->escape($search_ref); -} +if (!empty($search_ref)) $sql.= natural_search("cp.ref", $search_ref); // Start date $sql.= dolSqlDateFilter("cp.date_debut", $search_day_start, $search_month_start, $search_year_start); // End date @@ -662,6 +667,8 @@ if ($resql) $userstatic->id=$obj->fk_user; $userstatic->lastname=$obj->user_lastname; $userstatic->firstname=$obj->user_firstname; + $userstatic->admin = $obj->user_admin; + $userstatic->email = $obj->user_email; $userstatic->login=$obj->user_login; $userstatic->statut=$obj->user_statut; $userstatic->photo=$obj->user_photo; @@ -670,6 +677,8 @@ if ($resql) $approbatorstatic->id=$obj->fk_validator; $approbatorstatic->lastname=$obj->validator_lastname; $approbatorstatic->firstname=$obj->validator_firstname; + $approbatorstatic->admin = $obj->validator_admin; + $approbatorstatic->email = $obj->validator_email; $approbatorstatic->login=$obj->validator_login; $approbatorstatic->statut=$obj->validator_statut; $approbatorstatic->photo=$obj->validator_photo; diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index a7efd8616f0..f0171bfa4a6 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -35,9 +35,9 @@ $langs->loadLangs(array("holiday")); // Security check $socid=0; -if ($user->societe_id > 0) // Protection if external user +if ($user->socid > 0) // Protection if external user { - //$socid = $user->societe_id; + //$socid = $user->socid; accessforbidden(); } $result = restrictedArea($user, 'holiday', $id, ''); @@ -102,7 +102,7 @@ print '
'; print '
'; print '
'; -print ''; +print '
'; print ''; print ''; @@ -119,75 +119,75 @@ print ''; if ($num == 0) { - print ''; + print ''; } else { - while ($obj = $db->fetch_object($resql)) - { - $user = new User($db); - $user->fetch($obj->fk_user); + while ($obj = $db->fetch_object($resql)) + { + $user = new User($db); + $user->fetch($obj->fk_user); - $date_start = $db->jdate($obj->date_debut, true); - $date_end = $db->jdate($obj->date_fin, true); + $date_start = $db->jdate($obj->date_debut, true); + $date_end = $db->jdate($obj->date_fin, true); - $tmpstart = dol_getdate($date_start); - $tmpend = dol_getdate($date_end); + $tmpstart = dol_getdate($date_start); + $tmpend = dol_getdate($date_end); - $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; - $endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon'; + $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; + $endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon'; - $halfdayinmonth = $obj->halfday; - $starthalfdayinmonth = $starthalfday; - $endhalfdayinmonth = $endhalfday; + $halfdayinmonth = $obj->halfday; + $starthalfdayinmonth = $starthalfday; + $endhalfdayinmonth = $endhalfday; - //0:Full days, 2:Start afternoon end morning, -1:Start afternoon end afternoon, 1:Start morning end morning + //0:Full days, 2:Start afternoon end morning, -1:Start afternoon end afternoon, 1:Start morning end morning - // Set date_start_gmt and date_end_gmt that are date to show for the selected month - $date_start_inmonth = $db->jdate($obj->date_debut, true); - $date_end_inmonth = $db->jdate($obj->date_fin, true); - if ($tmpstart['year'] < $search_year || $tmpstart['mon'] < $search_month) - { - $date_start_inmonth = dol_get_first_day($search_year, $search_month, true); - $starthalfdayinmonth = 'morning'; - if ($halfdayinmonth == 2) $halfdayinmonth=1; - if ($halfdayinmonth == -1) $halfdayinmonth=0; - } - if ($tmpend['year'] > $search_year || $tmpend['mon'] > $search_month) - { - $date_end_inmonth = dol_get_last_day($search_year, $search_month, true) - ((24 * 3600) - 1); - $endhalfdayinmonth = 'afternoon'; - if ($halfdayinmonth == 2) $halfdayinmonth=-1; - if ($halfdayinmonth == 1) $halfdayinmonth=0; - } + // Set date_start_gmt and date_end_gmt that are date to show for the selected month + $date_start_inmonth = $db->jdate($obj->date_debut, true); + $date_end_inmonth = $db->jdate($obj->date_fin, true); + if ($tmpstart['year'] < $search_year || $tmpstart['mon'] < $search_month) + { + $date_start_inmonth = dol_get_first_day($search_year, $search_month, true); + $starthalfdayinmonth = 'morning'; + if ($halfdayinmonth == 2) $halfdayinmonth=1; + if ($halfdayinmonth == -1) $halfdayinmonth=0; + } + if ($tmpend['year'] > $search_year || $tmpend['mon'] > $search_month) + { + $date_end_inmonth = dol_get_last_day($search_year, $search_month, true) - ((24 * 3600) - 1); + $endhalfdayinmonth = 'afternoon'; + if ($halfdayinmonth == 2) $halfdayinmonth=-1; + if ($halfdayinmonth == 1) $halfdayinmonth=0; + } - // Leave request - $holidaystatic->id=$obj->rowid; - $holidaystatic->ref=$obj->rowid; + // Leave request + $holidaystatic->id=$obj->rowid; + $holidaystatic->ref=$obj->rowid; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } } print '
' . $langs->trans('Ref') . '
'.$langs->trans('None').'
'.$langs->trans('None').'
'; - print $holidaystatic->getNomUrl(1, 1); - print '' . $user->getFullName($langs) . '' . $obj->label . '' . dol_print_date($db->jdate($obj->date_debut), 'day'); - print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; - print '' . dol_print_date($db->jdate($obj->date_fin), 'day'); - print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; - print '' . num_open_day($date_start, $date_end, 0, 1, $obj->halfday) . '' . dol_print_date($date_start_inmonth, 'day'); - print ' ('.$langs->trans($listhalfday[$starthalfdayinmonth]).')'; - print '' . dol_print_date($date_end_inmonth, 'day'); - print ' ('.$langs->trans($listhalfday[$endhalfdayinmonth]).')'; - print '' . num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth) . '' . dol_escape_htmltag(dolGetFirstLineOfText($obj->description)) . '
'; + print $holidaystatic->getNomUrl(1, 1); + print '' . $user->getFullName($langs) . '' . $obj->label . '' . dol_print_date($db->jdate($obj->date_debut), 'day'); + print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; + print '' . dol_print_date($db->jdate($obj->date_fin), 'day'); + print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; + print '' . num_open_day($date_start, $date_end, 0, 1, $obj->halfday) . '' . dol_print_date($date_start_inmonth, 'day'); + print ' ('.$langs->trans($listhalfday[$starthalfdayinmonth]).')'; + print '' . dol_print_date($date_end_inmonth, 'day'); + print ' ('.$langs->trans($listhalfday[$endhalfdayinmonth]).')'; + print '' . num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth) . '' . dol_escape_htmltag(dolGetFirstLineOfText($obj->description)) . '
'; print '
'; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 13d4cb7d23a..813fe245cc1 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -60,7 +60,7 @@ $pagenext = $page + 1; // Protection if external user -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); // Si l'utilisateur n'a pas le droit de lire cette page if(!$user->rights->holiday->read_all) accessforbidden(); @@ -110,8 +110,8 @@ if (empty($reshook)) // Mass actions /*$objectclass='MyObject'; $objectlabel='MyObject'; - $permtoread = $user->rights->mymodule->read; - $permtodelete = $user->rights->mymodule->delete; + $permissiontoread = $user->rights->mymodule->read; + $permissiontodelete = $user->rights->mymodule->delete; $uploaddir = $conf->mymodule->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; */ diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 38cff03e28a..64683ac9d55 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -89,7 +89,7 @@ if ($result) $i = 0; // Load attribute_label - print ''; + print '
'; print ''; print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "e.name", "", "", "", $sortfield, $sortorder); print_liste_field_titre("Address", $_SERVER["PHP_SELF"], "e.address", "", "", "", $sortfield, $sortorder); diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index 243a1ce3222..b9ef15152de 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -42,15 +42,15 @@ $list = array ( */ if ($action == 'update') { $error = 0; - + foreach ($list as $constname) { $constvalue = GETPOST($constname, 'alpha'); - + if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { $error ++; } } - + if (! $error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -80,20 +80,20 @@ print ''; dol_fiche_head($head, 'parameters', $langs->trans("HRM"), -1, "user"); -print '
'; +print '
'; print ''; print ''; print "\n"; foreach ($list as $key) { $var = ! $var; - + print ''; - + // Param $label = $langs->trans($key); print ''; - + // Value print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index c09de053ea2..66baa76d4a0 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -346,7 +346,7 @@ if ($step == 1 || ! $datatoimport) // Affiche les modules d'imports print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
' . $langs->trans('Journaux') . '
'; print ''; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 0ea9b5ffba2..20c80d07981 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -55,7 +55,10 @@ class Establishment extends CommonObject */ public $ismultientitymanaged = 1; - public $picto='building'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='building'; /** * @var int ID @@ -265,12 +268,12 @@ class Establishment extends CommonObject } } - /** - * Delete record - * - * @param int $id Id of record to delete - * @return int <0 if KO, >0 if OK - */ + /** + * Delete record + * + * @param int $id Id of record to delete + * @return int <0 if KO, >0 if OK + */ public function delete($id) { $this->db->begin(); diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index a9f156d578f..b64563e38f2 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -124,7 +124,6 @@ elseif ($action == 'update') $error = 0; if (! $cancel) { - $name = GETPOST('name', 'alpha'); if (empty($name)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Name')), null, 'errors'); @@ -182,7 +181,7 @@ if ($action == 'create') dol_fiche_head(); - print ''; + print '
'; // Name print ''; @@ -279,7 +278,7 @@ if (($id || $ref) && $action == 'edit') print ''; print ''; - print '
'; + print '
'; // Ref print ""; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index ef8df639d26..281a573353b 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -46,7 +46,7 @@ $langs->loadLangs(array('users', 'holidays', 'trips', 'boxes')); $socid=GETPOST("socid", "int"); // Protection if external user -if ($user->societe_id > 0) accessforbidden(); +if ($user->socid > 0) accessforbidden(); if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) $setupcompanynotcomplete=1; @@ -114,6 +114,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print ''; print ''; + print '
'; print '
'; $i=0; foreach($listofsearchfields as $key => $value) @@ -126,6 +127,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele $i++; } print '
'; + print ''; print ''; print '
'; } @@ -139,7 +141,7 @@ if (! empty($conf->holiday->enabled)) $user_id = $user->id; print '
'; - print ''; + print '
'; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; @@ -246,93 +248,22 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) } print '
'.$langs->trans("Holidays").'
'; @@ -178,7 +180,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) $sql.= " WHERE u.rowid = x.fk_user"; $sql.= " AND x.entity = ".$conf->entity; if (empty($user->rights->holiday->read_all)) $sql.=' AND x.fk_user IN ('.join(',', $childids).')'; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; //if (!empty($socid)) $sql.= " AND x.fk_soc = ".$socid; $sql.= $db->order("x.tms", "DESC"); $sql.= $db->plimit($max, 0); @@ -225,7 +227,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) print '
'.$holidaystatic->getNomUrl(1).''.$userstatic->getNomUrl(-1, 'leave').''.$userstatic->getNomUrl(-1, 'leave').''.$typeleaves[$obj->fk_type]['label'].'
'; print '
'; + print '
'; } else dol_print_error($db); } -// Last expense report (old module) -if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) -{ - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut, u.photo, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut"; - $sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE u.rowid = d.fk_user"; - $sql.= " AND d.entity = ".$conf->entity; - if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',', $childids).')'; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if (!empty($socid)) $sql.= " AND d.fk_soc = ".$socid; - $sql.= $db->order("d.tms", "DESC"); - $sql.= $db->plimit($max, 0); - - $result = $db->query($sql); - if ($result) - { - $var=false; - $num = $db->num_rows($result); - - $i = 0; - - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if ($num) - { - $total_ttc = $totalam = $total = 0; - - $deplacementstatic=new Deplacement($db); - $userstatic=new User($db); - while ($i < $num && $i < $max) - { - $obj = $db->fetch_object($result); - - $deplacementstatic->ref=$obj->rowid; - $deplacementstatic->id=$obj->rowid; - - $userstatic->id=$obj->uid; - $userstatic->lastname=$obj->lastname; - $userstatic->firstname=$obj->firstname; - $userstatic->login=$obj->login; - $userstatic->email=$obj->email; - $userstatic->statut=$obj->statut; - $userstatic->photo=$obj->photo; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - $i++; - } - } - else - { - print ''; - } - print '
'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''.$langs->trans("FeesKilometersOrAmout").''.$langs->trans("DateModificationShort").' 
'.$deplacementstatic->getNomUrl(1).''.$userstatic->getNomUrl(-1).''.$obj->km.''.dol_print_date($db->jdate($obj->dm), 'day').''.$deplacementstatic->LibStatut($obj->fk_statut, 3).'
'.$langs->trans("None").'
'; - print '
'; - } - else dol_print_error($db); -} - -// Last expense report (new module) +// Latest expense report if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut, u.photo, x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status"; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u"; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE u.rowid = x.fk_user_author"; $sql.= " AND x.entity = ".$conf->entity; if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $sql.=' AND x.fk_user_author IN ('.join(',', $childids).')'; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; //if (!empty($socid)) $sql.= " AND x.fk_soc = ".$socid; $sql.= $db->order("x.tms", "DESC"); $sql.= $db->plimit($max, 0); @@ -340,7 +271,6 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire $result = $db->query($sql); if ($result) { - $var=false; $num = $db->num_rows($result); $i = 0; @@ -376,7 +306,7 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire print '
'.$expensereportstatic->getNomUrl(1).''.$userstatic->getNomUrl(-1).''.$userstatic->getNomUrl(-1).''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->dm), 'day').''.$expensereportstatic->LibStatut($obj->status, 3).'
'; + print '
'; print ''; print ''; print ''; @@ -451,7 +451,6 @@ if ($step == 2 && $datatoimport) $liste=$objmodelimport->liste_modeles($db); foreach($liste as $key) { - print ''; print ''; $text=$objmodelimport->getDriverDescForKey($key); @@ -875,7 +874,7 @@ if ($step == 4 && $datatoimport) // Title of array with fields print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'.$langs->trans("Module").''.$langs->trans("ImportableDatas").'
'.img_picto_common($key, $objmodelimport->getPictoForKey($key)).'
'; + print '
'; print ''; print ''; print ''; @@ -1152,7 +1151,7 @@ if ($step == 4 && $datatoimport) print ''; print ''; - print '
'.$langs->trans("FieldsInSourceFile").''.$langs->trans("FieldsInTargetDatabase").'
'; + print '
'; print ''; print ''; print ''; @@ -1175,7 +1174,6 @@ if ($step == 4 && $datatoimport) $i = 0; while ($i < $num) { - $obj = $db->fetch_object($resql); print ' + + + + + +
'.$langs->trans("ImportModelName").' 
'; print $obj->label; @@ -1964,15 +1962,16 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') $height='24px'; - if ($key == 'none') {//stop multiple duplicate ids with no number + if ($key == 'none') { + //stop multiple duplicate ids with no number print "\n\n\n"; print '
' . "\n"; print '' . "\n"; } else { - print "\n\n\n"; + print "\n\n\n"; print '
' . "\n"; - print '
'."\n"; + print '
'."\n"; } if ($pos && $pos > count($fieldssource)) // No fields diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index f674daddddc..c91dc0fe83b 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/imports/class/import.class.php'; // Load translation files required by the page $langs->load("exports"); -if (! $user->societe_id == 0) +if (! $user->socid == 0) accessforbidden(); $import=new Import($db); @@ -54,7 +54,8 @@ print '
'; // List of import set /* -print '
'; +print '
'; +print '
'; print ''; print ''; print ''; @@ -84,6 +85,7 @@ else print ''; } print '
'.$langs->trans("Module").''.$langs->trans("ImportableDatas").'
'.$langs->trans("NoImportableData").'
'; +print '
'; print '
'; */ @@ -107,7 +109,8 @@ print '
'; // List of available import format -print ''; +print '
'; +print '
'; print ''; print ''; print ''; @@ -130,6 +133,7 @@ foreach($liste as $key) } print '
'.$langs->trans("AvailableFormats").''.$langs->trans("LibraryShort").'
'; +print ''; //print ''; diff --git a/htdocs/includes/jquery/plugins/flot/jquery.flot.js b/htdocs/includes/jquery/plugins/flot/jquery.flot.js index 39f3e4cf3ef..c97ceb1bf44 100644 --- a/htdocs/includes/jquery/plugins/flot/jquery.flot.js +++ b/htdocs/includes/jquery/plugins/flot/jquery.flot.js @@ -2010,7 +2010,7 @@ Licensed under the MIT license. ctx.lineTo(xrange.to + subPixel, yrange.to); } else { ctx.moveTo(xrange.from, yrange.to + subPixel); - ctx.lineTo(xrange.to, yrange.to + subPixel); + ctx.lineTo(xrange.to, yrange.to + subPixel); } ctx.stroke(); } else { @@ -2525,9 +2525,9 @@ Licensed under the MIT license. radius = series.points.radius, symbol = series.points.symbol; - // If the user sets the line width to 0, we change it to a very + // If the user sets the line width to 0, we change it to a very // small value. A line width of 0 seems to force the default of 1. - // Doing the conditional here allows the shadow setting to still be + // Doing the conditional here allows the shadow setting to still be // optional even with a lineWidth of 0. if( lw == 0 ) diff --git a/htdocs/includes/mike42/escpos-php/.coveralls.yml b/htdocs/includes/mike42/escpos-php/.coveralls.yml new file mode 100644 index 00000000000..b33373af905 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/.coveralls.yml @@ -0,0 +1,4 @@ +service_name: travis-ci +coverage_clover: build/logs/clover.xml +json_path: build/logs/coveralls-upload.json + diff --git a/htdocs/includes/mike42/escpos-php/.gitignore b/htdocs/includes/mike42/escpos-php/.gitignore index 0e8fc4a31ee..8632f891ad4 100644 --- a/htdocs/includes/mike42/escpos-php/.gitignore +++ b/htdocs/includes/mike42/escpos-php/.gitignore @@ -10,3 +10,7 @@ doc/doxygen_sqlite3.db # composer files vendor/ + +# other build files +build/* +*.phar diff --git a/htdocs/includes/mike42/escpos-php/.travis.yml b/htdocs/includes/mike42/escpos-php/.travis.yml new file mode 100644 index 00000000000..04ffb6523b6 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/.travis.yml @@ -0,0 +1,46 @@ +--- +dist: trusty +sudo: required + +language: php + +php: + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - nightly + - hhvm-3.21 + - hhvm-nightly + +matrix: + allow_failures: + - php: nightly + - php: hhvm-nightly + +before_install: + - sudo apt-get -qq update + - sudo apt-get install -y imagemagick ghostscript + +install: + - composer install + +before_script: + # Install 'imagick' plugin + - bash -c 'if [[ $TRAVIS_PHP_VERSION != hhvm* ]]; then printf "\n" | pecl install imagick; fi' + # Directory for coverage report + - mkdir -p build/logs/ + +script: + # Check code style + - php vendor/bin/phpcs --standard=psr2 src/ -n + # Run tests + - php vendor/bin/phpunit --coverage-clover build/logs/clover.xml + +after_success: + # Upload coverage statistics to coveralls service after test + - wget -c -nc https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar + - php coveralls.phar -v +... diff --git a/htdocs/includes/mike42/escpos-php/CONTRIBUTING.md b/htdocs/includes/mike42/escpos-php/CONTRIBUTING.md new file mode 100644 index 00000000000..326e1d093ac --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# How to contribute + +This project is open to many different types of contribution. You can help with improving the documentation and examples, sharing your insights on the issue tracker, adding fixes to the code, providing test cases, or just [writing about your hardware setup that you use](https://github.com/mike42/escpos-php/issues/new). + +## Issue tracker + +Open issues of all sorts are tracked on the [issue tracker](https://github.com/mike42/escpos-php/issues). Please check [the FAQ](https://github.com/mike42/escpos-php/blob/development/doc/FAQ.md) before you post, and practice good [bug tracker etiquette](https://bugzilla.mozilla.org/page.cgi?id=etiquette.html) to keep it running smoothly. + +Issues are [loosely categorised](https://github.com/mike42/escpos-php/labels), and will stay open while there is still something that can be resolved. + +Anybody may add to the discussion on the bug tracker. Just be sure to add new questions as separate issues, and to avoid commenting on closed issues. + +## Submitting changes + +Code changes may be submitted as a "[pull request](https://help.github.com/articles/about-pull-requests/)" at [mike42/escpos-php](https://github.com/mike42/escpos-php). The description should include some information about how the change improves the library. + +The project is MIT-licensed (see [LICENSE.md](https://github.com/mike42/escpos-php/blob/development/LICENSE.md) for details). You are not required to assign copyright in order to submit changes, but you do need to agree for your code to be distributed under this license in order for it to be accepted. + +### Documentation changes + +The official documentaton is also located in the main repository, under the [doc/](https://github.com/mike42/escpos-php/tree/development/doc) folder. + +You are welcome to post any suggested improvements as pull requests. + +### Release process + +Once a pull request is accepted, it usually appears in a release a few days later. + +Branches: + +- "development" is the most recent code, possibly containing unreleased fixes +- "master" contains the most recently released code (old versions are not maintained). + +The release process for your changes is: + +- Changes are submitted via pull request to the shared "development" branch. +- A new release is staged on the "master" branch via another pull request, and then tagged. + +## Code style + +This project uses the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) for all PHP source code. + +## Testing and CI + +The tests are executed on [Travis CI](https://travis-ci.org/mike42/escpos-php) over PHP 5.4, 5.5, 5.6, 7.0, 7.1 and 7.2, plus the latest LTS version of HHVM, 3.21. Older versions of PHP are not supported in current releases. + +For development, it's suggested that you load `imagick`, `gd` and `Xdebug` PHP exensions, and install `composer`. + +Fetch a copy of this code and load dependencies with composer: + + git clone https://github.com/mike42/escpos-php + cd escpos-php/ + composer install + +Execute unit tests via `phpunit`: + + php vendor/bin/phpunit --coverage-text + +Code style can be checked via [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer): + + php vendor/bin/phpcs --standard=psr2 src/ -n + +The developer docs are built with [doxygen](https://github.com/doxygen/doxygen). Re-build them to check for documentation warnings: + + make -C doc clean && make -C doc diff --git a/htdocs/includes/mike42/escpos-php/CONTRIBUTORS.md b/htdocs/includes/mike42/escpos-php/CONTRIBUTORS.md new file mode 100644 index 00000000000..12f3acf95a5 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/CONTRIBUTORS.md @@ -0,0 +1,25 @@ +# escpos-php contributors + +This file contains a list of people who have made contributions of +code which appear in the public repository of escpos-php. + +Main repository: [mike42/escpos-php](https://github.com/mike42/escpos-php) ([online contributor list](https://github.com/mike42/escpos-php/graphs/contributors)) + +- [Michael Billington](https://github.com/mike42) +- [Alif Maulana El Fattah Nataly](https://github.com/alif25r) +- [Mareks Sudniks](https://github.com/marech) +- [matiasgaston](https://github.com/matiasgaston) +- [Mike Stivala](https://github.com/brndwgn) +- [Nicholas Long](https://github.com/longsview) +- [Evandro Araújo](https://github.com/evsar3) + +Via fork: [wdoyle/EpsonESCPOS-PHP](https://github.com/wdoyle/EpsonESCPOS-PHP): + +- [Warren Doyle](https://github.com/wdoyle) + +Via fork: [ronisaha/php-esc-pos](https://github.com/ronisaha/php-esc-pos): + +- [Roni Saha](https://github.com/ronisaha) +- [Gergely Radics](https://github.com/Gerifield) +- [vharo](https://github.com/vharo) + diff --git a/htdocs/includes/mike42/escpos-php/Escpos.php b/htdocs/includes/mike42/escpos-php/Escpos.php deleted file mode 100644 index b8568260738..00000000000 --- a/htdocs/includes/mike42/escpos-php/Escpos.php +++ /dev/null @@ -1,853 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * This class generates ESC/POS printer control commands for compatible printers. - * See README.md for a summary of compatible printers and supported commands, and - * basic usage. - * - * See example/demo.php for a detailed print-out demonstrating the range of commands - * implemented in this project. - * - * Note that some functions have not been implemented: - * - Set paper sensors - * - Select print colour - * - * Please direct feature requests, bug reports and contributions to escpos-php - * on Github: - * - https://github.com/mike42/escpos-php - */ -require_once(dirname(__FILE__) . "/src/EscposImage.php"); -require_once(dirname(__FILE__) . "/src/PrintBuffer.php"); -require_once(dirname(__FILE__) . "/src/EscposPrintBuffer.php"); -require_once(dirname(__FILE__) . "/src/PrintConnector.php"); -require_once(dirname(__FILE__) . "/src/WindowsPrintConnector.php"); -require_once(dirname(__FILE__) . "/src/FilePrintConnector.php"); -require_once(dirname(__FILE__) . "/src/NetworkPrintConnector.php"); -require_once(dirname(__FILE__) . "/src/AbstractCapabilityProfile.php"); -require_once(dirname(__FILE__) . "/src/DefaultCapabilityProfile.php"); -require_once(dirname(__FILE__) . "/src/SimpleCapabilityProfile.php"); -require_once(dirname(__FILE__) . "/src/EposTepCapabilityProfile.php"); -require_once(dirname(__FILE__) . "/src/StarCapabilityProfile.php"); -require_once(dirname(__FILE__) . "/src/P822DCapabilityProfile.php"); -require_once(dirname(__FILE__) . "/src/CodePage.php"); -require_once(dirname(__FILE__) . "/src/ImagePrintBuffer.php"); - -class Escpos { - /* ASCII codes */ - const NUL = "\x00"; - const LF = "\x0a"; - const ESC = "\x1b"; - const FS = "\x1c"; - const FF = "\x0c"; - const GS = "\x1d"; - const DLE = "\x10"; - const EOT = "\x04"; - - /* Barcode types */ - const BARCODE_UPCA = 65; - const BARCODE_UPCE = 66; - const BARCODE_JAN13 = 67; - const BARCODE_JAN8 = 68; - const BARCODE_CODE39 = 69; - const BARCODE_ITF = 70; - const BARCODE_CODABAR = 71; - const BARCODE_CODE93 = 72; - const BARCODE_CODE128 = 73; - - /* Barcode HRI (human-readable interpretation) text position */ - const BARCODE_TEXT_NONE = 0; - const BARCODE_TEXT_ABOVE = 1; - const BARCODE_TEXT_BELOW = 2; - - /* Cut types */ - const CUT_FULL = 65; - const CUT_PARTIAL = 66; - - /* Fonts */ - const FONT_A = 0; - const FONT_B = 1; - const FONT_C = 2; - - /* Image sizing options */ - const IMG_DEFAULT = 0; - const IMG_DOUBLE_WIDTH = 1; - const IMG_DOUBLE_HEIGHT = 2; - - /* Justifications */ - const JUSTIFY_LEFT = 0; - const JUSTIFY_CENTER = 1; - const JUSTIFY_RIGHT = 2; - - /* Print mode constants */ - const MODE_FONT_A = 0; - const MODE_FONT_B = 1; - const MODE_EMPHASIZED = 8; - const MODE_DOUBLE_HEIGHT = 16; - const MODE_DOUBLE_WIDTH = 32; - const MODE_UNDERLINE = 128; - - /* QR code error correction levels */ - const QR_ECLEVEL_L = 0; - const QR_ECLEVEL_M = 1; - const QR_ECLEVEL_Q = 2; - const QR_ECLEVEL_H = 3; - - /* QR code models */ - const QR_MODEL_1 = 1; - const QR_MODEL_2 = 2; - const QR_MICRO = 3; - - /* Printer statuses */ - const STATUS_PRINTER = 1; - const STATUS_OFFLINE_CAUSE = 2; - const STATUS_ERROR_CAUSE = 3; - const STATUS_PAPER_ROLL = 4; - const STATUS_INK_A = 7; - const STATUS_INK_B = 6; - const STATUS_PEELER = 8; - - /* Underline */ - const UNDERLINE_NONE = 0; - const UNDERLINE_SINGLE = 1; - const UNDERLINE_DOUBLE = 2; - - /** - * @var PrintBuffer The printer's output buffer. - */ - private $buffer; - - /** - * @var PrintConnector - * @CHANGE - */ - protected $connector; - // private $connector; - - /** - * @var AbstractCapabilityProfile - */ - private $profile; - - /** - * @var int Current character code table - */ - private $characterTable; - - /** - * Construct a new print object - * - * @param PrintConnector $connector The PrintConnector to send data to. If not set, output is sent to standard output. - * @param AbstractCapabilityProfile $profile Supported features of this printer. If not set, the DefaultCapabilityProfile will be used, which is suitable for Epson printers. - * @throws InvalidArgumentException - */ - function __construct(PrintConnector $connector = null, AbstractCapabilityProfile $profile = null) { - if(is_null($connector)) { - if(php_sapi_name() == 'cli') { - $connector = new FilePrintConnector("php://stdout"); - } else { - throw new InvalidArgumentException("Argument passed to Escpos::__construct() must implement interface PrintConnector, null given."); - } - } - /* Set connector */ - $this -> connector = $connector; - - /* Set capability profile */ - if($profile === null) { - $profile = DefaultCapabilityProfile::getInstance(); - } - $this -> profile = $profile; - /* Set buffer */ - $buffer = new EscposPrintBuffer(); - $this -> buffer = null; - $this -> setPrintBuffer($buffer); - $this -> initialize(); - } - - /** - * Print a barcode. - * - * @param string $content The information to encode. - * @param int $type The barcode standard to output. If not specified, `Escpos::BARCODE_CODE39` will be used. Note that some barcode formats only support specific lengths or sets of characters. - * @throws InvalidArgumentException Where the length or characters used in $content is invalid for the requested barcode format. - */ - function barcode($content, $type = self::BARCODE_CODE39) { - /* Validate input */ - self::validateInteger($type, 65, 73, __FUNCTION__, "Barcode type"); - $len = strlen($content); - switch($type) { - case self::BARCODE_UPCA: - self::validateInteger($len, 11, 12, __FUNCTION__, "UPCA barcode content length"); - self::validateStringRegex($content, __FUNCTION__, "/^[0-9]{11,12}$/", "UPCA barcode content"); - break; - case self::BARCODE_UPCE: - self::validateIntegerMulti($len, array(array(6, 8), array(11, 12)), __FUNCTION__, "UPCE barcode content length"); - self::validateStringRegex($content, __FUNCTION__, "/^([0-9]{6,8}|[0-9]{11,12})$/", "UPCE barcode content"); - break; - case self::BARCODE_JAN13: - self::validateInteger($len, 12, 13, __FUNCTION__, "JAN13 barcode content length"); - self::validateStringRegex($content, __FUNCTION__, "/^[0-9]{12,13}$/", "JAN13 barcode content"); - break; - case self::BARCODE_JAN8: - self::validateInteger($len, 7, 8, __FUNCTION__, "JAN8 barcode content length"); - self::validateStringRegex($content, __FUNCTION__, "/^[0-9]{7,8}$/", "JAN8 barcode content"); - break; - case self::BARCODE_CODE39: - self::validateInteger($len, 1, 255, __FUNCTION__, "CODE39 barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. - self::validateStringRegex($content, __FUNCTION__, "/^([0-9A-Z \$\%\+\-\.\/]+|\*[0-9A-Z \$\%\+\-\.\/]+\*)$/", "CODE39 barcode content"); - break; - case self::BARCODE_ITF: - self::validateInteger($len, 2, 255, __FUNCTION__, "ITF barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. - self::validateStringRegex($content, __FUNCTION__, "/^([0-9]{2})+$/", "ITF barcode content"); - break; - case self::BARCODE_CODABAR: - self::validateInteger($len, 1, 255, __FUNCTION__, "Codabar barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. - self::validateStringRegex($content, __FUNCTION__, "/^[A-Da-d][0-9\$\+\-\.\/\:]+[A-Da-d]$/", "Codabar barcode content"); - break; - case self::BARCODE_CODE93: - self::validateInteger($len, 1, 255, __FUNCTION__, "Code93 barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. - self::validateStringRegex($content, __FUNCTION__, "/^[\\x00-\\x7F]+$/", "Code93 barcode content"); - break; - case self::BARCODE_CODE128: - self::validateInteger($len, 1, 255, __FUNCTION__, "Code128 barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. - // The CODE128 encoder is quite complex, so only a very basic header-check is applied here. - self::validateStringRegex($content, __FUNCTION__, "/^\{[A-C][\\x00-\\x7F]+$/", "Code128 barcode content"); - break; - } - if(!$this -> profile -> getSupportsBarcodeB()) { - // A simpler barcode command which supports fewer codes - self::validateInteger($type, 65, 71, __FUNCTION__); - $this -> connector -> write(self::GS . "k" . chr($type - 65) . $content . self::NUL); - return; - } - // More advanced function B, used in preference - $this -> connector -> write(self::GS . "k" . chr($type) . chr(strlen($content)) . $content); - } - - /** - * Print an image, using the older "bit image" command. This creates padding on the right of the image, - * if its width is not divisible by 8. - * - * Should only be used if your printer does not support the graphics() command. - * - * @param EscposImage $img The image to print - * @param EscposImage $size Size modifier for the image. - */ - function bitImage(EscposImage $img, $size = self::IMG_DEFAULT) { - self::validateInteger($size, 0, 3, __FUNCTION__); - $header = self::dataHeader(array($img -> getWidthBytes(), $img -> getHeight()), true); - $this -> connector -> write(self::GS . "v0" . chr($size) . $header); - $this -> connector -> write($img -> toRasterFormat()); - } - - /** - * Close the underlying buffer. With some connectors, the - * job will not actually be sent to the printer until this is called. - */ - function close() { - $this -> connector -> finalize(); - } - - /** - * Cut the paper. - * - * @param int $mode Cut mode, either Escpos::CUT_FULL or Escpos::CUT_PARTIAL. If not specified, `Escpos::CUT_FULL` will be used. - * @param int $lines Number of lines to feed - */ - function cut($mode = self::CUT_FULL, $lines = 3) { - // TODO validation on cut() inputs - $this -> connector -> write(self::GS . "V" . chr($mode) . chr($lines)); - } - - /** - * Print and feed line / Print and feed n lines. - * - * @param int $lines Number of lines to feed - */ - function feed($lines = 1) { - self::validateInteger($lines, 1, 255, __FUNCTION__); - if($lines <= 1) { - $this -> connector -> write(self::LF); - } else { - $this -> connector -> write(self::ESC . "d" . chr($lines)); - } - } - - /** - * Some printers require a form feed to release the paper. On most printers, this - * command is only useful in page mode, which is not implemented in this driver. - */ - function feedForm() { - $this -> connector -> write(self::FF); - } - - /** - * Print and reverse feed n lines. - * - * @param int $lines number of lines to feed. If not specified, 1 line will be fed. - */ - function feedReverse($lines = 1) { - self::validateInteger($lines, 1, 255, __FUNCTION__); - $this -> connector -> write(self::ESC . "e" . chr($lines)); - } - - /** - * @return number - */ - function getCharacterTable() { - return $this -> characterTable; - } - - /** - * @return PrintBuffer - */ - function getPrintBuffer() { - return $this -> buffer; - } - - /** - * @return PrintConnector - */ - function getPrintConnector() { - return $this -> connector; - } - - /** - * @return AbstractCapabilityProfile - */ - function getPrinterCapabilityProfile() { - return $this -> profile; - } - - /** - * @param int $type The type of status to request - * @return stdClass Class containing requested status, or null if either no status was received, or your print connector is unable to read from the printer. - */ - function getPrinterStatus($type = self::STATUS_PRINTER) { - self::validateIntegerMulti($type, array(array(1, 4), array(6, 8)), __FUNCTION__); - // Determine which flags we are looking for - $statusFlags = array( - self::STATUS_PRINTER => array( - 4 => "pulseHigh", // connector pin 3, see pulse(). - 8 => "offline", - 32 => "waitingForOnlineRecovery", - 64 => "feedButtonPressed" - ), - self::STATUS_OFFLINE_CAUSE => array( - 4 => "coverOpen", - 8 => "paperManualFeed", - 32 => "paperEnd", - 64 => "errorOccurred" - ), - self::STATUS_ERROR_CAUSE => array( - 4 => "recoverableError", - 8 => "autocutterError", - 32 => "unrecoverableError", - 64 => "autorecoverableError" - ), - self::STATUS_PAPER_ROLL => array( - 4 => "paperNearEnd", - 32 => "paperNotPresent" - ), - self::STATUS_INK_A => array( - 4 => "inkNearEnd", - 8 => "inkEnd", - 32 => "inkNotPresent", - 64 => "cleaning" - ), - self::STATUS_INK_B => array( - 4 => "inkNearEnd", - 8 => "inkEnd", - 32 => "inkNotPresent" - ), - self::STATUS_PEELER => array( - 4 => "labelWaitingForRemoval", - 32 => "labelPaperNotDetected" - ) - ); - $flags = $statusFlags[$type]; - // Clear any previous statuses which haven't been read yet - $f = $this -> connector -> read(1); - // Make request - $reqC = chr($type); - switch($type) { - // Special cases: These are two-character requests - case self::STATUS_INK_A: - $reqC = chr(7) . chr(1); - break; - case self::STATUS_INK_B: - $reqC = chr(7) . chr(2); - break; - case self::STATUS_PEELER: - $reqC = chr(8) . chr(3); - break; - } - $this -> connector -> write(self::DLE . self::EOT . $reqC); - // Wait for single-character response - $f = $this -> connector -> read(1); - $i = 0; - while($f === false && $i < 50000) { - usleep(100); - $f = $this -> connector -> read(1); - $i++; - } - if($f === false) { - // Timeout - return null; - } - $ret = new stdClass(); - foreach($flags as $num => $name) { - $ret -> $name = (ord($f) & $num) != 0; - } - return $ret; - } - - /** - * Print an image to the printer. - * - * Size modifiers are: - * - IMG_DEFAULT (leave image at original size) - * - IMG_DOUBLE_WIDTH - * - IMG_DOUBLE_HEIGHT - * - * See the example/ folder for detailed examples. - * - * The function bitImage() takes the same parameters, and can be used if - * your printer doesn't support the newer graphics commands. - * - * @param EscposImage $img The image to print. - * @param int $size Output size modifier for the image. - */ - function graphics(EscposImage $img, $size = self::IMG_DEFAULT) { - self::validateInteger($size, 0, 3, __FUNCTION__); - $imgHeader = self::dataHeader(array($img -> getWidth(), $img -> getHeight()), true); - $tone = '0'; - $colors = '1'; - $xm = (($size & self::IMG_DOUBLE_WIDTH) == self::IMG_DOUBLE_WIDTH) ? chr(2) : chr(1); - $ym = (($size & self::IMG_DOUBLE_HEIGHT) == self::IMG_DOUBLE_HEIGHT) ? chr(2) : chr(1); - $header = $tone . $xm . $ym . $colors . $imgHeader; - $this -> wrapperSendGraphicsData('0', 'p', $header . $img -> toRasterFormat()); - $this -> wrapperSendGraphicsData('0', '2'); - } - - /** - * Initialize printer. This resets formatting back to the defaults. - */ - function initialize() { - $this -> connector -> write(self::ESC . "@"); - $this -> characterTable = 0; - } - - /** - * Generate a pulse, for opening a cash drawer if one is connected. - * The default settings should open an Epson drawer. - * - * @param int $pin 0 or 1, for pin 2 or pin 5 kick-out connector respectively. - * @param int $on_ms pulse ON time, in milliseconds. - * @param int $off_ms pulse OFF time, in milliseconds. - */ - function pulse($pin = 0, $on_ms = 120, $off_ms = 240) { - self::validateInteger($pin, 0, 1, __FUNCTION__); - self::validateInteger($on_ms, 1, 511, __FUNCTION__); - self::validateInteger($off_ms, 1, 511, __FUNCTION__); - $this -> connector -> write(self::ESC . "p" . chr($pin + 48) . chr($on_ms / 2) . chr($off_ms / 2)); - } - - /** - * Print the given data as a QR code on the printer. - * - * @param string $content The content of the code. Numeric data will be more efficiently compacted. - * @param int $ec Error-correction level to use. One of Escpos::QR_ECLEVEL_L (default), Escpos::QR_ECLEVEL_M, Escpos::QR_ECLEVEL_Q or Escpos::QR_ECLEVEL_H. Higher error correction results in a less compact code. - * @param int $size Pixel size to use. Must be 1-16 (default 3) - * @param int $model QR code model to use. Must be one of Escpos::QR_MODEL_1, Escpos::QR_MODEL_2 (default) or Escpos::QR_MICRO (not supported by all printers). - */ - function qrCode($content, $ec = self::QR_ECLEVEL_L, $size = 3, $model = self::QR_MODEL_2) { - self::validateString($content, __FUNCTION__); - self::validateInteger($ec, 0, 3, __FUNCTION__); - self::validateInteger($size, 1, 16, __FUNCTION__); - self::validateInteger($model, 1, 3, __FUNCTION__); - if($content == "") { - return; - } - if(!$this -> profile -> getSupportsQrCode()) { - // TODO use software rendering via phpqrcode instead - throw new Exception("QR codes are not supported on your printer."); - } - $cn = '1'; // Code type for QR code - // Select model: 1, 2 or micro. - $this -> wrapperSend2dCodeData(chr(65), $cn, chr(48 + $model) . chr(0)); - // Set dot size. - $this -> wrapperSend2dCodeData(chr(67), $cn, chr($size)); - // Set error correction level: L, M, Q, or H - $this -> wrapperSend2dCodeData(chr(69), $cn, chr(48 + $ec)); - // Send content & print - $this -> wrapperSend2dCodeData(chr(80), $cn, $content, '0'); - $this -> wrapperSend2dCodeData(chr(81), $cn, '', '0'); - } - - /** - * Switch character table (code page) manually. Used in conjunction with textRaw() to - * print special characters which can't be encoded automatically. - * - * @param int $table The table to select. Available code tables are model-specific. - */ - function selectCharacterTable($table = 0) { - self::validateInteger($table, 0, 255, __FUNCTION__); - $supported = $this -> profile -> getSupportedCodePages(); - if(!isset($supported[$table])) { - throw new InvalidArgumentException("There is no code table $table allowed by this printer's capability profile."); - } - $this -> characterTable = $table; - if($this -> profile -> getSupportsStarCommands()) { - /* Not an ESC/POS command: STAR printers stash all the extra code pages under a different command. */ - $this -> connector -> write(self::ESC . self::GS . "t" . chr($table)); - return; - } - $this -> connector -> write(self::ESC . "t" . chr($table)); - } - - /** - * Select print mode(s). - * - * Several MODE_* constants can be OR'd together passed to this function's `$mode` argument. The valid modes are: - * - MODE_FONT_A - * - MODE_FONT_B - * - MODE_EMPHASIZED - * - MODE_DOUBLE_HEIGHT - * - MODE_DOUBLE_WIDTH - * - MODE_UNDERLINE - * - * @param int $mode The mode to use. Default is Escpos::MODE_FONT_A, with no special formatting. This has a similar effect to running initialize(). - */ - function selectPrintMode($mode = self::MODE_FONT_A) { - $allModes = self::MODE_FONT_B | self::MODE_EMPHASIZED | self::MODE_DOUBLE_HEIGHT | self::MODE_DOUBLE_WIDTH | self::MODE_UNDERLINE; - if(!is_integer($mode) || $mode < 0 || ($mode & $allModes) != $mode) { - throw new InvalidArgumentException("Invalid mode"); - } - - $this -> connector -> write(self::ESC . "!" . chr($mode)); - } - - /** - * Set barcode height. - * - * @param int $height Height in dots. If not specified, 8 will be used. - */ - function setBarcodeHeight($height = 8) { - self::validateInteger($height, 1, 255, __FUNCTION__); - $this -> connector -> write(self::GS . "h" . chr($height)); - } - - - /** - * Set the position for the Human Readable Interpretation (HRI) of barcode characters. - * - * @param position $position. Use Escpos::BARCODE_TEXT_NONE to hide the text (default), or any combination of Escpos::BARCODE_TEXT_TOP and Escpos::BARCODE_TEXT_BOTTOM flags to display the text. - */ - function setBarcodeTextPosition($position = self::BARCODE_TEXT_NONE) { - self::validateInteger($position, 0, 3, __FUNCTION__, "Barcode text position"); - $this -> connector -> write(self::GS . "H" . chr($position)); - } - - /** - * Turn double-strike mode on/off. - * - * @param boolean $on true for double strike, false for no double strike - */ - function setDoubleStrike($on = true) { - self::validateBoolean($on, __FUNCTION__); - $this -> connector -> write(self::ESC . "G". ($on ? chr(1) : chr(0))); - } - - /** - * Turn emphasized mode on/off. - * - * @param boolean $on true for emphasis, false for no emphasis - */ - function setEmphasis($on = true) { - self::validateBoolean($on, __FUNCTION__); - $this -> connector -> write(self::ESC . "E". ($on ? chr(1) : chr(0))); - } - - /** - * Select font. Most printers have two fonts (Fonts A and B), and some have a third (Font C). - * - * @param int $font The font to use. Must be either Escpos::FONT_A, Escpos::FONT_B, or Escpos::FONT_C. - */ - function setFont($font = self::FONT_A) { - self::validateInteger($font, 0, 2, __FUNCTION__); - $this -> connector -> write(self::ESC . "M" . chr($font)); - } - - /** - * Select justification. - * - * @param int $justification One of Escpos::JUSTIFY_LEFT, Escpos::JUSTIFY_CENTER, or Escpos::JUSTIFY_RIGHT. - */ - function setJustification($justification = self::JUSTIFY_LEFT) { - self::validateInteger($justification, 0, 2, __FUNCTION__); - $this -> connector -> write(self::ESC . "a" . chr($justification)); - } - - /** - * Attach a different print buffer to the printer. Buffers are responsible for handling text output to the printer. - * - * @param PrintBuffer $buffer The buffer to use. - * @throws InvalidArgumentException Where the buffer is already attached to a different printer. - */ - function setPrintBuffer(PrintBuffer $buffer) { - if($buffer === $this -> buffer) { - return; - } - if($buffer -> getPrinter() != null) { - throw new InvalidArgumentException("This buffer is already attached to a printer."); - } - if($this -> buffer !== null) { - $this -> buffer -> setPrinter(null); - } - $this -> buffer = $buffer; - $this -> buffer -> setPrinter($this); - } - - /** - * Set black/white reverse mode on or off. In this mode, text is printed white on a black background. - * - * @param boolean $on True to enable, false to disable. - */ - function setReverseColors($on = true) { - self::validateBoolean($on, __FUNCTION__); - $this -> connector -> write(self::GS . "B" . ($on ? chr(1) : chr(0))); - } - - /** - * Set the size of text, as a multiple of the normal size. - * - * @param int $widthMultiplier Multiple of the regular height to use (range 1 - 8) - * @param int $heightMultiplier Multiple of the regular height to use (range 1 - 8) - */ - function setTextSize($widthMultiplier, $heightMultiplier) { - self::validateInteger($widthMultiplier, 1, 8, __FUNCTION__); - self::validateInteger($heightMultiplier, 1, 8, __FUNCTION__); - $c = pow(2,4) * ($widthMultiplier - 1) + ($heightMultiplier - 1); - $this -> connector -> write(self::GS . "!" . chr($c)); - } - - /** - * Set underline for printed text. - * - * Argument can be true/false, or one of UNDERLINE_NONE, - * UNDERLINE_SINGLE or UNDERLINE_DOUBLE. - * - * @param int $underline Either true/false, or one of Escpos::UNDERLINE_NONE, Escpos::UNDERLINE_SINGLE or Escpos::UNDERLINE_DOUBLE. Defaults to Escpos::UNDERLINE_SINGLE. - */ - function setUnderline($underline = self::UNDERLINE_SINGLE) { - /* Map true/false to underline constants */ - if($underline === true) { - $underline = self::UNDERLINE_SINGLE; - } else if($underline === false) { - $underline = self::UNDERLINE_NONE; - } - /* Set the underline */ - self::validateInteger($underline, 0, 2, __FUNCTION__); - $this -> connector -> write(self::ESC . "-". chr($underline)); - } - - /** - * Add text to the buffer. - * - * Text should either be followed by a line-break, or feed() should be called - * after this to clear the print buffer. - * - * @param string $str Text to print - */ - function text($str = "") { - self::validateString($str, __FUNCTION__); - $this -> buffer -> writeText((string)$str); - } - - /** - * Add text to the buffer without attempting to interpret chararacter codes. - * - * Text should either be followed by a line-break, or feed() should be called - * after this to clear the print buffer. - * - * @param string $str Text to print - */ - function textRaw($str = "") { - self::validateString($str, __FUNCTION__); - $this -> buffer -> writeTextRaw((string)$str); - } - - /** - * Wrapper for GS ( k, to calculate and send correct data length. - * - * @param string $fn Function to use - * @param string $cn Output code type. Affects available data - * @param string $data Data to send. - * @param string $m Modifier/variant for function. Often '0' where used. - * @throws InvalidArgumentException Where the input lengths are bad. - */ - private function wrapperSend2dCodeData($fn, $cn, $data = '', $m = '') { - if(strlen($m) > 1 || strlen($cn) != 1 || strlen($fn) != 1) { - throw new InvalidArgumentException("wrapperSend2dCodeData: cn and fn must be one character each."); - } - $header = $this -> intLowHigh(strlen($data) + strlen($m) + 2, 2); - $this -> connector -> write(self::GS . "(k" . $header . $cn . $fn . $m . $data); - } - - /** - * Wrapper for GS ( L, to calculate and send correct data length. - * - * @param string $m Modifier/variant for function. Usually '0'. - * @param string $fn Function number to use, as character. - * @param string $data Data to send. - * @throws InvalidArgumentException Where the input lengths are bad. - */ - private function wrapperSendGraphicsData($m, $fn, $data = '') { - if(strlen($m) != 1 || strlen($fn) != 1) { - throw new InvalidArgumentException("wrapperSendGraphicsData: m and fn must be one character each."); - } - $header = $this -> intLowHigh(strlen($data) + 2, 2); - $this -> connector -> write(self::GS . "(L" . $header . $m . $fn . $data); - } - - /** - * Convert widths and heights to characters. Used before sending graphics to set the size. - * - * @param array $inputs - * @param boolean $long True to use 4 bytes, false to use 2 - * @return string - */ - private static function dataHeader(array $inputs, $long = true) { - $outp = array(); - foreach($inputs as $input) { - if($long) { - $outp[] = Escpos::intLowHigh($input, 2); - } else { - self::validateInteger($input, 0 , 255, __FUNCTION__); - $outp[] = chr($input); - } - } - return implode("", $outp); - } - - /** - * Generate two characters for a number: In lower and higher parts, or more parts as needed. - * @param int $int Input number - * @param int $length The number of bytes to output (1 - 4). - */ - private static function intLowHigh($input, $length) { - $maxInput = (256 << ($length * 8) - 1); - self::validateInteger($length, 1, 4, __FUNCTION__); - self::validateInteger($input, 0, $maxInput, __FUNCTION__); - $outp = ""; - for($i = 0; $i < $length; $i++) { - $outp .= chr($input % 256); - $input = (int)($input / 256); - } - return $outp; - } - - /** - * Throw an exception if the argument given is not a boolean - * - * @param boolean $test the input to test - * @param string $source the name of the function calling this - */ - protected static function validateBoolean($test, $source) { - if(!($test === true || $test === false)) { - throw new InvalidArgumentException("Argument to $source must be a boolean"); - } - } - - /** - * Throw an exception if the argument given is not an integer within the specified range - * - * @param int $test the input to test - * @param int $min the minimum allowable value (inclusive) - * @param int $max the maximum allowable value (inclusive) - * @param string $source the name of the function calling this - * @param string $argument the name of the invalid parameter - */ - protected static function validateInteger($test, $min, $max, $source, $argument = "Argument") { - self::validateIntegerMulti($test, array(array($min, $max)), $source, $argument); - } - - /** - * Throw an exception if the argument given is not an integer within one of the specified ranges - * - * @param int $test the input to test - * @param arrray $ranges array of two-item min/max ranges. - * @param string $source the name of the function calling this - * @param string $source the name of the function calling this - * @param string $argument the name of the invalid parameter - */ - protected static function validateIntegerMulti($test, array $ranges, $source, $argument = "Argument") { - if(!is_integer($test)) { - throw new InvalidArgumentException("$argument given to $source must be a number, but '$test' was given."); - } - $match = false; - foreach($ranges as $range) { - $match |= $test >= $range[0] && $test <= $range[1]; - } - if(!$match) { - // Put together a good error "range 1-2 or 4-6" - $rangeStr = "range "; - for($i = 0; $i < count($ranges); $i++) { - $rangeStr .= $ranges[$i][0] . "-" . $ranges[$i][1]; - if($i == count($ranges) - 1) { - continue; - } else if($i == count($ranges) - 2) { - $rangeStr .= " or "; - } else { - $rangeStr .= ", "; - } - } - throw new InvalidArgumentException("$argument given to $source must be in $rangeStr, but $test was given."); - } - } - - /** - * Throw an exception if the argument given can't be cast to a string - * - * @param string $test the input to test - * @param string $source the name of the function calling this - * @param string $argument the name of the invalid parameter - */ - protected static function validateString($test, $source, $argument = "Argument") { - if (is_object($test) && !method_exists($test, '__toString')) { - throw new InvalidArgumentException("$argument to $source must be a string"); - } - } - - protected static function validateStringRegex($test, $source, $regex, $argument = "Argument") { - if(preg_match($regex, $test) === 0) { - throw new InvalidArgumentException("$argument given to $source is invalid. It should match regex '$regex', but '$test' was given."); - } - } -} diff --git a/htdocs/includes/mike42/escpos-php/LICENSE.md b/htdocs/includes/mike42/escpos-php/LICENSE.md index a0bebf6920b..0e04f34f84f 100644 --- a/htdocs/includes/mike42/escpos-php/LICENSE.md +++ b/htdocs/includes/mike42/escpos-php/LICENSE.md @@ -1,11 +1,7 @@ -escpos-php, a Thermal receipt printer library, for use with -ESC/POS compatible printers. +MIT License -Copyright (c) 2014-15 Michael Billington , -incorporating modifications by: -- Roni Saha -- Gergely Radics -- Warren Doyle +Copyright (c) 2014-2016 Michael Billington, incorporating modifications by others. +See CONTRIBUTORS.md for a full list. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -13,10 +9,10 @@ in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -24,4 +20,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/htdocs/includes/mike42/escpos-php/README.md b/htdocs/includes/mike42/escpos-php/README.md index 43798bb0852..c5bb5c91337 100644 --- a/htdocs/includes/mike42/escpos-php/README.md +++ b/htdocs/includes/mike42/escpos-php/README.md @@ -1,73 +1,14 @@ -ESC/POS Print Driver for PHP -============================ +# ESC/POS Print Driver for PHP +[![Build Status](https://travis-ci.org/mike42/escpos-php.svg?branch=master)](https://travis-ci.org/mike42/escpos-php) [![Latest Stable Version](https://poser.pugx.org/mike42/escpos-php/v/stable)](https://packagist.org/packages/mike42/escpos-php) +[![Total Downloads](https://poser.pugx.org/mike42/escpos-php/downloads)](https://packagist.org/packages/mike42/escpos-php) +[![License](https://poser.pugx.org/mike42/escpos-php/license)](https://packagist.org/packages/mike42/escpos-php) +[![Coverage Status](https://coveralls.io/repos/github/mike42/escpos-php/badge.svg?branch=development)](https://coveralls.io/github/mike42/escpos-php?branch=development) + This project implements a subset of Epson's ESC/POS protocol for thermal receipt printers. It allows you to generate and print receipts with basic formatting, cutting, and barcodes on a compatible printer. The library was developed to add drop-in support for receipt printing to any PHP app, including web-based point-of-sale (POS) applications. -Basic usage ------------ -A "hello world" receipt can be generated easily (Call this `hello-world.php`): -```php - text("Hello World!\n"); -$printer -> cut(); -$printer -> close(); -``` -This would be printed as: -``` -# Networked printer -php hello-world.php | nc 10.x.x.x. 9100 -# Local printer -php hello-world.php > /dev/... -# Windows local printer -php hello-world.php > foo.txt -net use LPT1 \\server\printer -copy foo.txt LPT1 -del foo.txt -``` - -From your web app, you could pass the output directly to a socket if your printer is networked: -```php - text("Hello World!\n"); -$printer -> cut(); -$printer -> close(); -``` - -Or to a local printer: -```php - text("Hello World!\n"); -$printer -> cut(); -$printer -> close(); -``` - -### Basic workflow -The library should be initialised with a PrintConnector, which will pass on the data to your printer. -Use the table under "Compatibility", or the examples below to choose the appropriate connector for your -platform & interface. If no connector is specified, then standard output is used. - -When you have finished using the print object, call `close()` to finalize any data transfers. - -### Tips & examples -On Linux, your printer device file will be somewhere like `/dev/lp0` (parallel), `/dev/usb/lp1` (USB), `/dev/ttyUSB0` (USB-Serial), `/dev/ttyS0` (serial). - -On Windows, the device files will be along the lines of `LPT1` (parallel) or `COM1` (serial). Use the `WindowsPrintConnector` to tap into system printing on Windows (eg. [Windows USB](https://github.com/mike42/escpos-php/tree/master/example/interface/windows-usb.php), [SMB](https://github.com/mike42/escpos-php/tree/master/example/interface/smb.php) or [Windows LPT](https://github.com/mike42/escpos-php/tree/master/example/interface/windows-lpt.php)) - this submits print jobs via a queue rather than communicating directly with the printer. - -A complete real-world receipt can be found in the code of [Auth](https://github.com/mike42/Auth) in [ReceiptPrinter.php](https://github.com/mike42/Auth/blob/master/lib/misc/ReceiptPrinter.php). It includes justification, boldness, and a barcode. - -Other examples are located in the [example/](https://github.com/mike42/escpos-php/blob/master/example/) directory. - -Compatibility -------------- +## Compatibility ### Interfaces and operating systems This driver is known to work with the following OS/interface combinations: @@ -115,43 +56,276 @@ This driver is known to work with the following OS/interface combinations:
No Yes
CUPS hostedYesYesNo
### Printers Many thermal receipt printers support ESC/POS to some degree. This driver has been known to work with: +- 3nStar RPT-008 +- Approx APPPOS80AM +- AURES ODP-333 +- AURES ODP-500 +- Bematech-4200-TH +- Bematech LR2000E +- Birch PRP-085III +- Bixolon SRP-350III +- Bixolon SRP-350Plus +- Black Copper BC-85AC +- CHD TH-305N +- Citizen CBM1000-II +- Citizen CT-S310II +- Dapper-Geyi Q583P +- Daruma DR800 +- DR-MP200 (manufacturer unknown) - EPOS TEP 220M +- Elgin i9 +- Epson EU-T332C +- Epson FX-890 (requires `feedForm()` to release paper). +- Epson TM-T20 +- Epson TM-T20II +- Epson TM-T70 +- Epson TM-T70II +- Epson TM-T81 +- Epson TM-T82II +- Epson TM-T88II - Epson TM-T88III - Epson TM-T88IV -- Epson TM-T70 -- Epson TM-T82II -- Epson TM-T20 -- Epson TM-T70II +- Epson TM-T88V - Epson TM-U220 -- Epson FX-890 (requires `feedForm()` to release paper). -- Okipos 80 Plus III +- Epson TM-U295 (requires `release()` to release slip). +- Epson TM-U590 and TM-U590P +- Equal (EQ-IT-001) POS-58 +- Everycom EC-58 +- Excelvan HOP-E200 +- Excelvan HOP-E58 +- Excelvan HOP-E801 +- Gainscha GP-2120TF +- Gainscha GP-5890x (Also marketed as EC Line 5890x) +- Gainscha GP-U80300I (Also marketed as gprinter GP-U80300I) +- gprinter GP-U80160I +- HOIN HOP-H58 +- Ithaca iTherm 28 +- Hasar HTP 250 +- Metapace T-1 +- Metapace T-25 +- Nexa PX700 +- Nyear NP100 +- OKI RT322 +- OKI 80 Plus III +- Orient BTP-R580 - P-822D +- P85A-401 (make unknown) +- Partner Tech RP320 +- POSLIGNE ODP200H-III-G +- QPOS Q58M +- Rongta RP326US +- Rongta RP58-U +- Rongta RP80USE +- SAM4S GIANT-100DB +- Senor TP-100 +- Sewoo SLK-TS400 +- SEYPOS PRP-96 - SEYPOS PRP-300 (Also marketed as TYSSO PRP-300) +- SNBC BTP-R880NPIII +- Solux SX-TP-88300 +- Sicar POS-80 +- Silicon SP-201 / RP80USE +- SPRT SP-POS88V +- Star BSC10 +- Star TSP100 ECO +- Star TSP100III FuturePRNT - Star TSP-650 - Star TUP-592 +- TVS RP45 Shoppe +- Venus V248T +- Xeumior SM-8330 +- Xprinter F-900 +- Xprinter XP-365B +- Xprinter XP-58 Series +- Xprinter XP-80C +- Xprinter XP-90 +- XPrinter XP-Q20011 - Xprinter XP-Q800 -- Zijang NT-58H -- Zijang ZJ-5870 -- Zijang ZJ-5890T (Marketed as POS 5890T) +- Zjiang NT-58H +- Zjiang ZJ-5870 +- Zjiang ZJ-5890 (Also sold as POS-5890 by many vendors; ZJ-5890K, ZJ-5890T also work). +- Zjiang ZJ-8220 (Also marketed as Excelvan ZJ-8220) +- Zjiang ZJ-8250 -If you use any other printer with this code, please let me know so I can add it to the list. +If you use any other printer with this code, please [let us know](https://github.com/mike42/escpos-php/issues/new) so that it can be added to the list. -Available methods ------------------ +## Basic usage -### __construct(PrintConnector $connector, AbstractCapabilityProfile $profile) +### Include the library + +#### Composer +If you are using composer, then add `mike42/escpos-php` as a dependency: + +```bash +composer require mike42/escpos-php +``` + +In this case, you would include composer's auto-loader at the top of your source files: + +```php + text("Hello World!\n"); +$printer -> cut(); +$printer -> close(); +``` + +Some examples are below for common interfaces. + +Communicate with a printer with an Ethernet interface using `netcat`: + +```bash +php hello-world.php | nc 10.x.x.x. 9100 +``` + +A USB local printer connected with `usblp` on Linux has a device file (Includes USB-parallel interfaces): + +```bash +php hello-world.php > /dev/usb/lp0 +``` + +A computer installed into the local `cups` server is accessed through `lp` or `lpr`: + +```bash +php hello-world.php > foo.txt +lpr -o raw -H localhost -P printer foo.txt +``` + +A local or networked printer on a Windows computer is mapped in to a file, and generally requires you to share the printer first: + +``` +php hello-world.php > foo.txt +net use LPT1 \\server\printer +copy foo.txt LPT1 +del foo.txt +``` + +If you have troubles at this point, then you should consult your OS and printer system documentation to try to find a working print command. + +### Using a PrintConnector + +To print receipts from PHP, use the most applicable [PrintConnector](https://github.com/mike42/escpos-php/tree/master/src/Mike42/Escpos/PrintConnectors) for your setup. The connector simply provides the plumbing to get data to the printer. + +For example, a `NetworkPrintConnector` accepts an IP address and port: + +```php +use Mike42\Escpos\PrintConnectors\NetworkPrintConnector; +use Mike42\Escpos\Printer; +$connector = new NetworkPrintConnector("10.x.x.x", 9100); +$printer = new Printer($connector); +try { + // ... Print stuff +} finally { + $printer -> close(); +} +``` + +While a serial printer might use: +```php +use Mike42\Escpos\PrintConnectors\FilePrintConnector; +use Mike42\Escpos\Printer; +$connector = new FilePrintConnector("/dev/ttyS0"); +$printer = new Printer($connector); +``` + +For each OS/interface combination that's supported, there are examples in the compatibility section of how a `PrintConnector` would be constructed. If you can't get a `PrintConnector` to work, then be sure to include the working print command in bug. + +### Using a CapabilityProfile + +Support for commands and code pages varies between printer vendors and models. By default, the driver will accept UTF-8, and output commands that are suitable for Epson TM-series printers. + +When trying out a new brand of printer, it's a good idea to use the "simple" `CapabilityProfile`, which instructs the driver to avoid the use of advanced features (generally simpler image handling, ASCII-only text). + +```php +use Mike42\Escpos\PrintConnectors\WindowsPrintConnector; +use Mike42\Escpos\CapabilityProfile; +$profile = CapabilityProfile::load("simple"); +$connector = new WindowsPrintConnector("smb://computer/printer"); +$printer = new Printer($connector, $profile); +``` + +As another example, Star-branded printers use different commands: + +```php +use Mike42\Escpos\PrintConnectors\WindowsPrintConnector; +use Mike42\Escpos\CapabilityProfile; +$profile = CapabilityProfile::load("SP2000") +$connector = new WindowsPrintConnector("smb://computer/printer"); +$printer = new Printer($connector, $profile); +``` + +For a list of available profiles, or to have support for your printer improved, please see the upstream [receipt-print-hq/escpos-printer-db](https://github.com/receipt-print-hq/escpos-printer-db) project. + +### Tips & examples +On Linux, your printer device file will be somewhere like `/dev/lp0` (parallel), `/dev/usb/lp1` (USB), `/dev/ttyUSB0` (USB-Serial), `/dev/ttyS0` (serial). + +On Windows, the device files will be along the lines of `LPT1` (parallel) or `COM1` (serial). Use the `WindowsPrintConnector` to tap into system printing on Windows (eg. [Windows USB](https://github.com/mike42/escpos-php/tree/master/example/interface/windows-usb.php), [SMB](https://github.com/mike42/escpos-php/tree/master/example/interface/smb.php) or [Windows LPT](https://github.com/mike42/escpos-php/tree/master/example/interface/windows-lpt.php)) - this submits print jobs via a queue rather than communicating directly with the printer. + +A complete real-world receipt can be found in the code of [Auth](https://github.com/mike42/Auth) in [ReceiptPrinter.php](https://github.com/mike42/Auth/blob/master/lib/misc/ReceiptPrinter.php). It includes justification, boldness, and a barcode. + +Other examples are located in the [example/](https://github.com/mike42/escpos-php/blob/master/example/) directory. + +## Available methods + +### __construct(PrintConnector $connector, CapabilityProfile $profile) Construct new print object. Parameters: -- `PrintConnector $connector`: The PrintConnector to send data to. If not set, output is sent to standard output. -- `AbstractCapabilityProfile $profile` Supported features of this printer. If not set, the DefaultCapabilityProfile will be used, which is suitable for Epson printers. +- `PrintConnector $connector`: The PrintConnector to send data to. +- `CapabilityProfile $profile` Supported features of this printer. If not set, the "default" CapabilityProfile will be used, which is suitable for Epson printers. -See [example/interface/]("https://github.com/mike42/escpos-php/tree/master/example/interface/) for ways to open connections for different platforms and interfaces. +See [example/interface/](https://github.com/mike42/escpos-php/tree/master/example/interface/) for ways to open connections for different platforms and interfaces. ### barcode($content, $type) Print a barcode. @@ -159,7 +333,7 @@ Print a barcode. Parameters: - `string $content`: The information to encode. -- `int $type`: The barcode standard to output. If not specified, `Escpos::BARCODE_CODE39` will be used. +- `int $type`: The barcode standard to output. If not specified, `Printer::BARCODE_CODE39` will be used. Currently supported barcode standards are (depending on your printer): @@ -181,7 +355,7 @@ Cut the paper. Parameters: -- `int $mode`: Cut mode, either `Escpos::CUT_FULL` or `Escpos::CUT_PARTIAL`. If not specified, `Escpos::CUT_FULL` will be used. +- `int $mode`: Cut mode, either `Printer::CUT_FULL` or `Printer::CUT_PARTIAL`. If not specified, `Printer::CUT_FULL` will be used. - `int $lines`: Number of lines to feed before cutting. If not specified, 3 will be used. ### feed($lines) @@ -219,17 +393,29 @@ A minimal example: ```php graphics($img); ``` See the [example/](https://github.com/mike42/escpos-php/blob/master/example/) folder for detailed examples. -The function [bitImage()](#bitimageescposimage-image-size) takes the same parameters, and can be used if your printer doesn't support the newer graphics commands. +The function [bitImage()](#bitimageescposimage-image-size) takes the same parameters, and can be used if your printer doesn't support the newer graphics commands. As an additional fallback, the `bitImageColumnFormat()` function is also provided. ### initialize() Initialize printer. This resets formatting back to the defaults. +### pdf417Code($content, $width, $heightMultiplier, $dataColumnCount, $ec, $options) +Print a two-dimensional data code using the PDF417 standard. + +Parameters: + +- `string $content`: Text or numbers to store in the code +- `number $width`: Width of a module (pixel) in the printed code. Default is 3 dots. +- `number $heightMultiplier`: Multiplier for height of a module. Default is 3 times the width. +- `number $dataColumnCount`: Number of data columns to use. 0 (default) is to auto-calculate. Smaller numbers will result in a narrower code, making larger pixel sizes possible. Larger numbers require smaller pixel sizes. +- `real $ec`: Error correction ratio, from 0.01 to 4.00. Default is 0.10 (10%). +- `number $options`: Standard code `Printer::PDF417_STANDARD` with start/end bars, or truncated code `Printer::PDF417_TRUNCATED` with start bars only. + ### pulse($pin, $on_ms, $off_ms) Generate a pulse, for opening a cash drawer if one is connected. The default settings (0, 120, 240) should open an Epson drawer. @@ -243,16 +429,16 @@ Parameters: Print the given data as a QR code on the printer. - `string $content`: The content of the code. Numeric data will be more efficiently compacted. -- `int $ec` Error-correction level to use. One of `Escpos::QR_ECLEVEL_L` (default), `Escpos::QR_ECLEVEL_M`, `Escpos::QR_ECLEVEL_Q` or `Escpos::QR_ECLEVEL_H`. Higher error correction results in a less compact code. +- `int $ec` Error-correction level to use. One of `Printer::QR_ECLEVEL_L` (default), `Printer::QR_ECLEVEL_M`, `Printer::QR_ECLEVEL_Q` or `Printer::QR_ECLEVEL_H`. Higher error correction results in a less compact code. - `int $size`: Pixel size to use. Must be 1-16 (default 3) -- `int $model`: QR code model to use. Must be one of `Escpos::QR_MODEL_1`, `Escpos::QR_MODEL_2` (default) or `Escpos::QR_MICRO` (not supported by all printers). +- `int $model`: QR code model to use. Must be one of `Printer::QR_MODEL_1`, `Printer::QR_MODEL_2` (default) or `Printer::QR_MICRO` (not supported by all printers). ### selectPrintMode($mode) Select print mode(s). Parameters: -- `int $mode`: The mode to use. Default is `Escpos::MODE_FONT_A`, with no special formatting. This has a similar effect to running `initialize()`. +- `int $mode`: The mode to use. Default is `Printer::MODE_FONT_A`, with no special formatting. This has a similar effect to running `initialize()`. Several MODE_* constants can be OR'd together passed to this function's `$mode` argument. The valid modes are: @@ -270,6 +456,20 @@ Parameters: - `int $height`: Height in dots. If not specified, 8 will be used. +### setBarcodeWidth($width) +Set barcode bar width. + +Parameters: + +- `int $width`: Bar width in dots. If not specified, 3 will be used. Values above 6 appear to have no effect. + +### setColor($color) +Select print color - on printers that support multiple colors. + +Parameters: + +- `int $color`: Color to use. Must be either `Printer::COLOR_1` (default), or `Printer::COLOR_2` + ### setDoubleStrike($on) Turn double-strike mode on/off. @@ -289,14 +489,40 @@ Select font. Most printers have two fonts (Fonts A and B), and some have a third Parameters: -- `int $font`: The font to use. Must be either `Escpos::FONT_A`, `Escpos::FONT_B`, or `Escpos::FONT_C`. +- `int $font`: The font to use. Must be either `Printer::FONT_A`, `Printer::FONT_B`, or `Printer::FONT_C`. ### setJustification($justification) Select justification. Parameters: -- `int $justification`: One of `Escpos::JUSTIFY_LEFT`, `Escpos::JUSTIFY_CENTER`, or `Escpos::JUSTIFY_RIGHT`. +- `int $justification`: One of `Printer::JUSTIFY_LEFT`, `Printer::JUSTIFY_CENTER`, or `Printer::JUSTIFY_RIGHT`. + +### setLineSpacing($height) + +Set the height of the line. + +Some printers will allow you to overlap lines with a smaller line feed. + +Parameters: + +- `int $height`: The height of each line, in dots. If not set, the printer will reset to its default line spacing. + +### setPrintLeftMargin($margin) + +Set print area left margin. Reset to default with `Printer::initialize()`. + +Parameters: + +- `int $margin`: The left margin to set on to the print area, in dots. + +### setPrintWidth($width) + +Set print area width. This can be used to add a right margin to the print area. Reset to default with `Printer::initialize()`. + +Parameters: + +- `int $width`: The width of the page print area, in dots. ### setReverseColors($on) Set black/white reverse mode on or off. In this mode, text is printed white on a black background. @@ -318,7 +544,7 @@ Set underline for printed text. Parameters: -- `int $underline`: Either `true`/`false`, or one of `Escpos::UNDERLINE_NONE`, `Escpos::UNDERLINE_SINGLE` or `Escpos::UNDERLINE_DOUBLE`. Defaults to `Escpos::UNDERLINE_SINGLE`. +- `int $underline`: Either `true`/`false`, or one of `Printer::UNDERLINE_NONE`, `Printer::UNDERLINE_SINGLE` or `Printer::UNDERLINE_DOUBLE`. Defaults to `Printer::UNDERLINE_SINGLE`. ### text($str) Add text to the buffer. Text should either be followed by a line-break, or `feed()` should be called after this. @@ -327,26 +553,37 @@ Parameters: - `string $str`: The string to print. -Further notes -------------- +# Further notes Posts I've written up for people who are learning how to use receipt printers: -* [What is ESC/POS, and how do I use it?](http://mike.bitrevision.com/blog/what-is-escpos-and-how-do-i-use-it), which documents the output of test.php. -* [Setting up an Epson receipt printer](http://mike.bitrevision.com/blog/2014-20-26-setting-up-an-epson-receipt-printer) -* [Getting a USB receipt printer working on Linux](http://mike.bitrevision.com/blog/2015-03-getting-a-usb-receipt-printer-working-on-linux) +* [What is ESC/POS, and how do I use it?](https://mike42.me/blog/what-is-escpos-and-how-do-i-use-it), which documents the output of `example/demo.php`. +* [Setting up an Epson receipt printer](https://mike42.me/blog/2014-20-26-setting-up-an-epson-receipt-printer) +* [Getting a USB receipt printer working on Linux](https://mike42.me/blog/2015-03-getting-a-usb-receipt-printer-working-on-linux) -Other versions --------------- -Some forks of this project have been developed by others for specific use cases. Improvements from the following projects have been incorporated into escpos-php: +# Development -- [wdoyle/EpsonESCPOS-PHP](https://github.com/wdoyle/EpsonESCPOS-PHP) -- [ronisaha/php-esc-pos](https://github.com/ronisaha/php-esc-pos) +This code is MIT licensed, and you are encouraged to contribute any modifications back to the project. -Vendor documentation --------------------- -Epson notes that not all of its printers support all ESC/POS features, and includes a table in their documentation: +For development, it's suggested that you load `imagick`, `gd` and `Xdebug` PHP exensions, and install `composer`. -* [FAQ about ESC/POS from Epson](http://content.epson.de/fileadmin/content/files/RSD/downloads/escpos.pdf) +The tests are executed on [Travis CI](https://travis-ci.org/mike42/escpos-php) over PHP 5.4, 5.5, 5.6, 7.0, 7.1 and 7.2, plus the latest LTS version of HHVM, 3.21. Older versions of PHP are not supported in current releases. -Note that many printers produced by other vendors use the same standard, and are compatible by varying degrees. +Fetch a copy of this code and load dependencies with composer: + git clone https://github.com/mike42/escpos-php + cd escpos-php/ + composer install + +Execute unit tests via `phpunit`: + + php vendor/bin/phpunit --coverage-text + +This project uses the PSR-2 standard, which can be checked via [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer): + + php vendor/bin/phpcs --standard=psr2 src/ -n + +The developer docs are build with [doxygen](https://github.com/doxygen/doxygen). Re-build them to check for documentation warnings: + + make -C doc clean && make -C doc + +Pull requests and bug reports welcome. diff --git a/htdocs/includes/mike42/escpos-php/autoload.php b/htdocs/includes/mike42/escpos-php/autoload.php new file mode 100644 index 00000000000..47ed7d9e9c3 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/autoload.php @@ -0,0 +1,26 @@ +=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.5.*" - } + "name": "mike42/escpos-php", + "type": "library", + "description": "PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers", + "homepage": "https://github.com/mike42/escpos-php", + "keywords": ["receipt", "print", "escpos", "ESC-POS", "driver"], + "license": "MIT", + "authors": [ + { + "name": "Michael Billington", + "email": "michael.billington@gmail.com" + } + ], + "config": { + "platform": { + "php": "5.4.0" + } + }, + "require": { + "php": ">=5.4.0", + "ext-mbstring": "*" + }, + "suggest": { + "guzzlehttp/guzzle": "Allows the use of the ApiConnector to send print jobs over HTTP.", + "ext-imagick": "Will be used for image printing if present. Required for PDF printing or use of custom fonts.", + "ext-gd": "Used for image printing if present." + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^3.2", + "guzzlehttp/guzzle": "^5.3" + }, + "autoload": { + "psr-4": { + "Mike42\\": "src/Mike42" + } + } } diff --git a/htdocs/includes/mike42/escpos-php/composer.lock b/htdocs/includes/mike42/escpos-php/composer.lock index ab6911c281d..d46bbc79312 100644 --- a/htdocs/includes/mike42/escpos-php/composer.lock +++ b/htdocs/includes/mike42/escpos-php/composer.lock @@ -1,24 +1,24 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "fd25f2b816df83dabf03fe7259ad4018", + "content-hash": "0094775b67f67bc65c1ff4aebb0fd065", "packages": [], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.4", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", "shasum": "" }, "require": { @@ -29,7 +29,7 @@ "ext-pdo": "*", "ext-phar": "*", "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA" + "squizlabs/php_codesniffer": "~2.0" }, "type": "library", "extra": { @@ -38,8 +38,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\Instantiator\\": "src" + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -59,7 +59,161 @@ "constructor", "instantiate" ], - "time": "2014-10-13 12:58:55" + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "5.3.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f9acb4761844317e626a32259205bec1f1bc60d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f9acb4761844317e626a32259205bec1f1bc60d2", + "reference": "f9acb4761844317e626a32259205bec1f1bc60d2", + "shasum": "" + }, + "require": { + "guzzlehttp/ringphp": "^1.1", + "php": ">=5.4.0", + "react/promise": "^2.2" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-01-15T07:18:01+00:00" + }, + { + "name": "guzzlehttp/ringphp", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/RingPHP.git", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "shasum": "" + }, + "require": { + "guzzlehttp/streams": "~3.0", + "php": ">=5.4.0", + "react/promise": "~2.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Ring\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "time": "2015-05-20T03:37:09+00:00" + }, + { + "name": "guzzlehttp/streams", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/streams.git", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple abstraction over streams of data", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "stream" + ], + "time": "2014-10-12T19:18:40+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -108,34 +262,37 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2015-02-03T12:10:50+00:00" }, { "name": "phpspec/prophecy", - "version": "1.4.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5" + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", - "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -168,20 +325,20 @@ "spy", "stub" ], - "time": "2015-03-27 19:31:25" + "time": "2017-03-02T20:05:34+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.0.15", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "34cc484af1ca149188d0d9e91412191e398e0b67" + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67", - "reference": "34cc484af1ca149188d0d9e91412191e398e0b67", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "shasum": "" }, "require": { @@ -189,7 +346,7 @@ "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "~1.0", + "sebastian/environment": "^1.3.2", "sebastian/version": "~1.0" }, "require-dev": { @@ -204,7 +361,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { @@ -230,35 +387,37 @@ "testing", "xunit" ], - "time": "2015-01-24 10:06:35" + "time": "2015-10-06T15:47:00+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.3.4", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, "autoload": { "classmap": [ - "File/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -275,20 +434,20 @@ "filesystem", "iterator" ], - "time": "2013-10-10 15:34:57" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { @@ -297,20 +456,17 @@ "type": "library", "autoload": { "classmap": [ - "Text/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -319,35 +475,40 @@ "keywords": [ "template" ], - "time": "2014-01-30 17:20:04" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.5", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "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": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -363,20 +524,20 @@ "keywords": [ "timer" ], - "time": "2013-08-02 07:42:54" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.0", + "version": "1.4.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", - "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", "shasum": "" }, "require": { @@ -412,20 +573,20 @@ "keywords": [ "tokenizer" ], - "time": "2015-01-17 09:51:32" + "time": "2017-02-27T10:12:30+00:00" }, { "name": "phpunit/phpunit", - "version": "4.5.1", + "version": "4.8.36", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4" + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d6429b0995b24a2d9dfe5587ee3a7071c1161af4", - "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", "shasum": "" }, "require": { @@ -435,19 +596,19 @@ "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.0,>=2.0.11", - "phpunit/php-file-iterator": "~1.3.2", + "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.2", + "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.2", + "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.0" + "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" @@ -458,7 +619,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.5.x-dev" + "dev-master": "4.8.x-dev" } }, "autoload": { @@ -484,26 +645,27 @@ "testing", "xunit" ], - "time": "2015-03-29 09:24:05" + "time": "2017-06-21T08:07:12+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.1", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "74ffb87f527f24616f72460e54b595f508dccb5c" + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c", - "reference": "74ffb87f527f24616f72460e54b595f508dccb5c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", + "doctrine/instantiator": "^1.0.2", "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -539,26 +701,72 @@ "mock", "xunit" ], - "time": "2015-04-02 05:36:41" + "time": "2015-10-02T06:51:40+00:00" }, { - "name": "sebastian/comparator", - "version": "1.1.1", + "name": "react/promise", + "version": "v2.5.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" + "url": "https://github.com/reactphp/promise.git", + "reference": "62785ae604c8d69725d693eb370e1d67e94c4053" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", + "url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053", + "reference": "62785ae604c8d69725d693eb370e1d67e94c4053", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "time": "2017-03-25T12:08:31+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" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -566,7 +774,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -603,32 +811,32 @@ "compare", "equality" ], - "time": "2015-01-29 16:28:08" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -651,31 +859,31 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", - "version": "1.2.2", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -705,20 +913,20 @@ "environment", "hhvm" ], - "time": "2015-01-01 10:01:08" + "time": "2016-08-18T05:49:44+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "84839970d05254c73cde183a721c7af13aede943" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", - "reference": "84839970d05254c73cde183a721c7af13aede943", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -726,12 +934,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -771,20 +980,20 @@ "export", "exporter" ], - "time": "2015-01-27 07:23:06" + "time": "2016-06-17T09:04:28+00:00" }, { "name": "sebastian/global-state", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { @@ -822,20 +1031,20 @@ "keywords": [ "global state" ], - "time": "2014-10-06 09:23:50" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/recursion-context", - "version": "1.0.0", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252" + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "shasum": "" }, "require": { @@ -875,20 +1084,20 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-01-24 09:48:32" + "time": "2016-10-03T07:41:43+00:00" }, { "name": "sebastian/version", - "version": "1.0.5", + "version": "1.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", - "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "shasum": "" }, "type": "library", @@ -910,39 +1119,100 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-02-24 06:35:25" + "time": "2015-06-21T13:59:46+00:00" }, { - "name": "symfony/yaml", - "version": "v2.6.6", - "target-dir": "Symfony/Component/Yaml", + "name": "squizlabs/php_codesniffer", + "version": "3.2.3", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "174f009ed36379a801109955fc5a71a49fe62dd4" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/174f009ed36379a801109955fc5a71a49fe62dd4", - "reference": "174f009ed36379a801109955fc5a71a49fe62dd4", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4842476c434e375f9d3182ff7b89059583aa8b27", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27", "shasum": "" }, "require": { - "php": ">=5.3.3" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-02-20T21:35:23+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bb4ec47e8e109c1c1172145732d0aa468d967cd0", + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -950,17 +1220,66 @@ ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2017-02-21T08:33:48+00:00" + }, + { + "name": "symfony/yaml", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", + "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": "http://symfony.com", - "time": "2015-03-30 15:54:10" + "homepage": "https://symfony.com", + "time": "2017-03-01T18:13:50+00:00" } ], "aliases": [], @@ -969,7 +1288,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.3.0" + "php": ">=5.4.0", + "ext-mbstring": "*" }, - "platform-dev": [] + "platform-dev": [], + "platform-overrides": { + "php": "5.4.0" + } } diff --git a/htdocs/includes/mike42/escpos-php/doc/FAQ.md b/htdocs/includes/mike42/escpos-php/doc/FAQ.md new file mode 100644 index 00000000000..6b7a6247bca --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/doc/FAQ.md @@ -0,0 +1,142 @@ +# Frequently Asked Questions (FAQ) + +## Can I print to File Format X with this? + +If you are trying to generate XPS, PDF or DOCX or HTML files from PHP, then you are most likely in the wrong place. + +The purpose of this driver it to generate binary ESC/POS code, which is understood by many embedded thermal receipt and impact printers. + +## I have Printer X. Can I use this driver? + +If the printer understands ESC/POS, and you know how to get raw binary data to it, then yes. Otherwise, no. + +The [list of printers that are known to work](https://github.com/mike42/escpos-php/blob/development/README.md#printers) is crowd-sourced. We appreciate it when developers try out the driver, then [file information on the bug tracker](https://github.com/mike42/escpos-php/issues/new) with some information about which features worked on their model of printer. + +To see how well your printer works, first check that it supports ESC/POS, then begin by attempting to send the text "Hello World" to your printer on the command-line, from the computer that will run PHP. + +Once you solve this, [try to do the same from PHP](https://github.com/mike42/escpos-php/blob/development/README.md#basic-usage) using the default profile. Further details are in the [README](https://github.com/mike42/escpos-php/blob/development/README.md) file. + +## Can you add support for Printer X? + +Features vary between printers, so we collaborate on an ESC/POS printer compatibility database to collect known differences: [receipt-print-hq/escpos-printer-db](https://github.com/receipt-print-hq/escpos-printer-db). + +If you encounter garbage output when you try to print images or special characters, then please submit a test page and a link to vendor documentation to the `escpos-printer-db` project, so that support can be improved for future versions. + +## I have a printer that does not understand ESC/POS. Can I use this driver? + +No. The purpose of this driver it to generate binary ESC/POS code. If your printer doesn't understand that, then this code wont be much use to you. + +Some printers do have an emulation mode for ESC/POS. The vendor docs will tell if this is the case, and how to enable it. + +## Why do I get this error when I try to print? + +Start by testing that you can send text to your printer outside of escpos-php. The examples linked to in the README are commented with some commands to get you started. + +Generally, initial setup problems seem to have one of these causes: + +1. You are writing to the wrong place. Writing to `LPT1` does not output to parallel port on Linux, and `/dev/ttyS0` is not a serial printer on Windows. +2. The printer has not been set up to accept printing the way you expect. This means permissions on Linux, network printers being configured, and shared printers having user accounts and firewalls set up correctly on the print server. +3. Your printer actually doesn't work (rare but possible). + +To be clear, these are not escpos-php issues: No amount of PHP code can set up your printer for you. Instead, the driver relies on developers determining how their setup is going to work before using a connector to transport data to their printer. + +Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. You can try to use a PrintConnector now, based on your operating system and printer interface. A table is located in the README to help you select the right one. + +The connectors are- + +- `FilePrintConnector` and `NetworkPrintConnector` directly use files or network sockets. +- `WindowsPrintConnector` and `CupsPrintConnector` tie in with Windows and Unix system printing. +- `DummyPrintConnector` does not connect to a real printer, and can be used to save ESC/POS receipts to a database, for example. + +At this point, you might find that the way you would like to print is not supported by escpos-php. You can post your printing command as a feature request on the issue tracker. + +Lastly, you may run in to the final common trap: + +4. Your PHP is not running with the same sort of permissions as your login account. Again, no amount of PHP code can fix this. For example, on LAMP, your `www-data` user needs to be in the `lp` group, while on WAMP, `Local Service` account may run in to problems. SELinux and firewalls are also worth a look. + +When printing fails, you can expect a PHP Exception that explains what went wrong. They are all clues: + +- `Warning: copy(\\pc\printer): failed to open stream: Permission denied` +- `/dev/usb/lp0: Permission denied` +- `User name or password is incorrect` + +Ensure that while you are developing, you configure PHP to show error messages, so that you can see these problems. + +Please file a bug if you think that there is a specific situation which escpos-php could provide better error messages for. + +## Can I print over the network? + +Certainly, as long as your printer is available over the network. + +- `NetworkPrintConnector` will speak directly to an Ethernet-connected printer on port 9100. + +For USB or Serial printers, you need to install the printer on a computer and then share it, so that it becomes network-accessible. + +- `WindowsPrintConnector` will connect to Windows shared printers from Windows or Linux (Linux users will need Samba). +- `CupsPrintConnector` will connect to CUPS-shared printers from Linux or Mac. + +Always start by testing your shared printer setup outside of escpos-php. The examples linked to in the README are commented with some example commands to get you started. Typically, networks, firewalls and permissions need to be set up. + +Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. + +If you have any issues at this stage, please ask on the issue tracker, and include the commands that you used to verify your setup. + +## Can I print from my server on the Internet? + +Since PHP is a server-side language, escpos-php is a server-side print library. The driver is able to transport data between a server and a printer in a few different ways, all of them server-side. For example, you may print to a USB printer *connected to the server running PHP*, or an Ethernet printer *on a network accessible to the server*. + +Many developers dream of having an application that is hosted on the public Internet, with POS terminals accessing it, and printing via a web browser. Because the webserver cannot see the printer in this sort of setup, a server-side print driver is not much use. + +Because of this, there are no cut-and-paste recipes available, but here are two top-level approaches you could take: + +1. Architect your application so that the server can see your printer +2. Use an application which runs client-side to deliver print data instead + +### Option 1: Allow the server to print + +Server-side printing is viable if the server can get to the printer. Here are some ways it could work: + +- Run your server on the LAN instead, and read the section above about printing over the network +- Set up a VPN so that your cloud-hosted server can also access the LAN +- Expose the printer via some other secure tunnel to the server, via SSH or TLS + +Please do your own research to determine how these may apply to your setup- the escpos-php issue tracker is not a place where you should be requesting network support. + +### Option 2: Use client software to print + +If you aren't able to set up some network infrastructure to implement the above, then you cannot use a server-side print driver. + +Here are some browser-based printing tools which you may like to consider instead. + +- Use system printing with a vendor driver, and some good `@media print` CSS +- [Chrome Raw Print](https://github.com/receipt-print-hq/chrome-raw-print) app +- [qz](https://qz.io/) +- [ePOS-Device SDK for JavaScript](https://reference.epson-biz.com/modules/ref_epos_device_js_en/index.php?content_id=139). Requires network interface card that supports ePOS (UB-E04/R04) + +Please direct queries about client-side printing products to the appropriate project. + +## Why is image printing slow? + +Three things tend to slow down the image processing: + +1. Slow PHP code +2. Data link +3. The printer itself + +First, ensure you have the Imagick plugin loaded. The driver will avoid a slower image processing implementation once you've got it. + +Next, connect over a faster interface. Serial printers have a low bit-rate, and the printer spends a lot of time waiting for data. If you have USB or Ethernet, then use it (note: storing graphics to the printer memory is not currently implemented). + +Lastly, the printer will go faster if you use less pixels. Since images are two-dimensional, scaling down by 50% removes 75% of the pixels. The driver can then print at a half the density, so that your lower resolution image appears the same size when printed. + +## How can I get the status of the printer? + +This feature is not implemented, but a solution for some Epson printers is planned. + +Only `FilePrintConnector` or `NetworkPrintConnector` will support reading from the printer, ensure that you migrate to those if you would like these features. + +## How do I produce this complex layout? + +ESC/POS "page mode" is not currently supported, which would allow some printers to render some more complex layouts natively + +Since the output is raster anyway, it is suggested that you render your output to an image and print that instead. The driver supports PDF printing via Imagick, and an example that uses `wkhtmltoimage` is available in the repository. diff --git a/htdocs/includes/mike42/escpos-php/doc/Makefile b/htdocs/includes/mike42/escpos-php/doc/Makefile index fed323f0cff..4e01c2ac0a1 100644 --- a/htdocs/includes/mike42/escpos-php/doc/Makefile +++ b/htdocs/includes/mike42/escpos-php/doc/Makefile @@ -1,9 +1,20 @@ -html: ../Escpos.php escpos.conf - doxygen escpos.conf +html: escpos.doxyfile + # Compile + doxygen escpos.doxyfile + # Filter out warnings on README.md- doxygen cannot handle image links that + # are used there: [![Caption](https://example.com/target)](https://example.com/image) + sed -i '/README.md\:/d' warnings.log + # Show warnings log + cat warnings.log + # Return failure if there were any doc warnings + [ ! -s warnings.log ] latex: html # Do nothing -clean: - rm --preserve-root -Rf html latex doxygen_sqlite3.db +xml: html + xsltproc xml/combine.xslt xml/index.xml > all.xml + +clean: + rm --preserve-root -Rf html latex xml doxygen_sqlite3.db all.xml warnings.log diff --git a/htdocs/includes/mike42/escpos-php/doc/escpos.conf b/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile similarity index 99% rename from htdocs/includes/mike42/escpos-php/doc/escpos.conf rename to htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile index 54ea2874aa5..0c48656e15b 100644 --- a/htdocs/includes/mike42/escpos-php/doc/escpos.conf +++ b/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile @@ -20,7 +20,7 @@ # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. @@ -51,7 +51,7 @@ PROJECT_BRIEF = # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. -PROJECT_LOGO = ../example/images/escpos-php-small.png +PROJECT_LOGO = ../example/resources/escpos-php-small.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -741,7 +741,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = warnings.log #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -753,12 +753,12 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = ../Escpos.php ../src/ ../README.md +INPUT = ../src ../README.md ./ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: https://www.gnu.org/software/libiconv) for the list of +# documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. @@ -773,13 +773,13 @@ INPUT_ENCODING = UTF-8 # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. -FILE_PATTERNS = +FILE_PATTERNS = *.php *.md # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. -RECURSIVE = NO +RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a @@ -950,7 +950,7 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version +# (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: @@ -1820,7 +1820,7 @@ MAN_LINKS = NO # captures the structure of the code including all documentation. # The default value is: NO. -GENERATE_XML = NO +GENERATE_XML = YES # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/htdocs/includes/mike42/escpos-php/example/README.md b/htdocs/includes/mike42/escpos-php/example/README.md deleted file mode 100644 index 68b0dc77e7c..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Examples --------- - -This folder contains a collectoion of feature examples. -Generally, demo.php is the fastest way to find out which features your -printer supports. - -## Subfolders -- `interface/` - contains examples for output interfaces: eg, parallel, serial, USB, network, file-based. -- `specific/` - examples made in response to issues & questions. These cover specific languages, printers and interfaces, so hit narrower use cases. - -## List of examples - -Each example prints to standard output, so either edit the print connector, or redirect the output to your printer to see it in action. They are designed for developers: open them in a text editor before you run them! - -- `bit-image.php` - Prints a images to the printer using the older "bit image" commands. -- `demo.php` - Demonstrates output using a large subset of availale features. -- `qr-code.php` - Prints QR codes, if your printer supports it. -- `character-encodings.php` - Shows available character encodings. Change from the DefaultCapabilityProfile to get more useful output for your specific printer. -- `graphics.php` - The same output as `bit-image.php`, printed with the newer graphics commands (not supported on many non-Epson printers) -- `receipt-with-logo.php` - A simple receipt containing a logo and basic formating. -- `character-encodings-with-images.php` - The same as `character-encodings.php`, but also prints each string using an `ImagePrintBuffer`, showing compatibility gaps. -- `print-from-html.php` - Runs `wkhtmltoimage` to convert HTML to an image, and then prints the image. (This is very slow) -- `character-tables.php` - Prints a compact character code table for each available character set. Used to debug incorrect output from `character-encodings.php`. -- `print-from-pdf.php` - Loads a PDF and prints each page in a few different ways (very slow as well) - diff --git a/htdocs/includes/mike42/escpos-php/example/barcode.php b/htdocs/includes/mike42/escpos-php/example/barcode.php deleted file mode 100644 index 5475b76c19d..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/barcode.php +++ /dev/null @@ -1,181 +0,0 @@ -setBarcodeHeight ( 40 ); - -/* Text position */ -$printer->selectPrintMode ( Escpos::MODE_DOUBLE_HEIGHT | Escpos::MODE_DOUBLE_WIDTH ); -$printer->text ( "Text position\n" ); -$printer->selectPrintMode (); -$hri = array ( - Escpos::BARCODE_TEXT_NONE => "No text", - Escpos::BARCODE_TEXT_ABOVE => "Above", - Escpos::BARCODE_TEXT_BELOW => "Below", - Escpos::BARCODE_TEXT_ABOVE | Escpos::BARCODE_TEXT_BELOW => "Both" -); -foreach ( $hri as $position => $caption ) { - $printer->text ( $caption . "\n" ); - $printer->setBarcodeTextPosition ( $position ); - $printer->barcode ( "012345678901", Escpos::BARCODE_JAN13 ); - $printer->feed (); -} - -/* Barcode types */ -$standards = array ( - Escpos::BARCODE_UPCA => array ( - "title" => "UPC-A", - "caption" => "Fixed-length numeric product barcodes.", - "example" => array ( - array ( - "caption" => "12 char numeric including (wrong) check digit.", - "content" => "012345678901" - ), - array ( - "caption" => "Send 11 chars to add check digit automatically.", - "content" => "01234567890" - ) - ) - ), - Escpos::BARCODE_UPCE => array ( - "title" => "UPC-E", - "caption" => "Fixed-length numeric compact product barcodes.", - "example" => array ( - array ( - "caption" => "6 char numeric - auto check digit & NSC", - "content" => "123456" - ), - array ( - "caption" => "7 char numeric - auto check digit", - "content" => "0123456" - ), - array ( - "caption" => "8 char numeric", - "content" => "01234567" - ), - array ( - "caption" => "11 char numeric - auto check digit", - "content" => "01234567890" - ), - array ( - "caption" => "12 char numeric including (wrong) check digit", - "content" => "012345678901" - ) - ) - ), - Escpos::BARCODE_JAN13 => array ( - "title" => "JAN13/EAN13", - "caption" => "Fixed-length numeric barcodes.", - "example" => array ( - array ( - "caption" => "12 char numeric - auto check digit", - "content" => "012345678901" - ), - array ( - "caption" => "13 char numeric including (wrong) check digit", - "content" => "0123456789012" - ) - ) - ), - Escpos::BARCODE_JAN8 => array ( - "title" => "JAN8/EAN8", - "caption" => "Fixed-length numeric barcodes.", - "example" => array ( - array ( - "caption" => "7 char numeric - auto check digit", - "content" => "0123456" - ), - array ( - "caption" => "8 char numeric including (wrong) check digit", - "content" => "01234567" - ) - ) - ), - Escpos::BARCODE_CODE39 => array ( - "title" => "Code39", - "caption" => "Variable length alphanumeric w/ some special chars.", - "example" => array ( - array ( - "caption" => "Text, numbers, spaces", - "content" => "ABC 012" - ), - array ( - "caption" => "Special characters", - "content" => "$%+-./" - ), - array ( - "caption" => "Extra char (*) Used as start/stop", - "content" => "*TEXT*" - ) - ) - ), - Escpos::BARCODE_ITF => array ( - "title" => "ITF", - "caption" => "Variable length numeric w/even number of digits,\nas they are encoded in pairs.", - "example" => array ( - array ( - "caption" => "Numeric- even number of digits", - "content" => "0123456789" - ) - ) - ), - Escpos::BARCODE_CODABAR => array ( - "title" => "Codabar", - "caption" => "Varaible length numeric with some allowable\nextra characters. ABCD/abcd must be used as\nstart/stop characters (one at the start, one\nat the end) to distinguish between barcode\napplications.", - "example" => array ( - array ( - "caption" => "Numeric w/ A A start/stop. ", - "content" => "A012345A" - ), - array ( - "caption" => "Extra allowable characters", - "content" => "A012$+-./:A" - ) - ) - ), - Escpos::BARCODE_CODE93 => array ( - "title" => "Code93", - "caption" => "Variable length- any ASCII is available", - "example" => array ( - array ( - "caption" => "Text", - "content" => "012abcd" - ) - ) - ), - Escpos::BARCODE_CODE128 => array ( - "title" => "Code128", - "caption" => "Variable length- any ASCII is available", - "example" => array ( - array ( - "caption" => "Code set A uppercase & symbols", - "content" => "{A" . "012ABCD" - ), - array ( - "caption" => "Code set B general text", - "content" => "{B" . "012ABCDabcd" - ), - array ( - "caption" => "Code set C compact numbers\n Sending chr(21) chr(32) chr(43)", - "content" => "{C" . chr ( 21 ) . chr ( 32 ) . chr ( 43 ) - ) - ) - ) -); -$printer->setBarcodeTextPosition ( Escpos::BARCODE_TEXT_BELOW ); -foreach ( $standards as $type => $standard ) { - $printer->selectPrintMode ( Escpos::MODE_DOUBLE_HEIGHT | Escpos::MODE_DOUBLE_WIDTH ); - $printer->text ( $standard ["title"] . "\n" ); - $printer->selectPrintMode (); - $printer->text ( $standard ["caption"] . "\n\n" ); - foreach ( $standard ["example"] as $id => $barcode ) { - $printer->setEmphasis ( true ); - $printer->text ( $barcode ["caption"] . "\n" ); - $printer->setEmphasis ( false ); - $printer->text ( "Content: " . $barcode ["content"] . "\n" ); - $printer->barcode ( $barcode ["content"], $type ); - $printer->feed (); - } -} -$printer->cut (); -$printer->close (); - diff --git a/htdocs/includes/mike42/escpos-php/example/bit-image.php b/htdocs/includes/mike42/escpos-php/example/bit-image.php deleted file mode 100644 index f3a4054d98f..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/bit-image.php +++ /dev/null @@ -1,32 +0,0 @@ - text("These example images are printed with the older\nbit image print command. You should only use\n\$p -> bitImage() if \$p -> graphics() does not\nwork on your printer.\n\n"); - - $printer -> bitImage($tux); - $printer -> text("Regular Tux (bit image).\n"); - $printer -> feed(); - - $printer -> bitImage($tux, Escpos::IMG_DOUBLE_WIDTH); - $printer -> text("Wide Tux (bit image).\n"); - $printer -> feed(); - - $printer -> bitImage($tux, Escpos::IMG_DOUBLE_HEIGHT); - $printer -> text("Tall Tux (bit image).\n"); - $printer -> feed(); - - $printer -> bitImage($tux, Escpos::IMG_DOUBLE_WIDTH | Escpos::IMG_DOUBLE_HEIGHT); - $printer -> text("Large Tux in correct proportion (bit image).\n"); -} catch(Exception $e) { - /* Images not supported on your PHP, or image file not found */ - $printer -> text($e -> getMessage() . "\n"); -} - -$printer -> cut(); -$printer -> close(); -?> diff --git a/htdocs/includes/mike42/escpos-php/example/character-encodings-with-images.php b/htdocs/includes/mike42/escpos-php/example/character-encodings-with-images.php deleted file mode 100644 index a98bdbc96ae..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/character-encodings-with-images.php +++ /dev/null @@ -1,59 +0,0 @@ - selectPrintMode(Escpos::MODE_DOUBLE_HEIGHT | Escpos::MODE_EMPHASIZED | Escpos::MODE_DOUBLE_WIDTH); - $printer -> text("Implemented languages\n"); - $printer -> selectPrintMode(); - foreach($inputsOk as $label => $str) { - $printer -> setEmphasis(true); - $printer -> text($label . ":\n"); - $printer -> setEmphasis(false); - foreach($buffers as $buffer) { - $printer -> setPrintBuffer($buffer); - $printer -> text($str); - } - $printer -> setPrintBuffer($buffers[0]); - } - $printer -> feed(); - - $printer -> selectPrintMode(Escpos::MODE_DOUBLE_HEIGHT | Escpos::MODE_EMPHASIZED | Escpos::MODE_DOUBLE_WIDTH); - $printer -> text("Works in progress\n"); - $printer -> selectPrintMode(); - foreach($inputsNotOk as $label => $str) { - $printer -> setEmphasis(true); - $printer -> text($label . ":\n"); - $printer -> setEmphasis(false); - foreach($buffers as $buffer) { - $printer -> setPrintBuffer($buffer); - $printer -> text($str); - } - $printer -> setPrintBuffer($buffers[0]); - } - $printer -> cut(); - - /* Close printer */ - $printer -> close(); -} catch(Exception $e) { - echo "Couldn't print to this printer: " . $e -> getMessage() . "\n"; -} - diff --git a/htdocs/includes/mike42/escpos-php/example/character-encodings.php b/htdocs/includes/mike42/escpos-php/example/character-encodings.php deleted file mode 100644 index 8a42ecd0847..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/character-encodings.php +++ /dev/null @@ -1,58 +0,0 @@ - selectPrintMode(Escpos::MODE_DOUBLE_HEIGHT | Escpos::MODE_EMPHASIZED | Escpos::MODE_DOUBLE_WIDTH); - $printer -> text("Implemented languages\n"); - $printer -> selectPrintMode(); - foreach($inputsOk as $label => $str) { - $printer -> setEmphasis(true); - $printer -> text($label . ":\n"); - $printer -> setEmphasis(false); - $printer -> text($str); - } - $printer -> feed(); - - $printer -> selectPrintMode(Escpos::MODE_DOUBLE_HEIGHT | Escpos::MODE_EMPHASIZED | Escpos::MODE_DOUBLE_WIDTH); - $printer -> text("Works in progress\n"); - $printer -> selectPrintMode(); - foreach($inputsNotOk as $label => $str) { - $printer -> setEmphasis(true); - $printer -> text($label . ":\n"); - $printer -> setEmphasis(false); - $printer -> text($str); - } - $printer -> cut(); - - /* Close printer */ - $printer -> close(); -} catch(Exception $e) { - echo "Couldn't print to this printer: " . $e -> getMessage() . "\n"; -} - diff --git a/htdocs/includes/mike42/escpos-php/example/character-tables.php b/htdocs/includes/mike42/escpos-php/example/character-tables.php deleted file mode 100644 index 1ce2c5c9f1e..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/character-tables.php +++ /dev/null @@ -1,71 +0,0 @@ - getSupportedCodePages(); -$first = true; // Print larger table for first code-page. -foreach($codePages as $table => $name) { - /* Change printer code page */ - $printer -> selectCharacterTable(255); - $printer -> selectCharacterTable($table); - /* Select & print a label for it */ - $label = $name; - if($name === false) { - $label= " (not matched to iconv table)"; - } - $printer -> setEmphasis(true); - $printer -> textRaw("Table $table: $label\n"); - $printer -> setEmphasis(false); - if($name === false && !$verbose) { - continue; // Skip non-recognised - } - /* Print a table of available characters (first table is larger than subsequent ones */ - if($first) { - $first = false; - compactCharTable($printer, 1, true); - } else { - compactCharTable($printer); - } -} -$printer -> cut(); -$printer -> close(); - -function compactCharTable($printer, $start = 4, $header = false) { - /* Output a compact character table for the current encoding */ - $chars = str_repeat(' ', 256); - for($i = 0; $i < 255; $i++) { - $chars[$i] = ($i > 32 && $i != 127) ? chr($i) : ' '; - } - if($header) { - $printer -> setEmphasis(true); - $printer -> textRaw(" 0123456789ABCDEF0123456789ABCDEF\n"); - $printer -> setEmphasis(false); - } - for($y = $start; $y < 8; $y++) { - $printer -> setEmphasis(true); - $printer -> textRaw(strtoupper(dechex($y * 2)) . " "); - $printer -> setEmphasis(false); - $printer -> textRaw(substr($chars, $y * 32, 32) . "\n"); - } -} diff --git a/htdocs/includes/mike42/escpos-php/example/demo.php b/htdocs/includes/mike42/escpos-php/example/demo.php deleted file mode 100644 index 1c99e5cc880..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/demo.php +++ /dev/null @@ -1,167 +0,0 @@ - - */ -require_once(dirname(__FILE__) . "/../Escpos.php"); -$printer = new Escpos(); - -/* Initialize */ -$printer -> initialize(); - -/* Text */ -$printer -> text("Hello world\n"); -$printer -> cut(); - -/* Line feeds */ -$printer -> text("ABC"); -$printer -> feed(7); -$printer -> text("DEF"); -$printer -> feedReverse(3); -$printer -> text("GHI"); -$printer -> feed(); -$printer -> cut(); - -/* Font modes */ -$modes = array( - Escpos::MODE_FONT_B, - Escpos::MODE_EMPHASIZED, - Escpos::MODE_DOUBLE_HEIGHT, - Escpos::MODE_DOUBLE_WIDTH, - Escpos::MODE_UNDERLINE); -for($i = 0; $i < pow(2, count($modes)); $i++) { - $bits = str_pad(decbin($i), count($modes), "0", STR_PAD_LEFT); - $mode = 0; - for($j = 0; $j < strlen($bits); $j++) { - if(substr($bits, $j, 1) == "1") { - $mode |= $modes[$j]; - } - } - $printer -> selectPrintMode($mode); - $printer -> text("ABCDEFGHIJabcdefghijk\n"); -} -$printer -> selectPrintMode(); // Reset -$printer -> cut(); - -/* Underline */ -for($i = 0; $i < 3; $i++) { - $printer -> setUnderline($i); - $printer -> text("The quick brown fox jumps over the lazy dog\n"); -} -$printer -> setUnderline(0); // Reset -$printer -> cut(); - -/* Cuts */ -$printer -> text("Partial cut\n(not available on all printers)\n"); -$printer -> cut(Escpos::CUT_PARTIAL); -$printer -> text("Full cut\n"); -$printer -> cut(Escpos::CUT_FULL); - -/* Emphasis */ -for($i = 0; $i < 2; $i++) { - $printer -> setEmphasis($i == 1); - $printer -> text("The quick brown fox jumps over the lazy dog\n"); -} -$printer -> setEmphasis(false); // Reset -$printer -> cut(); - -/* Double-strike (looks basically the same as emphasis) */ -for($i = 0; $i < 2; $i++) { - $printer -> setDoubleStrike($i == 1); - $printer -> text("The quick brown fox jumps over the lazy dog\n"); -} -$printer -> setDoubleStrike(false); -$printer -> cut(); - -/* Fonts (many printers do not have a 'Font C') */ -$fonts = array( - Escpos::FONT_A, - Escpos::FONT_B, - Escpos::FONT_C); -for($i = 0; $i < count($fonts); $i++) { - $printer -> setFont($fonts[$i]); - $printer -> text("The quick brown fox jumps over the lazy dog\n"); -} -$printer -> setFont(); // Reset -$printer -> cut(); - -/* Justification */ -$justification = array( - Escpos::JUSTIFY_LEFT, - Escpos::JUSTIFY_CENTER, - Escpos::JUSTIFY_RIGHT); -for($i = 0; $i < count($justification); $i++) { - $printer -> setJustification($justification[$i]); - $printer -> text("A man a plan a canal panama\n"); -} -$printer -> setJustification(); // Reset -$printer -> cut(); - -/* Barcodes - see barcode.php for more detail */ -$printer -> setBarcodeHeight(80); -$printer->setBarcodeTextPosition ( Escpos::BARCODE_TEXT_BELOW ); -$printer -> barcode("9876"); -$printer -> feed(); -$printer -> cut(); - -/* Graphics - this demo will not work on some non-Epson printers */ -try { - $logo = new EscposImage("resources/escpos-php.png"); - $imgModes = array( - Escpos::IMG_DEFAULT, - Escpos::IMG_DOUBLE_WIDTH, - Escpos::IMG_DOUBLE_HEIGHT, - Escpos::IMG_DOUBLE_WIDTH | Escpos::IMG_DOUBLE_HEIGHT - ); - foreach($imgModes as $mode) { - $printer -> graphics($logo, $mode); - } -} catch(Exception $e) { - /* Images not supported on your PHP, or image file not found */ - $printer -> text($e -> getMessage() . "\n"); -} -$printer -> cut(); - -/* Bit image */ -try { - $logo = new EscposImage("resources/escpos-php.png"); - $imgModes = array( - Escpos::IMG_DEFAULT, - Escpos::IMG_DOUBLE_WIDTH, - Escpos::IMG_DOUBLE_HEIGHT, - Escpos::IMG_DOUBLE_WIDTH | Escpos::IMG_DOUBLE_HEIGHT - ); - foreach($imgModes as $mode) { - $printer -> bitImage($logo, $mode); - } -} catch(Exception $e) { - /* Images not supported on your PHP, or image file not found */ - $printer -> text($e -> getMessage() . "\n"); -} -$printer -> cut(); - -/* QR Code - see also the more in-depth demo at qr-code.php */ -$testStr = "Testing 123"; -$models = array( - Escpos::QR_MODEL_1 => "QR Model 1", - Escpos::QR_MODEL_2 => "QR Model 2 (default)", - Escpos::QR_MICRO => "Micro QR code\n(not supported on all printers)"); -foreach($models as $model => $name) { - $printer -> qrCode($testStr, Escpos::QR_ECLEVEL_L, 3, $model); - $printer -> text("$name\n"); - $printer -> feed(); -} -$printer -> cut(); - -/* Pulse */ -$printer -> pulse(); - -/* Always close the printer! On some PrintConnectors, no actual - * data is sent until the printer is closed. */ -$printer -> close(); -?> diff --git a/htdocs/includes/mike42/escpos-php/example/graphics.php b/htdocs/includes/mike42/escpos-php/example/graphics.php deleted file mode 100644 index 7650b6b9a08..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/graphics.php +++ /dev/null @@ -1,32 +0,0 @@ - graphics($tux); - $printer -> text("Regular Tux.\n"); - $printer -> feed(); - - $printer -> graphics($tux, Escpos::IMG_DOUBLE_WIDTH); - $printer -> text("Wide Tux.\n"); - $printer -> feed(); - - $printer -> graphics($tux, Escpos::IMG_DOUBLE_HEIGHT); - $printer -> text("Tall Tux.\n"); - $printer -> feed(); - - $printer -> graphics($tux, Escpos::IMG_DOUBLE_WIDTH | Escpos::IMG_DOUBLE_HEIGHT); - $printer -> text("Large Tux in correct proportion.\n"); - - $printer -> cut(); -} catch(Exception $e) { - /* Images not supported on your PHP, or image file not found */ - $printer -> text($e -> getMessage() . "\n"); -} - -$printer -> close(); -?> diff --git a/htdocs/includes/mike42/escpos-php/example/interface/README.md b/htdocs/includes/mike42/escpos-php/example/interface/README.md deleted file mode 100644 index 96fe2eed2fb..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/interface/README.md +++ /dev/null @@ -1,8 +0,0 @@ -Interfaces ----------- -This directory contains boilerpalte code to show you how to open a print connector -to printers which are connected in different ways. - -To get a list of supported interfaces and operating systems, see the main README.md file for the project. - -If you have a printer interface with no example, and you want to help put one together, then please lodge a request on the bug tracker: https://github.com/mike42/escpos-php/issues diff --git a/htdocs/includes/mike42/escpos-php/example/interface/ethernet.php b/htdocs/includes/mike42/escpos-php/example/interface/ethernet.php deleted file mode 100644 index bfea443903c..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/interface/ethernet.php +++ /dev/null @@ -1,22 +0,0 @@ - text("Hello World!\n"); - $printer -> cut(); - - /* Close printer */ - $printer -> close(); -} catch(Exception $e) { - echo "Couldn't print to this printer: " . $e -> getMessage() . "\n"; -} - diff --git a/htdocs/includes/mike42/escpos-php/example/interface/linux-usb.php b/htdocs/includes/mike42/escpos-php/example/interface/linux-usb.php deleted file mode 100644 index 9e1d96b91c0..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/interface/linux-usb.php +++ /dev/null @@ -1,33 +0,0 @@ - text("Hello World!\n"); - $printer -> cut(); - - /* Close printer */ - $printer -> close(); -} catch(Exception $e) { - echo "Couldn't print to this printer: " . $e -> getMessage() . "\n"; -} - diff --git a/htdocs/includes/mike42/escpos-php/example/interface/smb.php b/htdocs/includes/mike42/escpos-php/example/interface/smb.php deleted file mode 100644 index 40988f553ee..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/interface/smb.php +++ /dev/null @@ -1,51 +0,0 @@ - testfile - * ## If you need authentication, use "net use" to hook up the printer: - * # net use "\\computername\Receipt Printer" /user:Guest - * # net use "\\computername\Receipt Printer" /user:Bob secret - * # net use "\\computername\Receipt Printer" /user:workgroup\Bob secret - * copy testfile "\\computername\Receipt Printer" - * del testfile - * - * GNU/Linux: - * # No authentication - * echo "Hello World" | smbclient "//computername/Receipt Printer" -c "print -" -N - * # Guest login - * echo "Hello World" | smbclient "//computername/Receipt Printer" -U Guest -c "print -" -N - * # Basic username/password - * echo "Hello World" | smbclient "//computername/Receipt Printer" secret -U "Bob" -c "print -" - * # Including domain name - * echo "Hello World" | smbclient "//computername/Receipt Printer" secret -U "workgroup\\Bob" -c "print -" - */ -try { - // Enter the share name for your printer here, as a smb:// url format - $connector = null; - //$connector = new WindowsPrintConnector("smb://computername/Receipt Printer"); - //$connector = new WindowsPrintConnector("smb://Guest@computername/Receipt Printer"); - //$connector = new WindowsPrintConnector("smb://FooUser:secret@computername/workgroup/Receipt Printer"); - //$connector = new WindowsPrintConnector("smb://User:secret@computername/Receipt Printer"); - - /* Print a "Hello world" receipt" */ - $printer = new Escpos($connector); - $printer -> text("Hello World!\n"); - $printer -> cut(); - - /* Close printer */ - $printer -> close(); -} catch(Exception $e) { - echo "Couldn't print to this printer: " . $e -> getMessage() . "\n"; -} diff --git a/htdocs/includes/mike42/escpos-php/example/interface/windows-lpt.php b/htdocs/includes/mike42/escpos-php/example/interface/windows-lpt.php deleted file mode 100644 index 76294425cdc..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/interface/windows-lpt.php +++ /dev/null @@ -1,30 +0,0 @@ - LPT1 - */ -try { - $connector = null; - //$connector = new WindowsPrintConnector("LPT1"); - - // A FilePrintConnector will also work, but on non-Windows systems, writes - // to an actual file called 'LPT1' rather than giving a useful error. - // $connector = new FilePrintConnector("LPT1"); - - /* Print a "Hello world" receipt" */ - $printer = new Escpos($connector); - $printer -> text("Hello World!\n"); - $printer -> cut(); - - /* Close printer */ - $printer -> close(); -} catch(Exception $e) { - echo "Couldn't print to this printer: " . $e -> getMessage() . "\n"; -} diff --git a/htdocs/includes/mike42/escpos-php/example/interface/windows-usb.php b/htdocs/includes/mike42/escpos-php/example/interface/windows-usb.php deleted file mode 100644 index d4b550e2f93..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/interface/windows-usb.php +++ /dev/null @@ -1,32 +0,0 @@ - testfile - * copy testfile "\\%COMPUTERNAME%\Receipt Printer" - * del testfile - */ -try { - // Enter the share name for your USB printer here - $connector = null; - //$connector = new WindowsPrintConnector("Receipt Printer"); - - /* Print a "Hello world" receipt" */ - $printer = new Escpos($connector); - $printer -> text("Hello World!\n"); - $printer -> cut(); - - /* Close printer */ - $printer -> close(); -} catch(Exception $e) { - echo "Couldn't print to this printer: " . $e -> getMessage() . "\n"; -} diff --git a/htdocs/includes/mike42/escpos-php/example/print-from-html.php b/htdocs/includes/mike42/escpos-php/example/print-from-html.php deleted file mode 100644 index f0751d7a4ae..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/print-from-html.php +++ /dev/null @@ -1,53 +0,0 @@ - 225 below) and printing w/ Escpos::IMG_DOUBLE_WIDTH | Escpos::IMG_DOUBLE_HEIGHT - */ -try { - /* Set up command */ - $source = "http://en.m.wikipedia.org/wiki/ESC/P"; - $width = 550; - $dest = tempnam(sys_get_temp_dir(), 'escpos') . ".png"; - $cmd = sprintf("wkhtmltoimage -n -q --width %s %s %s", - escapeshellarg($width), - escapeshellarg($source), - escapeshellarg($dest)); - - /* Run wkhtmltoimage */ - ob_start(); - system($cmd); // Can also use popen() for better control of process - $outp = ob_get_contents(); - ob_end_clean(); - if(!file_exists($dest)) { - throw new Exception("Command $cmd failed: $outp"); - } - - /* Load up the image */ - try { - $img = new EscposImage($dest); - } catch(Exception $e) { - unlink($dest); - throw $e; - } - unlink($dest); - - /* Print it */ - $printer = new Escpos(); // Add connector for your printer here. - $printer -> bitImage($img); // bitImage() seems to allow larger images than graphics() on the TM-T20. - $printer -> cut(); - $printer -> close(); -} catch(Exception $e) { - echo $e -> getMessage(); -} - diff --git a/htdocs/includes/mike42/escpos-php/example/print-from-pdf.php b/htdocs/includes/mike42/escpos-php/example/print-from-pdf.php deleted file mode 100644 index ba6a4c67a96..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/print-from-pdf.php +++ /dev/null @@ -1,71 +0,0 @@ - graphics($page); - } - $printer -> cut(); - $printer -> close(); -} catch(Exception $e) { - /* - * loadPdf() throws exceptions if files or not found, or you don't have the - * imagick extension to read PDF's - */ - echo $e -> getMessage() . "\n"; - exit(0); -} - - -/* - * 2: Speed up printing by roughly halving the resolution, and printing double-size. - * This gives a 75% speed increase at the expense of some quality. - * - * Reduce the page width further if necessary: if it extends past the printing area, your prints will be very slow. - */ -$printer = new Escpos(); -$pdf = 'resources/document.pdf'; -$pages = EscposImage::loadPdf($pdf, 260); -foreach($pages as $page) { - $printer -> graphics($page, Escpos::IMG_DOUBLE_HEIGHT | Escpos::IMG_DOUBLE_WIDTH); -} -$printer -> cut(); -$printer -> close(); - -/* - * 3: PDF printing still too slow? If you regularly print the same files, serialize & compress your - * EscposImage objects (after printing[1]), instead of throwing them away. - * - * (You can also do this to print logos on computers which don't have an - * image processing library, by preparing a serialized version of your logo on your PC) - * - * [1]After printing, the pixels are loaded and formatted for the print command you used, so even a raspberry pi can print complex PDF's quickly. - */ -$printer = new Escpos(); -$pdf = 'resources/document.pdf'; -$ser = 'resources/document.z'; -if(!file_exists($ser)) { - $pages = EscposImage::loadPdf($pdf); -} else { - $pages = unserialize(gzuncompress(file_get_contents($ser))); -} - -foreach($pages as $page) { - $printer -> graphics($page); -} -$printer -> cut(); -$printer -> close(); - -if(!file_exists($ser)) { - file_put_contents($ser, gzcompress(serialize($pages))); -} diff --git a/htdocs/includes/mike42/escpos-php/example/qr-code.php b/htdocs/includes/mike42/escpos-php/example/qr-code.php deleted file mode 100644 index dbf21aaedf4..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/qr-code.php +++ /dev/null @@ -1,81 +0,0 @@ - qrCode($testStr); -$printer -> text("Most simple example\n"); -$printer -> feed(); - -// Demo that alignment is the same as text -$printer -> setJustification(Escpos::JUSTIFY_CENTER); -$printer -> qrCode($testStr); -$printer -> text("Same example, centred\n"); -$printer -> setJustification(); -$printer -> feed(); - -// Demo of numeric data being packed more densly -title($printer, "Data encoding\n"); -$test = array( - "Numeric" => "0123456789012345678901234567890123456789", - "Alphanumeric" => "abcdefghijklmnopqrstuvwxyzabcdefghijklmn", - "Binary" => str_repeat("\0", 40)); -foreach($test as $type => $data) { - $printer -> qrCode($data); - $printer -> text("$type\n"); - $printer -> feed(); -} - -// Demo of error correction -title($printer, "Error correction\n"); -$ec = array( - Escpos::QR_ECLEVEL_L => "L", - Escpos::QR_ECLEVEL_M => "M", - Escpos::QR_ECLEVEL_Q => "Q", - Escpos::QR_ECLEVEL_H => "H"); -foreach($ec as $level => $name) { - $printer -> qrCode($testStr, $level); - $printer -> text("Error correction $name\n"); - $printer -> feed(); -} - -// Change size -title($printer, "Pixel size\n"); -$sizes = array( - 1 => "(minimum)", - 2 => "", - 3 => "(default)", - 4 => "", - 5 => "", - 10 => "", - 16 => "(maximum)"); -foreach($sizes as $size => $label) { - $printer -> qrCode($testStr, Escpos::QR_ECLEVEL_L, $size); - $printer -> text("Pixel size $size $label\n"); - $printer -> feed(); -} - -// Change model -title($printer, "QR model\n"); -$models = array( - Escpos::QR_MODEL_1 => "QR Model 1", - Escpos::QR_MODEL_2 => "QR Model 2 (default)", - Escpos::QR_MICRO => "Micro QR code\n(not supported on all printers)"); -foreach($models as $model => $name) { - $printer -> qrCode($testStr, Escpos::QR_ECLEVEL_L, 3, $model); - $printer -> text("$name\n"); - $printer -> feed(); -} - -// Cut & close -$printer -> cut(); -$printer -> close(); - -function title(Escpos $printer, $str) { - $printer -> selectPrintMode(Escpos::MODE_DOUBLE_HEIGHT | Escpos::MODE_DOUBLE_WIDTH); - $printer -> text($str); - $printer -> selectPrintMode(); -} diff --git a/htdocs/includes/mike42/escpos-php/example/receipt-with-logo.php b/htdocs/includes/mike42/escpos-php/example/receipt-with-logo.php deleted file mode 100644 index 8322c09c750..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/receipt-with-logo.php +++ /dev/null @@ -1,96 +0,0 @@ - setJustification(Escpos::JUSTIFY_CENTER); -$printer -> graphics($logo); - -/* Name of shop */ -$printer -> selectPrintMode(Escpos::MODE_DOUBLE_WIDTH); -$printer -> text("ExampleMart Ltd.\n"); -$printer -> selectPrintMode(); -$printer -> text("Shop No. 42.\n"); -$printer -> feed(); - -/* Title of receipt */ -$printer -> setEmphasis(true); -$printer -> text("SALES INVOICE\n"); -$printer -> setEmphasis(false); - -/* Items */ -$printer -> setJustification(Escpos::JUSTIFY_LEFT); -$printer -> setEmphasis(true); -$printer -> text(new item('', '$')); -$printer -> setEmphasis(false); -foreach($items as $item) { - $printer -> text($item); -} -$printer -> setEmphasis(true); -$printer -> text($subtotal); -$printer -> setEmphasis(false); -$printer -> feed(); - -/* Tax and total */ -$printer -> text($tax); -$printer -> selectPrintMode(Escpos::MODE_DOUBLE_WIDTH); -$printer -> text($total); -$printer -> selectPrintMode(); - -/* Footer */ -$printer -> feed(2); -$printer -> setJustification(Escpos::JUSTIFY_CENTER); -$printer -> text("Thank you for shopping at ExampleMart\n"); -$printer -> text("For trading hours, please visit example.com\n"); -$printer -> feed(2); -$printer -> text($date . "\n"); - -/* Cut the receipt and open the cash drawer */ -$printer -> cut(); -$printer -> pulse(); - -$printer -> close(); - -/* A wrapper to do organise item names & prices into columns */ -class item { - private $name; - private $price; - private $dollarSign; - - public function __construct($name = '', $price = '', $dollarSign = false) { - $this -> name = $name; - $this -> price = $price; - $this -> dollarSign = $dollarSign; - } - - public function __toString() { - $rightCols = 10; - $leftCols = 38; - if($this -> dollarSign) { - $leftCols = $leftCols / 2 - $rightCols / 2; - } - $left = str_pad($this -> name, $leftCols) ; - - $sign = ($this -> dollarSign ? '$ ' : ''); - $right = str_pad($sign . $this -> price, $rightCols, ' ', STR_PAD_LEFT); - return "$left$right\n"; - } -} -?> diff --git a/htdocs/includes/mike42/escpos-php/example/resources/character-encoding-test-strings.inc b/htdocs/includes/mike42/escpos-php/example/resources/character-encoding-test-strings.inc deleted file mode 100644 index caca76c4479..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/resources/character-encoding-test-strings.inc +++ /dev/null @@ -1,35 +0,0 @@ - "Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon.\n", - "German" => "Falsches Üben von Xylophonmusik quält jeden größeren Zwerg.\n", - "Greek" => "Ξεσκεπάζω την ψυχοφθόρα βδελυγμία\n", - "English" => "The quick brown fox jumps over the lazy dog.\n", - "Spanish" => "El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.\n", - "French" => "Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en canoë au delà des îles, près du mälström où brûlent les novæ.\n", - "Irish Gaelic" => "D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh.\n", - "Hungarian" => "Árvíztűrő tükörfúrógép.\n", - "Icelandic" => "Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa.\n", - "Latvian" => "Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus.\n", - "Polish" => "Pchnąć w tę łódź jeża lub ośm skrzyń fig.\n", - "Russian" => "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!\n", - "Turkish" => "Pijamalı hasta, yağız şoföre çabucak güvendi.\n", - "Japanese (Katakana half-width)" => implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム", "ウイノオクヤマ ケフコエテ アサキユメミシ エヒモセスン")) . "\n" - ); - -/* - * These strings are not expected to print correctly, if at all, even on an Epson printer. This is due to a mix of - * escpos driver, printer, and PHP language support issues. - * - * They are included here as a collection of things not yet implemented. - */ -$inputsNotOk = array( - "Thai (No character encoder available)" => "นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ\n", - "Japanese (Hiragana)" => implode("\n", array("いろはにほへとちりぬるを", " わかよたれそつねならむ", "うゐのおくやまけふこえて", "あさきゆめみしゑひもせす")) . "\n", - "Japanese (Katakana full-width)" => implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム", "ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン")) . "\n", - "Arabic (RTL not supported, encoding issues)" => "صِف خَلقَ خَودِ كَمِثلِ الشَمسِ إِذ بَزَغَت — يَحظى الضَجيعُ بِها نَجلاءَ مِعطارِ" . "\n", - "Hebrew (RTL not supported, line break issues)" => "דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה" . "\n" - ); - diff --git a/htdocs/includes/mike42/escpos-php/example/resources/document.odt b/htdocs/includes/mike42/escpos-php/example/resources/document.odt deleted file mode 100644 index 4bbd7f98b65..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/example/resources/document.odt and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/example/resources/document.pdf b/htdocs/includes/mike42/escpos-php/example/resources/document.pdf deleted file mode 100644 index 93a702337f1..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/example/resources/document.pdf and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/example/resources/document.z b/htdocs/includes/mike42/escpos-php/example/resources/document.z deleted file mode 100644 index cb047387558..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/example/resources/document.z and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/example/resources/escpos-php-small.png b/htdocs/includes/mike42/escpos-php/example/resources/escpos-php-small.png deleted file mode 100644 index 3c74d2d57a2..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/example/resources/escpos-php-small.png and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/example/resources/escpos-php.png b/htdocs/includes/mike42/escpos-php/example/resources/escpos-php.png deleted file mode 100644 index feee2d71cc2..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/example/resources/escpos-php.png and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/example/resources/tux.png b/htdocs/includes/mike42/escpos-php/example/resources/tux.png deleted file mode 100644 index e32f8d94534..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/example/resources/tux.png and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/example/specific/29-latvian-star-tup592.php b/htdocs/includes/mike42/escpos-php/example/specific/29-latvian-star-tup592.php deleted file mode 100644 index 72dc7c8f2ed..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/29-latvian-star-tup592.php +++ /dev/null @@ -1,21 +0,0 @@ - text("Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus\n"); -$printer -> cut(); -$printer -> close(); - -/* Option 2: Image-based output (formatting not available using this output) */ -$buffer = new ImagePrintBuffer(); -$connector = new FilePrintConnector("php://stdout"); -$printer = new Escpos($connector, $profile); -$printer -> setPrintBuffer($buffer); -$printer -> text("Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus\n"); -$printer -> cut(); -$printer -> close(); -?> \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/example/specific/32-german-tm-t20-ii-custom-command.php b/htdocs/includes/mike42/escpos-php/example/specific/32-german-tm-t20-ii-custom-command.php deleted file mode 100644 index 49eca235091..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/32-german-tm-t20-ii-custom-command.php +++ /dev/null @@ -1,36 +0,0 @@ - getPrintConnector() -> write($cmd); -$printer -> text("Beispieltext in Deutsch\n"); -$printer -> cut(); -$printer -> close(); - -/* - * Hex-dump of output confirms that ESC V 1 being sent: - * - * 0000000 033 @ 033 V 001 B e i s p i e l t e x - * 0000010 t i n D e u t s c h \n 035 V A - * 0000020 003 - */ \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/example/specific/33-spanish-seypos-prp-300.php b/htdocs/includes/mike42/escpos-php/example/specific/33-spanish-seypos-prp-300.php deleted file mode 100644 index 7314ad21bf0..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/33-spanish-seypos-prp-300.php +++ /dev/null @@ -1,16 +0,0 @@ - text("El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.\n"); -$printer -> cut(); -$printer -> close(); - diff --git a/htdocs/includes/mike42/escpos-php/example/specific/39-currency-symbols.php b/htdocs/includes/mike42/escpos-php/example/specific/39-currency-symbols.php deleted file mode 100644 index b3d4b29edd1..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/39-currency-symbols.php +++ /dev/null @@ -1,69 +0,0 @@ - text("€ 9,95\n"); -$printer -> text("£ 9.95\n"); -$printer -> text("$ 9.95\n"); -$printer -> text("¥ 9.95\n"); -$printer -> cut(); -$printer -> close(); - -/* Option 2: Image-based output (formatting not available using this output). */ -$buffer = new ImagePrintBuffer(); -$connector = new FilePrintConnector("php://stdout"); -$printer = new Escpos($connector, $profile); -$printer -> setPrintBuffer($buffer); -$printer -> text("€ 9,95\n"); -$printer -> text("£ 9.95\n"); -$printer -> text("$ 9.95\n"); -$printer -> text("¥ 9.95\n"); -$printer -> cut(); -$printer -> close(); - -/* - Option 3: If the printer is configured to print in a specific code - page, you can set up a CapabilityProfile which either references its - iconv encoding name, or includes all of the available characters. - - Here, we make use of CP858 for its inclusion of currency symbols which - are not available in CP437. CP858 has good printer support, but is not - included in all iconv builds. -*/ -class CustomCapabilityProfile extends SimpleCapabilityProfile { - function getCustomCodePages() { - /* - * Example to print in a specific, user-defined character set - * on a printer which has been configured to use i - */ - return array( - 'CP858' => "ÇüéâäàåçêëèïîìÄÅ" . - "ÉæÆôöòûùÿÖÜø£Ø×ƒ" . - "áíóúñѪº¿®¬½¼¡«»" . - "░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐" . - "└┴┬├─┼ãÃ╚╔╩╦╠═╬¤" . - "ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀" . - "ÓßÔÒõÕµþÞÚÛÙýݯ´" . - " ±‗¾¶§÷¸°¨·¹³²■ "); - } - - function getSupportedCodePages() { - return array( - 0 => 'custom:CP858'); - } -} - -$connector = new FilePrintConnector("php://stdout"); -$profile = CustomCapabilityProfile::getInstance(); -$printer = new Escpos($connector, $profile); -$printer -> text("€ 9,95\n"); -$printer -> text("£ 9.95\n"); -$printer -> text("$ 9.95\n"); -$printer -> text("¥ 9.95\n"); - -$printer -> cut(); -$printer -> close(); diff --git a/htdocs/includes/mike42/escpos-php/example/specific/44-pound-symbol-star-tsp650.php b/htdocs/includes/mike42/escpos-php/example/specific/44-pound-symbol-star-tsp650.php deleted file mode 100644 index 4ef1a9575c2..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/44-pound-symbol-star-tsp650.php +++ /dev/null @@ -1,31 +0,0 @@ - textRaw("\x9C"); // based on position in CP437 -$printer -> text(" 1.95\n"); - -// B) Manually encoded UTF8 pound symbol. Tests that the driver correctly -// encodes this as CP437. -$printer -> text(base64_decode("wqM=") . " 2.95\n"); - -// C) Pasted in file. Tests that your files are being saved as UTF-8, which -// escpos-php is able to convert automatically to a mix of code pages. -$printer -> text("£ 3.95\n"); - -$printer -> cut(); -$printer -> close(); diff --git a/htdocs/includes/mike42/escpos-php/example/specific/50-P-822D-greek.php b/htdocs/includes/mike42/escpos-php/example/specific/50-P-822D-greek.php deleted file mode 100644 index 2d88cf1a2a8..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/50-P-822D-greek.php +++ /dev/null @@ -1,16 +0,0 @@ - text($text . "\n"); -$printer -> cut(); - -// Close the connection -$printer -> close(); diff --git a/htdocs/includes/mike42/escpos-php/example/specific/54-gfx-sidebyside.php b/htdocs/includes/mike42/escpos-php/example/specific/54-gfx-sidebyside.php deleted file mode 100644 index 316099cf304..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/54-gfx-sidebyside.php +++ /dev/null @@ -1,58 +0,0 @@ - setJustification(Escpos::JUSTIFY_CENTER); - $printer -> graphics($img); - $printer -> cut(); - } finally { - // Always close the connection - $printer -> close(); - } -} catch (Exception $e) { - // Print out any errors: Eg. printer connection, image loading & external image manipulation. - echo $e -> getMessage() . "\n"; - echo $e -> getTraceAsString(); -} finally { - unlink ( $imgCombined_path ); - unlink ( $tmpf_path ); -} diff --git a/htdocs/includes/mike42/escpos-php/example/specific/6-arabic-epos-tep-220m.php b/htdocs/includes/mike42/escpos-php/example/specific/6-arabic-epos-tep-220m.php deleted file mode 100644 index c2b0fb5aa57..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/6-arabic-epos-tep-220m.php +++ /dev/null @@ -1,47 +0,0 @@ - utf8Glyphs($text); - -/* - * Set up and use the printer - */ -$buffer = new ImagePrintBuffer(); -$profile = EposTepCapabilityProfile::getInstance(); -$connector = new FilePrintConnector("php://output"); - // = WindowsPrintConnector("LPT2"); - // Windows LPT2 was used in the bug tracker - -$printer = new Escpos($connector, $profile); -$printer -> setPrintBuffer($buffer); -$printer -> text($text . "\n"); -$printer -> close(); diff --git a/htdocs/includes/mike42/escpos-php/example/specific/README.md b/htdocs/includes/mike42/escpos-php/example/specific/README.md deleted file mode 100644 index 7433e7aa247..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/specific/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Specific examples ------------------ - -These examples are designed for specific combinations of language, -printer and interface. - -They are documented here because the general examples all set up the printer in a similar way. diff --git a/htdocs/includes/mike42/escpos-php/example/text-size.php b/htdocs/includes/mike42/escpos-php/example/text-size.php deleted file mode 100644 index 2f9272e434b..00000000000 --- a/htdocs/includes/mike42/escpos-php/example/text-size.php +++ /dev/null @@ -1,62 +0,0 @@ - - */ -require_once(dirname(__FILE__) . "/../Escpos.php"); -$printer = new Escpos(); - -/* Initialize */ -$printer -> initialize(); - -/* Text of various (in-proportion) sizes */ -title($printer, "Change height & width\n"); -for($i = 1; $i <= 8; $i++) { - $printer -> setTextSize($i, $i); - $printer -> text($i); -} -$printer -> text("\n"); - -/* Width changing only */ -title($printer, "Change width only (height=4):\n"); -for($i = 1; $i <= 8; $i++) { - $printer -> setTextSize($i, 4); - $printer -> text($i); -} -$printer -> text("\n"); - -/* Height changing only */ -title($printer, "Change height only (width=4):\n"); -for($i = 1; $i <= 8; $i++) { - $printer -> setTextSize(4, $i); - $printer -> text($i); -} -$printer -> text("\n"); - -/* Very narrow text */ -title($printer, "Very narrow text:\n"); -$printer -> setTextSize(1, 8); -$printer -> text("The quick brown fox jumps over the lazy dog.\n"); - -/* Very flat text */ -title($printer, "Very wide text:\n"); -$printer -> setTextSize(4, 1); -$printer -> text("Hello world!\n"); - -/* Very large text */ -title($printer, "Largest possible text:\n"); -$printer -> setTextSize(8,8); -$printer -> text("Hello\nworld!\n"); - -$printer -> cut(); -$printer -> close(); - -function title(Escpos $printer, $text) { - $printer -> selectPrintMode(Escpos::MODE_EMPHASIZED); - $printer -> text("\n" . $text); - $printer -> selectPrintMode(); // Reset -} - -?> diff --git a/htdocs/includes/mike42/escpos-php/phpunit.xml b/htdocs/includes/mike42/escpos-php/phpunit.xml new file mode 100644 index 00000000000..158b7e0775b --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/phpunit.xml @@ -0,0 +1,21 @@ + + + + test/unit + + + test/integration + + + + + src + + + diff --git a/htdocs/includes/mike42/escpos-php/src/AbstractCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/AbstractCapabilityProfile.php deleted file mode 100644 index db2e8e01f58..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/AbstractCapabilityProfile.php +++ /dev/null @@ -1,61 +0,0 @@ - CodePage::CP437, - 1 => CodePage::CP932, - 2 => CodePage::CP850, - 3 => CodePage::CP860, - 4 => CodePage::CP863, - 5 => CodePage::CP865, - 6 => false, // Hiragana - 7 => false, // One-pass printing Kanji characters - 8 => false, // Page 8 [One-pass printing Kanji characters] - 11 => CodePage::CP851, - 12 => CodePage::CP853, - 13 => CodePage::CP857, - 14 => CodePage::CP737, - 15 => CodePage::ISO8859_7, - 16 => CodePage::CP1252, - 17 => CodePage::CP866, - 18 => CodePage::CP852, - 19 => CodePage::CP858, - 20 => false, // Thai Character Code 42 - 21 => CodePage::CP874, // Thai Character Code 11 - 22 => false, // Thai Character Code 13 - 23 => false, // Thai Character Code 14 - 24 => false, // Thai Character Code 16 - 25 => false, // Thai Character Code 17 - 26 => false, // Thai Character Code 18 - 30 => false, // TCVN-3: Vietnamese - 31 => false, // TCVN-3: Vietnamese - 32 => CodePage::CP720, - 33 => CodePage::CP775, - 34 => CodePage::CP855, - 35 => CodePage::CP861, - 36 => CodePage::CP862, - 37 => CodePage::CP864, - 38 => CodePage::CP869, - 39 => CodePage::ISO8859_2, - 40 => CodePage::ISO8859_15, - 41 => CodePage::CP1098, // PC1098: Farsi - 42 => CodePage::CP774, - 43 => CodePage::CP772, - 44 => CodePage::CP1125, - 45 => CodePage::CP1250, - 46 => CodePage::CP1251, - 47 => CodePage::CP1253, - 48 => CodePage::CP1254, - 49 => CodePage::CP1255, - 50 => CodePage::CP1256, - 51 => CodePage::CP1257, - 52 => CodePage::CP1258, - 53 => CodePage::RK1048, - 66 => false, // Devanagari - 67 => false, // Bengali - 68 => false, // Tamil - 69 => false, // Telugu - 70 => false, // Assamese - 71 => false, // Oriya - 72 => false, // Kannada - 73 => false, // Malayalam - 74 => false, // Gujarati - 75 => false, // Punjabi - 82 => false, // Marathi - 254 => false, - 255 => false); - } - - function getSupportsBarcodeB() { - return true; - } - - function getSupportsBitImage() { - return true; - } - - function getSupportsGraphics() { - return true; - } - - function getSupportsStarCommands() { - return false; - } - - function getSupportsQrCode() { - return true; - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/DummyPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/DummyPrintConnector.php deleted file mode 100644 index e1a197b7c7b..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/DummyPrintConnector.php +++ /dev/null @@ -1,78 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Print connector that writes to nowhere, but allows the user to retrieve the - * buffered data. Used for testing. - */ -final class DummyPrintConnector implements PrintConnector { - /** - * @var array Buffer of accumilated data. - */ - private $buffer; - - /** - * @var string data which the printer will provide on next read - */ - private $readData; - - /** - * Create new print connector - */ - public function __construct() { - $this -> buffer = array(); - } - - public function __destruct() { - if($this -> buffer !== null) { - trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); - } - } - - public function finalize() { - $this -> buffer = null; - } - - /** - * @return string Get the accumulated data that has been sent to this buffer. - */ - public function getData() { - return implode($this -> buffer); - } - - /* (non-PHPdoc) - * @see PrintConnector::read() - */ - public function read($len) { - return $len >= strlen($this -> readData) ? $this -> readData : substr($this -> readData, 0, $len); - } - - public function write($data) { - $this -> buffer[] = $data; - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/EposTepCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/EposTepCapabilityProfile.php deleted file mode 100644 index 2803fe3f69c..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/EposTepCapabilityProfile.php +++ /dev/null @@ -1,4 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * This class deals with images in raster formats, and converts them into formats - * which are suitable for use on thermal receipt printers. Currently, only PNG - * images (in) and ESC/POS raster format (out) are implemeted. - * - * Input formats: - * - Currently, only PNG is supported. - * - Other easily read raster formats (jpg, gif) will be added at a later date, as this is not complex. - * - The BMP format can be directly read by some commands, but this has not yet been implemented. - * - * Output formats: - * - Currently, only ESC/POS raster format is supported - * - ESC/POS 'column format' support is partially implemented, but is not yet used by Escpos.php library. - * - Output as multiple rows of column format image is not yet in the works. - * - * Libraries: - * - Currently, php-gd is used to read the input. Support for imagemagick where gd is not installed is - * also not complex to add, and is a likely future feature. - * - Support for native use of the BMP format is a goal, for maximum compatibility with target environments. - */ -class EscposImage { - /** - * @var string The image's bitmap data (if it is a Windows BMP). - */ - protected $imgBmpData; - - /** - * @var string image data in rows: 1 for black, 0 for white. - */ - protected $imgData; - - /** - * @var string cached raster format data to avoid re-computation - */ - protected $imgRasterData; - - /** - * @var int height of the image - */ - protected $imgHeight; - - /** - * @var int width of the image - */ - protected $imgWidth; - - /** - * Load up an image from a filename - * - * @param string $imgPath The path to the image to load, or null to skip - * loading the image (some other functions are available for - * populating the data). Supported graphics types depend on your PHP configuration. - */ - public function __construct($imgPath = null) { - /* Can't use bitmaps yet */ - $this -> imgBmpData = null; - $this -> imgRasterData = null; - if($imgPath === null) { - // Blank image - $this -> imgHeight = 0; - $this -> imgWidth = 0; - $this -> imgData = ""; - return; - } - - /* Load up using GD */ - if(!file_exists($imgPath)) { - throw new Exception("File '$imgPath' does not exist."); - } - $ext = pathinfo($imgPath, PATHINFO_EXTENSION); - if($ext == "bmp") { - // The plan is to implement BMP handling directly in - // PHP, as some printers understand this format themselves. - // TODO implement PHP bitmap handling - throw new Exception("Native bitmaps not yet supported. Please convert the file to a supported raster format."); - } - if($this -> isGdSupported()) { - // Prefer to use gd. It is installed by default, so - // most systems will have it, giving a consistent UX. - switch($ext) { - case "png": - $im = @imagecreatefrompng($imgPath); - $this -> readImageFromGdResource($im); - return; - case "jpg": - $im = @imagecreatefromjpeg($imgPath); - $this -> readImageFromGdResource($im); - return; - case "gif": - $im = @imagecreatefromgif($imgPath); - $this -> readImageFromGdResource($im); - return; - } - } - if($this -> isImagickSupported()) { - $im = new Imagick(); - try { - // Throws an ImagickException if the format is not supported or file is not found - $im -> readImage($imgPath); - } catch(ImagickException $e) { - // Wrap in normal exception, so that classes which call this do not themselves require imagick as a dependency. - throw new Exception($e); - } - /* Flatten by doing a composite over white, in case of transparency */ - $flat = new Imagick(); - $flat -> newImage($im -> getimagewidth(), $im -> getimageheight(), "white"); - $flat -> compositeimage($im, Imagick::COMPOSITE_OVER, 0, 0); - $this -> readImageFromImagick($flat); - return; - } - throw new Exception("Images are not supported on your PHP. Please install either the gd or imagick extension."); - } - - /** - * @return int height of the image in pixels - */ - public function getHeight() { - return $this -> imgHeight; - } - - /** - * @return int Number of bytes to represent a row of this image - */ - public function getHeightBytes() { - return (int)(($this -> imgHeight + 7) / 8); - } - - /** - * @return int Width of the image - */ - public function getWidth() { - return $this -> imgWidth; - } - - /** - * @return int Number of bytes to represent a row of this image - */ - public function getWidthBytes() { - return (int)(($this -> imgWidth + 7) / 8); - } - - /** - * @return string binary data of the original file, for function which accept bitmaps. - */ - public function getWindowsBMPData() { - return $this -> imgBmpData; - } - - /** - * @return boolean True if the image was a windows bitmap, false otherwise - */ - public function isWindowsBMP() { - return $this -> imgBmpData != null; - } - - /** - * Load actual image pixels from GD resource. - * - * @param resouce $im GD resource to use - * @throws Exception Where the image can't be read. - */ - public function readImageFromGdResource($im) { - if(!is_resource($im)) { - throw new Exception("Failed to load image."); - } else if(!$this -> isGdSupported()) { - throw new Exception(__FUNCTION__ . " requires 'gd' extension."); - } - /* Make a string of 1's and 0's */ - $this -> imgHeight = imagesy($im); - $this -> imgWidth = imagesx($im); - $this -> imgData = str_repeat("\0", $this -> imgHeight * $this -> imgWidth); - for($y = 0; $y < $this -> imgHeight; $y++) { - for($x = 0; $x < $this -> imgWidth; $x++) { - /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */ - $cols = imagecolorsforindex($im, imagecolorat($im, $x, $y)); - $greyness = (int)(($cols['red'] + $cols['green'] + $cols['blue']) / 3) >> 7; // 1 for white, 0 for black - $black = (1 - $greyness) >> ($cols['alpha'] >> 6); // 1 for black, 0 for white, taking into account transparency - $this -> imgData[$y * $this -> imgWidth + $x] = $black; - } - } - } - - /** - * Load actual image pixels from Imagick object - * - * @param Imagick $im Image to load from - */ - public function readImageFromImagick(Imagick $im) { - /* Threshold */ - $im -> setImageType(Imagick::IMGTYPE_TRUECOLOR); // Remove transparency (good for PDF's) - $max = $im->getQuantumRange(); - $max = $max["quantumRangeLong"]; - $im -> thresholdImage(0.5 * $max); - /* Make a string of 1's and 0's */ - $geometry = $im -> getimagegeometry(); - $this -> imgHeight = $im -> getimageheight(); - $this -> imgWidth = $im -> getimagewidth(); - $this -> imgData = str_repeat("\0", $this -> imgHeight * $this -> imgWidth); - - for($y = 0; $y < $this -> imgHeight; $y++) { - for($x = 0; $x < $this -> imgWidth; $x++) { - /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */ - $cols = $im -> getImagePixelColor($x, $y); - $cols = $cols -> getcolor(); - $greyness = (int)(($cols['r'] + $cols['g'] + $cols['b']) / 3) >> 7; // 1 for white, 0 for black - $this -> imgData[$y * $this -> imgWidth + $x] = (1 - $greyness); // 1 for black, 0 for white - } - } - - } - - /** - * Output the image in raster (row) format. This can result in padding on the right of the image, if its width is not divisible by 8. - * - * @throws Exception Where the generated data is unsuitable for the printer (indicates a bug or oversized image). - * @return string The image in raster format. - */ - public function toRasterFormat() { - if($this -> imgRasterData != null) { - /* Use previous calculation */ - return $this -> imgRasterData; - } - /* Loop through and convert format */ - $widthPixels = $this -> getWidth(); - $heightPixels = $this -> getHeight(); - $widthBytes = $this -> getWidthBytes(); - $heightBytes = $this -> getHeightBytes(); - $x = $y = $bit = $byte = $byteVal = 0; - $data = str_repeat("\0", $widthBytes * $heightPixels); - if(strlen($data) == 0) { - return $data; - } - do { - $byteVal |= (int)$this -> imgData[$y * $widthPixels + $x] << (7 - $bit); - $x++; - $bit++; - if($x >= $widthPixels) { - $x = 0; - $y++; - $bit = 8; - if($y >= $heightPixels) { - $data[$byte] = chr($byteVal); - break; - } - } - if($bit >= 8) { - $data[$byte] = chr($byteVal); - $byteVal = 0; - $bit = 0; - $byte++; - } - } while(true); - if(strlen($data) != ($this -> getWidthBytes() * $this -> getHeight())) { - throw new Exception("Bug in " . __FUNCTION__ . ", wrong number of bytes."); - } - $this -> imgRasterData = $data; - return $this -> imgRasterData; - } - - /** - * Output image in column format. This format results in padding at the base and right of the image, if its height and width are not divisible by 8. - */ - private function toColumnFormat() { - /* Note: This function is marked private, as it is not yet used/tested and may be buggy. */ - $widthPixels = $this -> getWidth(); - $heightPixels = $this -> getHeight(); - $widthBytes = $this -> getWidthBytes(); - $heightBytes = $this -> getHeightBytes(); - $x = $y = $bit = $byte = $byteVal = 0; - $data = str_repeat("\0", $widthBytes * $heightBytes * 8); - do { - $byteVal |= (int)$this -> imgData[$y * $widthPixels + $x] << (8 - $bit); - $y++; - $bit++; - if($y >= $heightPixels) { - $y = 0; - $x++; - $bit = 8; - if($x >= $widthPixels) { - $data[$byte] = chr($byteVal); - break; - } - } - if($bit >= 8) { - $data[$byte] = chr($byteVal); - $byteVal = 0; - $bit = 0; - $byte++; - } - } while(true); - if(strlen($data) != ($widthBytes * $heightBytes * 8)) { - throw new Exception("Bug in " . __FUNCTION__ . ", wrong number of bytes. Should be " . ($widthBytes * $heightBytes * 8) . " but was " . strlen($data)); - } - return $data; - } - - /** - * @return boolean True if GD is supported, false otherwise (a wrapper for the static version, for mocking in tests) - */ - protected function isGdSupported() { - return self::isGdLoaded(); - } - - /** - * @return boolean True if Imagick is supported, false otherwise (a wrapper for the static version, for mocking in tests) - */ - protected function isImagickSupported() { - return self::isImagickLoaded(); - } - - - /** - * @return boolean True if GD is loaded, false otherwise - */ - public static function isGdLoaded() { - return extension_loaded('gd'); - } - - /** - * @return boolean True if Imagick is loaded, false otherwise - */ - public static function isImagickLoaded() { - return extension_loaded('imagick'); - } - - /** - * Load a PDF for use on the printer - * - * @param string $pdfFile The file to load - * @param string $pageWidth The width, in pixels, of the printer's output. The first page of the PDF will be scaled to approximately fit in this area. - * @param array $range array indicating the first and last page (starting from 0) to load. If not set, the entire document is loaded. - * @throws Exception Where Imagick is not loaded, or where a missing file or invalid page number is requested. - * @return multitype:EscposImage Array of images, retrieved from the PDF file. - */ - public static function loadPdf($pdfFile, $pageWidth = 550, array $range = null) { - if(!extension_loaded('imagick')) { - throw new Exception(__FUNCTION__ . " requires imagick extension."); - } - /* - * Load first page at very low density (resolution), to figure out what - * density to use to achieve $pageWidth - */ - try { - $image = new Imagick(); - $testRes = 2; // Test resolution - $image -> setresolution($testRes, $testRes); - $image -> readimage($pdfFile."[0]"); - $geo = $image -> getimagegeometry(); - $image -> destroy(); - $width = $geo['width']; - $newRes = $pageWidth / $width * $testRes; - /* Load actual document (can be very slow!) */ - $rangeStr = ""; // Set to [0] [0-1] page range if $range is set - if($range != null) { - if(count($range) != 2 || !isset($range[0]) || !is_integer($range[0]) || !isset($range[1]) || !is_integer($range[1]) || $range[0] > $range[1]) { - throw new Exception("Invalid range. Must be two numbers in the array: The start and finish page indexes, starting from 0."); - } - $rangeStr = "[" . ($range[0] == $range[1] ? $range[0] : implode($range, "-")) . "]"; - } - $image -> setresolution($newRes, $newRes); - $image -> readImage($pdfFile."$rangeStr"); - $pages = $image -> getNumberImages(); - /* Convert images to Escpos objects */ - $ret = array(); - for($i = 0;$i < $pages; $i++) { - $image -> setIteratorIndex($i); - $ep = new EscposImage(); - $ep -> readImageFromImagick($image); - $ret[] = $ep; - } - return $ret; - } catch(ImagickException $e) { - // Wrap in normal exception, so that classes which call this do not themselves require imagick as a dependency. - throw new Exception($e); - } - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/EscposPrintBuffer.php b/htdocs/includes/mike42/escpos-php/src/EscposPrintBuffer.php deleted file mode 100644 index 703bc0a57c0..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/EscposPrintBuffer.php +++ /dev/null @@ -1,304 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * This class manages newlines and character encoding for the target printer, and - * can be interchanged for an image-bassed buffer (ImagePrintBuffer) if you can't - * get it operating properly on your machine. - */ -class EscposPrintBuffer implements PrintBuffer { - /** - * @var boolean True to cache output as .gz, false to leave un-compressed (useful for debugging) - */ - const COMPRESS_CACHE = true; - - /** - * @var string The input encoding of the buffer. - */ - const INPUT_ENCODING = "UTF-8"; - - /** - * @var string Un-recorgnised characters will be replaced with this. - */ - const REPLACEMENT_CHAR = "?"; - - /** - * This array Maps ESC/POS character tables to names iconv encodings - */ - private $available = null; - - /** - * @var array Maps of UTF-8 to code-pages - */ - private $encode = null; - - /** - * @var Escpos Printer for output - */ - private $printer; - - /** - * Empty print buffer. - */ - function __construct() { - $this -> printer = null; - } - - public function flush() { - if($this -> printer == null) { - throw new LogicException("Not attached to a printer."); - } - // TODO Not yet implemented for this buffer: This indicates that the printer needs the current line to be ended. - } - - public function getPrinter() { - return $this -> printer; - } - - public function setPrinter(Escpos $printer = null) { - $this -> printer = $printer; - if($printer != null) { - $this -> loadAvailableCharacters(); - } - } - - public function writeText($text) { - if($this -> printer == null) { - throw new LogicException("Not attached to a printer."); - } - if($text == null) { - return; - } - if(!mb_detect_encoding($text, self::INPUT_ENCODING, true)) { - // Assume that the user has already put non-UTF8 into the target encoding. - return $this -> writeTextRaw($text); - } - $i = 0; - $j = 0; - $len = mb_strlen($text, self::INPUT_ENCODING); - while($i < $len) { - $matching = true; - if(($encoding = $this -> identifyText(mb_substr($text, $i, 1, self::INPUT_ENCODING))) === false) { - // Un-encodeable text - $encoding = $this -> getPrinter() -> getCharacterTable(); - } - $i++; - $j = 1; - do { - $char = mb_substr($text, $i, 1, self::INPUT_ENCODING); - $matching = !isset($this -> available[$char]) || isset($this -> available[$char][$encoding]); - if($matching) { - $i++; - $j++; - } - } while($matching && $i < $len); - $this -> writeTextUsingEncoding(mb_substr($text, $i - $j, $j, self::INPUT_ENCODING), $encoding); - } - } - - public function writeTextRaw($text) { - if($this -> printer == null) { - throw new LogicException("Not attached to a printer."); - } - if(strlen($text) == 0) { - return; - } - // Pass only printable characters - for($i = 0; $i < strlen($text); $i++) { - $c = substr($text, $i, 1); - if(!self::asciiCheck($c, true)) { - $text[$i] = self::REPLACEMENT_CHAR; - } - } - $this -> write($text); - } - - /** - * Return an encoding which we can start to use for outputting this text. Later parts of the text need not be included in the returned code page. - * - * @param string $text Input text to check. - * @return boolean|integer Code page number, or FALSE if the text is not printable on any supported encoding. - */ - private function identifyText($text) { - // TODO Replace this with an algorithm to choose the encoding which will encode the farthest into the string, to minimise code page changes. - $char = mb_substr($text, 0, 1, self::INPUT_ENCODING); - if(!isset($this -> available[$char])) { - /* Character not available anywhere */ - return false; - } - foreach($this -> available[$char] as $encodingNo => $true) { - /* Return first code-page where it is available */ - return $encodingNo; - } - return false; - } - - /** - * Based on the printer's connector, compute (or load a cached copy of) maps of UTF character to unicode characters for later use. - */ - private function loadAvailableCharacters() { - $supportedCodePages = $this -> printer -> getPrinterCapabilityProfile() -> getSupportedCodePages(); - $capabilityClassName = get_class($this -> printer -> getPrinterCapabilityProfile()); - $cacheFile = dirname(__FILE__) . "/cache/Characters-" . $capabilityClassName . ".ser" . (self::COMPRESS_CACHE ? ".gz" : ""); - $cacheKey = md5(serialize($supportedCodePages)); - /* Check for pre-generated file */ - if(file_exists($cacheFile)) { - $cacheData = file_get_contents($cacheFile); - if(self::COMPRESS_CACHE) { - $cacheData = gzdecode($cacheData); - } - if($cacheData) { - $dataArray = unserialize($cacheData); - if(isset($dataArray["key"]) && isset($dataArray["available"]) && isset($dataArray["encode"]) && $dataArray["key"] == $cacheKey) { - $this -> available = $dataArray["available"]; - $this -> encode = $dataArray["encode"]; - return; - } - } - } - /* Generate conversion tables */ - $encode = array(); - $available = array(); - $custom = $this -> printer -> getPrinterCapabilityProfile() -> getCustomCodePages(); - - foreach($supportedCodePages as $num => $characterMap) { - $encode[$num] = array(); - if($characterMap === false) { - continue; - } else if(strpos($characterMap, ":") !== false) { - /* Load a pre-defined custom map (vendor-specific code pages) */ - $i = strpos($characterMap, ":"); - if(substr($characterMap, 0, $i) !== "custom") { - continue; - } - $i++; - $mapName = substr($characterMap, $i, strlen($characterMap) - $i); - if(!isset($custom[$mapName]) || mb_strlen($custom[$mapName], self::INPUT_ENCODING) != 128) { - throw new Exception("Capability profile referenced invalid custom map '$mapName'."); - } - $map = $custom[$mapName]; - for($char = 128; $char <= 255; $char++) { - $utf8 = mb_substr($map, $char - 128, 1, self::INPUT_ENCODING); - if($utf8 == " ") { // Skip placeholders - continue; - } - if(!isset($available[$utf8])) { - $available[$utf8] = array(); - } - $available[$utf8][$num] = true; - $encode[$num][$utf8] = chr($char); - } - } else { - /* Generate map using iconv */ - for($char = 128; $char <= 255; $char++) { - $utf8 = @iconv($characterMap, self::INPUT_ENCODING, chr($char)); - if($utf8 == '') { - continue; - } - if(iconv(self::INPUT_ENCODING, $characterMap, $utf8) != chr($char)) { - // Avoid non-canonical conversions - continue; - } - if(!isset($available[$utf8])) { - $available[$utf8] = array(); - } - $available[$utf8][$num] = true; - $encode[$num][$utf8] = chr($char); - } - } - } - /* Use generated data */ - $dataArray = array("available" => $available, "encode" => $encode, "key" => $cacheKey); - $this -> available = $dataArray["available"]; - $this -> encode = $dataArray["encode"]; - $cacheData = serialize($dataArray); - if(self::COMPRESS_CACHE) { - $cacheData = gzencode($cacheData); - } - /* Attempt to cache, but don't worry if we can't */ - @file_put_contents($cacheFile, $cacheData); - } - - /** - * Encode a block of text using the specified map, and write it to the printer. - * - * @param string $text Text to print, UTF-8 format. - * @param integer $encodingNo Encoding number to use- assumed to exist. - */ - private function writeTextUsingEncoding($text, $encodingNo) { - $encodeMap = $this -> encode[$encodingNo]; - $len = mb_strlen($text, self::INPUT_ENCODING); - $rawText = str_repeat(self::REPLACEMENT_CHAR, $len); - for($i = 0; $i < $len; $i++) { - $char = mb_substr($text, $i, 1, self::INPUT_ENCODING); - if(isset($encodeMap[$char])) { - $rawText[$i] = $encodeMap[$char]; - } else if(self::asciiCheck($char)) { - $rawText[$i] = $char; - } - } - if($this -> printer -> getCharacterTable() != $encodingNo) { - $this -> printer -> selectCharacterTable($encodingNo); - } - $this -> writeTextRaw($rawText); - } - - /** - * Write data to the underlying printer. - * - * @param string $data - */ - private function write($data) { - $this -> printer -> getPrintConnector() -> write($data); - } - - /** - * Return true if a character is an ASCII printable character. - * - * @param string $char Character to check - * @param boolean $extended True to allow 128-256 values also (excluded by default) - * @return boolean True if the character is printable, false if it is not. - */ - private static function asciiCheck($char, $extended = false) { - if(strlen($char) != 1) { - // Multi-byte string - return false; - } - $num = ord($char); - if($num > 31 && $num < 127) { // Printable - return true; - } - if($num == 10) { // New-line (printer will take these) - return true; - } - if($extended && $num > 127) { - return true; - } - return false; - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/FilePrintConnector.php b/htdocs/includes/mike42/escpos-php/src/FilePrintConnector.php deleted file mode 100644 index 8d87f0a527a..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/FilePrintConnector.php +++ /dev/null @@ -1,80 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * PrintConnector for passing print data to a file. - */ -class FilePrintConnector implements PrintConnector { - /** - * @var resource The file pointer to send data to. - */ - protected $fp; - - /** - * Construct new connector, given a filename - * - * @param string $filename - */ - public function __construct($filename) { - $this -> fp = fopen($filename, "wb+"); - if($this -> fp === false) { - throw new Exception("Cannot initialise FilePrintConnector."); - } - } - - public function __destruct() { - if($this -> fp !== false) { - trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); - } - } - - /** - * Close file pointer - */ - public function finalize() { - fclose($this -> fp); - $this -> fp = false; - } - - /* (non-PHPdoc) - * @see PrintConnector::read() - */ - public function read($len) { - rewind($this -> fp); - return fgets($this -> fp, $len + 1); - } - - /** - * Write data to the file - * - * @param string $data - */ - public function write($data) { - fwrite($this -> fp, $data); - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/ImagePrintBuffer.php b/htdocs/includes/mike42/escpos-php/src/ImagePrintBuffer.php deleted file mode 100644 index 08ca64ac43e..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/ImagePrintBuffer.php +++ /dev/null @@ -1,99 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * This class renders text to small images on-the-fly. It attempts to mimic the - * behaviour of text output, whilst supporting any fonts & character encodings - * which your system can handle. This class currently requires Imagick. - */ -class ImagePrintBuffer implements PrintBuffer { - private $printer; - - function __construct() { - if(!EscposImage::isImagickLoaded()) { - throw new Exception("ImagePrintBuffer requires the imagick extension"); - } - } - - function flush() { - if($this -> printer == null) { - throw new LogicException("Not attached to a printer."); - } - } - - function getPrinter() { - return $this -> printer; - } - - function setPrinter(Escpos $printer = null) { - $this -> printer = $printer; - } - - function writeText($text) { - if($this -> printer == null) { - throw new LogicException("Not attached to a printer."); - } - if($text == null) { - return; - } - $text = trim($text, "\n"); - /* Create Imagick objects */ - $image = new Imagick(); - $draw = new ImagickDraw(); - $color = new ImagickPixel('#000000'); - $background = new ImagickPixel('white'); - - /* Create annotation */ - //$draw -> setFont('Arial');// (not necessary?) - $draw -> setFontSize(24); // Size 21 looks good for FONT B - $draw -> setFillColor($color); - $draw -> setStrokeAntialias(true); - $draw -> setTextAntialias(true); - $metrics = $image -> queryFontMetrics($draw, $text); - $draw -> annotation(0, $metrics['ascender'], $text); - - /* Create image & draw annotation on it */ - $image -> newImage($metrics['textWidth'], $metrics['textHeight'], $background); - $image -> setImageFormat('png'); - $image -> drawImage($draw); - //$image -> writeImage("test.png"); - - /* Save image */ - $escposImage = new EscposImage(); - $escposImage -> readImageFromImagick($image); - $size = Escpos::IMG_DEFAULT; - $this -> printer -> bitImage($escposImage, $size); - } - - function writeTextRaw($text) { - if($this -> printer == null) { - throw new LogicException("Not attached to a printer."); - } - $this -> printer -> getPrintConnector() -> write($data); - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfile.php new file mode 100644 index 00000000000..9a91390594e --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfile.php @@ -0,0 +1,348 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos; + +use \InvalidArgumentException; + +/** + * Store compatibility information about one printer. + */ +class CapabilityProfile +{ + + /** + * + * @var string $codePageCacheKey + * Hash of the code page data structure, to identify it for caching. + */ + protected $codePageCacheKey; + + /** + * + * @var array $codePages + * Associtive array of CodePage objects, indicating which encodings the printer supports. + */ + protected $codePages; + + /** + * + * @var array $colors + * Not used. + */ + protected $colors; + + /** + * + * @var array $features + * Feature values. + */ + protected $features; + + /** + * + * @var array $fonts + * Not used + */ + protected $fonts; + + /** + * + * @var array $media + * Not used + */ + protected $media; + + /** + * + * @var string $name + * Name of the profile, including model number. + */ + protected $name; + + /** + * + * @var string $notes + * Notes on the profile, null if not set. + */ + protected $notes; + + /** + * + * @var string $profileId + * ID of the profile. + */ + protected $profileId; + + + /** + * @var string $vendor + * Name of manufacturer. + */ + protected $vendor; + + /** + * + * @var array $encodings + * Data structure containing encodings loaded from disk, null if not loaded yet. + */ + protected static $encodings = null; + + /** + * + * @var array $profiles + * Data structure containing profiles loaded from disk, null if not loaded yet. + */ + protected static $profiles = null; + + /** + * Construct new CapabilityProfile. + * The encoding data must be loaded from disk before calling. + * + * @param string $profileId + * ID of the profile + * @param array $profileData + * Profile data from disk. + */ + protected function __construct($profileId, array $profileData) + { + // Basic primitive fields + $this->profileId = $profileId; + $this->name = $profileData['name']; + $this->notes = $profileData['notes']; + $this->vendor = $profileData['vendor']; + // More complex fields that are not currently loaded into custom objects + $this->features = $profileData['features']; + $this->colors = $profileData['colors']; + $this->fonts = $profileData['fonts']; + $this->media = $profileData['media']; + // More complex fields that are loaded into custom objects + $this->codePages = []; + $this->codePageCacheKey = md5(json_encode($profileData['codePages'])); + foreach ($profileData['codePages'] as $k => $v) { + $this->codePages[$k] = new CodePage($v, self::$encodings[$v]); + } + } + + /** + * + * @return string Hash of the code page data structure, to identify it for caching. + */ + public function getCodePageCacheKey() + { + return $this->codePageCacheKey; + } + + /** + * + * @return array Associtive array of CodePage objects, indicating which encodings the printer supports. + */ + public function getCodePages() + { + return $this->codePages; + } + + /** + * + * @param string $featureName + * Name of the feature to retrieve. + * @throws \InvalidArgumentException Where the feature does not exist. + * The exception will contain suggestions for the closest-named features. + * @return mixed feature value. + */ + public function getFeature($featureName) + { + if (isset($this->features[$featureName])) { + return $this->features[$featureName]; + } + $suggestionsArr = $this->suggestFeatureName($featureName); + $suggestionsStr = implode(", ", $suggestionsArr); + $str = "The feature '$featureName' does not exist. Try one that does exist, such as $suggestionsStr"; + throw new \InvalidArgumentException($str); + } + + /** + * + * @return string ID of the profile. + */ + public function getId() + { + return $this->profileId; + } + + /** + * + * @return string Name of the printer. + */ + public function getName() + { + return $this->name; + } + + /** + * + * @return boolean True if Barcode B command is supported, false otherwise + */ + public function getSupportsBarcodeB() + { + return $this->getFeature('barcodeB') === true; + } + + /** + * + * @return boolean True if Bit Image Raster command is supported, false otherwise + */ + public function getSupportsBitImageRaster() + { + return $this->getFeature('bitImageRaster') === true; + } + + /** + * + * @return boolean True if Graphics command is supported, false otherwise + */ + public function getSupportsGraphics() + { + return $this->getFeature('graphics') === true; + } + + /** + * + * @return boolean True if PDF417 code command is supported, false otherwise + */ + public function getSupportsPdf417Code() + { + // TODO submit 'pdf417Code' as a new feature to be tracked in upstream profiles + return $this->getFeature('qrCode') === true; + } + + /** + * + * @return boolean True if QR code command is supported, false otherwise + */ + public function getSupportsQrCode() + { + return $this->getFeature('qrCode') === true; + } + + /** + * + * @return boolean True if Star mode commands are supported, false otherwise + */ + public function getSupportsStarCommands() + { + return $this->getFeature('starCommands') === true; + } + + /** + * + * @return string Vendor of this printer. + */ + public function getVendor() + { + return $this->vendor; + } + + /** + * + * @param string $featureName + * Feature that does not exist + * @return array Three most similar feature names that do exist. + */ + protected function suggestFeatureName($featureName) + { + return self::suggestNearest($featureName, array_keys($this->features), 3); + } + + /** + * + * @return array Names of all profiles that exist. + */ + public static function getProfileNames() + { + self::loadCapabilitiesDataFile(); + return array_keys(self::$profiles); + } + + /** + * Retrieve the CapabilityProfile with the given ID. + * + * @param string $profileName + * The ID of the profile to load. + * @throws InvalidArgumentException Where the ID does not exist. Some similarly-named profiles will be suggested in the Exception text. + * @return CapabilityProfile The CapabilityProfile that was requested. + */ + public static function load($profileName) + { + self::loadCapabilitiesDataFile(); + if (! isset(self::$profiles[$profileName])) { + $suggestionsArray = self::suggestProfileName($profileName); + $suggestionsStr = implode(", ", $suggestionsArray); + throw new InvalidArgumentException("The CapabilityProfile '$profileName' does not exist. Try one that does exist, such as $suggestionsStr."); + } + return new CapabilityProfile($profileName, self::$profiles[$profileName]); + } + + /** + * Ensure that the capabilities.json data file has been loaded. + */ + protected static function loadCapabilitiesDataFile() + { + if (self::$profiles === null) { + $filename = dirname(__FILE__) . "/resources/capabilities.json"; + $capabilitiesData = json_decode(file_get_contents($filename), true); + self::$profiles = $capabilitiesData['profiles']; + self::$encodings = $capabilitiesData['encodings']; + } + } + + /** + * Return choices with smallest edit distance to an invalid input. + * + * @param string $input + * Input that is not a valid choice + * @param array $choices + * Array of valid choices. + * @param int $num + * Number of suggestions to return + */ + public static function suggestNearest($input, array $choices, $num) + { + $distances = array_fill_keys($choices, PHP_INT_MAX); + foreach ($distances as $word => $_) { + $distances[$word] = levenshtein($input, $word); + } + asort($distances); + return array_slice(array_keys($distances), 0, min($num, count($choices))); + } + + /** + * + * @param string $profileName + * profile name that does not exist + * @return array Three similar profile names that do exist, plus 'simple' and 'default' for good measure. + */ + protected static function suggestProfileName($profileName) + { + $suggestions = self::suggestNearest($profileName, array_keys(self::$profiles), 3); + $alwaysSuggest = [ + 'simple', + 'default' + ]; + foreach ($alwaysSuggest as $item) { + if (array_search($item, $suggestions) === false) { + array_push($suggestions, $item); + } + } + return $suggestions; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/DefaultCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/DefaultCapabilityProfile.php new file mode 100644 index 00000000000..c574aed178b --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/DefaultCapabilityProfile.php @@ -0,0 +1,22 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ +namespace Mike42\Escpos\CapabilityProfiles; + +use Mike42\Escpos\CapabilityProfile; + +class DefaultCapabilityProfile +{ + public static function getInstance() + { + return CapabilityProfile::load('default'); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/EposTepCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/EposTepCapabilityProfile.php new file mode 100644 index 00000000000..cc8e3ec5f3b --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/EposTepCapabilityProfile.php @@ -0,0 +1,22 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ +namespace Mike42\Escpos\CapabilityProfiles; + +use Mike42\Escpos\CapabilityProfile; + +class EposTepCapabilityProfile +{ + public static function getInstance() + { + return CapabilityProfile::load('TEP-200M'); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/P822DCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/P822DCapabilityProfile.php new file mode 100644 index 00000000000..42ee3a0b4fa --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/P822DCapabilityProfile.php @@ -0,0 +1,22 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ +namespace Mike42\Escpos\CapabilityProfiles; + +use Mike42\Escpos\CapabilityProfile; + +class P822DCapabilityProfile +{ + public static function getInstance() + { + return CapabilityProfile::load('P822D'); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/SimpleCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/SimpleCapabilityProfile.php new file mode 100644 index 00000000000..cb141b8b9b8 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/SimpleCapabilityProfile.php @@ -0,0 +1,22 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ +namespace Mike42\Escpos\CapabilityProfiles; + +use Mike42\Escpos\CapabilityProfile; + +class SimpleCapabilityProfile +{ + public static function getInstance() + { + return CapabilityProfile::load('simple'); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/StarCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/StarCapabilityProfile.php new file mode 100644 index 00000000000..6e2f64c2c93 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/StarCapabilityProfile.php @@ -0,0 +1,22 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ +namespace Mike42\Escpos\CapabilityProfiles; + +use Mike42\Escpos\CapabilityProfile; + +class StarCapabilityProfile +{ + public static function getInstance() + { + return CapabilityProfile::load('SP2000'); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CodePage.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CodePage.php new file mode 100644 index 00000000000..25f58b95369 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/CodePage.php @@ -0,0 +1,181 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos; + +use \InvalidArgumentException; + +/** + * Class to handle data about a particular CodePage, as loaded from the receipt print + * database. + * + * Also computes map between UTF-8 and this encoding if necessary, using the iconv library. + */ +class CodePage +{ + /** + * The input encoding for generating character maps with iconv. + */ + const INPUT_ENCODING = "UTF-8"; + + /** + * @var string $data + * Data string, null if not known (can be computed with iconv) + */ + protected $data; + + /** + * @var string $iconv + * Iconv encoding name, null if not known + */ + protected $iconv; + + /** + * @var string $id + * Internal ID of the CodePage + */ + protected $id; + + /** + * @var string $name + * Name of the code page. Substituted with the ID if not set. + */ + protected $name; + + /** + * @var string $notes + * Notes on this code page, or null if not set. + */ + protected $notes; + + /** + * + * @param string $id + * Unique internal identifier for the CodePage. + * @param array $codePageData + * Associative array of CodePage data, as + * specified by the upstream receipt-print-hq/escpos-printer-db database. + * May contain 'name', 'data', 'iconv', and 'notes' fields. + */ + public function __construct($id, array $codePageData) + { + $this->id = $id; + $this->name = isset($codePageData['name']) ? $codePageData['name'] : $id; + $this->data = isset($codePageData['data']) ? implode("", $codePageData['data']) : null; + $this->iconv = isset($codePageData['iconv']) ? $codePageData['iconv'] : null; + $this->notes = isset($codePageData['notes']) ? $codePageData['notes'] : null; + } + + /** + * Get a 128-character data string representing this encoding. + * It will be + * calculated and cached if it was not previously known. + * + * @throws InvalidArgumentException Where the data is now known or computable. + * @return string Data for this encoding. + */ + public function getData() + { + if ($this->data !== null) { + // Return data if known + return $this->data; + } + if ($this->iconv !== null) { + // Calculate with iconv if we know the encoding name + $this->data = self::generateEncodingMap($this->iconv); + return $this->data; + } + // Can't encode.. + throw new InvalidArgumentException("Cannot encode this code page"); + } + + /** + * + * @return string Iconv encoding name, or blank if not set. + */ + public function getIconv() + { + return $this->iconv; + } + + /** + * + * @return string Unique identifier of the code page. + */ + public function getId() + { + return $this->id; + } + + /** + * Name of the code page. + */ + public function getName() + { + return $this->name; + } + + /** + * The notes may explain quirks about a code-page, such as a source if it's non-standard or un-encodeable. + * + * @return string Notes on the code page, or null if not set. + */ + public function getNotes() + { + return $this->notes; + } + + /** + * + * @return boolean True if we can encode with this code page (ie, we know what data it holds). + * + * Many printers contain vendor-specific code pages, which are named but have not been identified or + * typed out. For our purposes, this is an "un-encodeable" code page. + */ + public function isEncodable() + { + return $this->iconv !== null || $this->data !== null; + } + + /** + * Given an iconv encoding name, generate a 128-character UTF-8 string, containing code points 128-255. + * + * This string is used to map UTF-8 characters to their location in this code page. + * + * @param string $iconvName + * Name of the encoding + * @return string 128-character string in UTF-8. + */ + protected static function generateEncodingMap($iconvName) + { + // Start with array of blanks (" " indicates unknown character). + $charMap = array_fill(0, 128, " "); + // Loop through 128 code points + for ($char = 128; $char <= 255; $char ++) { + // Try to identify the UTF-8 character that would go here + $utf8 = @iconv($iconvName, self::INPUT_ENCODING, chr($char)); + if ($utf8 == '') { + continue; + } + if (iconv(self::INPUT_ENCODING, $iconvName, $utf8) != chr($char)) { + // Avoid non-canonical conversions (no known examples) + continue; + } + // Replace the ' ' with the correct character if we found it + $charMap[$char - 128] = $utf8; + } + // Join into a 128-character string and return. + $charMapStr = implode("", $charMap); + assert(mb_strlen($charMapStr, self::INPUT_ENCODING) == 128); + return $charMapStr; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/Devices/AuresCustomerDisplay.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/Devices/AuresCustomerDisplay.php new file mode 100644 index 00000000000..3bf9101a4cf --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/Devices/AuresCustomerDisplay.php @@ -0,0 +1,150 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\Devices; + +use Mike42\Escpos\Printer; + +/** + * A class for sending ESC/POS-like code to an Aures customer display. + * The display has some features that printers do not, such as an ability to "clear" the screen. + */ +class AuresCustomerDisplay extends Printer +{ + + /** + * Indicates that the text should wrap and type over + * existing text on the screen, rather than scroll. + */ + const TEXT_OVERWRITE = 1; + + /** + * Indicates that overflowing text should cause the + * display to scroll vertically, like a computer terminal. + */ + const TEXT_VERTICAL_SCROLL = 2; + + /** + * Indicates that overflowing text should cause the + * display to scroll horizontally, like a news ticker. + */ + const TEXT_HORIZONTAL_SCROLL = 3; + + /** + * + * {@inheritdoc} + * + * @see \Mike42\Escpos\Printer::initialize() + */ + public function initialize() + { + // Select ESC/POS mode first + $this->selectEscposMode(); + parent::initialize(); + // ESC @ does not reset character table on this printer + $this->selectCharacterTable(0); + // Default to horizontal scroll mode. Behaves most like a printer. + $this->selectTextScrollMode(AuresCustomerDisplay::TEXT_VERTICAL_SCROLL); + } + + /** + * Selects ESC/POS mode. + * + * This device supports other modes, which are not used. + */ + protected function selectEscposMode() + { + $this->connector->write("\x02\x05\x43\x31\x03"); + } + + /** + * + * @param int $mode + * The text scroll mode to use. One of + * AuresCustomerDisplay::TEXT_OVERWRITE, + * AuresCustomerDisplay::TEXT_VERTICAL_SCROLL or + * AuresCustomerDisplay::TEXT_HORIZONTAL_SCROLL + */ + public function selectTextScrollMode($mode = AuresCustomerDisplay::TEXT_VERTICAL_SCROLL) + { + self::validateInteger($mode, 1, 3, __FUNCTION__); + $this->connector->write("\x1F" . chr($mode)); + } + + /** + * Clear the display. + */ + public function clear() + { + $this->connector->write("\x0c"); + } + + /** + * Instruct the display to show the firmware version. + */ + public function showFirmwareVersion() + { + $this->connector->write("\x02\x05\x56\x01\x03"); + } + + /** + * Instruct the display to begin a self-test/demo sequence. + */ + public function selfTest() + { + $this->connector->write("\x02\x05\x44\x08\x03"); + } + + /** + * Instruct the display to show a pre-loaded logo. + * + * Note that this driver is not capable of uploading a + * logo, but that the vendor supplies software + * which has this function. + */ + public function showLogo() + { + $this->connector->write("\x02\xFC\x55\xAA\x55\xAA"); + } + + /** + * + * {@inheritdoc} + * + * @see \Mike42\Escpos\Printer::text() + */ + public function text($str = "") + { + self::validateString($str, __FUNCTION__); + // Need to intercept line-feeds, since "\n" is insufficient on this device. + foreach (explode("\n", $str) as $id => $line) { + if ($id > 0) { + $this->feed(); + } + parent::text($line); + } + } + + /** + * + * {@inheritdoc} + * + * @see \Mike42\Escpos\Printer::feed() + */ + public function feed($lines = 1) + { + self::validateInteger($lines, 1, 255, __FUNCTION__); + for ($i = 0; $i < $lines; $i ++) { + $this->connector->write("\r\n"); + } + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/EscposImage.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/EscposImage.php new file mode 100644 index 00000000000..9a625acb47c --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/EscposImage.php @@ -0,0 +1,460 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos; + +use Exception; +use InvalidArgumentException; + +/** + * This class deals with images in raster formats, and converts them into formats + * which are suitable for use on thermal receipt printers. Currently, only PNG + * images (in) and ESC/POS raster format (out) are implemeted. + * + * Input formats: + * - Currently, only PNG is supported. + * - Other easily read raster formats (jpg, gif) will be added at a later date, as this is not complex. + * - The BMP format can be directly read by some commands, but this has not yet been implemented. + * + * Output formats: + * - Currently, only ESC/POS raster format is supported + * - ESC/POS 'column format' support is partially implemented, but is not yet used by Escpos.php library. + * - Output as multiple rows of column format image is not yet in the works. + * + * Libraries: + * - Currently, php-gd is used to read the input. Support for imagemagick where gd is not installed is + * also not complex to add, and is a likely future feature. + * - Support for native use of the BMP format is a goal, for maximum compatibility with target environments. + */ +abstract class EscposImage +{ + /** + * @var int $imgHeight + * height of the image. + */ + protected $imgHeight = 0; + + /** + * @var int $imgWidth + * width of the image + */ + protected $imgWidth = 0; + + /** + * @var string $imgData + * Image data in rows: 1 for black, 0 for white. + */ + private $imgData = null; + + /** + * @var array:string $imgColumnData + * Cached column-format data to avoid re-computation + */ + private $imgColumnData = []; + + /** + * @var string $imgRasterData + * Cached raster format data to avoid re-computation + */ + private $imgRasterData = null; + + /** + * @var string $filename + * Filename of image on disk - null if not loaded from disk. + */ + private $filename = null; + + /** + * @var boolean $allowOptimisations + * True to allow faster library-specific rendering shortcuts, false to always just use + * image libraries to read pixels (more reproducible between systems). + */ + private $allowOptimisations = true; + + /** + * Construct a new EscposImage. + * + * @param string $filename Path to image filename, or null to create an empty image. + * @param boolean $allowOptimisations True (default) to use any library-specific tricks + * to speed up rendering, false to force the image to be read in pixel-by-pixel, + * which is easier to unit test and more reproducible between systems, but slower. + */ + public function __construct($filename = null, $allowOptimisations = true) + { + $this -> filename = $filename; + $this -> allowOptimisations = $allowOptimisations; + } + + /** + * @return int height of the image in pixels + */ + public function getHeight() + { + return $this -> imgHeight; + } + + /** + * @return int Number of bytes to represent a row of this image + */ + public function getHeightBytes() + { + return (int)(($this -> imgHeight + 7) / 8); + } + + /** + * @return int Width of the image + */ + public function getWidth() + { + return $this -> imgWidth; + } + + /** + * @return int Number of bytes to represent a row of this image + */ + public function getWidthBytes() + { + return (int)(($this -> imgWidth + 7) / 8); + } + + /** + * Output the image in raster (row) format. This can result in padding on the + * right of the image, if its width is not divisible by 8. + * + * @throws Exception Where the generated data is unsuitable for the printer + * (indicates a bug or oversized image). + * @return string The image in raster format. + */ + public function toRasterFormat() + { + // Just wraps implementations for caching & lazy loading + if ($this -> imgRasterData !== null) { + /* Return cached value */ + return $this -> imgRasterData; + } + if ($this -> allowOptimisations) { + /* Use optimised code if allowed */ + $this -> imgRasterData = $this -> getRasterFormatFromFile($this -> filename); + } + if ($this -> imgRasterData === null) { + /* Load in full image and render the slow way if no faster implementation + is available, or if we've been asked not to use it */ + if ($this -> imgData === null) { + $this -> loadImageData($this -> filename); + } + $this -> imgRasterData = $this -> getRasterFormat(); + } + return $this -> imgRasterData; + } + + /** + * Output the image in column format. + * + * @param boolean $doubleDensity True for double density (24px) lines, false for single-density (8px) lines. + * @return string[] an array, one item per line of output. All lines will be of equal size. + */ + public function toColumnFormat($doubleDensity = false) + { + $densityIdx = $doubleDensity ? 1 : 0; + // Just wraps implementations for caching and lazy loading + if (isset($this -> imgColumnData[$densityIdx])) { + /* Return cached value */ + return $this -> imgColumnData[$densityIdx]; + } + $this -> imgColumnData[$densityIdx] = null; + if ($this -> allowOptimisations) { + /* Use optimised code if allowed */ + $data = $this -> getColumnFormatFromFile($this -> filename, $doubleDensity); + $this -> imgColumnData[$densityIdx] = $data; + } + if ($this -> imgColumnData[$densityIdx] === null) { + /* Load in full image and render the slow way if no faster implementation + is available, or if we've been asked not to use it */ + if ($this -> imgData === null) { + $this -> loadImageData($this -> filename); + } + $this -> imgColumnData[$densityIdx] = $this -> getColumnFormat($doubleDensity); + } + return $this -> imgColumnData[$densityIdx]; + } + + /** + * Load an image from disk. This default implementation always gives a zero-sized image. + * + * @param string|null $filename Filename to load from. + */ + protected function loadImageData($filename = null) + { + // Load image in to string of 1's and 0's, also set width & height + $this -> setImgWidth(0); + $this -> setImgHeight(0); + $this -> setImgData(""); + } + + /** + * Set image data. + * + * @param string $data Image data to use, string of 1's (black) and 0's (white) in row-major order. + */ + protected function setImgData($data) + { + $this -> imgData = $data; + } + + /** + * Set image width. + * + * @param int $width width of the image + */ + protected function setImgWidth($width) + { + $this -> imgWidth = $width; + } + + /** + * Set image height. + * + * @param int $height height of the image. + */ + protected function setImgHeight($height) + { + $this -> imgHeight = $height; + } + + /** + * @param string $filename + * Filename to load from + * @return string|NULL + * Raster format data, or NULL if no optimised renderer is available in + * this implementation. + */ + protected function getRasterFormatFromFile($filename = null) + { + // No optimised implementation to provide + return null; + } + + /** + * @param string $filename + * Filename to load from + * @param boolean $highDensityVertical + * True for high density output (24px lines), false for regular density (8px) + * @return string[]|NULL + * Column format data as array, or NULL if optimised renderer isn't + * available in this implementation. + */ + protected function getColumnFormatFromFile($filename = null, $highDensityVertical = true) + { + // No optimised implementation to provide + return null; + } + + /** + * Get column fromat from loaded image pixels, line by line. + * + * @throws Exception + * Where wrong number of bytes has been generated. + * @return string + * Raster format data + */ + private function getRasterFormat() + { + /* Loop through and convert format */ + $widthPixels = $this -> getWidth(); + $heightPixels = $this -> getHeight(); + $widthBytes = $this -> getWidthBytes(); + $heightBytes = $this -> getHeightBytes(); + $x = $y = $bit = $byte = $byteVal = 0; + $data = str_repeat("\0", $widthBytes * $heightPixels); + if (strlen($data) == 0) { + return $data; + } + do { + $byteVal |= (int)$this -> imgData[$y * $widthPixels + $x] << (7 - $bit); + $x++; + $bit++; + if ($x >= $widthPixels) { + $x = 0; + $y++; + $bit = 8; + if ($y >= $heightPixels) { + $data[$byte] = chr($byteVal); + break; + } + } + if ($bit >= 8) { + $data[$byte] = chr($byteVal); + $byteVal = 0; + $bit = 0; + $byte++; + } + } while (true); + if (strlen($data) != ($this -> getWidthBytes() * $this -> getHeight())) { + throw new Exception("Bug in " . __FUNCTION__ . ", wrong number of bytes."); + } + return $data; + } + + /** + * Get column fromat from loaded image pixels, line by line. + * + * @param boolean $highDensity + * True for high density output (24px lines), false for regular density (8px) + * @return string[] + * Array of column format data, one item per row. + */ + private function getColumnFormat($highDensity) + { + $out = []; + $i = 0; + while (($line = $this -> getColumnFormatLine($i, $highDensity)) !== null) { + $out[] = $line; + $i++; + } + return $out; + } + + /** + * Output image in column format. Must be called once for each line of output. + * + * @param int $lineNo + * Line number to retrieve + * @param bool $highDensity + * True for high density output (24px lines), false for regular density (8px) + * @throws Exception + * Where wrong number of bytes has been generated. + * @return NULL|string + * Column format data, or null if there is no more data (when iterating) + */ + private function getColumnFormatLine($lineNo, $highDensity) + { + // Currently double density in both directions, very experimental + $widthPixels = $this -> getWidth(); + $heightPixels = $this -> getHeight(); + $widthBytes = $this -> getWidthBytes(); + $heightBytes = $this -> getHeightBytes(); + $lineHeight = $highDensity ? 3 : 1; // Vertical density. 1 or 3 (for 8 and 24 pixel lines) + // Initialise to zero + $x = $y = $bit = $byte = $byteVal = 0; + $data = str_repeat("\x00", $widthPixels * $lineHeight); + $yStart = $lineHeight * 8 * $lineNo; + if ($yStart >= $heightPixels) { + return null; + } + if (strlen($data) == 0) { + return $data; + } + do { + $yReal = $y + $yStart; + if ($yReal < $heightPixels) { + $byteVal |= (int)$this -> imgData[$yReal * $widthPixels + $x] << (7 - $bit); + } + $y++; + $bit++; + if ($y >= $lineHeight * 8) { + $y = 0; + $x++; + $bit = 8; + if ($x >= $widthPixels) { + $data[$byte] = chr($byteVal); + break; + } + } + if ($bit >= 8) { + $data[$byte] = chr($byteVal); + $byteVal = 0; + $bit = 0; + $byte++; + } + } while (true); + if (strlen($data) != $widthPixels * $lineHeight) { + throw new Exception("Bug in " . __FUNCTION__ . ", wrong number of bytes."); + } + return $data; + } + + /** + * @return boolean True if GD is loaded, false otherwise + */ + public static function isGdLoaded() + { + return extension_loaded('gd'); + } + + /** + * @return boolean True if Imagick is loaded, false otherwise + */ + public static function isImagickLoaded() + { + return extension_loaded('imagick'); + } + + + /** + * This is a convinience method to load an image from file, auto-selecting + * an EscposImage implementation which uses an available library. + * + * The sub-classes can be constructed directly if you know that you will + * have Imagick or GD on the print server. + * + * @param string $filename + * File to load from + * @param bool $allowOptimisations + * True to allow the fastest rendering shortcuts, false to force the library + * to read the image into an internal raster format and use PHP to render + * the image (slower but less fragile). + * @param array $preferred + * Order to try to load libraries in- escpos-php supports pluggable image + * libraries. Items can be 'imagick', 'gd', 'native'. + * @throws Exception + * Where no suitable library could be found for the type of file being loaded. + * @return EscposImage + * + */ + public static function load( + $filename, + $allowOptimisations = true, + array $preferred = ['imagick', 'gd', 'native'] + ) { + /* Fail early if file is not readble */ + if (!file_exists($filename) || !is_readable($filename)) { + throw new Exception("File '$filename' does not exist, or is not readable."); + } + $ext = pathinfo($filename, PATHINFO_EXTENSION); + /* Choose the first implementation which can handle this format */ + foreach ($preferred as $implemetnation) { + if ($implemetnation === 'imagick') { + if (!self::isImagickLoaded()) { + // Skip option if Imagick is not loaded + continue; + } + return new \Mike42\Escpos\ImagickEscposImage($filename, $allowOptimisations); + } elseif ($implemetnation === 'gd') { + if (!self::isGdLoaded()) { + // Skip option if GD not loaded + continue; + } + return new \Mike42\Escpos\GdEscposImage($filename, $allowOptimisations); + } elseif ($implemetnation === 'native') { + if (!in_array($ext, ['wbmp', 'pbm', 'bmp'])) { + // Pure PHP is fastest way to generate raster output from wbmp and pbm formats. + continue; + } + return new \Mike42\Escpos\NativeEscposImage($filename, $allowOptimisations); + } else { + // Something else on the 'preferred' list. + throw new InvalidArgumentException("'$implemetnation' is not a known EscposImage implementation"); + } + } + throw new InvalidArgumentException("No suitable EscposImage implementation found for '$filename'."); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/GdEscposImage.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/GdEscposImage.php new file mode 100644 index 00000000000..32edf76ef7c --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/GdEscposImage.php @@ -0,0 +1,86 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos; + +use Mike42\Escpos\EscposImage; +use Exception; + +/** + * Implementation of EscposImage using the GD PHP plugin. + */ +class GdEscposImage extends EscposImage +{ + /** + * Load an image from disk, into memory, using GD. + * + * @param string|null $filename The filename to load from + * @throws Exception if the image format is not supported, + * or the file cannot be opened. + */ + protected function loadImageData($filename = null) + { + if ($filename === null) { + /* Set to blank image */ + return parent::loadImageData($filename); + } + + $ext = pathinfo($filename, PATHINFO_EXTENSION); + switch ($ext) { + case "png": + $im = @imagecreatefrompng($filename); + break; + case "jpg": + $im = @imagecreatefromjpeg($filename); + break; + case "gif": + $im = @imagecreatefromgif($filename); + break; + default: + throw new Exception("Image format not supported in GD"); + } + $this -> readImageFromGdResource($im); + } + + /** + * Load actual image pixels from GD resource. + * + * @param resource $im GD resource to use + * @throws Exception Where the image can't be read. + */ + public function readImageFromGdResource($im) + { + if (!is_resource($im)) { + throw new Exception("Failed to load image."); + } elseif (!EscposImage::isGdLoaded()) { + throw new Exception(__FUNCTION__ . " requires 'gd' extension."); + } + /* Make a string of 1's and 0's */ + $imgHeight = imagesy($im); + $imgWidth = imagesx($im); + $imgData = str_repeat("\0", $imgHeight * $imgWidth); + for ($y = 0; $y < $imgHeight; $y++) { + for ($x = 0; $x < $imgWidth; $x++) { + /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */ + $cols = imagecolorsforindex($im, imagecolorat($im, $x, $y)); + // 1 for white, 0 for black, ignoring transparency + $greyness = (int)(($cols['red'] + $cols['green'] + $cols['blue']) / 3) >> 7; + // 1 for black, 0 for white, taking into account transparency + $black = (1 - $greyness) >> ($cols['alpha'] >> 6); + $imgData[$y * $imgWidth + $x] = $black; + } + } + $this -> setImgWidth($imgWidth); + $this -> setImgHeight($imgHeight); + $this -> setImgData($imgData); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/ImagickEscposImage.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/ImagickEscposImage.php new file mode 100644 index 00000000000..13851a4d034 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/ImagickEscposImage.php @@ -0,0 +1,273 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos; + +use Exception; +use Imagick; +use Mike42\Escpos\EscposImage; + +/** + * Implementation of EscposImage using the Imagick PHP plugin. + */ +class ImagickEscposImage extends EscposImage +{ + /** + * Load actual image pixels from Imagick object + * + * @param Imagick $im Image to load from + */ + public function readImageFromImagick(\Imagick $im) + { + /* Strip transparency */ + $im = self::alphaRemove($im); + /* Threshold */ + $im -> setImageType(\Imagick::IMGTYPE_TRUECOLOR); // Remove transparency (good for PDF's) + $max = $im->getQuantumRange(); + $max = $max["quantumRangeLong"]; + $im -> thresholdImage(0.5 * $max); + /* Make a string of 1's and 0's */ + $imgHeight = $im -> getimageheight(); + $imgWidth = $im -> getimagewidth(); + $imgData = str_repeat("\0", $imgHeight * $imgWidth); + for ($y = 0; $y < $imgHeight; $y++) { + for ($x = 0; $x < $imgWidth; $x++) { + /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */ + $cols = $im -> getImagePixelColor($x, $y); + $cols = $cols -> getcolor(); + $greyness = (int)(($cols['r'] + $cols['g'] + $cols['b']) / 3) >> 7; // 1 for white, 0 for black + $imgData[$y * $imgWidth + $x] = (1 - $greyness); // 1 for black, 0 for white + } + } + $this -> setImgWidth($imgWidth); + $this -> setImgHeight($imgHeight); + $this -> setImgData($imgData); + } + + /** + * @param string $filename + * Filename to load from + * @param boolean $highDensityVertical + * True for high density output (24px lines), false for regular density (8px) + * @return string[]|NULL + * Column format data as array, or NULL if optimised renderer isn't + * available in this implementation. + */ + protected function getColumnFormatFromFile($filename = null, $highDensityVertical = true) + { + if ($filename === null) { + return null; + } + $im = $this -> getImageFromFile($filename); + $this -> setImgWidth($im -> getimagewidth()); + $this -> setImgHeight($im -> getimageheight()); + + /* Strip transparency */ + $im = self::alphaRemove($im); + $im -> setformat('pbm'); + $im -> getimageblob(); // Forces 1-bit rendering now, so that subsequent operations are faster + $im -> rotateImage('#fff', 90.0); + $im -> flopImage(); + $lineHeight = $highDensityVertical ? 3 : 1; + $blobs = $this -> getColumnFormatFromImage($im, $lineHeight * 8); + return $blobs; + } + + /** + * Load an image from disk, into memory, using Imagick. + * + * @param string|null $filename The filename to load from + * @throws Exception if the image format is not supported, + * or the file cannot be opened. + */ + protected function loadImageData($filename = null) + { + if ($filename === null) { + /* Set to blank image */ + return parent::loadImageData($filename); + } + + $im = $this -> getImageFromFile($filename); + $this -> readImageFromImagick($im); + } + + /** + * Return data in column format as array of slices. + * Operates recursively to save cloning larger image many times. + * + * @param Imagick $im + * @param int $lineHeight + * Height of printed line in dots. 8 or 24. + * @return string[] + */ + private function getColumnFormatFromImage(Imagick $im, $lineHeight) + { + $imgWidth = $im->getimagewidth(); + if ($imgWidth == $lineHeight) { + // Return glob of this panel + return [$this -> getRasterBlobFromImage($im)]; + } elseif ($imgWidth > $lineHeight) { + // Calculations + $slicesLeft = ceil($imgWidth / $lineHeight / 2); + $widthLeft = $slicesLeft * $lineHeight; + $widthRight = $imgWidth - $widthLeft; + // Slice up (left) + $left = clone $im; + $left -> extentimage($widthLeft, $left -> getimageheight(), 0, 0); + // Slice up (right - ensure width is divisible by lineHeight also) + $right = clone $im; + $widthRightRounded = $widthRight < $lineHeight ? $lineHeight : $widthRight; + $right -> extentimage($widthRightRounded, $right -> getimageheight(), $widthLeft, 0); + // Recurse + $leftBlobs = $this -> getColumnFormatFromImage($left, $lineHeight); + $rightBlobs = $this -> getColumnFormatFromImage($right, $lineHeight); + return array_merge($leftBlobs, $rightBlobs); + } else { + /* Image is smaller than full width */ + $im -> extentimage($lineHeight, $im -> getimageheight(), 0, 0); + return [$this -> getRasterBlobFromImage($im)]; + } + } + + /** + * Load Imagick file from image + * + * @param string $filename Filename to load + * @throws Exception Wrapped Imagick error if image can't be loaded + * @return Imagick Loaded image + */ + private function getImageFromFile($filename) + { + $im = new Imagick(); + try { + $im->setResourceLimit(6, 1); // Prevent libgomp1 segfaults, grumble grumble. + $im -> readimage($filename); + } catch (\ImagickException $e) { + /* Re-throw as normal exception */ + throw new Exception($e); + } + return $im; + } + + /** + * Pull blob (from PBM-formatted image only!), and spit out a blob or raster data. + * Will crash out on anything which is not a valid 'P4' file. + * + * @param Imagick $im Image which has format PBM. + * @return string raster data from the image + */ + private function getRasterBlobFromImage(Imagick $im) + { + $blob = $im -> getimageblob(); + /* Find where header ends */ + $i = strpos($blob, "P4\n") + 2; + while ($blob[$i + 1] == '#') { + $i = strpos($blob, "\n", $i + 1); + } + $i = strpos($blob, "\n", $i + 1); + /* Return raster data only */ + $subBlob = substr($blob, $i + 1); + return $subBlob; + } + + /** + * @param string $filename + * Filename to load from + * @return string|NULL + * Raster format data, or NULL if no optimised renderer is available in + * this implementation. + */ + protected function getRasterFormatFromFile($filename = null) + { + if ($filename === null) { + return null; + } + $im = $this -> getImageFromFile($filename); + $this -> setImgWidth($im -> getimagewidth()); + $this -> setImgHeight($im -> getimageheight()); + /* Convert to PBM and extract raster portion */ + $im = self::alphaRemove($im); + $im -> setFormat('pbm'); + return $this -> getRasterBlobFromImage($im); + } + + /** + * Load a PDF for use on the printer + * + * @param string $pdfFile + * The file to load + * @param int $pageWidth + * The width, in pixels, of the printer's output. The first page of the + * PDF will be scaled to approximately fit in this area. + * @throws Exception Where Imagick is not loaded, or where a missing file + * or invalid page number is requested. + * @return array Array of images, retrieved from the PDF file. + */ + public static function loadPdf($pdfFile, $pageWidth = 550) + { + if (!EscposImage::isImagickLoaded()) { + throw new Exception(__FUNCTION__ . " requires imagick extension."); + } + /* + * Load first page at very low density (resolution), to figure out what + * density to use to achieve $pageWidth + */ + try { + $image = new \Imagick(); + $testRes = 2; // Test resolution + $image -> setresolution($testRes, $testRes); + /* Load document just to measure geometry */ + $image -> readimage($pdfFile); + $geo = $image -> getimagegeometry(); + $image -> destroy(); + $width = $geo['width']; + $newRes = $pageWidth / $width * $testRes; + /* Load entire document in */ + $image -> setresolution($newRes, $newRes); + $image -> readImage($pdfFile); + $pages = $image -> getNumberImages(); + /* Convert images to Escpos objects */ + $ret = []; + for ($i = 0; $i < $pages; $i++) { + $image -> setIteratorIndex($i); + $ep = new ImagickEscposImage(); + $ep -> readImageFromImagick($image); + $ret[] = $ep; + } + return $ret; + } catch (\ImagickException $e) { + /* Wrap in normal exception, so that classes which call this do not + * themselves require imagick as a dependency. */ + throw new Exception($e); + } + } + + /** + * Paste image over white canvas to stip transparency reliably on different + * versions of ImageMagick. + * + * There are other methods for this: + * - flattenImages() is deprecated + * - setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE) is not available on + * ImageMagick < 6.8. + * + * @param Imagick $im Image to flatten + * @return Imagick Flattened image + */ + private static function alphaRemove(Imagick $im) + { + $flat = new \Imagick(); + $flat -> newImage($im -> getimagewidth(), $im -> getimageheight(), "white", $im -> getimageformat()); + $flat -> compositeimage($im, \Imagick::COMPOSITE_OVER, 0, 0); + return $flat; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/NativeEscposImage.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/NativeEscposImage.php new file mode 100644 index 00000000000..e85c942b2c3 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/NativeEscposImage.php @@ -0,0 +1,24 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos; + +use Mike42\Escpos\EscposImage; + +/** + * Implementation of EscposImage using only native PHP. + * TODO: wbmp, pbm, bmp files. + */ +class NativeEscposImage extends EscposImage +{ + +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/EscposPrintBuffer.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/EscposPrintBuffer.php new file mode 100644 index 00000000000..4e04176521e --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/EscposPrintBuffer.php @@ -0,0 +1,300 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintBuffers; + +use LogicException; +use Mike42\Escpos\Printer; + +/** + * This class manages newlines and character encoding for the target printer, and + * can be interchanged for an image-bassed buffer (ImagePrintBuffer) if you can't + * get it operating properly on your machine. + */ +class EscposPrintBuffer implements PrintBuffer +{ + /** + * True to cache output as .z, false to leave un-compressed (useful for debugging) + */ + const COMPRESS_CACHE = true; + + /** + * The input encoding of the buffer. + */ + const INPUT_ENCODING = "UTF-8"; + + /** + * Un-recognised characters will be replaced with this. + */ + const REPLACEMENT_CHAR = "?"; + + /** + * @var array $available + * This array Maps ESC/POS character tables to names iconv encodings + */ + private $available = null; + + /** + * @var array $encode + * Maps of UTF-8 to code-pages + */ + private $encode = null; + + /** + * @var Printer|null $printer + * Printer for output + */ + private $printer; + + /** + * Empty print buffer. + */ + public function __construct() + { + $this -> printer = null; + } + + public function flush() + { + if ($this -> printer == null) { + throw new LogicException("Not attached to a printer."); + } + // TODO Not yet implemented for this buffer: This indicates that the printer needs the current line to be ended. + } + + public function getPrinter() + { + return $this -> printer; + } + + public function setPrinter(Printer $printer = null) + { + $this -> printer = $printer; + if ($printer != null) { + $this -> loadAvailableCharacters(); + } + } + + public function writeText($text) + { + if ($this -> printer == null) { + throw new LogicException("Not attached to a printer."); + } + if ($text == null) { + return; + } + if (!mb_detect_encoding($text, self::INPUT_ENCODING, true)) { + // Assume that the user has already put non-UTF8 into the target encoding. + return $this -> writeTextRaw($text); + } + $i = 0; + $j = 0; + $len = mb_strlen($text, self::INPUT_ENCODING); + while ($i < $len) { + $matching = true; + if (($encoding = $this -> identifyText(mb_substr($text, $i, 1, self::INPUT_ENCODING))) === false) { + // Un-encodeable text + $encoding = $this -> getPrinter() -> getCharacterTable(); + } + $i++; + $j = 1; + do { + $char = mb_substr($text, $i, 1, self::INPUT_ENCODING); + $matching = !isset($this -> available[$char]) || isset($this -> available[$char][$encoding]); + if ($matching) { + $i++; + $j++; + } + } while ($matching && $i < $len); + $this -> writeTextUsingEncoding(mb_substr($text, $i - $j, $j, self::INPUT_ENCODING), $encoding); + } + } + + public function writeTextRaw($text) + { + if ($this -> printer == null) { + throw new LogicException("Not attached to a printer."); + } + if (strlen($text) == 0) { + return; + } + // Pass only printable characters + $j = 0; + $l = strlen($text); + $outp = str_repeat(self::REPLACEMENT_CHAR, $l); + for ($i = 0; $i < $l; $i++) { + $c = substr($text, $i, 1); + if ($c == "\r") { + /* Skip past Windows line endings (raw usage). */ + continue; + } else if (self::asciiCheck($c, true)) { + $outp[$j] = $c; + } + $j++; + } + $this -> write(substr($outp, 0, $j)); + } + + /** + * Return an encoding which we can start to use for outputting this text. + * Later parts of the text need not be included in the returned code page. + * + * @param string $text Input text to check. + * @return boolean|integer Code page number, or FALSE if the text is not + * printable on any supported encoding. + */ + private function identifyText($text) + { + // TODO Replace this with an algorithm to choose the encoding which will + // encode the farthest into the string, to minimise code page changes. + $char = mb_substr($text, 0, 1, self::INPUT_ENCODING); + if (!isset($this -> available[$char])) { + /* Character not available anywhere */ + return false; + } + foreach ($this -> available[$char] as $encodingNo => $true) { + /* Return first code-page where it is available */ + return $encodingNo; + } + return false; + } + + /** + * Based on the printer's connector, compute (or load a cached copy of) maps + * of UTF character to unicode characters for later use. + */ + private function loadAvailableCharacters() + { + $profile = $this -> printer -> getPrinterCapabilityProfile(); + $supportedCodePages = $profile -> getCodePages(); + $profileName = $profile -> getId(); + $cacheFile = dirname(__FILE__) . "/cache/Characters-" . $profileName . ".ser" . + (self::COMPRESS_CACHE ? ".z" : ""); + $cacheKey = $profile -> getCodePageCacheKey(); + /* Check for pre-generated file */ + if (file_exists($cacheFile)) { + $cacheData = file_get_contents($cacheFile); + if (self::COMPRESS_CACHE) { + $cacheData = gzuncompress($cacheData); + } + if ($cacheData) { + $dataArray = unserialize($cacheData); + if (isset($dataArray["key"]) && isset($dataArray["available"]) && + isset($dataArray["encode"]) && $dataArray["key"] == $cacheKey) { + $this -> available = $dataArray["available"]; + $this -> encode = $dataArray["encode"]; + return; + } + } + } + + /* Generate conversion tables */ + $encode = []; + $available = []; + + foreach ($supportedCodePages as $num => $codePage) { + $encode[$num] = []; + if (!$codePage -> isEncodable()) { + continue; + } + $map = $codePage -> getData(); + for ($char = 128; $char <= 255; $char++) { + $utf8 = mb_substr($map, $char - 128, 1, self::INPUT_ENCODING); + if ($utf8 == " ") { // Skip placeholders + continue; + } + if (!isset($available[$utf8])) { + $available[$utf8] = []; + } + $available[$utf8][$num] = true; + $encode[$num][$utf8] = chr($char); + } + } + + /* Use generated data */ + $dataArray = ["available" => $available, "encode" => $encode, "key" => $cacheKey]; + $this -> available = $dataArray["available"]; + $this -> encode = $dataArray["encode"]; + $cacheData = serialize($dataArray); + if (self::COMPRESS_CACHE) { + $cacheData = gzcompress($cacheData); + } + /* Attempt to cache, but don't worry if we can't */ + @file_put_contents($cacheFile, $cacheData); + } + + /** + * Encode a block of text using the specified map, and write it to the printer. + * + * @param string $text Text to print, UTF-8 format. + * @param integer $encodingNo Encoding number to use- assumed to exist. + */ + private function writeTextUsingEncoding($text, $encodingNo) + { + $encodeMap = $this -> encode[$encodingNo]; + $len = mb_strlen($text, self::INPUT_ENCODING); + $rawText = str_repeat(self::REPLACEMENT_CHAR, $len); + $j = 0; + for ($i = 0; $i < $len; $i++) { + $char = mb_substr($text, $i, 1, self::INPUT_ENCODING); + if (isset($encodeMap[$char])) { + $rawText[$j] = $encodeMap[$char]; + } elseif (self::asciiCheck($char)) { + $rawText[$j] = $char; + } elseif ($char === "\r") { + /* Skip past Windows line endings (UTF-8 usage) */ + continue; + } + $j++; + } + if ($this -> printer -> getCharacterTable() != $encodingNo) { + $this -> printer -> selectCharacterTable($encodingNo); + } + $this -> writeTextRaw(substr($rawText, 0, $j)); + } + + /** + * Write data to the underlying printer. + * + * @param string $data + */ + private function write($data) + { + $this -> printer -> getPrintConnector() -> write($data); + } + + /** + * Return true if a character is an ASCII printable character. + * + * @param string $char Character to check + * @param boolean $extended True to allow 128-256 values also (excluded by default) + * @return boolean True if the character is printable, false if it is not. + */ + private static function asciiCheck($char, $extended = false) + { + if (strlen($char) != 1) { + // Multi-byte string + return false; + } + $num = ord($char); + if ($num > 31 && $num < 127) { // Printable + return true; + } + if ($num == 10) { // New-line (printer will take these) + return true; + } + if ($extended && $num > 127) { + return true; + } + return false; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/ImagePrintBuffer.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/ImagePrintBuffer.php new file mode 100644 index 00000000000..d4fdefaf130 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/ImagePrintBuffer.php @@ -0,0 +1,135 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintBuffers; + +use Exception; +use LogicException; +use Mike42\Escpos\Printer; +use Mike42\Escpos\EscposImage; +use Mike42\Escpos\ImagickEscposImage; + +/** + * This class renders text to small images on-the-fly. It attempts to mimic the + * behaviour of text output, whilst supporting any fonts & character encodings + * which your system can handle. This class currently requires Imagick. + */ +class ImagePrintBuffer implements PrintBuffer +{ + private $printer; + + /** + * @var string|null font to use + */ + private $font; + + private $fontSize; + + public function __construct() + { + if (!EscposImage::isImagickLoaded()) { + throw new Exception("ImagePrintBuffer requires the imagick extension"); + } + $this -> font = null; + $this -> fontSize = 24; + } + + public function flush() + { + if ($this -> printer == null) { + throw new LogicException("Not attached to a printer."); + } + } + + public function getPrinter() + { + return $this -> printer; + } + + public function setPrinter(Printer $printer = null) + { + $this -> printer = $printer; + } + + public function writeText($text) + { + if ($this -> printer == null) { + throw new LogicException("Not attached to a printer."); + } + if ($text == null) { + return; + } + $text = trim($text, "\n"); + /* Create Imagick objects */ + $image = new \Imagick(); + $draw = new \ImagickDraw(); + $color = new \ImagickPixel('#000000'); + $background = new \ImagickPixel('white'); + + /* Create annotation */ + if ($this->font !== null) { + // Allow fallback on defaults as necessary + $draw->setFont($this->font); + } + /* In Arial, size 21 looks good as a substitute for FONT_B, 24 for FONT_A */ + $draw -> setFontSize($this -> fontSize); + $draw -> setFillColor($color); + $draw -> setStrokeAntialias(true); + $draw -> setTextAntialias(true); + $metrics = $image -> queryFontMetrics($draw, $text); + $draw -> annotation(0, $metrics['ascender'], $text); + + /* Create image & draw annotation on it */ + $image -> newImage($metrics['textWidth'], $metrics['textHeight'], $background); + $image -> setImageFormat('png'); + $image -> drawImage($draw); + // debugging if you want to view the images yourself + //$image -> writeImage("test.png"); + + /* Save image */ + $escposImage = new ImagickEscposImage(); + $escposImage -> readImageFromImagick($image); + $size = Printer::IMG_DEFAULT; + $this -> printer -> bitImage($escposImage, $size); + } + + public function writeTextRaw($text) + { + if ($this -> printer == null) { + throw new LogicException("Not attached to a printer."); + } + $this -> printer -> getPrintConnector() -> write($text); + } + + /** + * Set path on disk to TTF font that will be used to render text to image, + * or 'null' to use a default. + * + * ImageMagick will also accept a font name, but this will not port as well + * between systems. + * + * @param string $font + * Font name or a filename + */ + public function setFont($font) + { + $this->font = $font; + } + + /** + * Numeric font size for rendering text to image + */ + public function setFontSize($fontSize) + { + $this->fontSize = $fontSize; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/PrintBuffer.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/PrintBuffer.php new file mode 100644 index 00000000000..fcad6e9e0bb --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/PrintBuffer.php @@ -0,0 +1,63 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintBuffers; + +use Mike42\Escpos\Printer; + +/** + * Print buffers manage newlines and character encoding for the target printer. + * They are used as a swappable component: text or image-based output. + * + * - Text output (EscposPrintBuffer) is the fast default, and is recommended for + * most people, as the text output can be more directly manipulated by ESC/POS + * commands. + * - Image output (ImagePrintBuffer) is designed to accept more encodings than the + * physical printer supports, by rendering the text to small images on-the-fly. + * This takes a lot more CPU than sending text, but is necessary for some users. + * - If your use case fits outside these, then a further speed/flexibility trade-off + * can be made by printing directly from generated HTML or PDF. + */ +interface PrintBuffer +{ + /** + * Cause the buffer to send any partial input and wait on a newline. + * If the printer is already on a new line, this does nothing. + */ + public function flush(); + + /** + * Used by Escpos to check if a printer is set. + */ + public function getPrinter(); + + /** + * Used by Escpos to hook up one-to-one link between buffers and printers. + * + * @param Printer|null $printer New printer + */ + public function setPrinter(Printer $printer = null); + + /** + * Accept UTF-8 text for printing. + * + * @param string $text Text to print + */ + public function writeText($text); + + /** + * Accept 8-bit text in the current encoding and add it to the buffer. + * + * @param string $text Text to print, already the target encoding. + */ + public function writeTextRaw($text); +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-OCD-300.ser.z b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-OCD-300.ser.z new file mode 100644 index 00000000000..c0b9adb9d97 Binary files /dev/null and b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-OCD-300.ser.z differ diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-P822D.ser.z b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-P822D.ser.z new file mode 100644 index 00000000000..800630b6d4b Binary files /dev/null and b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-P822D.ser.z differ diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-POS-5890.ser.z b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-POS-5890.ser.z new file mode 100644 index 00000000000..948e135c9b9 Binary files /dev/null and b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-POS-5890.ser.z differ diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-SP2000.ser.z b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-SP2000.ser.z new file mode 100644 index 00000000000..c5ac146d0b5 Binary files /dev/null and b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-SP2000.ser.z differ diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-TEP-200M.ser.z b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-TEP-200M.ser.z new file mode 100644 index 00000000000..3e6b190290e Binary files /dev/null and b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-TEP-200M.ser.z differ diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-default.ser.z b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-default.ser.z new file mode 100644 index 00000000000..3e6b190290e Binary files /dev/null and b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-default.ser.z differ diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-simple.ser.z b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-simple.ser.z new file mode 100644 index 00000000000..ca1c7bcab3a Binary files /dev/null and b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/cache/Characters-simple.ser.z differ diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/ApiPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/ApiPrintConnector.php new file mode 100644 index 00000000000..893a4858c8e --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/ApiPrintConnector.php @@ -0,0 +1,102 @@ +httpClient = new Client(['base_uri' => $host]); + $this->printerId = $printerId; + $this->apiToken = $apiToken; + + $this->stream = ''; + } + + /** + * Print connectors should cause a NOTICE if they are deconstructed + * when they have not been finalized. + */ + public function __destruct() + { + if (! empty($this->stream)) { + trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); + } + } + + /** + * Finish using this print connector (close file, socket, send + * accumulated output, etc). + */ + public function finalize() + { + /** @var Request $request */ + $request = $this->httpClient->post( + 'printers/'.$this->printerId.'/print?api_token='.$this->apiToken, + null, + $this->stream + ); + + /** @var Response $response */ + $response = $request->send(); + + if (! $response->isSuccessful()) { + throw new Exception( + sprintf('Failed to print. API returned "%s: %s"', $response->getStatusCode(), $response->getReasonPhrase()) + ); + } + + $this->stream = ''; + } + + /** + * Read data from the printer. + * + * @param string $len Length of data to read. + * @return string Data read from the printer. + */ + public function read($len) + { + return $this->stream; + } + + /** + * Write data to the print connector. + * + * @param string $data The data to write + */ + public function write($data) + { + $this->stream .= $data; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/CupsPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/CupsPrintConnector.php new file mode 100644 index 00000000000..497887f37cd --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/CupsPrintConnector.php @@ -0,0 +1,182 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +use Exception; +use BadMethodCallException; + +/** + * Print connector that passes print data to CUPS print commands. + * Your printer mut be installed on the local CUPS instance to use this connector. + */ +class CupsPrintConnector implements PrintConnector +{ + + /** + * @var array $buffer + * Buffer of accumilated data. + */ + private $buffer; + + /** + * + * @var string $printerName + * The name of the target printer. + */ + private $printerName; + + /** + * Construct new CUPS print connector. + * + * @param string $dest + * The CUPS printer name to print to. This must be loaded using a raw driver. + * @throws BadMethodCallException + */ + public function __construct($dest) + { + $valid = $this->getLocalPrinters(); + if (count($valid) == 0) { + throw new BadMethodCallException("You do not have any printers installed on " . + "this system via CUPS. Check 'lpr -a'."); + } + + if (array_search($dest, $valid, true) === false) { + throw new BadMethodCallException("'$dest' is not a printer on this system. " . + "Printers are: [" . implode(", ", $valid) . "]"); + } + $this->buffer = array (); + $this->printerName = $dest; + } + + /** + * Cause a NOTICE if deconstructed before the job was printed. + */ + public function __destruct() + { + if ($this->buffer !== null) { + trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); + } + } + + /** + * Send job to printer. + */ + public function finalize() + { + $data = implode($this->buffer); + $this->buffer = null; + + // Build command to work on data + $tmpfname = tempnam(sys_get_temp_dir(), 'print-'); + file_put_contents($tmpfname, $data); + $cmd = sprintf( + "lp -d %s %s", + escapeshellarg($this->printerName), + escapeshellarg($tmpfname) + ); + try { + $this->getCmdOutput($cmd); + } catch (Exception $e) { + unlink($tmpfname); + throw $e; + } + unlink($tmpfname); + } + + /** + * Run a command and throw an exception if it fails, or return the output if it works. + * (Basically exec() with good error handling) + * + * @param string $cmd + * Command to run + */ + protected function getCmdOutput($cmd) + { + $descriptors = array ( + 1 => array ( + "pipe", + "w" + ), + 2 => array ( + "pipe", + "w" + ) + ); + $process = proc_open($cmd, $descriptors, $fd); + if (! is_resource($process)) { + throw new Exception("Command '$cmd' failed to start."); + } + /* Read stdout */ + $outputStr = stream_get_contents($fd [1]); + fclose($fd [1]); + /* Read stderr */ + $errorStr = stream_get_contents($fd [2]); + fclose($fd [2]); + /* Finish up */ + $retval = proc_close($process); + if ($retval != 0) { + throw new Exception("Command $cmd failed: $errorStr"); + } + return $outputStr; + } + + /** + * Read data from the printer. + * + * @param string $len Length of data to read. + * @return Data read from the printer, or false where reading is not possible. + */ + public function read($len) + { + return false; + } + + /** + * @param string $data + */ + public function write($data) + { + $this->buffer [] = $data; + } + + /** + * Load a list of CUPS printers. + * + * @return array A list of printer names installed on this system. Any item + * on this list is valid for constructing a printer. + */ + protected function getLocalPrinters() + { + $outpStr = $this->getCmdOutput("lpstat -a"); + $outpLines = explode("\n", trim($outpStr)); + foreach ($outpLines as $line) { + $ret [] = $this->chopLpstatLine($line); + } + return $ret; + } + + /** + * Get the item before the first space in a string + * + * @param string $line + * @return string the string, up to the first space, or the whole string if it contains no spaces. + */ + private function chopLpstatLine($line) + { + if (($pos = strpos($line, " ")) === false) { + return $line; + } else { + return substr($line, 0, $pos); + } + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/DummyPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/DummyPrintConnector.php new file mode 100644 index 00000000000..b376cd87d83 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/DummyPrintConnector.php @@ -0,0 +1,78 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +/** + * Print connector that writes to nowhere, but allows the user to retrieve the + * buffered data. Used for testing. + */ +final class DummyPrintConnector implements PrintConnector +{ + /** + * @var array $buffer + * Buffer of accumilated data. + */ + private $buffer; + + /** + * @var string data which the printer will provide on next read + */ + private $readData; + + /** + * Create new print connector + */ + public function __construct() + { + $this -> buffer = []; + } + + public function clear() + { + $this -> buffer = []; + } + + public function __destruct() + { + if ($this -> buffer !== null) { + trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); + } + } + + public function finalize() + { + $this -> buffer = null; + } + + /** + * @return string Get the accumulated data that has been sent to this buffer. + */ + public function getData() + { + return implode($this -> buffer); + } + + /** + * {@inheritDoc} + * @see PrintConnector::read() + */ + public function read($len) + { + return $len >= strlen($this -> readData) ? $this -> readData : substr($this -> readData, 0, $len); + } + + public function write($data) + { + $this -> buffer[] = $data; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/FilePrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/FilePrintConnector.php new file mode 100644 index 00000000000..ca44ad0ad7e --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/FilePrintConnector.php @@ -0,0 +1,82 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +use Exception; + +/** + * PrintConnector for passing print data to a file. + */ +class FilePrintConnector implements PrintConnector +{ + /** + * @var resource $fp + * The file pointer to send data to. + */ + protected $fp; + + /** + * Construct new connector, given a filename + * + * @param string $filename + */ + public function __construct($filename) + { + $this -> fp = fopen($filename, "wb+"); + if ($this -> fp === false) { + throw new Exception("Cannot initialise FilePrintConnector."); + } + } + + public function __destruct() + { + if ($this -> fp !== false) { + trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); + } + } + + /** + * Close file pointer + */ + public function finalize() + { + if ($this -> fp !== false) { + fclose($this -> fp); + $this -> fp = false; + } + } + + /* (non-PHPdoc) + * @see PrintConnector::read() + */ + public function read($len) + { + if ($this -> fp === false) { + throw new Exception("PrintConnector has been closed, cannot read input."); + } + return fread($this -> fp, $len); + } + + /** + * Write data to the file + * + * @param string $data + */ + public function write($data) + { + if ($this -> fp === false) { + throw new Exception("PrintConnector has been closed, cannot send output."); + } + fwrite($this -> fp, $data); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/NetworkPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/NetworkPrintConnector.php new file mode 100644 index 00000000000..10aa6640a01 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/NetworkPrintConnector.php @@ -0,0 +1,41 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +use Exception; + +/** + * PrintConnector for directly opening a network socket to a printer to send it commands. + */ +class NetworkPrintConnector extends FilePrintConnector +{ + /** + * Construct a new NetworkPrintConnector + * + * @param string $ip IP address or hostname to use. + * @param string $port The port number to connect on. + * @param string $timeout The connection timeout, in seconds. + * @throws Exception Where the socket cannot be opened. + */ + public function __construct($ip, $port = "9100", $timeout = false) + { + // Default to 60 if default_socket_timeout isn't defined in the ini + $defaultSocketTimeout = ini_get("default_socket_timeout") ?: 60; + $timeout = $timeout ?: $defaultSocketTimeout; + + $this -> fp = @fsockopen($ip, $port, $errno, $errstr, $timeout); + if ($this -> fp === false) { + throw new Exception("Cannot initialise NetworkPrintConnector: " . $errstr); + } + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/PrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/PrintConnector.php new file mode 100644 index 00000000000..4198dbc133b --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/PrintConnector.php @@ -0,0 +1,47 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +/** + * Interface passed to Escpos class for receiving print data. Print connectors + * are responsible for transporting this to the actual printer. + */ +interface PrintConnector +{ + /** + * Print connectors should cause a NOTICE if they are deconstructed + * when they have not been finalized. + */ + public function __destruct(); + + /** + * Finish using this print connector (close file, socket, send + * accumulated output, etc). + */ + public function finalize(); + + /** + * Read data from the printer. + * + * @param string $len Length of data to read. + * @return Data read from the printer, or false where reading is not possible. + */ + public function read($len); + + /** + * Write data to the print connector. + * + * @param string $data The data to write + */ + public function write($data); +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/RawbtPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/RawbtPrintConnector.php new file mode 100644 index 00000000000..622f7263d9e --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/RawbtPrintConnector.php @@ -0,0 +1,81 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +/** + * Print connector for android RawBT application + * https://play.google.com/store/apps/details?id=ru.a402d.rawbtprinter + */ +final class RawbtPrintConnector implements PrintConnector +{ + /** + * @var array $buffer + * Buffer of accumilated data. + */ + private $buffer; + + /** + * @var string data which the printer will provide on next read + */ + private $readData; + + /** + * Create new print connector + */ + public function __construct() + { + ob_start(); + $this->buffer = []; + } + + public function clear() + { + $this->buffer = []; + } + + public function __destruct() + { + if ($this->buffer !== null) { + trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); + } + } + + public function finalize() + { + ob_end_clean(); + echo "intent:base64," . base64_encode($this->getData()) . "#Intent;scheme=rawbt;package=ru.a402d.rawbtprinter;end;"; + $this->buffer = null; + } + + /** + * @return string Get the accumulated data that has been sent to this buffer. + */ + public function getData() + { + return implode($this->buffer); + } + + /** + * {@inheritDoc} + * @see PrintConnector::read() + */ + public function read($len) + { + return $len >= strlen($this->readData) ? $this->readData : substr($this->readData, 0, $len); + } + + public function write($data) + { + $this->buffer[] = $data; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/UriPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/UriPrintConnector.php new file mode 100644 index 00000000000..c51d2bf3350 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/UriPrintConnector.php @@ -0,0 +1,44 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +class UriPrintConnector +{ + const URI_ASSEMBLER_PATTERN = "~^(.+):/{2}(.+?)(?::(\d{1,4}))?$~"; + + public static function get($uri) + { + // Parse URI + $is_uri = preg_match(self::URI_ASSEMBLER_PATTERN, $uri, $uri_parts); + if ($is_uri !== 1) { + throw new \InvalidArgumentException("Malformed connector URI: {$uri}"); + } + // Extract parts + $protocol = $uri_parts[1]; + $printer = $uri_parts[2]; + $port = isset($uri_parts[3]) ? $uri_parts[3] : 9100; + // Initialise the most applicable print connector + switch ($protocol) { + case "file": + return new FilePrintConnector($printer); + case "tcp": + return new NetworkPrintConnector($printer, $port); + case "smb": + return new WindowsPrintConnector($uri); + } + // Fallthrough + throw new \InvalidArgumentException("URI sheme is not supported: {$protocol}://"); + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/WindowsPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/WindowsPrintConnector.php new file mode 100644 index 00000000000..9bab87cddb8 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/WindowsPrintConnector.php @@ -0,0 +1,391 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos\PrintConnectors; + +use Exception; +use BadMethodCallException; + +/** + * Connector for sending print jobs to + * - local ports on windows (COM1, LPT1, etc) + * - shared (SMB) printers from any platform (smb://server/foo) + * For USB printers or other ports, the trick is to share the printer with a + * generic text driver, then connect to the shared printer locally. + */ +class WindowsPrintConnector implements PrintConnector +{ + /** + * @var array $buffer + * Accumulated lines of output for later use. + */ + private $buffer; + + /** + * @var string $hostname + * The hostname of the target machine, or null if this is a local connection. + */ + private $hostname; + + /** + * @var boolean $isLocal + * True if a port is being used directly (must be Windows), false if network shares will be used. + */ + private $isLocal; + + /** + * @var int $platform + * Platform we're running on, for selecting different commands. See PLATFORM_* constants. + */ + private $platform; + + /** + * @var string $printerName + * The name of the target printer (eg "Foo Printer") or port ("COM1", "LPT1"). + */ + private $printerName; + + /** + * @var string $userName + * Login name for network printer, or null if not using authentication. + */ + private $userName; + + /** + * @var string $userPassword + * Password for network printer, or null if no password is required. + */ + private $userPassword; + + /** + * @var string $workgroup + * Workgroup that the printer is located on + */ + private $workgroup; + + /** + * Represents Linux + */ + const PLATFORM_LINUX = 0; + + /** + * Represents Mac + */ + const PLATFORM_MAC = 1; + + /** + * Represents Windows + */ + const PLATFORM_WIN = 2; + + /** + * Valid local ports. + */ + const REGEX_LOCAL = "/^(LPT\d|COM\d)$/"; + + /** + * Valid printer name. + */ + const REGEX_PRINTERNAME = "/^[\d\w-]+(\s[\d\w-]+)*$/"; + + /** + * Valid smb:// URI containing hostname & printer with optional user & optional password only. + */ + const REGEX_SMB = "/^smb:\/\/([\s\d\w-]+(:[\s\d\w+-]+)?@)?([\d\w-]+\.)*[\d\w-]+\/([\d\w-]+\/)?[\d\w-]+(\s[\d\w-]+)*$/"; + + /** + * @param string $dest + * @throws BadMethodCallException + */ + public function __construct($dest) + { + $this -> platform = $this -> getCurrentPlatform(); + $this -> isLocal = false; + $this -> buffer = null; + $this -> userName = null; + $this -> userPassword = null; + $this -> workgroup = null; + if (preg_match(self::REGEX_LOCAL, $dest) == 1) { + // Straight to LPT1, COM1 or other local port. Allowed only if we are actually on windows. + if ($this -> platform !== self::PLATFORM_WIN) { + throw new BadMethodCallException("WindowsPrintConnector can only be " . + "used to print to a local printer ('".$dest."') on a Windows computer."); + } + $this -> isLocal = true; + $this -> hostname = null; + $this -> printerName = $dest; + } elseif (preg_match(self::REGEX_SMB, $dest) == 1) { + // Connect to samba share, eg smb://host/printer + $part = parse_url($dest); + $this -> hostname = $part['host']; + /* Printer name and optional workgroup */ + $path = ltrim($part['path'], '/'); + if (strpos($path, "/") !== false) { + $pathPart = explode("/", $path); + $this -> workgroup = $pathPart[0]; + $this -> printerName = $pathPart[1]; + } else { + $this -> printerName = $path; + } + /* Username and password if set */ + if (isset($part['user'])) { + $this -> userName = $part['user']; + if (isset($part['pass'])) { + $this -> userPassword = $part['pass']; + } + } + } elseif (preg_match(self::REGEX_PRINTERNAME, $dest) == 1) { + // Just got a printer name. Assume it's on the current computer. + $hostname = gethostname(); + if (!$hostname) { + $hostname = "localhost"; + } + $this -> hostname = $hostname; + $this -> printerName = $dest; + } else { + throw new BadMethodCallException("Printer '" . $dest . "' is not a valid " . + "printer name. Use local port (LPT1, COM1, etc) or smb://computer/printer notation."); + } + $this -> buffer = []; + } + + public function __destruct() + { + if ($this -> buffer !== null) { + trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); + } + } + + public function finalize() + { + $data = implode($this -> buffer); + $this -> buffer = null; + if ($this -> platform == self::PLATFORM_WIN) { + $this -> finalizeWin($data); + } elseif ($this -> platform == self::PLATFORM_LINUX) { + $this -> finalizeLinux($data); + } else { + $this -> finalizeMac($data); + } + } + + /** + * Send job to printer -- platform-specific Linux code. + * + * @param string $data Print data + * @throws Exception + */ + protected function finalizeLinux($data) + { + /* Non-Windows samba printing */ + $device = "//" . $this -> hostname . "/" . $this -> printerName; + if ($this -> userName !== null) { + $user = ($this -> workgroup != null ? ($this -> workgroup . "\\") : "") . $this -> userName; + if ($this -> userPassword == null) { + // No password + $command = sprintf( + "smbclient %s -U %s -c %s -N -m SMB2", + escapeshellarg($device), + escapeshellarg($user), + escapeshellarg("print -") + ); + $redactedCommand = $command; + } else { + // With password + $command = sprintf( + "smbclient %s %s -U %s -c %s -m SMB2", + escapeshellarg($device), + escapeshellarg($this -> userPassword), + escapeshellarg($user), + escapeshellarg("print -") + ); + $redactedCommand = sprintf( + "smbclient %s %s -U %s -c %s -m SMB2", + escapeshellarg($device), + escapeshellarg("*****"), + escapeshellarg($user), + escapeshellarg("print -") + ); + } + } else { + // No authentication information at all + $command = sprintf( + "smbclient %s -c %s -N -m SMB2", + escapeshellarg($device), + escapeshellarg("print -") + ); + $redactedCommand = $command; + } + $retval = $this -> runCommand($command, $outputStr, $errorStr, $data); + if ($retval != 0) { + throw new Exception("Failed to print. Command \"$redactedCommand\" " . + "failed with exit code $retval: " . trim($errorStr) . trim($outputStr)); + } + } + + /** + * Send job to printer -- platform-specific Mac code. + * + * @param string $data Print data + * @throws Exception + */ + protected function finalizeMac($data) + { + throw new Exception("Mac printing not implemented."); + } + + /** + * Send data to printer -- platform-specific Windows code. + * + * @param string $data + */ + protected function finalizeWin($data) + { + /* Windows-friendly printing of all sorts */ + if (!$this -> isLocal) { + /* Networked printing */ + $device = "\\\\" . $this -> hostname . "\\" . $this -> printerName; + if ($this -> userName !== null) { + /* Log in */ + $user = "/user:" . ($this -> workgroup != null ? ($this -> workgroup . "\\") : "") . $this -> userName; + if ($this -> userPassword == null) { + $command = sprintf( + "net use %s %s", + escapeshellarg($device), + escapeshellarg($user) + ); + $redactedCommand = $command; + } else { + $command = sprintf( + "net use %s %s %s", + escapeshellarg($device), + escapeshellarg($user), + escapeshellarg($this -> userPassword) + ); + $redactedCommand = sprintf( + "net use %s %s %s", + escapeshellarg($device), + escapeshellarg($user), + escapeshellarg("*****") + ); + } + $retval = $this -> runCommand($command, $outputStr, $errorStr); + if ($retval != 0) { + throw new Exception("Failed to print. Command \"$redactedCommand\" " . + "failed with exit code $retval: " . trim($errorStr)); + } + } + /* Final print-out */ + $filename = tempnam(sys_get_temp_dir(), "escpos"); + file_put_contents($filename, $data); + if (!$this -> runCopy($filename, $device)) { + throw new Exception("Failed to copy file to printer"); + } + unlink($filename); + } else { + /* Drop data straight on the printer */ + if (!$this -> runWrite($data, $this -> printerName)) { + throw new Exception("Failed to write file to printer at " . $this -> printerName); + } + } + } + + /** + * @return string Current platform. Separated out for testing purposes. + */ + protected function getCurrentPlatform() + { + if (PHP_OS == "WINNT") { + return self::PLATFORM_WIN; + } + if (PHP_OS == "Darwin") { + return self::PLATFORM_MAC; + } + return self::PLATFORM_LINUX; + } + + /* (non-PHPdoc) + * @see PrintConnector::read() + */ + public function read($len) + { + /* Two-way communication is not supported */ + return false; + } + + /** + * Run a command, pass it data, and retrieve its return value, standard output, and standard error. + * + * @param string $command the command to run. + * @param string $outputStr variable to fill with standard output. + * @param string $errorStr variable to fill with standard error. + * @param string $inputStr text to pass to the command's standard input (optional). + * @return number + */ + protected function runCommand($command, &$outputStr, &$errorStr, $inputStr = null) + { + $descriptors = [ + 0 => ["pipe", "r"], + 1 => ["pipe", "w"], + 2 => ["pipe", "w"], + ]; + $process = proc_open($command, $descriptors, $fd); + if (is_resource($process)) { + /* Write to input */ + if ($inputStr !== null) { + fwrite($fd[0], $inputStr); + } + fclose($fd[0]); + /* Read stdout */ + $outputStr = stream_get_contents($fd[1]); + fclose($fd[1]); + /* Read stderr */ + $errorStr = stream_get_contents($fd[2]); + fclose($fd[2]); + /* Finish up */ + $retval = proc_close($process); + return $retval; + } else { + /* Method calling this should notice a non-zero exit and print an error */ + return -1; + } + } + + /** + * Copy a file. Separated out so that nothing is actually printed during test runs. + * + * @param string $from Source file + * @param string $to Destination file + * @return boolean True if copy was successful, false otherwise + */ + protected function runCopy($from, $to) + { + return copy($from, $to); + } + + /** + * Write data to a file. Separated out so that nothing is actually printed during test runs. + * + * @param string $data Data to print + * @param string $filename Destination file + * @return boolean True if write was successful, false otherwise + */ + protected function runWrite($data, $filename) + { + return file_put_contents($filename, $data) !== false; + } + + public function write($data) + { + $this -> buffer[] = $data; + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/Printer.php b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/Printer.php new file mode 100644 index 00000000000..753d2ea8ad3 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/Printer.php @@ -0,0 +1,1217 @@ +, + * incorporating modifications by others. See CONTRIBUTORS.md for a full list. + * + * This software is distributed under the terms of the MIT license. See LICENSE.md + * for details. + */ + +namespace Mike42\Escpos; + +use Exception; +use InvalidArgumentException; +use Mike42\Escpos\PrintBuffers\PrintBuffer; +use Mike42\Escpos\PrintBuffers\EscposPrintBuffer; +use Mike42\Escpos\PrintConnectors\PrintConnector; +use Mike42\Escpos\CapabilityProfile; + +/** + * Main class for ESC/POS code generation + */ +class Printer +{ + /** + * ASCII null control character + */ + const NUL = "\x00"; + + /** + * ASCII linefeed control character + */ + const LF = "\x0a"; + + /** + * ASCII escape control character + */ + const ESC = "\x1b"; + + /** + * ASCII form separator control character + */ + const FS = "\x1c"; + + /** + * ASCII form feed control character + */ + const FF = "\x0c"; + + /** + * ASCII group separator control character + */ + const GS = "\x1d"; + + /** + * ASCII data link escape control character + */ + const DLE = "\x10"; + + /** + * ASCII end of transmission control character + */ + const EOT = "\x04"; + + /** + * Indicates UPC-A barcode when used with Printer::barcode + */ + const BARCODE_UPCA = 65; + + /** + * Indicates UPC-E barcode when used with Printer::barcode + */ + const BARCODE_UPCE = 66; + + /** + * Indicates JAN13 barcode when used with Printer::barcode + */ + const BARCODE_JAN13 = 67; + + /** + * Indicates JAN8 barcode when used with Printer::barcode + */ + const BARCODE_JAN8 = 68; + + /** + * Indicates CODE39 barcode when used with Printer::barcode + */ + const BARCODE_CODE39 = 69; + + /** + * Indicates ITF barcode when used with Printer::barcode + */ + const BARCODE_ITF = 70; + + /** + * Indicates CODABAR barcode when used with Printer::barcode + */ + const BARCODE_CODABAR = 71; + + /** + * Indicates CODE93 barcode when used with Printer::barcode + */ + const BARCODE_CODE93 = 72; + + /** + * Indicates CODE128 barcode when used with Printer::barcode + */ + const BARCODE_CODE128 = 73; + + /** + * Indicates that HRI (human-readable interpretation) text should not be + * printed, when used with Printer::setBarcodeTextPosition + */ + const BARCODE_TEXT_NONE = 0; + + /** + * Indicates that HRI (human-readable interpretation) text should be printed + * above a barcode, when used with Printer::setBarcodeTextPosition + */ + const BARCODE_TEXT_ABOVE = 1; + + /** + * Indicates that HRI (human-readable interpretation) text should be printed + * below a barcode, when used with Printer::setBarcodeTextPosition + */ + const BARCODE_TEXT_BELOW = 2; + + /** + * Use the first color (usually black), when used with Printer::setColor + */ + const COLOR_1 = 0; + + /** + * Use the second color (usually red or blue), when used with Printer::setColor + */ + const COLOR_2 = 1; + + /** + * Make a full cut, when used with Printer::cut + */ + const CUT_FULL = 65; + + /** + * Make a partial cut, when used with Printer::cut + */ + const CUT_PARTIAL = 66; + + /** + * Use Font A, when used with Printer::setFont + */ + const FONT_A = 0; + + /** + * Use Font B, when used with Printer::setFont + */ + const FONT_B = 1; + + /** + * Use Font C, when used with Printer::setFont + */ + const FONT_C = 2; + + /** + * Use default (high density) image size, when used with Printer::graphics, + * Printer::bitImage or Printer::bitImageColumnFormat + */ + const IMG_DEFAULT = 0; + + /** + * Use lower horizontal density for image printing, when used with Printer::graphics, + * Printer::bitImage or Printer::bitImageColumnFormat + */ + const IMG_DOUBLE_WIDTH = 1; + + /** + * Use lower vertical density for image printing, when used with Printer::graphics, + * Printer::bitImage or Printer::bitImageColumnFormat + */ + const IMG_DOUBLE_HEIGHT = 2; + + /** + * Align text to the left, when used with Printer::setJustification + */ + const JUSTIFY_LEFT = 0; + + /** + * Center text, when used with Printer::setJustification + */ + const JUSTIFY_CENTER = 1; + + /** + * Align text to the right, when used with Printer::setJustification + */ + const JUSTIFY_RIGHT = 2; + + /** + * Use Font A, when used with Printer::selectPrintMode + */ + const MODE_FONT_A = 0; + + /** + * Use Font B, when used with Printer::selectPrintMode + */ + const MODE_FONT_B = 1; + + /** + * Use text emphasis, when used with Printer::selectPrintMode + */ + const MODE_EMPHASIZED = 8; + + /** + * Use double height text, when used with Printer::selectPrintMode + */ + const MODE_DOUBLE_HEIGHT = 16; + + /** + * Use double width text, when used with Printer::selectPrintMode + */ + const MODE_DOUBLE_WIDTH = 32; + + /** + * Underline text, when used with Printer::selectPrintMode + */ + const MODE_UNDERLINE = 128; + + /** + * Indicates standard PDF417 code + */ + const PDF417_STANDARD = 0; + + /** + * Indicates truncated PDF417 code + */ + const PDF417_TRUNCATED = 1; + + /** + * Indicates error correction level L when used with Printer::qrCode + */ + const QR_ECLEVEL_L = 0; + + /** + * Indicates error correction level M when used with Printer::qrCode + */ + const QR_ECLEVEL_M = 1; + + /** + * Indicates error correction level Q when used with Printer::qrCode + */ + const QR_ECLEVEL_Q = 2; + + /** + * Indicates error correction level H when used with Printer::qrCode + */ + const QR_ECLEVEL_H = 3; + + /** + * Indicates QR model 1 when used with Printer::qrCode + */ + const QR_MODEL_1 = 1; + + /** + * Indicates QR model 2 when used with Printer::qrCode + */ + const QR_MODEL_2 = 2; + + /** + * Indicates micro QR code when used with Printer::qrCode + */ + const QR_MICRO = 3; + + /** + * Indicates a request for printer status when used with + * Printer::getPrinterStatus (experimental) + */ + const STATUS_PRINTER = 1; + + /** + * Indicates a request for printer offline cause when used with + * Printer::getPrinterStatus (experimental) + */ + const STATUS_OFFLINE_CAUSE = 2; + + /** + * Indicates a request for error cause when used with Printer::getPrinterStatus + * (experimental) + */ + const STATUS_ERROR_CAUSE = 3; + + /** + * Indicates a request for error cause when used with Printer::getPrinterStatus + * (experimental) + */ + const STATUS_PAPER_ROLL = 4; + + /** + * Indicates a request for ink A status when used with Printer::getPrinterStatus + * (experimental) + */ + const STATUS_INK_A = 7; + + /** + * Indicates a request for ink B status when used with Printer::getPrinterStatus + * (experimental) + */ + const STATUS_INK_B = 6; + + /** + * Indicates a request for peeler status when used with Printer::getPrinterStatus + * (experimental) + */ + const STATUS_PEELER = 8; + + /** + * Indicates no underline when used with Printer::setUnderline + */ + const UNDERLINE_NONE = 0; + + /** + * Indicates single underline when used with Printer::setUnderline + */ + const UNDERLINE_SINGLE = 1; + + /** + * Indicates double underline when used with Printer::setUnderline + */ + const UNDERLINE_DOUBLE = 2; + + /** + * @var PrintBuffer|null $buffer + * The printer's output buffer. + */ + protected $buffer; + + /** + * @var PrintConnector $connector + * Connector showing how to print to this printer + */ + protected $connector; + + /** + * @var CapabilityProfile $profile + * Profile showing supported features for this printer + */ + protected $profile; + + /** + * @var int $characterTable + * Current character code table + */ + protected $characterTable; + + /** + * Construct a new print object + * + * @param PrintConnector $connector The PrintConnector to send data to. If not set, output is sent to standard output. + * @param CapabilityProfile|null $profile Supported features of this printer. If not set, the "default" CapabilityProfile will be used, which is suitable for Epson printers. + * @throws InvalidArgumentException + */ + public function __construct(PrintConnector $connector, CapabilityProfile $profile = null) + { + /* Set connector */ + $this -> connector = $connector; + + /* Set capability profile */ + if ($profile === null) { + $profile = CapabilityProfile::load('default'); + } + $this -> profile = $profile; + /* Set buffer */ + $buffer = new EscposPrintBuffer(); + $this -> buffer = null; + $this -> setPrintBuffer($buffer); + $this -> initialize(); + } + + /** + * Print a barcode. + * + * @param string $content The information to encode. + * @param int $type The barcode standard to output. Supported values are + * `Printer::BARCODE_UPCA`, `Printer::BARCODE_UPCE`, `Printer::BARCODE_JAN13`, + * `Printer::BARCODE_JAN8`, `Printer::BARCODE_CODE39`, `Printer::BARCODE_ITF`, + * `Printer::BARCODE_CODABAR`, `Printer::BARCODE_CODE93`, and `Printer::BARCODE_CODE128`. + * If not specified, `Printer::BARCODE_CODE39` will be used. Note that some + * barcode formats only support specific lengths or sets of characters, and that + * available barcode types vary between printers. + * @throws InvalidArgumentException Where the length or characters used in $content is invalid for the requested barcode format. + */ + public function barcode($content, $type = Printer::BARCODE_CODE39) + { + /* Validate input */ + self::validateInteger($type, 65, 73, __FUNCTION__, "Barcode type"); + $len = strlen($content); + switch ($type) { + case self::BARCODE_UPCA: + self::validateInteger($len, 11, 12, __FUNCTION__, "UPCA barcode content length"); + self::validateStringRegex($content, __FUNCTION__, "/^[0-9]{11,12}$/", "UPCA barcode content"); + break; + case self::BARCODE_UPCE: + self::validateIntegerMulti($len, [[6, 8], [11, 12]], __FUNCTION__, "UPCE barcode content length"); + self::validateStringRegex($content, __FUNCTION__, "/^([0-9]{6,8}|[0-9]{11,12})$/", "UPCE barcode content"); + break; + case self::BARCODE_JAN13: + self::validateInteger($len, 12, 13, __FUNCTION__, "JAN13 barcode content length"); + self::validateStringRegex($content, __FUNCTION__, "/^[0-9]{12,13}$/", "JAN13 barcode content"); + break; + case self::BARCODE_JAN8: + self::validateInteger($len, 7, 8, __FUNCTION__, "JAN8 barcode content length"); + self::validateStringRegex($content, __FUNCTION__, "/^[0-9]{7,8}$/", "JAN8 barcode content"); + break; + case self::BARCODE_CODE39: + self::validateInteger($len, 1, 255, __FUNCTION__, "CODE39 barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. + self::validateStringRegex($content, __FUNCTION__, "/^([0-9A-Z \$\%\+\-\.\/]+|\*[0-9A-Z \$\%\+\-\.\/]+\*)$/", "CODE39 barcode content"); + break; + case self::BARCODE_ITF: + self::validateInteger($len, 2, 255, __FUNCTION__, "ITF barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. + self::validateStringRegex($content, __FUNCTION__, "/^([0-9]{2})+$/", "ITF barcode content"); + break; + case self::BARCODE_CODABAR: + self::validateInteger($len, 1, 255, __FUNCTION__, "Codabar barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. + self::validateStringRegex($content, __FUNCTION__, "/^[A-Da-d][0-9\$\+\-\.\/\:]+[A-Da-d]$/", "Codabar barcode content"); + break; + case self::BARCODE_CODE93: + self::validateInteger($len, 1, 255, __FUNCTION__, "Code93 barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. + self::validateStringRegex($content, __FUNCTION__, "/^[\\x00-\\x7F]+$/", "Code93 barcode content"); + break; + case self::BARCODE_CODE128: + self::validateInteger($len, 1, 255, __FUNCTION__, "Code128 barcode content length"); // 255 is a limitation of the "function b" command, not the barcode format. + // The CODE128 encoder is quite complex, so only a very basic header-check is applied here. + self::validateStringRegex($content, __FUNCTION__, "/^\{[A-C][\\x00-\\x7F]+$/", "Code128 barcode content"); + break; + } + if (!$this -> profile -> getSupportsBarcodeB()) { + // A simpler barcode command which supports fewer codes + self::validateInteger($type, 65, 71, __FUNCTION__); + $this -> connector -> write(self::GS . "k" . chr($type - 65) . $content . self::NUL); + return; + } + // More advanced function B, used in preference + $this -> connector -> write(self::GS . "k" . chr($type) . chr(strlen($content)) . $content); + } + + /** + * Print an image, using the older "bit image" command. This creates padding on the right of the image, + * if its width is not divisible by 8. + * + * Should only be used if your printer does not support the graphics() command. + * See also bitImageColumnFormat(). + * + * @param EscposImage $img The image to print + * @param int $size Size modifier for the image. Must be either `Printer::IMG_DEFAULT` + * (default), or any combination of the `Printer::IMG_DOUBLE_HEIGHT` and + * `Printer::IMG_DOUBLE_WIDTH` flags. + */ + public function bitImage(EscposImage $img, $size = Printer::IMG_DEFAULT) + { + self::validateInteger($size, 0, 3, __FUNCTION__); + $rasterData = $img -> toRasterFormat(); + $header = Printer::dataHeader([$img -> getWidthBytes(), $img -> getHeight()], true); + $this -> connector -> write(self::GS . "v0" . chr($size) . $header); + $this -> connector -> write($rasterData); + } + + /** + * Print an image, using the older "bit image" command in column format. + * + * Should only be used if your printer does not support the graphics() or + * bitImage() commands. + * + * @param EscposImage $img The image to print + * @param int $size Size modifier for the image. Must be either `Printer::IMG_DEFAULT` + * (default), or any combination of the `Printer::IMG_DOUBLE_HEIGHT` and + * `Printer::IMG_DOUBLE_WIDTH` flags. + */ + public function bitImageColumnFormat(EscposImage $img, $size = Printer::IMG_DEFAULT) + { + $highDensityVertical = ! (($size & self::IMG_DOUBLE_HEIGHT) == Printer::IMG_DOUBLE_HEIGHT); + $highDensityHorizontal = ! (($size & self::IMG_DOUBLE_WIDTH) == Printer::IMG_DOUBLE_WIDTH); + // Experimental column format printing + // This feature is not yet complete and may produce unpredictable results. + $this -> setLineSpacing(16); // 16-dot line spacing. This is the correct value on both TM-T20 and TM-U220 + // Header and density code (0, 1, 32, 33) re-used for every line + $densityCode = ($highDensityHorizontal ? 1 : 0) + ($highDensityVertical ? 32 : 0); + $colFormatData = $img -> toColumnFormat($highDensityVertical); + $header = Printer::dataHeader([$img -> getWidth()], true); + foreach ($colFormatData as $line) { + // Print each line, double density etc for printing are set here also + $this -> connector -> write(self::ESC . "*" . chr($densityCode) . $header . $line); + $this -> feed(); + // sleep(0.1); // Reduces the amount of trouble that a TM-U220 has keeping up with large images + } + $this -> setLineSpacing(); // Revert to default line spacing + } + + /** + * Close the underlying buffer. With some connectors, the + * job will not actually be sent to the printer until this is called. + */ + public function close() + { + $this -> connector -> finalize(); + } + + /** + * Cut the paper. + * + * @param int $mode Cut mode, either Printer::CUT_FULL or Printer::CUT_PARTIAL. If not specified, `Printer::CUT_FULL` will be used. + * @param int $lines Number of lines to feed + */ + public function cut($mode = Printer::CUT_FULL, $lines = 3) + { + // TODO validation on cut() inputs + $this -> connector -> write(self::GS . "V" . chr($mode) . chr($lines)); + } + + /** + * Print and feed line / Print and feed n lines. + * + * @param int $lines Number of lines to feed + */ + public function feed($lines = 1) + { + self::validateInteger($lines, 1, 255, __FUNCTION__); + if ($lines <= 1) { + $this -> connector -> write(self::LF); + } else { + $this -> connector -> write(self::ESC . "d" . chr($lines)); + } + } + + /** + * Some printers require a form feed to release the paper. On most printers, this + * command is only useful in page mode, which is not implemented in this driver. + */ + public function feedForm() + { + $this -> connector -> write(self::FF); + } + + /** + * Some slip printers require `ESC q` sequence to release the paper. + */ + public function release() + { + $this -> connector -> write(self::ESC . chr(113)); + } + + /** + * Print and reverse feed n lines. + * + * @param int $lines number of lines to feed. If not specified, 1 line will be fed. + */ + public function feedReverse($lines = 1) + { + self::validateInteger($lines, 1, 255, __FUNCTION__); + $this -> connector -> write(self::ESC . "e" . chr($lines)); + } + + /** + * @return number + */ + public function getCharacterTable() + { + return $this -> characterTable; + } + + /** + * @return PrintBuffer + */ + public function getPrintBuffer() + { + return $this -> buffer; + } + + /** + * @return PrintConnector + */ + public function getPrintConnector() + { + return $this -> connector; + } + + /** + * @return CapabilityProfile + */ + public function getPrinterCapabilityProfile() + { + return $this -> profile; + } + + /** + * Print an image to the printer. + * + * Size modifiers are: + * - Printer::IMG_DEFAULT (leave image at original size) + * - Printer::IMG_DOUBLE_WIDTH + * - Printer::IMG_DOUBLE_HEIGHT + * + * See the example/ folder for detailed examples. + * + * The functions bitImage() and bitImageColumnFormat() take the same + * parameters, and can be used if your printer doesn't support the newer + * graphics commands. + * + * @param EscposImage $img The image to print. + * @param int $size Size modifier for the image. Must be either `Printer::IMG_DEFAULT` + * (default), or any combination of the `Printer::IMG_DOUBLE_HEIGHT` and + * `Printer::IMG_DOUBLE_WIDTH` flags. + */ + public function graphics(EscposImage $img, $size = Printer::IMG_DEFAULT) + { + self::validateInteger($size, 0, 3, __FUNCTION__); + $rasterData = $img -> toRasterFormat(); + $imgHeader = Printer::dataHeader([$img -> getWidth(), $img -> getHeight()], true); + $tone = '0'; + $colors = '1'; + $xm = (($size & self::IMG_DOUBLE_WIDTH) == Printer::IMG_DOUBLE_WIDTH) ? chr(2) : chr(1); + $ym = (($size & self::IMG_DOUBLE_HEIGHT) == Printer::IMG_DOUBLE_HEIGHT) ? chr(2) : chr(1); + $header = $tone . $xm . $ym . $colors . $imgHeader; + $this -> wrapperSendGraphicsData('0', 'p', $header . $rasterData); + $this -> wrapperSendGraphicsData('0', '2'); + } + + /** + * Initialize printer. This resets formatting back to the defaults. + */ + public function initialize() + { + $this -> connector -> write(self::ESC . "@"); + $this -> characterTable = 0; + } + + /** + * Print a two-dimensional data code using the PDF417 standard. + * + * @param string $content Text or numbers to store in the code + * @param int $width Width of a module (pixel) in the printed code. + * Default is 3 dots. + * @param int $heightMultiplier Multiplier for height of a module. + * Default is 3 times the width. + * @param int $dataColumnCount Number of data columns to use. 0 (default) + * is to auto-calculate. Smaller numbers will result in a narrower code, + * making larger pixel sizes possible. Larger numbers require smaller pixel sizes. + * @param float $ec Error correction ratio, from 0.01 to 4.00. Default is 0.10 (10%). + * @param int $options Standard code Printer::PDF417_STANDARD with + * start/end bars, or truncated code Printer::PDF417_TRUNCATED with start bars only. + * @throws Exception If this profile indicates that PDF417 code is not supported + */ + public function pdf417Code($content, $width = 3, $heightMultiplier = 3, $dataColumnCount = 0, $ec = 0.10, $options = Printer::PDF417_STANDARD) + { + self::validateString($content, __FUNCTION__, 'content'); + self::validateInteger($width, 2, 8, __FUNCTION__, 'width'); + self::validateInteger($heightMultiplier, 2, 8, __FUNCTION__, 'heightMultiplier'); + self::validateInteger($dataColumnCount, 0, 30, __FUNCTION__, 'dataColumnCount'); + self::validateFloat($ec, 0.01, 4.00, __FUNCTION__, 'ec'); + self::validateInteger($options, 0, 1, __FUNCTION__, 'options'); + if ($content == "") { + return; + } + if (!$this -> profile -> getSupportsPdf417Code()) { + // TODO use software rendering via a library instead + throw new Exception("PDF417 codes are not supported on your printer."); + } + $cn = '0'; // Code type for pdf417 code + // Select model: standard or truncated + $this -> wrapperSend2dCodeData(chr(70), $cn, chr($options)); + // Column count + $this -> wrapperSend2dCodeData(chr(65), $cn, chr($dataColumnCount)); + // Set dot sizes + $this -> wrapperSend2dCodeData(chr(67), $cn, chr($width)); + $this -> wrapperSend2dCodeData(chr(68), $cn, chr($heightMultiplier)); + // Set error correction ratio: 1% to 400% + $ec_int = (int)ceil(floatval($ec) * 10); + $this -> wrapperSend2dCodeData(chr(69), $cn, chr($ec_int), '1'); + // Send content & print + $this -> wrapperSend2dCodeData(chr(80), $cn, $content, '0'); + $this -> wrapperSend2dCodeData(chr(81), $cn, '', '0'); + } + + /** + * Generate a pulse, for opening a cash drawer if one is connected. + * The default settings should open an Epson drawer. + * + * @param int $pin 0 or 1, for pin 2 or pin 5 kick-out connector respectively. + * @param int $on_ms pulse ON time, in milliseconds. + * @param int $off_ms pulse OFF time, in milliseconds. + */ + public function pulse($pin = 0, $on_ms = 120, $off_ms = 240) + { + self::validateInteger($pin, 0, 1, __FUNCTION__); + self::validateInteger($on_ms, 1, 511, __FUNCTION__); + self::validateInteger($off_ms, 1, 511, __FUNCTION__); + $this -> connector -> write(self::ESC . "p" . chr($pin + 48) . chr($on_ms / 2) . chr($off_ms / 2)); + } + + /** + * Print the given data as a QR code on the printer. + * + * @param string $content The content of the code. Numeric data will be more efficiently compacted. + * @param int $ec Error-correction level to use. One of Printer::QR_ECLEVEL_L (default), Printer::QR_ECLEVEL_M, Printer::QR_ECLEVEL_Q or Printer::QR_ECLEVEL_H. Higher error correction results in a less compact code. + * @param int $size Pixel size to use. Must be 1-16 (default 3) + * @param int $model QR code model to use. Must be one of Printer::QR_MODEL_1, Printer::QR_MODEL_2 (default) or Printer::QR_MICRO (not supported by all printers). + */ + public function qrCode($content, $ec = Printer::QR_ECLEVEL_L, $size = 3, $model = Printer::QR_MODEL_2) + { + self::validateString($content, __FUNCTION__); + self::validateInteger($ec, 0, 3, __FUNCTION__); + self::validateInteger($size, 1, 16, __FUNCTION__); + self::validateInteger($model, 1, 3, __FUNCTION__); + if ($content == "") { + return; + } + if (!$this -> profile -> getSupportsQrCode()) { + // TODO use software rendering via phpqrcode instead + throw new Exception("QR codes are not supported on your printer."); + } + $cn = '1'; // Code type for QR code + // Select model: 1, 2 or micro. + $this -> wrapperSend2dCodeData(chr(65), $cn, chr(48 + $model) . chr(0)); + // Set dot size. + $this -> wrapperSend2dCodeData(chr(67), $cn, chr($size)); + // Set error correction level: L, M, Q, or H + $this -> wrapperSend2dCodeData(chr(69), $cn, chr(48 + $ec)); + // Send content & print + $this -> wrapperSend2dCodeData(chr(80), $cn, $content, '0'); + $this -> wrapperSend2dCodeData(chr(81), $cn, '', '0'); + } + + /** + * Switch character table (code page) manually. Used in conjunction with textRaw() to + * print special characters which can't be encoded automatically. + * + * @param int $table The table to select. Available code tables are model-specific. + */ + public function selectCharacterTable($table = 0) + { + self::validateInteger($table, 0, 255, __FUNCTION__); + $supported = $this -> profile -> getCodePages(); + if (!isset($supported[$table])) { + throw new InvalidArgumentException("There is no code table $table allowed by this printer's capability profile."); + } + $this -> characterTable = $table; + if ($this -> profile -> getSupportsStarCommands()) { + /* Not an ESC/POS command: STAR printers stash all the extra code pages under a different command. */ + $this -> connector -> write(self::ESC . self::GS . "t" . chr($table)); + return; + } + $this -> connector -> write(self::ESC . "t" . chr($table)); + } + + /** + * Select print mode(s). + * + * Several MODE_* constants can be OR'd together passed to this function's `$mode` argument. The valid modes are: + * - Printer::MODE_FONT_A + * - Printer::MODE_FONT_B + * - Printer::MODE_EMPHASIZED + * - Printer::MODE_DOUBLE_HEIGHT + * - Printer::MODE_DOUBLE_WIDTH + * - Printer::MODE_UNDERLINE + * + * @param int $mode The mode to use. Default is Printer::MODE_FONT_A, with no special formatting. This has a similar effect to running initialize(). + */ + public function selectPrintMode($mode = Printer::MODE_FONT_A) + { + $allModes = Printer::MODE_FONT_B | self::MODE_EMPHASIZED | self::MODE_DOUBLE_HEIGHT | self::MODE_DOUBLE_WIDTH | self::MODE_UNDERLINE; + if (!is_integer($mode) || $mode < 0 || ($mode & $allModes) != $mode) { + throw new InvalidArgumentException("Invalid mode"); + } + + $this -> connector -> write(self::ESC . "!" . chr($mode)); + } + + /** + * Set barcode height. + * + * @param int $height Height in dots. If not specified, 8 will be used. + */ + public function setBarcodeHeight($height = 8) + { + self::validateInteger($height, 1, 255, __FUNCTION__); + $this -> connector -> write(self::GS . "h" . chr($height)); + } + + /** + * Set barcode bar width. + * + * @param int $width Bar width in dots. If not specified, 3 will be used. + * Values above 6 appear to have no effect. + */ + public function setBarcodeWidth($width = 3) + { + self::validateInteger($width, 1, 255, __FUNCTION__); + $this -> connector -> write(self::GS . "w" . chr($width)); + } + + /** + * Set the position for the Human Readable Interpretation (HRI) of barcode characters. + * + * @param int $position. Use Printer::BARCODE_TEXT_NONE to hide the text (default), + * or any combination of Printer::BARCODE_TEXT_ABOVE and Printer::BARCODE_TEXT_BELOW + * flags to display the text. + */ + public function setBarcodeTextPosition($position = Printer::BARCODE_TEXT_NONE) + { + self::validateInteger($position, 0, 3, __FUNCTION__, "Barcode text position"); + $this -> connector -> write(self::GS . "H" . chr($position)); + } + + /** + * Turn double-strike mode on/off. + * + * @param boolean $on true for double strike, false for no double strike + */ + public function setDoubleStrike($on = true) + { + self::validateBoolean($on, __FUNCTION__); + $this -> connector -> write(self::ESC . "G". ($on ? chr(1) : chr(0))); + } + + /** + * Select print color on printers that support multiple colors. + * + * @param int $color Color to use. Must be either Printer::COLOR_1 (default), or Printer::COLOR_2. + */ + public function setColor($color = Printer::COLOR_1) + { + self::validateInteger($color, 0, 1, __FUNCTION__, "Color"); + $this -> connector -> write(self::ESC . "r" . chr($color)); + } + + /** + * Turn emphasized mode on/off. + * + * @param boolean $on true for emphasis, false for no emphasis + */ + public function setEmphasis($on = true) + { + self::validateBoolean($on, __FUNCTION__); + $this -> connector -> write(self::ESC . "E". ($on ? chr(1) : chr(0))); + } + + /** + * Select font. Most printers have two fonts (Fonts A and B), and some have a third (Font C). + * + * @param int $font The font to use. Must be either Printer::FONT_A, Printer::FONT_B, or Printer::FONT_C. + */ + public function setFont($font = Printer::FONT_A) + { + self::validateInteger($font, 0, 2, __FUNCTION__); + $this -> connector -> write(self::ESC . "M" . chr($font)); + } + + /** + * Select justification. + * + * @param int $justification One of Printer::JUSTIFY_LEFT, Printer::JUSTIFY_CENTER, or Printer::JUSTIFY_RIGHT. + */ + public function setJustification($justification = Printer::JUSTIFY_LEFT) + { + self::validateInteger($justification, 0, 2, __FUNCTION__); + $this -> connector -> write(self::ESC . "a" . chr($justification)); + } + + /** + * Set the height of the line. + * + * Some printers will allow you to overlap lines with a smaller line feed. + * + * @param int|null $height The height of each line, in dots. If not set, the printer + * will reset to its default line spacing. + */ + public function setLineSpacing($height = null) + { + if ($height === null) { + // Reset to default + $this -> connector -> write(self::ESC . "2"); // Revert to default line spacing + return; + } + self::validateInteger($height, 1, 255, __FUNCTION__); + $this -> connector -> write(self::ESC . "3" . chr($height)); + } + + /** + * Set print area left margin. Reset to default with Printer::initialize() + * + * @param int $margin The left margin to set on to the print area, in dots. + */ + public function setPrintLeftMargin($margin = 0) + { + self::validateInteger($margin, 0, 65535, __FUNCTION__); + $this -> connector -> write(Printer::GS . 'L' . self::intLowHigh($margin, 2)); + } + + /** + * Set print area width. This can be used to add a right margin to the print area. + * Reset to default with Printer::initialize() + * + * @param int $width The width of the page print area, in dots. + */ + public function setPrintWidth($width = 512) + { + self::validateInteger($width, 1, 65535, __FUNCTION__); + $this -> connector -> write(Printer::GS . 'W' . self::intLowHigh($width, 2)); + } + + /** + * Attach a different print buffer to the printer. Buffers are responsible for handling text output to the printer. + * + * @param PrintBuffer $buffer The buffer to use. + * @throws InvalidArgumentException Where the buffer is already attached to a different printer. + */ + public function setPrintBuffer(PrintBuffer $buffer) + { + if ($buffer === $this -> buffer) { + return; + } + if ($buffer -> getPrinter() != null) { + throw new InvalidArgumentException("This buffer is already attached to a printer."); + } + if ($this -> buffer !== null) { + $this -> buffer -> setPrinter(null); + } + $this -> buffer = $buffer; + $this -> buffer -> setPrinter($this); + } + + /** + * Set black/white reverse mode on or off. In this mode, text is printed white on a black background. + * + * @param boolean $on True to enable, false to disable. + */ + public function setReverseColors($on = true) + { + self::validateBoolean($on, __FUNCTION__); + $this -> connector -> write(self::GS . "B" . ($on ? chr(1) : chr(0))); + } + + /** + * Set the size of text, as a multiple of the normal size. + * + * @param int $widthMultiplier Multiple of the regular height to use (range 1 - 8) + * @param int $heightMultiplier Multiple of the regular height to use (range 1 - 8) + */ + public function setTextSize($widthMultiplier, $heightMultiplier) + { + self::validateInteger($widthMultiplier, 1, 8, __FUNCTION__); + self::validateInteger($heightMultiplier, 1, 8, __FUNCTION__); + $c = pow(2, 4) * ($widthMultiplier - 1) + ($heightMultiplier - 1); + $this -> connector -> write(self::GS . "!" . chr($c)); + } + + /** + * Set underline for printed text. + * + * Argument can be true/false, or one of UNDERLINE_NONE, + * UNDERLINE_SINGLE or UNDERLINE_DOUBLE. + * + * @param int $underline Either true/false, or one of Printer::UNDERLINE_NONE, Printer::UNDERLINE_SINGLE or Printer::UNDERLINE_DOUBLE. Defaults to Printer::UNDERLINE_SINGLE. + */ + public function setUnderline($underline = Printer::UNDERLINE_SINGLE) + { + /* Map true/false to underline constants */ + if ($underline === true) { + $underline = Printer::UNDERLINE_SINGLE; + } elseif ($underline === false) { + $underline = Printer::UNDERLINE_NONE; + } + /* Set the underline */ + self::validateInteger($underline, 0, 2, __FUNCTION__); + $this -> connector -> write(self::ESC . "-" . chr($underline)); + } + + /** + * Print each line upside-down (180 degrees rotated). + * + * @param boolean $on True to enable, false to disable. + */ + public function setUpsideDown($on = true) + { + self::validateBoolean($on, __FUNCTION__); + $this -> connector -> write(self::ESC . "{" . ($on ? chr(1) : chr(0))); + } + + /** + * Add text to the buffer. + * + * Text should either be followed by a line-break, or feed() should be called + * after this to clear the print buffer. + * + * @param string $str Text to print + */ + public function text($str = "") + { + self::validateString($str, __FUNCTION__); + $this -> buffer -> writeText((string)$str); + } + + /** + * Add Chinese text to the buffer. This is a specific workaround for the common Zijang printer- The printer will be switched to a two-byte mode and sent GBK-encoded text. + * + * Support for this will be merged into a print buffer. + * + * @param string $str Text to print, as UTF-8 + */ + public function textChinese($str = "") + { + self::validateString($str, __FUNCTION__); + $this -> connector -> write(self::FS . "&"); + $str = iconv("UTF-8", "GBK//IGNORE", $str); + $this -> buffer -> writeTextRaw((string)$str); + $this -> connector -> write(self::FS . "."); + } + + /** + * Add text to the buffer without attempting to interpret chararacter codes. + * + * Text should either be followed by a line-break, or feed() should be called + * after this to clear the print buffer. + * + * @param string $str Text to print + */ + public function textRaw($str = "") + { + self::validateString($str, __FUNCTION__); + $this -> buffer -> writeTextRaw((string)$str); + } + + /** + * Wrapper for GS ( k, to calculate and send correct data length. + * + * @param string $fn Function to use + * @param string $cn Output code type. Affects available data + * @param string $data Data to send. + * @param string $m Modifier/variant for function. Often '0' where used. + * @throws InvalidArgumentException Where the input lengths are bad. + */ + protected function wrapperSend2dCodeData($fn, $cn, $data = '', $m = '') + { + if (strlen($m) > 1 || strlen($cn) != 1 || strlen($fn) != 1) { + throw new InvalidArgumentException("wrapperSend2dCodeData: cn and fn must be one character each."); + } + $header = $this -> intLowHigh(strlen($data) + strlen($m) + 2, 2); + $this -> connector -> write(self::GS . "(k" . $header . $cn . $fn . $m . $data); + } + + /** + * Wrapper for GS ( L, to calculate and send correct data length. + * + * @param string $m Modifier/variant for function. Usually '0'. + * @param string $fn Function number to use, as character. + * @param string $data Data to send. + * @throws InvalidArgumentException Where the input lengths are bad. + */ + protected function wrapperSendGraphicsData($m, $fn, $data = '') + { + if (strlen($m) != 1 || strlen($fn) != 1) { + throw new InvalidArgumentException("wrapperSendGraphicsData: m and fn must be one character each."); + } + $header = $this -> intLowHigh(strlen($data) + 2, 2); + $this -> connector -> write(self::GS . "(L" . $header . $m . $fn . $data); + } + + /** + * Convert widths and heights to characters. Used before sending graphics to set the size. + * + * @param array $inputs + * @param boolean $long True to use 4 bytes, false to use 2 + * @return string + */ + protected static function dataHeader(array $inputs, $long = true) + { + $outp = []; + foreach ($inputs as $input) { + if ($long) { + $outp[] = Printer::intLowHigh($input, 2); + } else { + self::validateInteger($input, 0, 255, __FUNCTION__); + $outp[] = chr($input); + } + } + return implode("", $outp); + } + + /** + * Generate two characters for a number: In lower and higher parts, or more parts as needed. + * + * @param int $input Input number + * @param int $length The number of bytes to output (1 - 4). + */ + protected static function intLowHigh($input, $length) + { + $maxInput = (256 << ($length * 8) - 1); + self::validateInteger($length, 1, 4, __FUNCTION__); + self::validateInteger($input, 0, $maxInput, __FUNCTION__); + $outp = ""; + for ($i = 0; $i < $length; $i++) { + $outp .= chr($input % 256); + $input = (int)($input / 256); + } + return $outp; + } + + /** + * Throw an exception if the argument given is not a boolean + * + * @param boolean $test the input to test + * @param string $source the name of the function calling this + */ + protected static function validateBoolean($test, $source) + { + if (!($test === true || $test === false)) { + throw new InvalidArgumentException("Argument to $source must be a boolean"); + } + } + + /** + * Throw an exception if the argument given is not a float within the specified range + * + * @param float $test the input to test + * @param float $min the minimum allowable value (inclusive) + * @param float $max the maximum allowable value (inclusive) + * @param string $source the name of the function calling this + * @param string $argument the name of the invalid parameter + */ + protected static function validateFloat($test, $min, $max, $source, $argument = "Argument") + { + if (!is_numeric($test)) { + throw new InvalidArgumentException("$argument given to $source must be a float, but '$test' was given."); + } + if ($test < $min || $test > $max) { + throw new InvalidArgumentException("$argument given to $source must be in range $min to $max, but $test was given."); + } + } + + /** + * Throw an exception if the argument given is not an integer within the specified range + * + * @param int $test the input to test + * @param int $min the minimum allowable value (inclusive) + * @param int $max the maximum allowable value (inclusive) + * @param string $source the name of the function calling this + * @param string $argument the name of the invalid parameter + */ + protected static function validateInteger($test, $min, $max, $source, $argument = "Argument") + { + self::validateIntegerMulti($test, [[$min, $max]], $source, $argument); + } + + /** + * Throw an exception if the argument given is not an integer within one of the specified ranges + * + * @param int $test the input to test + * @param array $ranges array of two-item min/max ranges. + * @param string $source the name of the function calling this + * @param string $source the name of the function calling this + * @param string $argument the name of the invalid parameter + */ + protected static function validateIntegerMulti($test, array $ranges, $source, $argument = "Argument") + { + if (!is_integer($test)) { + throw new InvalidArgumentException("$argument given to $source must be a number, but '$test' was given."); + } + $match = false; + foreach ($ranges as $range) { + $match |= $test >= $range[0] && $test <= $range[1]; + } + if (!$match) { + // Put together a good error "range 1-2 or 4-6" + $rangeStr = "range "; + for ($i = 0; $i < count($ranges); $i++) { + $rangeStr .= $ranges[$i][0] . "-" . $ranges[$i][1]; + if ($i == count($ranges) - 1) { + continue; + } elseif ($i == count($ranges) - 2) { + $rangeStr .= " or "; + } else { + $rangeStr .= ", "; + } + } + throw new InvalidArgumentException("$argument given to $source must be in $rangeStr, but $test was given."); + } + } + + /** + * Throw an exception if the argument given can't be cast to a string + * + * @param string $test the input to test + * @param string $source the name of the function calling this + * @param string $argument the name of the parameter being validated + * @throws InvalidArgumentException Where the argument is not valid + */ + protected static function validateString($test, $source, $argument = "Argument") + { + if (is_object($test) && !method_exists($test, '__toString')) { + throw new InvalidArgumentException("$argument to $source must be a string"); + } + } + + /** + * Throw an exception if the argument doesn't match the given regex. + * + * @param string $test the input to test + * @param string $source the name of the function calling this + * @param string $regex valid values for this attribute, as a regex + * @param string $argument the name of the parameter being validated + * @throws InvalidArgumentException Where the argument is not valid + */ + protected static function validateStringRegex($test, $source, $regex, $argument = "Argument") + { + if (preg_match($regex, $test) === 0) { + throw new InvalidArgumentException("$argument given to $source is invalid. It should match regex '$regex', but '$test' was given."); + } + } +} diff --git a/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/resources/capabilities.json b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/resources/capabilities.json new file mode 100644 index 00000000000..c60cac0deb7 --- /dev/null +++ b/htdocs/includes/mike42/escpos-php/src/Mike42/Escpos/resources/capabilities.json @@ -0,0 +1,1760 @@ +{ + "encodings": { + "CP1001": { + "name": "Unimplemented Star-specific CP1001" + }, + "CP1098": { + "name": "CP1098" + }, + "CP1125": { + "iconv": "CP1125", + "name": "CP1125", + "python_encode": "cp1125" + }, + "CP1250": { + "iconv": "CP1250", + "name": "CP1250", + "python_encode": "cp1250" + }, + "CP1251": { + "iconv": "CP1251", + "name": "CP1251", + "python_encode": "cp1251" + }, + "CP1252": { + "iconv": "CP1252", + "name": "CP1252", + "python_encode": "cp1252" + }, + "CP1253": { + "iconv": "CP1253", + "name": "CP1253", + "python_encode": "cp1253" + }, + "CP1254": { + "iconv": "CP1254", + "name": "CP1254", + "python_encode": "cp1254" + }, + "CP1255": { + "iconv": "CP1255", + "name": "CP1255", + "python_encode": "cp1255" + }, + "CP1256": { + "iconv": "CP1256", + "name": "CP1256", + "python_encode": "cp1256" + }, + "CP1257": { + "iconv": "CP1257", + "name": "CP1257", + "python_encode": "cp1257" + }, + "CP1258": { + "iconv": "CP1258", + "name": "CP1258", + "python_encode": "cp1258" + }, + "CP2001": { + "name": "Unimplemented Star-specific CP2001" + }, + "CP3001": { + "name": "Unimplemented Star-specific CP3001" + }, + "CP3002": { + "name": "Unimplemented Star-specific CP3002" + }, + "CP3011": { + "data": [ + "\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5", + "\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00a2\u00a3\u00a5\u20a7\u0192", + "\u00e1\u00ed\u00f3\u00fa\u00f1\u00d1\u00aa\u00ba\u00bf\u2310\u00ac\u00bd\u00bc\u00a1\u00ab\u00bb", + "\u2591\u2592\u2593\u2502\u2524\u0100\u2562\u0146\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510", + "\u2514\u2534\u252c\u251c\u2500\u253c\u0101\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567", + "\u0160\u2564\u010d\u010c\u2558\u2552\u0123\u012a\u012b\u2518\u250c\u2588\u2584\u016b\u016a\u2580", + "\u03b1\u00df\u0393\u03c0\u03a3\u03c3\u00b5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229", + "\u0112\u0113\u0122\u0137\u0136\u013c\u013b\u017e\u017d\u2219\u00b7\u221a\u0145\u0161\u25a0 " + ], + "name": "CP3011 Latvian" + }, + "CP3012": { + "data": [ + "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f", + "\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f", + "\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f", + "\u2591\u2592\u2593\u2502\u2524\u0100\u2562\u0146\u2555\u2563\u2551\u2557\u255d\u014c\u255b\u2510", + "\u2514\u2534\u252c\u251c\u2500\u253c\u0101\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567", + "\u0160\u2564\u010d\u010c\u2558\u2552\u0123\u012a\u012b\u2518\u250c\u2588\u2584\u016b\u016a\u2580", + "\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f", + "\u0112\u0113\u0122\u0137\u0136\u013c\u013b\u017e\u017d\u2219\u00b7\u221a\u0145\u0161\u25a0 " + ], + "name": "CP3012 Cyrillic" + }, + "CP3021": { + "name": "Unimplemented Star-specific CP3021" + }, + "CP3041": { + "name": "Unimplemented Star-specific CP3041" + }, + "CP3840": { + "name": "Unimplemented Star-specific CP3840" + }, + "CP3841": { + "name": "Unimplemented Star-specific CP3841" + }, + "CP3843": { + "name": "Unimplemented Star-specific CP3843" + }, + "CP3844": { + "name": "Unimplemented Star-specific CP3844" + }, + "CP3845": { + "name": "Unimplemented Star-specific CP3845" + }, + "CP3846": { + "name": "Unimplemented Star-specific CP3846" + }, + "CP3847": { + "name": "Unimplemented Star-specific CP3847" + }, + "CP3848": { + "name": "Unimplemented Star-specific CP3848" + }, + "CP437": { + "iconv": "CP437", + "name": "CP437", + "python_encode": "cp437" + }, + "CP720": { + "name": "CP720", + "python_encode": "cp720" + }, + "CP737": { + "iconv": "CP737", + "name": "CP737", + "python_encode": "cp737" + }, + "CP747": { + "name": "CP747" + }, + "CP772": { + "iconv": "CP772", + "name": "CP772" + }, + "CP774": { + "iconv": "CP774", + "name": "CP774" + }, + "CP775": { + "iconv": "CP775", + "name": "CP775", + "python_encode": "cp775" + }, + "CP850": { + "iconv": "CP850", + "name": "CP850", + "python_encode": "cp850" + }, + "CP851": { + "name": "Greek CP851", + "notes": "Not used, due to inconsistencies between implementations." + }, + "CP852": { + "iconv": "CP852", + "name": "CP852", + "python_encode": "cp852" + }, + "CP853": { + "name": "CP853" + }, + "CP855": { + "iconv": "CP855", + "name": "CP855", + "python_encode": "cp855" + }, + "CP857": { + "iconv": "CP857", + "name": "CP857", + "python_encode": "cp857" + }, + "CP858": { + "name": "CP858", + "python_encode": "cp858" + }, + "CP860": { + "iconv": "CP860", + "name": "CP860", + "python_encode": "cp860" + }, + "CP861": { + "iconv": "CP861", + "name": "CP861", + "python_encode": "cp861" + }, + "CP862": { + "iconv": "CP862", + "name": "CP862", + "python_encode": "cp862" + }, + "CP863": { + "iconv": "CP863", + "name": "CP863", + "python_encode": "cp863" + }, + "CP864": { + "iconv": "CP864", + "name": "CP864", + "python_encode": "cp864" + }, + "CP865": { + "iconv": "CP865", + "name": "CP865", + "python_encode": "cp865" + }, + "CP866": { + "iconv": "CP866", + "name": "CP866", + "python_encode": "cp866" + }, + "CP869": { + "iconv": "CP869", + "name": "CP869", + "python_encode": "cp869" + }, + "CP874": { + "iconv": "CP874", + "name": "CP874", + "python_encode": "cp874" + }, + "CP928": { + "name": "CP928" + }, + "CP932": { + "iconv": "CP932", + "name": "CP932", + "python_encode": "cp932" + }, + "ISO_8859-15": { + "iconv": "ISO_8859-15", + "name": "ISO_8859-15", + "python_encode": "iso8859-15" + }, + "ISO_8859-2": { + "iconv": "ISO_8859-2", + "name": "ISO_8859-2", + "python_encode": "iso8859_2" + }, + "ISO_8859-7": { + "iconv": "ISO_8859-7", + "name": "ISO_8859-7", + "python_encode": "iso8859_7" + }, + "OXHOO-EUROPEAN": { + "data": [ + "\u00c7\u00fc\u00e9\u00e2\u00e4\u00e0\u00e5\u00e7\u00ea\u00eb\u00e8\u00ef\u00ee\u00ec\u00c4\u00c5", + "\u00c9\u00e6\u00c6\u00f4\u00f6\u00f2\u00fb\u00f9\u00ff\u00d6\u00dc\u00f1\u00d1\u00aa\u00ba\u00bf", + "\u00e1\u00ed\u00f3\u00fa\u00a2\u00a3\u00a5\u20a7\u0192\u00a1\u00c3\u00e3\u00d5\u00f5\u00d8\u00f8", + "\u00b7\u00a8\u00b0`\u00b4\u00bd\u00bc\u00d7\u00f7\u2264\u2265\u00ab\u00bb\u2260\u221a\u00af", + "\u2320\u2321\u221e\u25e4\u21b5\u2191\u2193\u2192\u2190\u250c\u2510\u2514\u2518\u2022\u00ae\u00a9", + "\u2122\u2020\u00a7\u00b6\u0393\u25e2\u0398 ", + "\u00df \u03b5 ", + "\u03c4 " + ], + "name": "Oxhoo-specific European" + }, + "RK1048": { + "iconv": "RK1048", + "name": "RK1048" + }, + "TCVN-3-1": { + "data": [ + " ", + " ", + " \u0103\u00e2\u00ea\u00f4\u01a1\u01b0\u0111 ", + " \u00e0\u1ea3\u00e3\u00e1\u1ea1 \u1eb1\u1eb3\u1eb5\u1eaf ", + " \u1eb7\u1ea7\u1ea9\u1eab\u1ea5\u1ead\u00e8 \u1ebb\u1ebd", + "\u00e9\u1eb9\u1ec1\u1ec3\u1ec5\u1ebf\u1ec7\u00ec\u1ec9 \u0129\u00ed\u1ecb\u00f2", + " \u1ecf\u00f5\u00f3\u1ecd\u1ed3\u1ed5\u1ed7\u1ed1\u1ed9\u1edd\u1edf\u1ee1\u1edb\u1ee3\u00f9", + " \u1ee7\u0169\u00fa\u1ee5\u1eeb\u1eed\u1eef\u1ee9\u1ef1\u1ef3\u1ef7\u1ef9\u00fd\u1ef5 " + ], + "name": "Vietnamese TCVN-3 1" + }, + "TCVN-3-2": { + "data": [ + " ", + " ", + " \u0102\u00c2 \u00d0 \u00ca\u00d4\u01a0\u01af ", + " \u00c0\u1ea2\u00c3\u00c1\u1ea0 \u1eb0\u1eb2\u1eb4\u1eae ", + " \u1eb6\u1ea6\u1ea8\u1eaa\u1ea4\u1eac\u00c8 \u1eba\u1ebc", + "\u00c9\u1eb8\u1ec0\u1ec2\u1ec4\u1ebe\u1ec6\u00cc\u1ec8 \u0128\u00cd\u1eca\u00d2", + " \u1ece\u00d5\u00d3\u1ecc\u1ed2\u1ed4\u1ed6\u1ed0\u1ed8\u1edc\u1ede\u1ee0\u1eda\u1ee2\u00d9", + " \u1ee6\u0168\u00da\u1ee4\u1eea\u1eec\u1eee\u1ee8\u1ef0\u1ef2\u1ef6\u1ef8\u00dd\u1ef4 " + ], + "name": "Vietnamese TCVN-3 1" + }, + "Unknown": { + "name": "Unknown", + "notes": "Code page that has not yet been identified." + } + }, + "profiles": { + "AF-240": { + "codePages": { + "0": "OXHOO-EUROPEAN" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": false, + "barcodeB": false, + "bitImageColumn": false, + "bitImageRaster": false, + "graphics": false, + "highDensity": false, + "paperFullCut": false, + "paperPartCut": false, + "pdf417Code": false, + "pulseBel": false, + "pulseStandard": false, + "qrCode": false, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 20, + "name": "Font A" + } + }, + "media": { + "width": { + "mm": 120, + "pixels": 100 + } + }, + "name": "AF-240 Customer Display", + "notes": "This is a two-line, ESC/POS-aware customer display from Oxhoo. The ESC/POS command mode can be activated persistently by sending:\n\n echo -ne \"\\n\\x02\\x05\\x43\\x31\\x03\" > /dev/ttyUSB0\n", + "vendor": "Oxhoo" + }, + "NT-5890K": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "9": "Unknown", + "10": "Unknown", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "20": "Unknown", + "21": "Unknown", + "22": "Unknown", + "23": "Unknown", + "24": "CP747", + "25": "CP1257", + "27": "CP1258", + "28": "CP864", + "31": "Unknown", + "32": "CP1255", + "50": "CP437", + "52": "CP437", + "53": "CP858", + "54": "CP852", + "55": "CP860", + "56": "CP861", + "57": "CP863", + "58": "CP865", + "59": "CP866", + "60": "CP855", + "61": "CP857", + "62": "CP862", + "63": "CP864", + "64": "CP737", + "65": "CP851", + "66": "CP869", + "68": "CP772", + "69": "CP774", + "71": "CP1252", + "72": "CP1250", + "73": "CP1251", + "74": "CP3840", + "76": "CP3843", + "77": "CP3844", + "78": "CP3845", + "79": "CP3846", + "80": "CP3847", + "81": "CP3848", + "83": "CP2001", + "84": "CP3001", + "85": "CP3002", + "86": "CP3011", + "87": "CP3012", + "88": "CP3021", + "89": "CP3041", + "90": "CP1253", + "91": "CP1254", + "92": "CP1256", + "93": "CP720", + "94": "CP1258", + "95": "CP775", + "96": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": false, + "barcodeB": false, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": false, + "highDensity": true, + "paperFullCut": false, + "paperPartCut": false, + "pdf417Code": false, + "pulseBel": false, + "pulseStandard": true, + "qrCode": false, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 32, + "name": "Font A" + }, + "1": { + "columns": 42, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": 57.5, + "pixels": 384 + } + }, + "name": "NT-5890K", + "notes": "", + "vendor": "Netum" + }, + "OCD-100": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "9": "CP852", + "10": "CP862", + "11": "CP866", + "12": "CP1251", + "13": "CP1254", + "14": "CP1255", + "15": "CP1257", + "16": "CP1252", + "17": "CP1253", + "19": "CP858" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": false, + "barcodeB": false, + "bitImageColumn": false, + "bitImageRaster": false, + "graphics": false, + "highDensity": false, + "paperFullCut": false, + "paperPartCut": false, + "pdf417Code": false, + "pulseBel": false, + "pulseStandard": false, + "qrCode": false, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 20, + "name": "Font A" + } + }, + "media": { + "width": { + "mm": 180, + "pixels": 100 + } + }, + "name": "OCD-100 Customer Display", + "notes": "This is a two-line, ESC/POS-aware customer display from Aures. It has some graphics support via custom fonts, but is otherwise text-only. This profile is also suitable for the OCD-150 pole-mounted display.\n", + "vendor": "Aures" + }, + "OCD-300": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "9": "CP852", + "10": "CP862", + "11": "CP866", + "12": "CP1251", + "13": "CP1254", + "14": "CP1255", + "15": "CP1257", + "16": "CP1252", + "17": "CP1253", + "18": "CP1250", + "19": "CP858", + "20": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": false, + "barcodeB": false, + "bitImageColumn": false, + "bitImageRaster": false, + "graphics": false, + "highDensity": false, + "paperFullCut": false, + "paperPartCut": false, + "pdf417Code": false, + "pulseBel": false, + "pulseStandard": false, + "qrCode": false, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 20, + "name": "Font A" + } + }, + "media": { + "width": { + "mm": 130.2, + "pixels": 240 + } + }, + "name": "OCD-300 Customer Display", + "notes": "This is a two-line, ESC/POS-aware customer display from Aures. It has some graphics support via vendor-provided tools, but is otherwise text-only.\n", + "vendor": "Aures" + }, + "P822D": { + "codePages": { + "0": "CP437", + "1": "Unknown", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "9": "Unknown", + "10": "Unknown", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "20": "Unknown", + "21": "Unknown", + "22": "Unknown", + "23": "Unknown", + "24": "CP747", + "25": "CP1257", + "27": "Unknown", + "28": "CP864", + "29": "CP1001", + "30": "Unknown", + "31": "Unknown", + "32": "CP1255", + "33": "CP720", + "34": "CP1256", + "35": "CP1257", + "50": "CP437", + "51": "Unknown", + "52": "CP437", + "53": "CP858", + "54": "CP852", + "55": "CP860", + "56": "CP861", + "57": "CP863", + "58": "CP865", + "59": "CP866", + "60": "CP855", + "61": "CP857", + "62": "CP862", + "63": "CP864", + "64": "CP737", + "65": "CP851", + "66": "CP869", + "67": "CP928", + "68": "CP772", + "69": "CP774", + "70": "CP874", + "71": "CP1252", + "72": "CP1250", + "73": "CP1251", + "74": "CP3840", + "75": "CP3841", + "76": "CP3843", + "77": "CP3844", + "78": "CP3845", + "79": "CP3846", + "80": "CP3847", + "81": "CP3848", + "82": "CP1001", + "83": "CP2001", + "84": "CP3001", + "85": "CP3002", + "86": "CP3011", + "87": "CP3012", + "88": "CP3021", + "89": "CP3041", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": false, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "P822D", + "notes": "", + "vendor": "PBM" + }, + "POS-5890": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "9": "Unknown", + "10": "Unknown", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "20": "Unknown", + "21": "Unknown", + "22": "Unknown", + "23": "Unknown", + "24": "CP747", + "25": "CP1257", + "27": "CP1258", + "28": "CP864", + "31": "Unknown", + "32": "CP1255", + "50": "CP437", + "52": "CP437", + "53": "CP858", + "54": "CP852", + "55": "CP860", + "56": "CP861", + "57": "CP863", + "58": "CP865", + "59": "CP866", + "60": "CP855", + "61": "CP857", + "62": "CP862", + "63": "CP864", + "64": "CP737", + "65": "CP851", + "66": "CP869", + "68": "CP772", + "69": "CP774", + "71": "CP1252", + "72": "CP1250", + "73": "CP1251", + "74": "CP3840", + "76": "CP3843", + "77": "CP3844", + "78": "CP3845", + "79": "CP3846", + "80": "CP3847", + "81": "CP3848", + "83": "CP2001", + "84": "CP3001", + "85": "CP3002", + "86": "CP3011", + "87": "CP3012", + "88": "CP3021", + "89": "CP3041", + "90": "CP1253", + "91": "CP1254", + "92": "CP1256", + "93": "CP720", + "94": "CP1258", + "95": "CP775", + "96": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": false, + "barcodeB": false, + "bitImageColumn": false, + "bitImageRaster": true, + "graphics": false, + "highDensity": true, + "paperFullCut": false, + "paperPartCut": false, + "pdf417Code": false, + "pulseBel": false, + "pulseStandard": true, + "qrCode": false, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 32, + "name": "Font A" + }, + "1": { + "columns": 42, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": 57.5, + "pixels": 384 + } + }, + "name": "POS5890 Series", + "notes": "POS-5890 thermal printer series, also marketed under various other names.\n", + "vendor": "Zjiang" + }, + "SP2000": { + "codePages": { + "0": "CP437", + "1": "CP437", + "2": "CP932", + "3": "CP437", + "4": "CP858", + "5": "CP852", + "6": "CP860", + "7": "CP861", + "8": "CP863", + "9": "CP865", + "10": "CP866", + "11": "CP855", + "12": "CP857", + "13": "CP862", + "14": "CP864", + "15": "CP737", + "16": "CP851", + "17": "CP869", + "18": "CP928", + "19": "CP772", + "20": "CP774", + "21": "CP874", + "32": "CP1252", + "33": "CP1250", + "34": "CP1251", + "64": "CP3840", + "65": "CP3841", + "66": "CP3843", + "67": "CP3844", + "68": "CP3845", + "69": "CP3846", + "70": "CP3847", + "71": "CP3848", + "72": "CP1001", + "73": "CP2001", + "74": "CP3001", + "75": "CP3002", + "76": "CP3011", + "77": "CP3012", + "78": "CP3021", + "79": "CP3041", + "96": "Unknown", + "97": "Unknown", + "98": "Unknown", + "99": "Unknown", + "100": "Unknown", + "101": "Unknown", + "102": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": true + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "SP2000 Series", + "notes": "Star SP2000 impact printer series with ESC/POS emulation enabled", + "vendor": "Star Micronics" + }, + "TEP-200M": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "11": "CP851", + "12": "CP853", + "13": "CP857", + "14": "CP737", + "15": "ISO_8859-7", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "20": "Unknown", + "21": "CP874", + "22": "Unknown", + "23": "Unknown", + "24": "Unknown", + "25": "Unknown", + "26": "Unknown", + "30": "TCVN-3-1", + "31": "TCVN-3-2", + "32": "CP720", + "33": "CP775", + "34": "CP855", + "35": "CP861", + "36": "CP862", + "37": "CP864", + "38": "CP869", + "39": "ISO_8859-2", + "40": "ISO_8859-15", + "41": "CP1098", + "42": "CP774", + "43": "CP772", + "44": "CP1125", + "45": "CP1250", + "46": "CP1251", + "47": "CP1253", + "48": "CP1254", + "49": "CP1255", + "50": "CP1256", + "51": "CP1257", + "52": "CP1258", + "53": "RK1048", + "66": "Unknown", + "67": "Unknown", + "68": "Unknown", + "69": "Unknown", + "70": "Unknown", + "71": "Unknown", + "72": "Unknown", + "73": "Unknown", + "74": "Unknown", + "75": "Unknown", + "82": "Unknown", + "254": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "TEP200M Series", + "notes": "", + "vendor": "EPOS" + }, + "TM-P80": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "11": "CP851", + "12": "CP853", + "13": "CP857", + "14": "CP737", + "15": "ISO_8859-7", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "20": "Unknown", + "21": "CP874", + "22": "Unknown", + "23": "Unknown", + "24": "Unknown", + "25": "Unknown", + "26": "Unknown", + "30": "TCVN-3-1", + "31": "TCVN-3-2", + "32": "CP720", + "33": "CP775", + "34": "CP855", + "35": "CP861", + "36": "CP862", + "37": "CP864", + "38": "CP869", + "39": "ISO_8859-2", + "40": "ISO_8859-15", + "41": "CP1098", + "42": "CP774", + "43": "CP772", + "44": "CP1125", + "45": "CP1250", + "46": "CP1251", + "47": "CP1253", + "48": "CP1254", + "49": "CP1255", + "50": "CP1256", + "51": "CP1257", + "52": "CP1258", + "53": "RK1048", + "66": "Unknown", + "67": "Unknown", + "68": "Unknown", + "69": "Unknown", + "70": "Unknown", + "71": "Unknown", + "72": "Unknown", + "73": "Unknown", + "74": "Unknown", + "75": "Unknown", + "82": "Unknown", + "254": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + }, + "2": { + "columns": 24, + "name": "Kanji" + } + }, + "media": { + "width": { + "mm": 72, + "pixels": 576 + } + }, + "name": "TM-P80", + "notes": "Portable printer (48-column mode)", + "vendor": "Epson" + }, + "TM-P80-42col": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "11": "CP851", + "12": "CP853", + "13": "CP857", + "14": "CP737", + "15": "ISO_8859-7", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "20": "Unknown", + "21": "CP874", + "22": "Unknown", + "23": "Unknown", + "24": "Unknown", + "25": "Unknown", + "26": "Unknown", + "30": "TCVN-3-1", + "31": "TCVN-3-2", + "32": "CP720", + "33": "CP775", + "34": "CP855", + "35": "CP861", + "36": "CP862", + "37": "CP864", + "38": "CP869", + "39": "ISO_8859-2", + "40": "ISO_8859-15", + "41": "CP1098", + "42": "CP774", + "43": "CP772", + "44": "CP1125", + "45": "CP1250", + "46": "CP1251", + "47": "CP1253", + "48": "CP1254", + "49": "CP1255", + "50": "CP1256", + "51": "CP1257", + "52": "CP1258", + "53": "RK1048", + "66": "Unknown", + "67": "Unknown", + "68": "Unknown", + "69": "Unknown", + "70": "Unknown", + "71": "Unknown", + "72": "Unknown", + "73": "Unknown", + "74": "Unknown", + "75": "Unknown", + "82": "Unknown", + "254": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 60, + "name": "Font B" + }, + "2": { + "columns": 21, + "name": "Kanji" + } + }, + "media": { + "width": { + "mm": 63.6, + "pixels": 546 + } + }, + "name": "TM-P80 (42 column mode)", + "notes": "Portable printer (42-column mode)", + "vendor": "Epson" + }, + "TM-T88II": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "19": "CP858", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "TM-T88II", + "notes": "Epson TM-T88II profile. This printer is discontinued by the Vendor, and has similar feature support to the TM-T88III. The code page mapping is documented in the \"TM-T88II/T88III Technical Reference Guide\".\n", + "vendor": "Epson" + }, + "TM-T88III": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "16": "CP1252", + "17": "CP866", + "18": "CP862", + "19": "CP858", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "TM-T88III", + "notes": "Epson TM-T88III profile. This printer has similar feature support to the TM-T88II. The code page mapping is documented in the \"TM-T88II/T88III Technical Reference Guide\".\n", + "vendor": "Epson" + }, + "TM-T88IV": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "TM-T88IV", + "notes": "Epson TM-T88IV profile\n", + "vendor": "Epson" + }, + "TM-T88IV-SA": { + "codePages": { + "0": "CP437", + "20": "Unknown", + "21": "CP874", + "26": "Unknown", + "30": "TCVN-3-1", + "31": "TCVN-3-2" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "TM-T88IV South Asia", + "notes": "Epson TM-T88IV profile (South Asia models)\n", + "vendor": "Epson" + }, + "TM-U220": { + "codePages": { + "0": "CP437" + }, + "colors": { + "0": "black", + "1": "alternate" + }, + "features": { + "barcodeA": false, + "barcodeB": false, + "bitImageColumn": true, + "bitImageRaster": false, + "graphics": false, + "highDensity": false, + "paperFullCut": false, + "paperPartCut": false, + "pdf417Code": false, + "pulseBel": false, + "pulseStandard": true, + "qrCode": false, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": 80, + "pixels": "Unknown" + } + }, + "name": "TM-U220", + "notes": "Two-color impact printer with 80mm output", + "vendor": "Epson" + }, + "TSP600": { + "codePages": { + "0": "CP437", + "1": "CP437", + "2": "CP932", + "3": "CP437", + "4": "CP858", + "5": "CP852", + "6": "CP860", + "7": "CP861", + "8": "CP863", + "9": "CP865", + "10": "CP866", + "11": "CP855", + "12": "CP857", + "13": "CP862", + "14": "CP864", + "15": "CP737", + "16": "CP851", + "17": "CP869", + "18": "CP928", + "19": "CP772", + "20": "CP774", + "21": "CP874", + "32": "CP1252", + "33": "CP1250", + "34": "CP1251", + "64": "CP3840", + "65": "CP3841", + "66": "CP3843", + "67": "CP3844", + "68": "CP3845", + "69": "CP3846", + "70": "CP3847", + "71": "CP3848", + "72": "CP1001", + "73": "CP2001", + "74": "CP3001", + "75": "CP3002", + "76": "CP3011", + "77": "CP3012", + "78": "CP3021", + "79": "CP3041", + "96": "Unknown", + "97": "Unknown", + "98": "Unknown", + "99": "Unknown", + "100": "Unknown", + "101": "Unknown", + "102": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": true + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "TSP600 Series", + "notes": "Star TSP600 thermal printer series with ESC/POS emulation enabled", + "vendor": "Star Micronics" + }, + "TUP500": { + "codePages": { + "0": "CP437", + "1": "CP437", + "2": "CP932", + "3": "CP437", + "4": "CP858", + "5": "CP852", + "6": "CP860", + "7": "CP861", + "8": "CP863", + "9": "CP865", + "10": "CP866", + "11": "CP855", + "12": "CP857", + "13": "CP862", + "14": "CP864", + "15": "CP737", + "16": "CP851", + "17": "CP869", + "18": "CP928", + "19": "CP772", + "20": "CP774", + "21": "CP874", + "32": "CP1252", + "33": "CP1250", + "34": "CP1251", + "64": "CP3840", + "65": "CP3841", + "66": "CP3843", + "67": "CP3844", + "68": "CP3845", + "69": "CP3846", + "70": "CP3847", + "71": "CP3848", + "72": "CP1001", + "73": "CP2001", + "74": "CP3001", + "75": "CP3002", + "76": "CP3011", + "77": "CP3012", + "78": "CP3021", + "79": "CP3041", + "96": "Unknown", + "97": "Unknown", + "98": "Unknown", + "99": "Unknown", + "100": "Unknown", + "101": "Unknown", + "102": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": true + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "TUP500 Series", + "notes": "Star TUP500 thermal printer series with ESC/POS emulation enabled", + "vendor": "Star Micronics" + }, + "default": { + "codePages": { + "0": "CP437", + "1": "CP932", + "2": "CP850", + "3": "CP860", + "4": "CP863", + "5": "CP865", + "6": "Unknown", + "7": "Unknown", + "8": "Unknown", + "11": "CP851", + "12": "CP853", + "13": "CP857", + "14": "CP737", + "15": "ISO_8859-7", + "16": "CP1252", + "17": "CP866", + "18": "CP852", + "19": "CP858", + "20": "Unknown", + "21": "CP874", + "22": "Unknown", + "23": "Unknown", + "24": "Unknown", + "25": "Unknown", + "26": "Unknown", + "30": "TCVN-3-1", + "31": "TCVN-3-2", + "32": "CP720", + "33": "CP775", + "34": "CP855", + "35": "CP861", + "36": "CP862", + "37": "CP864", + "38": "CP869", + "39": "ISO_8859-2", + "40": "ISO_8859-15", + "41": "CP1098", + "42": "CP774", + "43": "CP772", + "44": "CP1125", + "45": "CP1250", + "46": "CP1251", + "47": "CP1253", + "48": "CP1254", + "49": "CP1255", + "50": "CP1256", + "51": "CP1257", + "52": "CP1258", + "53": "RK1048", + "66": "Unknown", + "67": "Unknown", + "68": "Unknown", + "69": "Unknown", + "70": "Unknown", + "71": "Unknown", + "72": "Unknown", + "73": "Unknown", + "74": "Unknown", + "75": "Unknown", + "82": "Unknown", + "254": "Unknown", + "255": "Unknown" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": true, + "barcodeB": true, + "bitImageColumn": true, + "bitImageRaster": true, + "graphics": true, + "highDensity": true, + "paperFullCut": true, + "paperPartCut": true, + "pdf417Code": true, + "pulseBel": false, + "pulseStandard": true, + "qrCode": true, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "Default", + "notes": "Default ESC/POS profile, suitable for standards-compliant or Epson-branded printers. This profile allows the use of standard ESC/POS features, and can encode a variety of code pages.\n", + "vendor": "Generic" + }, + "simple": { + "codePages": { + "0": "CP437" + }, + "colors": { + "0": "black" + }, + "features": { + "barcodeA": false, + "barcodeB": false, + "bitImageColumn": false, + "bitImageRaster": true, + "graphics": false, + "highDensity": true, + "paperFullCut": false, + "paperPartCut": false, + "pdf417Code": false, + "pulseBel": false, + "pulseStandard": true, + "qrCode": false, + "starCommands": false + }, + "fonts": { + "0": { + "columns": 42, + "name": "Font A" + }, + "1": { + "columns": 56, + "name": "Font B" + } + }, + "media": { + "width": { + "mm": "Unknown", + "pixels": "Unknown" + } + }, + "name": "Simple", + "notes": "A profile for use in printers with unknown or poor compatibility. This profile indicates that a small number of features are supported, so that commands are not sent a printer that is unlikely to understand them.\n", + "vendor": "Generic" + } + } +} \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/src/NetworkPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/NetworkPrintConnector.php deleted file mode 100644 index 4dd2c39f115..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/NetworkPrintConnector.php +++ /dev/null @@ -1,39 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * PrintConnector for directly opening a network socket to a printer to send it commands. - */ -class NetworkPrintConnector extends FilePrintConnector { - public function __construct($ip, $port = "9100") { - $this -> fp = @fsockopen($ip, $port, $errno, $errstr); - if($this -> fp === false) { - throw new Exception("Cannot initialise NetworkPrintConnector: " . $errstr); - } - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/P822DCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/P822DCapabilityProfile.php deleted file mode 100644 index 7c3b5abe6dd..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/P822DCapabilityProfile.php +++ /dev/null @@ -1,90 +0,0 @@ - CodePage::CP437, - 1 => false, // Katakana - 2 => CodePage::CP850, - 3 => CodePage::CP860, - 4 => CodePage::CP863, - 5 => CodePage::CP865, - 6 => false, // Western Europe - 7 => false, // Greek - 8 => false, // Hebrew - 9 => false, // Eastern europe - 10 => false, // Iran - 16 => CodePage::CP1252 , - 17 => CodePage::CP866 , - 18 => CodePage::CP852 , - 19 => CodePage::CP858, - 20 => false, // Iran II - 21 => false, // latvian - 22 => false, //Arabic - 23 => false, // PT151, 1251 - 24 => CodePage::CP747, - 25 => CodePage::CP1257, - 27 => false, // Vietnam, - 28 => CodePage::CP864, - 29 => CodePage::CP1001, - 30 => false, // Uigur - 31 => false, // Hebrew - 32 => CodePage::CP1255, - 33 => CodePage::CP720, - 34 => CodePage::CP1256, - 35 => CodePage::CP1257, - 255 => false, // Thai - - 50 => CodePage::CP437, - 51 => false, // Jatakana, - 52 => CodePage::CP437, - 53 => CodePage::CP858, - 54 => CodePage::CP852, - 55 => CodePage::CP860, - 56 => CodePage::CP861, - 57 => CodePage::CP863, - 58 => CodePage::CP865, - 59 => CodePage::CP866, - 60 => CodePage::CP855, - 61 => CodePage::CP857, - 62 => CodePage::CP862, - 63 => CodePage::CP864, - 64 => CodePage::CP737, - 65 => CodePage::CP851, - 66 => CodePage::CP869, - 67 => CodePage::CP928, - 68 => CodePage::CP772, - 69 => CodePage::CP774, - 70 => CodePage::CP874, - 71 => CodePage::CP1252, - 72 => CodePage::CP1250, - 73 => CodePage::CP1251, - 74 => CodePage::CP3840, - 75 => CodePage::CP3841, - 76 => CodePage::CP3843, - 77 => CodePage::CP3844, - 78 => CodePage::CP3845, - 79 => CodePage::CP3846, - 80 => CodePage::CP3847, - 81 => CodePage::CP3848, - 82 => CodePage::CP1001, - 83 => CodePage::CP2001, - 84 => CodePage::CP3001, - 85 => CodePage::CP3002, - 86 => CodePage::CP3011, - 87 => CodePage::CP3012, - 88 => CodePage::CP3021, - 89 => CodePage::CP3041 - ); - } - - public function getSupportsGraphics() { - /* Ask the driver to use bitImage wherever possible instead of graphics */ - return false; - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/PrintBuffer.php b/htdocs/includes/mike42/escpos-php/src/PrintBuffer.php deleted file mode 100644 index 9e3b110085f..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/PrintBuffer.php +++ /dev/null @@ -1,75 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Print buffers manage newlines and character encoding for the target printer. - * They are used as a swappable component: text or image-based output. - * - * - Text output (EscposPrintBuffer) is the fast default, and is recommended for - * most people, as the text output can be more directly manipulated by ESC/POS - * commands. - * - Image output (ImagePrintBuffer) is designed to accept more encodings than the - * physical printer supports, by rendering the text to small images on-the-fly. - * This takes a lot more CPU than sending text, but is necessary for some users. - * - If your use case fits outside these, then a further speed/flexibility trade-off - * can be made by printing directly from generated HTML or PDF. - */ -interface PrintBuffer { - /** - * Cause the buffer to send any partial input and wait on a newline. - * If the printer is already on a new line, this does nothing. - */ - function flush(); - - /** - * Used by Escpos to check if a printer is set. - */ - function getPrinter(); - - /** - * Used by Escpos to hook up one-to-one link between buffers and printers. - * - * @param Escpos $printer New printer - */ - function setPrinter(Escpos $printer = null); - - /** - * Accept UTF-8 text for printing. - * - * @param string $text Text to print - */ - function writeText($text); - - /** - * Accept 8-bit text in the current encoding and add it to the buffer. - * - * @param string $text Text to print, already the target encoding. - */ - function writeTextRaw($text); -} -?> \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/src/PrintConnector.php b/htdocs/includes/mike42/escpos-php/src/PrintConnector.php deleted file mode 100644 index f1d37be9c55..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/PrintConnector.php +++ /dev/null @@ -1,56 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Interface passed to Escpos class for receiving print data. Print connectors - * are responsible for transporting this to the actual printer. - */ -interface PrintConnector { - /** - * Print connectors should cause a NOTICE if they are deconstructed - * when they have not been finalized. - */ - public function __destruct(); - - /** - * Finish using this print connector (close file, socket, send - * accumulated output, etc). - */ - public function finalize(); - - /** - * @param string $data - * @return Data read from the printer, or false where reading is not possible. - */ - public function read($len); - - /** - * @param string $data - */ - public function write($data); -} diff --git a/htdocs/includes/mike42/escpos-php/src/SimpleCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/SimpleCapabilityProfile.php deleted file mode 100644 index 7076b5e16cb..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/SimpleCapabilityProfile.php +++ /dev/null @@ -1,17 +0,0 @@ - CodePage::CP437); - } - - public function getSupportsGraphics() { - /* Ask the driver to use bitImage wherever possible instead of graphics */ - return false; - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/StarCapabilityProfile.php b/htdocs/includes/mike42/escpos-php/src/StarCapabilityProfile.php deleted file mode 100644 index f61774a5e30..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/StarCapabilityProfile.php +++ /dev/null @@ -1,82 +0,0 @@ - "ÇüéâäàåçêëèïîìÄÅ" . - "ÉæÆôöòûùÿÖÜ¢£¥₧ƒ" . - "áíóúñѪº¿⌐¬½¼¡«»" . - "░▒▓│┤Ā╢ņ╕╣║╗╝╜╛┐" . - "└┴┬├─┼ā╟╚╔╩╦╠═╬╧" . - "Š╤čČ╘╒ģĪī┘┌█▄ūŪ▀" . - "αßΓπΣσµτΦΘΩδ∞φε∩" . - "ĒēĢķĶļĻžŽ∙·√Ņš■ ", - 'CP3012' => "АБВГДЕЖЗИЙКЛМНОП" . - "РСТУФХЦЧШЩЪЫЬЭЮЯ" . - "абвгдежзийклмноп" . - "░▒▓│┤Ā╢ņ╕╣║╗╝Ō╛┐" . - "└┴┬├─┼ā╟╚╔╩╦╠═╬╧" . - "Š╤čČ╘╒ģĪī┘┌█▄ūŪ▀" . - "рстуфхцчшщъыьэюя" . - "ĒēĢķĶļĻžŽ∙·√Ņš■ " - ); - } - - function getSupportedCodePages() { - return array( - 0 => CodePage::CP437, // "Normal" - 1 => CodePage::CP437, - 2 => CodePage::CP932, - 3 => CodePage::CP437, - 4 => CodePage::CP858, - 5 => CodePage::CP852, - 6 => CodePage::CP860, - 7 => CodePage::CP861, - 8 => CodePage::CP863, - 9 => CodePage::CP865, - 10 => CodePage::CP866, - 11 => CodePage::CP855, - 12 => CodePage::CP857, - 13 => CodePage::CP862, - 14 => CodePage::CP864, - 15 => CodePage::CP737, - 16 => CodePage::CP851, - 17 => CodePage::CP869, - 18 => CodePage::CP928, - 19 => CodePage::CP772, - 20 => CodePage::CP774, - 21 => CodePage::CP874, - 32 => CodePage::CP1252, - 33 => CodePage::CP1250, - 34 => CodePage::CP1251, - 64 => CodePage::CP3840, - 65 => CodePage::CP3841, - 66 => CodePage::CP3843, - 67 => CodePage::CP3844, - 68 => CodePage::CP3845, - 69 => CodePage::CP3846, - 70 => CodePage::CP3847, - 71 => CodePage::CP3848, - 72 => CodePage::CP1001, - 73 => CodePage::CP2001, - 74 => CodePage::CP3001, - 75 => CodePage::CP3002, - 76 => 'custom:CP3011', - 77 => 'custom:CP3012', - 78 => CodePage::CP3021, - 79 => CodePage::CP3041, - 96 => false, // Thai Character Code 42 - 97 => false, // Thai Character Code 11 - 98 => false, // Thai Character Code 13 - 99 => false, // Thai Character Code 14 - 100 => false, // Thai Character Code 16 - 101 => false, // Thai Character Code 17 - 102 => false, // Thai Character Code 18 - 255 => false); - } - - function getSupportsStarCommands() { - /* Allows Escpos.php to substitute emulated ESC/POS commands with native ones for this printer. */ - return true; - } -} \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/src/WindowsPrintConnector.php b/htdocs/includes/mike42/escpos-php/src/WindowsPrintConnector.php deleted file mode 100644 index 717e9c1a572..00000000000 --- a/htdocs/includes/mike42/escpos-php/src/WindowsPrintConnector.php +++ /dev/null @@ -1,356 +0,0 @@ -, - * incorporating modifications by: - * - Roni Saha - * - Gergely Radics - * - Warren Doyle - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Connector for sending print jobs to - * - local ports on windows (COM1, LPT1, etc) - * - shared (SMB) printers from any platform (\\server\foo) - * For USB printers or other ports, the trick is to share the printer with a generic text driver, then access it locally. - */ -class WindowsPrintConnector implements PrintConnector { - /** - * @var array Accumulated lines of output for later use. - */ - private $buffer; - - /** - * @var string The hostname of the target machine, or null if this is a local connection. - */ - private $hostname; - - /** - * @var boolean True if a port is being used directly (must be Windows), false if network shares will be used. - */ - private $isLocal; - - /** - * @var int Platform we're running on, for selecting different commands. See PLATFORM_* constants. - */ - private $platform; - - /** - * @var string The name of the target printer (eg "Foo Printer") or port ("COM1", "LPT1"). - */ - private $printerName; - - /** - * @var string Login name for network printer, or null if not using authentication. - */ - private $userName; - - /** - * @var string Password for network printer, or null if no password is required. - */ - private $userPassword; - - /** - * @var string Workgroup that the printer is located on - */ - private $workgroup; - - /** - * @var int represents Linux - */ - const PLATFORM_LINUX = 0; - - /** - * @var int represents Mac - */ - const PLATFORM_MAC = 1; - - /** - * @var int represents Windows - */ - const PLATFORM_WIN = 2; - - /** - * @var string Valid local ports. - */ - const REGEX_LOCAL = "/^(LPT\d|COM\d)$/"; - - /** - * @var string Valid printer name. - */ - const REGEX_PRINTERNAME = "/^[\w-]+(\s[\w-]+)*$/"; - - /** - * @var string Valid smb:// URI containing hostname & printer with optional user & optional password only. - */ - const REGEX_SMB = "/^smb:\/\/([\s\w-]+(:[\s\w-]+)?@)?[\w-]+\/([\w-]+\/)?[\w-]+(\s[\w-]+)*$/"; - - /** - * @param string $dest - * @throws BadMethodCallException - */ - public function __construct($dest) { - $this -> platform = $this -> getCurrentPlatform(); - $this -> isLocal = false; - $this -> buffer = null; - $this -> userName = null; - $this -> userPassword = null; - $this -> workgroup = null; - if(preg_match(self::REGEX_LOCAL, $dest) == 1) { - // Straight to LPT1, COM1 or other local port. Allowed only if we are actually on windows. - if($this -> platform !== self::PLATFORM_WIN) { - throw new BadMethodCallException("WindowsPrintConnector can only be used to print to a local printer ('".$dest."') on a Windows computer."); - } - $this -> isLocal = true; - $this -> hostname = null; - $this -> printerName = $dest; - } else if(preg_match(self::REGEX_SMB, $dest) == 1) { - // Connect to samba share, eg smb://host/printer - $part = parse_url($dest); - $this -> hostname = $part['host']; - /* Printer name and optional workgroup */ - $path = ltrim($part['path'], '/'); - if(strpos($path, "/") !== false) { - $pathPart = explode("/", $path); - $this -> workgroup = $pathPart[0]; - $this -> printerName = $pathPart[1]; - } else { - $this -> printerName = $path; - } - /* Username and password if set */ - if(isset($part['user'])) { - $this -> userName = $part['user']; - if(isset($part['pass'])) { - $this -> userPassword = $part['pass']; - } - } - } else if(preg_match(self::REGEX_PRINTERNAME, $dest) == 1) { - // Just got a printer name. Assume it's on the current computer. - $hostname = gethostname(); - if(!$hostname) { - $hostname = "localhost"; - } - $this -> hostname = $hostname; - $this -> printerName = $dest; - } else { - throw new BadMethodCallException("Printer '" . $dest . "' is not a valid printer name. Use local port (LPT1, COM1, etc) or smb://computer/printer notation."); - } - $this -> buffer = array(); - } - - public function __destruct() { - if($this -> buffer !== null) { - trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE); - } - } - - public function finalize() { - $data = implode($this -> buffer); - $this -> buffer = null; - if($this -> platform == self::PLATFORM_WIN) { - $this -> finalizeWin($data); - } else if($this -> platform == self::PLATFORM_LINUX) { - $this -> finalizeLinux($data); - } else { - $this -> finalizeMac($data); - } - } - - /** - * Send job to printer -- platform-specific Linux code. - * - * @param string $data Print data - * @throws Exception - */ - protected function finalizeLinux($data) { - /* Non-Windows samba printing */ - $device = "//" . $this -> hostname . "/" . $this -> printerName; - if($this -> userName !== null) { - $user = ($this -> workgroup != null ? ($this -> workgroup . "\\") : "") . $this -> userName; - if($this -> userPassword == null) { - // No password - $command = sprintf("smbclient %s -U %s -c %s -N", - escapeshellarg($device), - escapeshellarg($user), - escapeshellarg("print -")); - $redactedCommand = $command; - } else { - // With password - $command = sprintf("smbclient %s %s -U %s -c %s", - escapeshellarg($device), - escapeshellarg($this -> userPassword), - escapeshellarg($user), - escapeshellarg("print -")); - $redactedCommand = sprintf("smbclient %s %s -U %s -c %s", - escapeshellarg($device), - escapeshellarg("*****"), - escapeshellarg($user), - escapeshellarg("print -")); - } - } else { - // No authentication information at all - $command = sprintf("smbclient %s -c %s -N", - escapeshellarg($device), - escapeshellarg("print -")); - $redactedCommand = $command; - } - $retval = $this -> runCommand($command, $outputStr, $errorStr, $data); - if($retval != 0) { - throw new Exception("Failed to print. Command \"$redactedCommand\" failed with exit code $retval: " . trim($outputStr)); - } - } - - protected function finalizeMac($data) { - throw new Exception("Mac printing not implemented."); - } - - /** - * Send data to printer -- platform-specific Windows code. - * - * @param string $data - */ - protected function finalizeWin($data) { - /* Windows-friendly printing of all sorts */ - if(!$this -> isLocal) { - /* Networked printing */ - $device = "\\\\" . $this -> hostname . "\\" . $this -> printerName; - if($this -> userName !== null) { - /* Log in */ - $user = "/user:" . ($this -> workgroup != null ? ($this -> workgroup . "\\") : "") . $this -> userName; - if($this -> userPassword == null) { - $command = sprintf("net use %s %s", - escapeshellarg($device), - escapeshellarg($user)); - $redactedCommand = $command; - } else { - $command = sprintf("net use %s %s %s", - escapeshellarg($device), - escapeshellarg($user), - escapeshellarg($this -> userPassword)); - $redactedCommand = sprintf("net use %s %s %s", - escapeshellarg($device), - escapeshellarg($user), - escapeshellarg("*****")); - } - $retval = $this -> runCommand($command, $outputStr, $errorStr); - if($retval != 0) { - throw new Exception("Failed to print. Command \"$redactedCommand\" failed with exit code $retval: " . trim($errorStr)); - } - } - /* Final print-out */ - $filename = tempnam(sys_get_temp_dir(), "escpos"); - file_put_contents($filename, $data); - if(!$this -> runCopy($filename, $device)){ - throw new Exception("Failed to copy file to printer"); - } - unlink($filename); - } else { - /* Drop data straight on the printer */ - if(!$this -> runWrite($data, $this -> printerName)) { - throw new Exception("Failed to write file to printer at " . $this -> printerName); - } - } - } - - /** - * @return string Current platform. Separated out for testing purposes. - */ - protected function getCurrentPlatform() { - if(PHP_OS == "WINNT") { - return self::PLATFORM_WIN; - } - if(PHP_OS == "Darwin") { - return self::PLATFORM_MAC; - } - return self::PLATFORM_LINUX; - } - - /* (non-PHPdoc) - * @see PrintConnector::read() - */ - public function read($len) { - /* Two-way communication is not supported */ - return false; - } - - /** - * Run a command, pass it data, and retrieve its return value, standard output, and standard error. - * - * @param string $command the command to run. - * @param string $outputStr variable to fill with standard output. - * @param string $errorStr variable to fill with standard error. - * @param string $inputStr text to pass to the command's standard input (optional). - * @return number - */ - protected function runCommand($command, &$outputStr, &$errorStr, $inputStr = null) { - $descriptors = array( - 0 => array("pipe", "r"), - 1 => array("pipe", "w"), - 2 => array("pipe", "w"), - ); - $process = proc_open($command, $descriptors, $fd); - if (is_resource($process)) { - /* Write to input */ - if($inputStr !== null) { - fwrite($fd[0], $inputStr); - } - fclose($fd[0]); - /* Read stdout */ - $outputStr = stream_get_contents($fd[1]); - fclose($fd[1]); - /* Read stderr */ - $errorStr = stream_get_contents($fd[2]); - fclose($fd[2]); - /* Finish up */ - $retval = proc_close($process); - return $retval; - } else { - /* Method calling this should notice a non-zero exit and print an error */ - return -1; - } - } - - /** - * Copy a file. Separated out so that nothing is actually printed during test runs. - * - * @param string $from Source file - * @param string $to Destination file - * @return boolean True if copy was successful, false otherwise - */ - protected function runCopy($from, $to) { - return copy($from, $to); - } - - /** - * Write data to a file. Separated out so that nothing is actually printed during test runs. - * - * @param string $data Data to print - * @param string $to Destination file - * @return boolean True if write was successful, false otherwise - */ - protected function runWrite($data, $to) { - return file_put_contents($data, $to) !== false; - } - - public function write($data) { - $this -> buffer[] = $data; - } -} diff --git a/htdocs/includes/mike42/escpos-php/src/cache/Characters-DefaultCapabilityProfile.ser.gz b/htdocs/includes/mike42/escpos-php/src/cache/Characters-DefaultCapabilityProfile.ser.gz deleted file mode 100644 index 43ad39d2295..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/src/cache/Characters-DefaultCapabilityProfile.ser.gz and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/src/cache/Characters-SimpleCapabilityProfile.ser.gz b/htdocs/includes/mike42/escpos-php/src/cache/Characters-SimpleCapabilityProfile.ser.gz deleted file mode 100644 index 288b7d37407..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/src/cache/Characters-SimpleCapabilityProfile.ser.gz and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/src/cache/Characters-StarCapabilityProfile.ser.gz b/htdocs/includes/mike42/escpos-php/src/cache/Characters-StarCapabilityProfile.ser.gz deleted file mode 100644 index e0bb0e5fec5..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/src/cache/Characters-StarCapabilityProfile.ser.gz and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/bootstrap.php b/htdocs/includes/mike42/escpos-php/test/bootstrap.php deleted file mode 100644 index 41b04f5ca6b..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/bootstrap.php +++ /dev/null @@ -1,27 +0,0 @@ - $c) { - $code = ord($c); - if($code < 32 || $code > 126) { - $chars[$i] = "\\x" . bin2hex($c); - } - } - return implode($chars); -} diff --git a/htdocs/includes/mike42/escpos-php/test/integration/ExampleTest.php b/htdocs/includes/mike42/escpos-php/test/integration/ExampleTest.php deleted file mode 100644 index 689891e2432..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/integration/ExampleTest.php +++ /dev/null @@ -1,126 +0,0 @@ - exampleDir = dirname(__FILE__) . "/../../example/"; - } - - public function testBitImage() { - $this -> requireGraphicsLibrary(); - $outp = $this -> runExample("bit-image.php"); - $this -> outpTest($outp, "bit-image.bin"); - } - - public function testCharacterEncodings() { - $outp = $this -> runExample("character-encodings.php"); - $this -> outpTest($outp, "character-encodings.bin"); - } - - public function testCharacterTables() { - $outp = $this -> runExample("character-tables.php"); - $this -> outpTest($outp, "character-tables.bin"); - } - - private function outpTest($outp, $fn) { - $file = dirname(__FILE__) . "/resources/output/".$fn; - if(!file_exists($file)) { - file_put_contents($file, $outp); - } - $this -> assertEquals($outp, file_get_contents($file)); - } - - public function testDemo() { - $this -> requireGraphicsLibrary(); - $outp = $this -> runExample("demo.php"); - $this -> outpTest($outp, "demo.bin"); - } - - public function testGraphics() { - $this -> requireGraphicsLibrary(); - $outp = $this -> runExample("graphics.php"); - $this -> outpTest($outp, "graphics.bin"); - } - - public function testReceiptWithLogo() { - $this -> requireGraphicsLibrary(); - $outp = $this -> runExample("receipt-with-logo.php"); - $this -> outpTest($outp, "receipt-with-logo.bin"); - } - - public function testQrCode() { - $outp = $this -> runExample("qr-code.php"); - $this -> outpTest($outp, "qr-code.bin"); - } - - public function testBarcode() { - $outp = $this -> runExample("barcode.php"); - $this -> outpTest($outp, "barcode.bin"); - } - - public function testTextSize() { - $outp = $this -> runExample("text-size.php"); - $this -> outpTest($outp, "text-size.bin"); - } - - /** - * @large - */ - public function testPrintFromPdf() { - if(!EscposImage::isImagickLoaded()) { - $this -> markTestSkipped("imagick plugin required for this test"); - } - $outp = $this -> runExample("print-from-pdf.php"); - $this -> outpTest(gzcompress($outp, 9), "print-from-pdf.bin.z"); // Compressing output because it's ~1MB - } - - public function testInterfaceEthernet() { - // Test attempts DNS lookup on some machine - $outp = $this -> runExample("interface/ethernet.php"); - $this -> outpTest($outp, "interface.bin"); - } - - public function testInterfaceLinuxUSB() { - $outp = $this -> runExample("interface/linux-usb.php"); - $this -> outpTest($outp, "interface.bin"); - } - - public function testInterfaceWindowsUSB() { - // Output varies between platforms, not checking. - $outp = $this -> runExample("interface/windows-usb.php"); - $this -> outpTest($outp, "interface.bin"); - } - - public function testInterfaceSMB() { - // Output varies between platforms, not checking. - $outp = $this -> runExample("interface/smb.php"); - $this -> outpTest($outp, "interface.bin"); - } - - public function testInterfaceWindowsLPT() { - // Output varies between platforms, not checking. - $outp = $this -> runExample("interface/windows-lpt.php"); - $this -> outpTest($outp, "interface.bin"); - } - - private function runExample($fn) { - // Change directory and check script - chdir($this -> exampleDir); - $this -> assertTrue(file_exists($fn), "Script $fn not found."); - // Run command and save output - ob_start(); - passthru("php " . escapeshellarg($fn), $retval); - $outp = ob_get_contents(); - ob_end_clean(); - // Check return value - $this -> assertEquals(0, $retval, "Example $fn exited with status $retval"); - return $outp; - } - - protected function requireGraphicsLibrary() { - if(!EscposImage::isGdLoaded() && !EscposImage::isImagickLoaded()) { - $this -> markTestSkipped("This test requires a graphics library."); - } - } -} diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/barcode.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/barcode.bin deleted file mode 100644 index 79a2daf803e..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/barcode.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/bit-image.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/bit-image.bin deleted file mode 100644 index 462eb1a0bf3..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/bit-image.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/character-encodings.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/character-encodings.bin deleted file mode 100644 index 0a762c8c160..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/character-encodings.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/character-tables.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/character-tables.bin deleted file mode 100644 index f3fb990cea3..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/character-tables.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/demo.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/demo.bin deleted file mode 100644 index 6b426d91ff0..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/demo.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/graphics.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/graphics.bin deleted file mode 100644 index 8eeda76d297..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/graphics.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/interface.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/interface.bin deleted file mode 100644 index 729d4f4481b..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/interface.bin +++ /dev/null @@ -1,2 +0,0 @@ -@Hello World! -VA \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/print-from-pdf.bin.z b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/print-from-pdf.bin.z deleted file mode 100644 index f89eb5d2115..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/print-from-pdf.bin.z and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/qr-code.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/qr-code.bin deleted file mode 100644 index a1e687f151c..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/qr-code.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/receipt-with-logo.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/receipt-with-logo.bin deleted file mode 100644 index a4ed9c35304..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/receipt-with-logo.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/text-size.bin b/htdocs/includes/mike42/escpos-php/test/integration/resources/output/text-size.bin deleted file mode 100644 index 4d36038e463..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/integration/resources/output/text-size.bin and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/phpunit.xml b/htdocs/includes/mike42/escpos-php/test/phpunit.xml deleted file mode 100644 index f9a6579cf45..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/phpunit.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - unit - - - integration - - - \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/test/unit/AbstractCapabilityProfileTest.php b/htdocs/includes/mike42/escpos-php/test/unit/AbstractCapabilityProfileTest.php deleted file mode 100644 index b3e72452a9f..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/unit/AbstractCapabilityProfileTest.php +++ /dev/null @@ -1,69 +0,0 @@ - profiles = array('DefaultCapabilityProfile', 'EposTepCapabilityProfile', 'SimpleCapabilityProfile', 'StarCapabilityProfile', 'P822DCapabilityProfile'); - $this -> checklist = array(); - foreach($this -> profiles as $profile) { - $this-> checklist[] = $profile::getInstance(); - } - } - - function testSupportedCodePages() { - foreach($this -> checklist as $obj) { - $check = $obj -> getSupportedCodePages(); - $this -> assertTrue(is_array($check) && isset($check[0]) && $check[0] == 'CP437'); - $custom = $obj -> getCustomCodePages(); - foreach($check as $num => $page) { - $this -> assertTrue(is_numeric($num) && ($page === false || is_string($page))); - if($page === false || strpos($page, ":") === false) { - continue; - } - $part = explode(":", $page); - if(!array_shift($part) == "custom") { - continue; - } - $this -> assertTrue(isset($custom[implode(":", $part)])); - } - } - } - - function testCustomCodePages() { - foreach($this -> checklist as $obj) { - $check = $obj -> getCustomCodePages(); - $this -> assertTrue(is_array($check)); - foreach($check as $name => $customMap) { - $this -> assertTrue(is_string($name)); - $this -> assertTrue(is_string($customMap) && mb_strlen($customMap, 'UTF-8') == 128); - } - } - } - - function testSupportsBitImage() { - foreach($this -> checklist as $obj) { - $check = $obj -> getSupportsBitImage(); - $this -> assertTrue(is_bool($check)); - } - } - - function testSupportsGraphics() { - foreach($this -> checklist as $obj) { - $check = $obj -> getSupportsGraphics(); - $this -> assertTrue(is_bool($check)); - } - } - - function testSupportsQrCode() { - foreach($this -> checklist as $obj) { - $check = $obj -> getSupportsQrCode(); - $this -> assertTrue(is_bool($check)); - } - } -} -?> \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/test/unit/EscposImageTest.php b/htdocs/includes/mike42/escpos-php/test/unit/EscposImageTest.php deleted file mode 100644 index f152f400a2f..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/unit/EscposImageTest.php +++ /dev/null @@ -1,235 +0,0 @@ - loadAndCheckImg(null, false, false, 0, 0, ""); - } - - /** - * BMP handling not yet implemented, but these will use - * a native PHP bitmap reader. - * This just tests that they are not being passed on to another library. - */ - public function testBmpBadFilename() { - $this -> setExpectedException('Exception'); - $this -> loadAndCheckImg('not a real file.bmp', false, false, 1, 1, "\x80"); - } - - public function testBmpBlack() { - $this -> setExpectedException('Exception'); - $this -> loadAndCheckImg("canvas_black.bmp", false, false, 0, 0, "\x80"); - } - - public function testBmpBlackWhite() { - $this -> setExpectedException('Exception'); - $this -> loadAndCheckImg("black_white.bmp", false, false, 0, 0, "\xc0\x00"); - } - - public function testBmpWhite() { - $this -> setExpectedException('Exception'); - $this -> loadAndCheckImg("canvas_white.bmp", false, false, 0, 0, "\x00"); - } - - /** - * GD tests - Load tiny images and check how they are printed. - * These are skipped if you don't have gd. - */ - public function testGdBadFilename() { - $this -> setExpectedException('Exception'); - $this -> loadAndCheckImg('not a real file.png', true, false, 1, 1, "\x80"); - } - - public function testGdBlack() { - foreach(array('png', 'jpg', 'gif') as $format) { - $this -> loadAndCheckImg('canvas_black.' . $format, true, false, 1, 1, "\x80"); - } - } - - public function testGdBlackTransparent() { - foreach(array('png', 'gif') as $format) { - $this -> loadAndCheckImg('black_transparent.' . $format, true, false, 2, 2, "\xc0\x00"); - } - } - - public function testGdBlackWhite() { - foreach(array('png', 'jpg', 'gif') as $format) { - $this -> loadAndCheckImg('black_white.' . $format, true, false, 2, 2, "\xc0\x00"); - } - } - - public function testGdWhite() { - foreach(array('png', 'jpg', 'gif') as $format) { - $this -> loadAndCheckImg('canvas_white.' . $format, true, false, 1, 1, "\x00"); - } - } - - /** - * Imagick tests - Load tiny images and check how they are printed - * These are skipped if you don't have imagick - */ - public function testImagickBadFilename() { - $this -> setExpectedException('Exception'); - $this -> loadAndCheckImg('not a real file.png', false, true, 1, 1, "\x80"); - } - - public function testImagickBlack() { - foreach(array('png', 'jpg', 'gif') as $format) { - $this -> loadAndCheckImg('canvas_black.' . $format, false, true, 1, 1, "\x80"); - } - } - - public function testImagickBlackTransparent() { - foreach(array('png', 'gif') as $format) { - $this -> loadAndCheckImg('black_transparent.' . $format, false, true, 2, 2, "\xc0\x00"); - } - } - - public function testImagickBlackWhite() { - foreach(array('png', 'jpg', 'gif') as $format) { - $this -> loadAndCheckImg('black_white.' . $format, false, true, 2, 2, "\xc0\x00"); - } - } - - public function testImagickWhite() { - foreach(array('png', 'jpg', 'gif') as $format) { - $this -> loadAndCheckImg('canvas_white.' . $format, false, true, 1, 1, "\x00"); - } - } - - /** - * Mixed test - Same as above, but confirms that each tiny image can be loaded - * under any supported library configuration with the same results. - * These are skipped if you don't have gd AND imagick - */ - public function testLibraryDifferences() { - if(!EscposImage::isGdLoaded() || !EscposImage::isImagickLoaded()) { - $this -> markTestSkipped("both gd and imagick plugin are required for this test"); - } - $inFile = array('black_white.png', 'canvas_black.png', 'canvas_white.png'); - foreach($inFile as $fn) { - // Default check - $im = new EscposImage(dirname(__FILE__) . "/resources/$fn"); - $width = $im -> getWidth(); - $height = $im -> getHeight(); - $data = $im -> toRasterFormat(); - // Gd check - $this -> loadAndCheckImg($fn, true, false, $width, $height, $data); - // Imagick check - $this -> loadAndCheckImg($fn, false, true, $width, $height, $data); - } - } - - /** - * PDF tests - load tiny PDF and check for well-formedness - * These are also skipped if you don't have imagick - * @medium - */ - public function testPdfAllPages() { - $this -> loadAndCheckPdf('doc.pdf', null, 1, 1, array("\x00", "\x80")); - } - - public function testPdfBadFilename() { - $this -> setExpectedException('Exception'); - $this -> loadAndCheckPdf('not a real file', null, 1, 1, array()); - } - - /** - * @medium - */ - public function testPdfBadRange() { - // Start page is after end page. - $this -> setExpectedException('Exception'); - $this -> loadAndCheckPdf('doc.pdf', array(1, 0), 1, 1, array("\x00", "\x80")); - } - - /** - * @medium - */ - public function testPdfFirstPage() { - $this -> loadAndCheckPdf('doc.pdf', array(0, 0), 1, 1, array("\x00")); - } - - /** - * @medium - */ - public function testPdfMorePages() { - $this -> loadAndCheckPdf('doc.pdf', array(1, 20), 1, 1, array("\x80")); - } - - /** - * @medium - */ - public function testPdfSecondPage() { - $this -> loadAndCheckPdf('doc.pdf', array(1, 1), 1, 1, array("\x80")); - } - - /** - * @medium - */ - public function testPdfStartPastEndOfDoc() { - // Doc only has pages 0 and 1, can't start reading from 2. - $this -> markTestIncomplete("Test needs revising- produces output due to apparent imagick bug."); - $this -> setExpectedException('ImagickException'); - $this -> loadAndCheckPdf('doc.pdf', array(2, 3), 1, 1, array()); - } - - /** - * Load an EscposImage with (optionally) certain libraries disabled and run a check. - */ - private function loadAndCheckImg($fn, $gd, $imagick, $width, $height, $rasterFormat = null) { - $img = $this -> getMockImage($fn === null ? null : dirname(__FILE__) . "/resources/$fn", $gd, $imagick); - $this -> checkImg($img, $width, $height, $rasterFormat); - } - - /** - * Same as above, loading document and checking pages against some expected values. - */ - private function loadAndCheckPdf($fn, array $range = null, $width, $height, array $rasterFormat = null) { - if(!EscposImage::isImagickLoaded()) { - $this -> markTestSkipped("imagick plugin required for this test"); - } - $pdfPages = EscposImage::loadPdf(dirname(__FILE__) . "/resources/$fn", $width, $range); - $this -> assertTrue(count($pdfPages) == count($rasterFormat), "Got back wrong number of pages"); - foreach($pdfPages as $id => $img) { - $this -> checkImg($img, $width, $height, $rasterFormat[$id]); - } - } - - /** - * Check image against known width, height, output. - */ - private function checkImg(EscposImage $img, $width, $height, $rasterFormat = null) { - if($rasterFormat === null) { - echo "\nImage was: " . $img -> getWidth() . "x" . $img -> getHeight() . ", data \"" . friendlyBinary($img -> toRasterFormat()) . "\""; - } - $this -> assertTrue($img -> getHeight() == $height); - $this -> assertTrue($img -> getWidth() == $width); - $this -> assertTrue($img -> toRasterFormat() == $rasterFormat); - } - - /** - * Load up an EsposImage with given libraries disabled or enabled. Marks the test - * as skipped if you ask for a library which is not loaded. - */ - private function getMockImage($path, $gd, $imagick) { - /* Sanity checks */ - if($gd && !EscposImage::isGdLoaded()) { - $this -> markTestSkipped("gd plugin required for this test"); - } - if($imagick && !EscposImage::isImagickLoaded()) { - $this -> markTestSkipped("imagick plugin required for this test"); - } - $stub = $this -> getMockBuilder('EscposImage') - -> setMethods(array('isGdSupported', 'isImagickSupported')) - -> disableOriginalConstructor() - -> getMock(); - $stub -> method('isGdSupported') - -> willReturn($gd); - $stub -> method('isImagickSupported') - -> willReturn($imagick); - $stub -> __construct($path); - return $stub; - } -} \ No newline at end of file diff --git a/htdocs/includes/mike42/escpos-php/test/unit/EscposPrintBufferTest.php b/htdocs/includes/mike42/escpos-php/test/unit/EscposPrintBufferTest.php deleted file mode 100644 index 2bbdb34c20c..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/unit/EscposPrintBufferTest.php +++ /dev/null @@ -1,150 +0,0 @@ - outputConnector = new DummyPrintConnector(); - $printer = new Escpos($this -> outputConnector); - $this -> buffer = $printer -> getPrintBuffer(); - } - - protected function checkOutput($expected = null) { - /* Check those output strings */ - $outp = $this -> outputConnector -> getData(); - if($expected === null) { - echo "\nOutput was:\n\"" . friendlyBinary($outp) . "\"\n"; - } - $this -> assertEquals($expected, $outp); - } - - protected function tearDown() { - $this -> outputConnector -> finalize(); - } - - public function testRawTextNonprintable() { - $this -> buffer -> writeTextRaw("Test" . Escpos::ESC . "v1\n"); - $this -> checkOutput("\x1b@Test?v1\x0a"); // ASCII ESC character is substituted for '?' - } - - public function testDanish() { - $this -> buffer -> writeText("Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon.\n"); - $this -> checkOutput("\x1b@Quizdeltagerne spiste jordb\x91r med fl\x1bt\x02\x9bde, mens cirkusklovnen Wolther spillede p\x86 xylofon.\x0a"); - } - - public function testGerman() { - $this -> buffer -> writeText("Falsches Üben von Xylophonmusik quält jeden größeren Zwerg.\n"); - $this -> checkOutput("\x1b@Falsches \x9aben von Xylophonmusik qu\x84lt jeden gr\x94\xe1eren Zwerg.\x0a"); - } - - public function testGreek() { - $this -> buffer -> writeText("Ξεσκεπάζω την ψυχοφθόρα βδελυγμία"); - $this -> checkOutput("\x1b@\x1bt\x0b\xbd\xde\xec\xe4\xde\xea\x9b\xe0\xfa \xee\xe1\xe7 \xf6\xf2\xf4\xe9\xf3\xe2\xa2\xeb\xd6 \xd7\xdd\xde\xe5\xf2\xd8\xe6\x9f\xd6"); - } - - public function testGreekWithDiacritics() { - // This is a string which is known to be un-printable in ESC/POS (the grave-accented letters are not in any code page), - // so we are checking the substitution '?' for unknown characters. - $this -> buffer -> writeText("Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο.\n"); - $this -> checkOutput("\x1b@\xe2\xe0\x1bt\x0b\xe0\x9d\xde\xed \xe4\xd6? \xe6\xf2\xeb\xee\xe3?\xed \xdd?\xe7 \xe2? \xd7\xeb? \xea\xe3? \xec\xee? \xf4\xeb\xf2\xec\xd6\xf3? \xe8\x9d\xf3\xfa\xee\xe9.\x0a"); - } - - public function testEnglish() { - $this -> buffer -> writeText("The quick brown fox jumps over the lazy dog.\n"); - $this -> checkOutput("\x1b@The quick brown fox jumps over the lazy dog.\n"); - } - - public function testSpanish() { - // This one does not require changing code-pages at all, so characters are just converted from Unicode to CP437. - $this -> buffer -> writeText("El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.\n"); - $this -> checkOutput("\x1b@El ping\x81ino Wenceslao hizo kil\xa2metros bajo exhaustiva lluvia y fr\xa1o, a\xa4oraba a su querido cachorro.\x0a"); - } - - public function testFrench() { - $this -> buffer -> writeText("Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en canoë au delà des îles, près du mälström où brûlent les novæ.\n"); - $this -> checkOutput("\x1b@Le c\x1bt\x10\x9cur d\xe9\xe7u mais l'\xe2me plut\xf4t na\xefve, Lou\xffs r\xeava de crapa\xfcter en cano\xeb au del\xe0 des \xeeles, pr\xe8s du m\xe4lstr\xf6m o\xf9 br\xfblent les nov\xe6.\x0a"); - } - - public function testIrishGaelic() { - // Note that some letters with diacritics cannot be printed for Irish Gaelic text, so text may need to be simplified. - $this -> buffer -> writeText("D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh.\n"); - $this -> checkOutput("\x1b@D'fhuascail \x1bt\x02\xd6osa, \xe9rmhac na h\xe0ighe Beannaithe, p\xa2r \x90ava agus \xb5dhaimh.\x0a"); - } - - public function testHungarian() { - $this -> buffer -> writeText("Árvíztűrő tükörfúrógép.\n"); - $this -> checkOutput("\x1b@\x1bt\x02\xb5rv\xa1zt\x1bt\x12\xfbr\x8b t\x81k\x94rf\xa3r\xa2g\x82p.\x0a"); - } - - public function testIcelandic() { - $this -> buffer -> writeText("Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa."); - $this -> checkOutput("\x1b@K\x91mi n\x1bt\x02\xec \x94xi h\x82r ykist \xe7j\xa2fum n\xa3 b\x91\xd0i v\xa1l og \xa0drepa."); - } - - public function testJapaneseHiragana() { - $this -> markTestIncomplete("Non-ASCII character sets not yet supported."); - $this -> buffer -> writeText(implode("\n", array("いろはにほへとちりぬるを", " わかよたれそつねならむ", "うゐのおくやまけふこえて", "あさきゆめみしゑひもせす")) . "\n"); - $this -> checkOutput(); - } - - public function testJapaneseKatakana() { - $this -> markTestIncomplete("Non-ASCII character sets not yet supported."); - $this -> buffer -> writeText(implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム", "ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン")) . "\n"); - $this -> checkOutput("\x1b@\x1bt\x01\xb2\xdb\xca\xc6\xce\xcd\xc4 \xc1\xd8\xc7\xd9\xa6 \xdc\xb6\xd6\xc0\xda\xbf \xc2\xc8\xc5\xd7\xd1\x0a\xb3\xb2\xc9\xb5\xb8\xd4\xcf \xb9\xcc\xba\xb4\xc3 \xb1\xbb\xb7\xd5\xd2\xd0\xbc \xb4\xcb\xd3\xbe\xbd\xdd\x0a"); - } - - public function testJapaneseKataKanaHalfWidth() { - $this -> buffer -> writeText(implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム", "ウイノオクヤマ ケフコエテ アサキユメミシ エヒモセスン")) . "\n"); - $this -> checkOutput("\x1b@\x1bt\x01\xb2\xdb\xca\xc6\xce\xcd\xc4 \xc1\xd8\xc7\xd9\xa6 \xdc\xb6\xd6\xc0\xda\xbf \xc2\xc8\xc5\xd7\xd1\x0a\xb3\xb2\xc9\xb5\xb8\xd4\xcf \xb9\xcc\xba\xb4\xc3 \xb1\xbb\xb7\xd5\xd2\xd0\xbc \xb4\xcb\xd3\xbe\xbd\xdd\x0a"); - } - - public function testLatvian() { - $this -> buffer -> writeText("Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus.\n"); - $this -> checkOutput("\x1b@Gl\x1bt!\x83\xd8\xd5\xe9\xd7\xeca r\xd7\xe9\x8c\xd5i dz\x89rum\x83 \xd1iepj Baha koncertfl\x8c\x85e\xebu v\x83kus.\x0a"); - } - - public function testPolish() { - $this -> buffer -> writeText("Pchnąć w tę łódź jeża lub ośm skrzyń fig.\n"); - $this -> checkOutput("\x1b@Pchn\x1bt\x12\xa5\x86 w t\xa9 \x88\xa2d\xab je\xbea lub o\x98m skrzy\xe4 fig.\x0a"); - } - - public function testRussian() { - $this -> buffer -> writeText("В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!\n"); - $this -> checkOutput("\x1b@\x1bt\x11\x82 \xe7\xa0\xe9\xa0\xe5 \xee\xa3\xa0 \xa6\xa8\xab \xa1\xeb \xe6\xa8\xe2\xe0\xe3\xe1? \x84\xa0, \xad\xae \xe4\xa0\xab\xec\xe8\xa8\xa2\xeb\xa9 \xed\xaa\xa7\xa5\xac\xaf\xab\xef\xe0!\x0a"); - } - - public function testThai() { - $this -> markTestIncomplete("Non-ASCII character sets not yet supported."); - $this -> buffer -> writeText("นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ\n"); // Quotation from Wikipedia - $this -> checkOutput(); - } - - public function testTurkish() { - $this -> buffer -> writeText("Pijamalı hasta, yağız şoföre çabucak güvendi.\n"); - $this -> checkOutput("\x1b@Pijamal\x1bt\x02\xd5 hasta, ya\x1bt\x0d\xa7\x8dz \x9fof\x94re \x87abucak g\x81vendi.\x0a"); - } - - public function testArabic() { - $this -> markTestIncomplete("Right-to-left text not yet supported."); - $this -> buffer -> writeText("صِف خَلقَ خَودِ كَمِثلِ الشَمسِ إِذ بَزَغَت — يَحظى الضَجيعُ بِها نَجلاءَ مِعطارِ" . "\n"); // Quotation from Wikipedia - $this -> checkOutput(); - } - - public function testHebrew() { - // RTL text is more complex than the above. - $this -> markTestIncomplete("Right-to-left text not yet supported."); - $this -> buffer -> writeText("דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה" . "\n"); - $this -> checkOutput(); - } -} - diff --git a/htdocs/includes/mike42/escpos-php/test/unit/EscposTest.php b/htdocs/includes/mike42/escpos-php/test/unit/EscposTest.php deleted file mode 100644 index 6fd0bd7d204..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/unit/EscposTest.php +++ /dev/null @@ -1,765 +0,0 @@ - outputConnector = new DummyPrintConnector(); - $this -> printer = new Escpos($this -> outputConnector); - } - - protected function checkOutput($expected = null) { - /* Check those output strings */ - $outp = $this -> outputConnector -> getData(); - if($expected === null) { - echo "\nOutput was:\n\"" . friendlyBinary($outp) . "\"\n"; - } - $this -> assertEquals($expected, $outp); - } - - protected function tearDown() { - $this -> outputConnector -> finalize(); - } - - protected function requireGraphicsLibrary() { - if(!EscposImage::isGdLoaded() && !EscposImage::isImagickLoaded()) { - // If the test is about to do something which requires a library, - // something must throw an exception. - $this -> setExpectedException('Exception'); - } - } - - public function testInitializeOutput() { - $this -> checkOutput("\x1b\x40"); - } - - public function testTextStringOutput() { - $this -> printer -> text("The quick brown fox jumps over the lazy dog\n"); - $this -> checkOutput("\x1b@The quick brown fox jumps over the lazy dog\n"); - } - - public function testTextDefault() { - $this -> printer -> text(); - $this -> checkOutput("\x1b@"); - } - - public function testTextString() { - $this -> printer -> text("String"); - $this -> printer -> text(123); - $this -> printer -> text(); - $this -> printer -> text(null); - $this -> printer -> text(1.2); - $this -> printer -> text(new FooBar("FooBar")); - $this -> checkOutput("\x1b@String1231.2FooBar"); - } - - public function testTextObject() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> text(new DateTime()); - } - - public function testFeedDefault() { - $this -> printer -> feed(); - $this -> checkOutput("\x1b@\x0a"); - } - - public function testFeed3Lines() { - $this -> printer -> feed(3); - $this -> checkOutput("\x1b@\x1bd\x03"); - } - - public function testFeedZero() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> feed(0); - } - - public function testFeedNonInteger() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> feed("ab"); - } - - public function testFeedTooLarge() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> feed(256); - } - - /* Print mode */ - public function testSelectPrintModeDefault() { - $this -> printer -> selectPrintMode(); - $this -> checkOutput("\x1b@\x1b!\x00"); - } - - public function testSelectPrintModeAcceptedValues() { - /* This iterates over a bunch of numbers, figures out which - ones contain invalid flags, and checks that the driver - rejects those, but accepts the good inputs */ - - for($i = -1; $i <= 256; $i++) { - $invalid = ($i < 0) || ($i > 255) || (($i & 2) == 2) || (($i & 4) == 4) || (($i & 64) == 64); - $failed = false; - try { - $this -> printer -> selectPrintMode($i); - } catch(Exception $e) { - $failed = true; - } - $this -> assertEquals($failed, $invalid); - } - } - - /* Underline */ - public function testSetUnderlineDefault() { - $this -> printer -> setUnderline(); - $this -> checkOutput("\x1b@\x1b-\x01"); - } - - public function testSetUnderlineOff() { - $this -> printer -> setUnderline(Escpos::UNDERLINE_NONE); - $this -> checkOutput("\x1b@\x1b-\x00"); - } - - public function testSetUnderlineOn() { - $this -> printer -> setUnderline(Escpos::UNDERLINE_SINGLE); - $this -> checkOutput("\x1b@\x1b-\x01"); - } - - public function testSetUnderlineDbl() { - $this -> printer -> setUnderline(Escpos::UNDERLINE_DOUBLE); - $this -> checkOutput("\x1b@\x1b-\x02"); - } - - public function testSetUnderlineAcceptedValues() { - $this -> printer -> setUnderline(0); - $this -> printer -> setUnderline(1); - $this -> printer -> setUnderline(2); - /* These map to 0 & 1 for interchangeability with setEmphasis */ - $this -> printer -> setUnderline(true); - $this -> printer -> setUnderline(false); - $this -> checkOutput("\x1b@\x1b-\x00\x1b-\x01\x1b-\x02\x1b-\x01\x1b-\x00"); - } - - public function testSetUnderlineTooLarge() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setUnderline(3); - } - - public function testSetUnderlineNegative() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setUnderline(-1); - } - - public function testSetUnderlineNonInteger() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setUnderline("Hello"); - } - - /* Emphasis */ - public function testSetEmphasisDefault() { - $this -> printer -> setEmphasis(); - $this -> checkOutput("\x1b@\x1bE\x01"); - } - - public function testSetEmphasisOn() { - $this -> printer -> setEmphasis(true); - $this -> checkOutput("\x1b@\x1bE\x01"); - } - - public function testSetEmphasisOff() { - $this -> printer -> setEmphasis(false); - $this -> checkOutput("\x1b@\x1bE\x00"); - } - - public function testSetEmphasisNonBoolean() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setEmphasis(7); - } - - /* Double strike */ - public function testSetDoubleStrikeDefault() { - $this -> printer -> setDoubleStrike(); - $this -> checkOutput("\x1b@\x1bG\x01"); - } - - public function testSetDoubleStrikeOn() { - $this -> printer -> setDoubleStrike(true); - $this -> checkOutput("\x1b@\x1bG\x01"); - } - - public function testSetDoubleStrikeOff() { - $this -> printer -> setDoubleStrike(false); - $this -> checkOutput("\x1b@\x1bG\x00"); - } - - public function testSetDoubleStrikeNonBoolean() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setDoubleStrike(4); - } - - /* Font */ - public function testSetFontDefault() { - $this -> printer -> setFont(); - $this -> checkOutput("\x1b@\x1bM\x00"); - } - - public function testSetFontAcceptedValues() { - $this -> printer -> setFont(Escpos::FONT_A); - $this -> printer -> setFont(Escpos::FONT_B); - $this -> printer -> setFont(Escpos::FONT_C); - $this -> checkOutput("\x1b@\x1bM\x00\x1bM\x01\x1bM\x02"); - } - - public function testSetFontNegative() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setFont(-1); - } - - - public function testSetFontTooLarge() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setFont(3); - } - - public function testSetFontNonInteger() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setFont('hello'); - } - - /* Justification */ - public function testSetJustificationDefault() { - $this -> printer -> setJustification(); - $this -> checkOutput("\x1b@\x1ba\x00"); - } - - public function testSetJustificationLeft() { - $this -> printer -> setJustification(Escpos::JUSTIFY_LEFT); - $this -> checkOutput("\x1b@\x1ba\x00"); - } - - public function testSetJustificationRight() { - $this -> printer -> setJustification(Escpos::JUSTIFY_RIGHT); - $this -> checkOutput("\x1b@\x1ba\x02"); - } - - public function testSetJustificationCenter() { - $this -> printer -> setJustification(Escpos::JUSTIFY_CENTER); - $this -> checkOutput("\x1b@\x1ba\x01"); - } - - public function testSetJustificationNegative() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setJustification(-1); - } - - - public function testSetJustificationTooLarge() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setFont(3); - } - - public function testSetJustificationNonInteger() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setJustification('hello'); - } - - /* Reverse feed */ - public function testFeedReverseDefault() { - $this -> printer -> feedReverse(); - $this -> checkOutput("\x1b@\x1be\x01"); - } - - public function testFeedReverse3() { - $this -> printer -> feedReverse(3); - $this -> checkOutput("\x1b@\x1be\x03"); - } - - public function testFeedReverseNegative() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> feedReverse(-1); - } - - public function testFeedReverseTooLarge() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> feedReverse(256); - } - - public function testFeedReverseNonInteger() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> feedReverse('hello'); - } - - /* Cut */ - public function testCutDefault() { - // TODO check what the accepted range of values should be for $line - // cut($mode = self::CUT_FULL, $lines = 3) - $this -> printer -> cut(); - $this -> checkOutput("\x1b@\x1dVA\x03"); - } - - /* Set barcode height */ - public function testSetBarcodeHeightDefault() { - $this -> printer -> setBarcodeHeight(); - $this -> checkOutput("\x1b@\x1dh\x08"); - } - - public function testBarcodeHeight10() { - $this -> printer -> setBarcodeHeight(10); - $this -> checkOutput("\x1b@\x1dh\x0a"); - } - - public function testSetBarcodeHeightNegative() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setBarcodeHeight(-1); - } - - public function testSetBarcodeHeightTooLarge() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setBarcodeHeight(256); - } - - public function tesSetBarcodeHeightNonInteger() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setBarcodeHeight('hello'); - } - - /* Barcode text position */ - public function testSetBarcodeTextPositionDefault() { - $this -> printer -> setBarcodeTextPosition(); - $this -> checkOutput("\x1b@\x1dH\x00"); - } - - public function testSetBarcodeTextPositionBelow() { - $this -> printer -> setBarcodeTextPosition(Escpos::BARCODE_TEXT_BELOW); - $this -> checkOutput("\x1b@\x1dH\x02"); - } - - public function testSetBarcodeTextPositionBoth() { - $this -> printer -> setBarcodeTextPosition(Escpos::BARCODE_TEXT_BELOW | Escpos::BARCODE_TEXT_ABOVE); - $this -> checkOutput("\x1b@\x1dH\x03"); - } - - public function testSetBarcodeTextPositionNegative() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setBarcodeTextPosition(-1); - } - - public function testSetBarcodeTextPositionTooLarge() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setBarcodeTextPosition(4); - } - - public function tesSetBarcodeTextPositionNonInteger() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setBarcodeTextPosition('hello'); - } - - /* Barcode - UPC-A */ - public function testBarcodeUpcaNumeric11Char() { - $this -> printer -> barcode("01234567890", Escpos::BARCODE_UPCA); - $this -> checkOutput("\x1b@\x1dkA\x0b01234567890"); - } - - public function testBarcodeUpcaNumeric12Char() { - $this -> printer -> barcode("012345678901", Escpos::BARCODE_UPCA); - $this -> checkOutput("\x1b@\x1dkA\x0c012345678901"); - } - - public function testBarcodeUpcaNumeric13Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("0123456789012", Escpos::BARCODE_UPCA); - } - - public function testBarcodeUpcaNonNumeric12Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("A12345678901", Escpos::BARCODE_UPCA); - } - - /* Barcode - UPC-E */ - public function testBarcodeUpceNumeric6Char() { - $this -> printer -> barcode("123456", Escpos::BARCODE_UPCE); - $this -> checkOutput("\x1b@\x1dkB\x06123456"); - } - - public function testBarcodeUpceNumeric7Char() { - $this -> printer -> barcode("0123456", Escpos::BARCODE_UPCE); - $this -> checkOutput("\x1b@\x1dkB\x070123456"); - } - - public function testBarcodeUpceNumeric8Char() { - $this -> printer -> barcode("01234567", Escpos::BARCODE_UPCE); - $this -> checkOutput("\x1b@\x1dkB\x0801234567"); - } - - public function testBarcodeUpceNumeric11Char() { - $this -> printer -> barcode("01234567890", Escpos::BARCODE_UPCE); - $this -> checkOutput("\x1b@\x1dkB\x0b01234567890"); - } - - public function testBarcodeUpceNumeric12Char() { - $this -> printer -> barcode("012345678901", Escpos::BARCODE_UPCE); - $this -> checkOutput("\x1b@\x1dkB\x0c012345678901"); - } - - public function testBarcodeUpceNumeric9Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("012345678", Escpos::BARCODE_UPCE); - } - - public function testBarcodeUpceNonNumeric12Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("A12345678901", Escpos::BARCODE_UPCE); - } - - /* Barcode - JAN13 */ - public function testBarcodeJan13Numeric12Char() { - $this -> printer -> barcode("012345678901", Escpos::BARCODE_JAN13); - $this -> checkOutput("\x1b@\x1dkC\x0c012345678901"); - } - - public function testBarcodeJan13Numeric13Char() { - $this -> printer -> barcode("0123456789012", Escpos::BARCODE_JAN13); - $this -> checkOutput("\x1b@\x1dkC\x0d0123456789012"); - } - - public function testBarcodeJan13Numeric11Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("01234567890", Escpos::BARCODE_JAN13); - } - - public function testBarcodeJan13NonNumeric13Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("A123456789012", Escpos::BARCODE_JAN13); - } - - /* Barcode - JAN8 */ - public function testBarcodeJan8Numeric7Char() { - $this -> printer -> barcode("0123456", Escpos::BARCODE_JAN8); - $this -> checkOutput("\x1b@\x1dkD\x070123456"); - } - - public function testBarcodeJan8Numeric8Char() { - $this -> printer -> barcode("01234567", Escpos::BARCODE_JAN8); - $this -> checkOutput("\x1b@\x1dkD\x0801234567"); - } - - public function testBarcodeJan8Numeric9Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("012345678", Escpos::BARCODE_JAN8); - } - - public function testBarcodeJan8NonNumeric8Char() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("A1234567", Escpos::BARCODE_JAN8); - } - - /* Barcode - Code39 */ - public function testBarcodeCode39AsDefault() { - $this -> printer -> barcode("1234"); - $this -> checkOutput("\x1b@\x1dkE\x041234"); - } - - public function testBarcodeCode39Text() { - $this -> printer -> barcode("ABC 012", Escpos::BARCODE_CODE39); - $this -> checkOutput("\x1b@\x1dkE\x07ABC 012"); - } - - public function testBarcodeCode39SpecialChars() { - $this -> printer -> barcode("$%+-./", Escpos::BARCODE_CODE39); - $this -> checkOutput("\x1b@\x1dkE\x06$%+-./"); - } - - public function testBarcodeCode39Asterisks() { - $this -> printer -> barcode("*TEXT*", Escpos::BARCODE_CODE39); - $this -> checkOutput("\x1b@\x1dkE\x06*TEXT*"); - } - - public function testBarcodeCode39AsterisksUnmatched() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("*TEXT", Escpos::BARCODE_CODE39); - } - - public function testBarcodeCode39AsteriskInText() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("12*34", Escpos::BARCODE_CODE39); - } - - public function testBarcodeCode39Lowercase() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("abcd", Escpos::BARCODE_CODE39); - } - - public function testBarcodeCode39Empty() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("**", Escpos::BARCODE_CODE39); - } - - /* Barcode - ITF */ - public function testBarcodeItfNumericEven() { - $this -> printer -> barcode("1234", Escpos::BARCODE_ITF); - $this -> checkOutput("\x1b@\x1dkF\x041234"); - } - - public function testBarcodeItfNumericOdd() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("123", Escpos::BARCODE_ITF); - } - - public function testBarcodeItfNonNumericEven() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("A234", Escpos::BARCODE_ITF); - } - - /* Barcode - Codabar */ - public function testBarcodeCodabarNumeric() { - $this -> printer -> barcode("A012345A", Escpos::BARCODE_CODABAR); - $this -> checkOutput("\x1b@\x1dkG\x08A012345A"); - } - - public function testBarcodeCodabarSpecialChars() { - $this -> printer -> barcode("A012$+-./:A", Escpos::BARCODE_CODABAR); - $this -> checkOutput("\x1b@\x1dkG\x0bA012$+-./:A"); - } - - public function testBarcodeCodabarNotWrapped() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("012345", Escpos::BARCODE_CODABAR); - } - - public function testBarcodeCodabarStartStopWrongPlace() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("012A45", Escpos::BARCODE_CODABAR); - } - - /* Barcode - Code93 */ - public function testBarcodeCode93Valid() { - $this -> printer -> barcode("012abcd", Escpos::BARCODE_CODE93); - $this -> checkOutput("\x1b@\x1dkH\x07012abcd"); - } - - public function testBarcodeCode93Empty() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("", Escpos::BARCODE_CODE93); - } - - /* Barcode - Code128 */ - public function testBarcodeCode128ValidA() { - $this -> printer -> barcode("{A" . "012ABCD", Escpos::BARCODE_CODE128); - $this -> checkOutput("\x1b@\x1dkI\x09{A012ABCD"); - } - - public function testBarcodeCode128ValidB() { - $this -> printer -> barcode("{B" . "012ABCDabcd", Escpos::BARCODE_CODE128); - $this -> checkOutput("\x1b@\x1dkI\x0d{B012ABCDabcd"); - } - - public function testBarcodeCode128ValidC() { - $this -> printer -> barcode("{C" . chr ( 21 ) . chr ( 32 ) . chr ( 43 ), Escpos::BARCODE_CODE128); - $this -> checkOutput("\x1b@\x1dkI\x05{C\x15 +"); - } - - public function testBarcodeCode128NoCodeSet() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> barcode("ABCD", Escpos::BARCODE_CODE128); - } - - /* Pulse */ - function testPulseDefault() { - $this -> printer -> pulse(); - $this -> checkOutput("\x1b@\x1bp0 printer -> pulse(1); - $this -> checkOutput("\x1b@\x1bp1 printer -> pulse(0, 2, 2); - $this -> checkOutput("\x1b@\x1bp0\x01\x01"); - } - - function testPulseOddMs() { - $this -> printer -> pulse(0, 3, 3); // Should be rounded down and give same output - $this -> checkOutput("\x1b@\x1bp0\x01\x01"); - } - - function testPulseTooHigh() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> pulse(0, 512, 2); - } - - function testPulseTooLow() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> pulse(0, 0, 2); - } - - function testPulseNotANumber() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> pulse("fish"); - } - - /* Set reverse */ - public function testSetReverseColorsDefault() { - $this -> printer -> setReverseColors(); - $this -> checkOutput("\x1b@\x1dB\x01"); - } - - public function testSetReverseColorsOn() { - $this -> printer -> setReverseColors(true); - $this -> checkOutput("\x1b@\x1dB\x01"); - } - - public function testSetReverseColorsOff() { - $this -> printer -> setReverseColors(false); - $this -> checkOutput("\x1b@\x1dB\x00"); - } - - public function testSetReverseColorsNonBoolean() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setReverseColors(7); - } - - /* Bit image print */ - public function testBitImageBlack() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/canvas_black.png"); - $this -> printer -> bitImage($img); - $this -> checkOutput("\x1b@\x1dv0\x00\x01\x00\x01\x00\x80"); - } - - public function testBitImageWhite() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/canvas_white.png"); - $this -> printer -> bitImage($img); - $this -> checkOutput("\x1b@\x1dv0\x00\x01\x00\x01\x00\x00"); - } - - public function testBitImageBoth() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/black_white.png"); - $this -> printer -> bitImage($img); - $this -> checkOutput("\x1b@\x1dv0\x00\x01\x00\x02\x00\xc0\x00"); - } - - public function testBitImageTransparent() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/black_transparent.png"); - $this -> printer -> bitImage($img); - $this -> checkOutput("\x1b@\x1dv0\x00\x01\x00\x02\x00\xc0\x00"); - } - - /* Graphics print */ - public function testGraphicsWhite() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/canvas_white.png"); - $this -> printer -> graphics($img); - $this -> checkOutput("\x1b@\x1d(L\x0b\x000p0\x01\x011\x01\x00\x01\x00\x00\x1d(L\x02\x0002"); - } - - public function testGraphicsBlack() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/canvas_black.png"); - $this -> printer -> graphics($img); - $this -> checkOutput("\x1b@\x1d(L\x0b\x000p0\x01\x011\x01\x00\x01\x00\x80\x1d(L\x02\x0002"); - } - - public function testGraphicsBoth() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/black_white.png"); - $this -> printer -> graphics($img); - $this -> checkOutput("\x1b@\x1d(L\x0c\x000p0\x01\x011\x02\x00\x02\x00\xc0\x00\x1d(L\x02\x0002"); - } - - public function testGraphicsTransparent() { - $this -> requireGraphicsLibrary(); - $img = new EscposImage(dirname(__FILE__)."/resources/black_transparent.png"); - $this -> printer -> graphics($img); - $this -> checkOutput("\x1b@\x1d(L\x0c\x000p0\x01\x011\x02\x00\x02\x00\xc0\x00\x1d(L\x02\x0002"); - } - - /* QR code */ - public function testQRCodeDefaults() { - // Test will fail if default values change - $this -> printer -> qrCode("1234"); - $this -> checkOutput("\x1b@\x1d(k\x04\x001A2\x00\x1d(k\x03\x001C\x03\x1d(k\x03\x001E0\x1d(k\x07\x001P01234\x1d(k\x03\x001Q0"); - } - - public function testQRCodeDefaultsAreCorrect() { - // Below tests assume that defaults are as written here (output string should be same as above) - $this -> printer -> qrCode("1234", Escpos::QR_ECLEVEL_L, 3, Escpos::QR_MODEL_2); - $this -> checkOutput("\x1b@\x1d(k\x04\x001A2\x00\x1d(k\x03\x001C\x03\x1d(k\x03\x001E0\x1d(k\x07\x001P01234\x1d(k\x03\x001Q0"); - } - - public function testQRCodeEmpty() { - $this -> printer -> qrCode(''); - $this -> checkOutput("\x1b@"); // No commands actually sent - } - - public function testQRCodeChangeEC() { - $this -> printer -> qrCode("1234", Escpos::QR_ECLEVEL_H); - $this -> checkOutput("\x1b@\x1d(k\x04\x001A2\x00\x1d(k\x03\x001C\x03\x1d(k\x03\x001E3\x1d(k\x07\x001P01234\x1d(k\x03\x001Q0"); - } - - public function testQRCodeChangeSize() { - $this -> printer -> qrCode("1234", Escpos::QR_ECLEVEL_L, 7); - $this -> checkOutput("\x1b@\x1d(k\x04\x001A2\x00\x1d(k\x03\x001C\x07\x1d(k\x03\x001E0\x1d(k\x07\x001P01234\x1d(k\x03\x001Q0"); - } - - public function testQRCodeChangeModel() { - $this -> printer -> qrCode("1234", Escpos::QR_ECLEVEL_L, 3, Escpos::QR_MODEL_1); - $this -> checkOutput("\x1b@\x1d(k\x04\x001A1\x00\x1d(k\x03\x001C\x03\x1d(k\x03\x001E0\x1d(k\x07\x001P01234\x1d(k\x03\x001Q0"); - } - - /* Feed form - Required on page-mode only printers */ - public function testFeedForm() { - $this -> printer -> feedForm(); - $this -> checkOutput("\x1b@\x0c"); - } - - /* Get status */ - public function testGetStatus() { - $this -> markTestIncomplete("Status check test code not implemented."); - // TODO some unit testing here on statuses - // $a = $this -> printer -> getPrinterStatus(Escpos::STATUS_PRINTER); - } - - /* Set text size */ - public function testSetTextSizeNormal() { - $this -> printer -> setTextSize(1, 1); - $this -> checkOutput("\x1b@\x1d!\x00"); - } - - public function testSetTextSizeWide() { - $this -> printer -> setTextSize(4, 1); - $this -> checkOutput("\x1b@\x1d!0"); - } - - public function testSetTextSizeNarrow() { - $this -> printer -> setTextSize(1, 4); - $this -> checkOutput("\x1b@\x1d!\x03"); - } - - public function testSetTextSizeLarge() { - $this -> printer -> setTextSize(4, 4); - $this -> checkOutput("\x1b@\x1d!3"); - } - - public function testSetTextSizeInvalid() { - $this -> setExpectedException('InvalidArgumentException'); - $this -> printer -> setTextSize(0, 9); - } -} - -/* - * For testing that string-castable objects are handled - */ -class FooBar { - private $foo; - public function __construct($foo) { - $this -> foo = $foo; - } - - public function __toString() { - return $this -> foo; - } -} -?> diff --git a/htdocs/includes/mike42/escpos-php/test/unit/WindowsPrintConnectorTest.php b/htdocs/includes/mike42/escpos-php/test/unit/WindowsPrintConnectorTest.php deleted file mode 100644 index 392775d3277..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/unit/WindowsPrintConnectorTest.php +++ /dev/null @@ -1,278 +0,0 @@ - getMockConnector("LPT1", WindowsPrintConnector::PLATFORM_WIN); - $connector -> expects($this -> once()) - -> method('runWrite') - -> with($this -> equalTo(''), $this -> equalTo("LPT1")); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> finalize(); - } - - public function testLptMac() { - // Cannot print to local printer on Mac with this connector - $this -> setExpectedException('BadMethodCallException'); - $connector = $this -> getMockConnector("LPT1", WindowsPrintConnector::PLATFORM_MAC); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> finalize(); - } - - public function testLptLinux() { - // Cannot print to local printer on Linux with this connector - $this -> setExpectedException('BadMethodCallException'); - $connector = $this -> getMockConnector("LPT1", WindowsPrintConnector::PLATFORM_LINUX); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> finalize(); - } - - public function testComWindows() { - // Simple file write - $connector = $this -> getMockConnector("COM1", WindowsPrintConnector::PLATFORM_WIN); - $connector -> expects($this -> once()) - -> method('runWrite') - -> with($this -> equalTo(''), $this -> equalTo("COM1")); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> finalize(); - } - - public function testComMac() { - // Cannot print to local printer on Mac with this connector - $this -> setExpectedException('BadMethodCallException'); - $connector = $this -> getMockConnector("COM1", WindowsPrintConnector::PLATFORM_MAC); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> finalize(); - } - - public function testComLinux() { - // Cannot print to local printer on Linux with this connector - $this -> setExpectedException('BadMethodCallException'); - $connector = $this -> getMockConnector("COM1", WindowsPrintConnector::PLATFORM_LINUX); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> finalize(); - } - - public function testLocalShareWindows() { - $connector = $this -> getMockConnector("Printer", WindowsPrintConnector::PLATFORM_WIN); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> once()) - -> method('runCopy') - -> with($this -> anything(), $this -> stringContains('\\Printer')); - $connector -> finalize(); - } - - public function testSharedPrinterWindows() { - $connector = $this -> getMockConnector("smb://example-pc/Printer", WindowsPrintConnector::PLATFORM_WIN); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> once()) - -> method('runCopy') - -> with($this -> anything(), $this -> equalTo('\\\\example-pc\\Printer')); - $connector -> finalize(); - } - - public function testSharedPrinterWindowsUsername() { - $connector = $this -> getMockConnector("smb://bob@example-pc/Printer", WindowsPrintConnector::PLATFORM_WIN); - $connector -> expects($this -> once()) - -> method('runCommand') - -> with($this -> equalTo('net use \'\\\\example-pc\\Printer\' \'/user:bob\'')); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> once()) - -> method('runCopy') - -> with($this -> anything(), $this -> equalTo('\\\\example-pc\\Printer')); - $connector -> finalize(); - } - - public function testSharedPrinterWindowsUsernameDomain() { - $connector = $this -> getMockConnector("smb://bob@example-pc/home/Printer", WindowsPrintConnector::PLATFORM_WIN); - $connector -> expects($this -> once()) - -> method('runCommand') - -> with($this -> equalTo('net use \'\\\\example-pc\\Printer\' \'/user:home\\bob\'')); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> once()) - -> method('runCopy') - -> with($this -> anything(), $this -> equalTo('\\\\example-pc\\Printer')); - $connector -> finalize(); - } - - public function testSharedPrinterWindowsUsernamePassword() { - $connector = $this -> getMockConnector("smb://bob:secret@example-pc/Printer", WindowsPrintConnector::PLATFORM_WIN); - $connector -> expects($this -> once()) - -> method('runCommand') - -> with($this -> equalTo('net use \'\\\\example-pc\\Printer\' \'/user:bob\' \'secret\'')); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> once()) - -> method('runCopy') - -> with($this -> anything(), $this -> equalTo('\\\\example-pc\\Printer')); - $connector -> finalize(); - } - - public function testSharedPrinterMac() { - // Not implemented - $this -> setExpectedException('Exception'); - $connector = $this -> getMockConnector("smb://Guest@example-pc/Printer", WindowsPrintConnector::PLATFORM_MAC); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> expects($this -> exactly(0)) - -> method('runCommand'); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> finalize(); - } - - public function testSharedPrinterLinux() { - $connector = $this -> getMockConnector("smb://example-pc/Printer", WindowsPrintConnector::PLATFORM_LINUX); - $connector -> expects($this -> once()) - -> method('runCommand') - -> with($this -> equalTo('smbclient \'//example-pc/Printer\' -c \'print -\' -N')); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> finalize(); - } - - public function testSharedPrinterLinuxUsername() { - $connector = $this -> getMockConnector("smb://bob@example-pc/Printer", WindowsPrintConnector::PLATFORM_LINUX); - $connector -> expects($this -> once()) - -> method('runCommand') - -> with($this -> equalTo('smbclient \'//example-pc/Printer\' -U \'bob\' -c \'print -\' -N')); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> finalize(); - } - - public function testSharedPrinterLinuxUsernameDomain() { - $connector = $this -> getMockConnector("smb://bob@example-pc/home/Printer", WindowsPrintConnector::PLATFORM_LINUX); - $connector -> expects($this -> once()) - -> method('runCommand') - -> with($this -> equalTo('smbclient \'//example-pc/Printer\' -U \'home\\bob\' -c \'print -\' -N')); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> finalize(); - } - - public function testSharedPrinterLinuxUsernamePassword() { - $connector = $this -> getMockConnector("smb://bob:secret@example-pc/Printer", WindowsPrintConnector::PLATFORM_LINUX); - $connector -> expects($this -> once()) - -> method('runCommand') - -> with($this -> equalTo('smbclient \'//example-pc/Printer\' \'secret\' -U \'bob\' -c \'print -\'')); - $connector -> expects($this -> exactly(0)) - -> method('runCopy'); - $connector -> expects($this -> exactly(0)) - -> method('runWrite'); - $connector -> finalize(); - } - - private function getMockConnector($path, $platform) { - $stub = $this -> getMockBuilder('WindowsPrintConnector') - -> setMethods(array('runCopy', 'runCommand', 'getCurrentPlatform', 'runWrite')) - -> disableOriginalConstructor() - -> getMock(); - $stub -> method('runCommand') - -> willReturn(0); - $stub -> method('runCopy') - -> willReturn(true); - $stub -> method('runWrite') - -> willReturn(true); - $stub -> method('getCurrentPlatform') - -> willReturn($platform); - $stub -> __construct($path); - return $stub; - } - - /** - * Test for correct identification of bogus or non-supported Samba strings. - */ - public function testSambaRegex() { - $good = array("smb://foo/bar", - "smb://foo/bar baz", - "smb://bob@foo/bar", - "smb://bob:secret@foo/bar", - "smb://foo-computer/FooPrinter", - "smb://foo-computer/workgroup/FooPrinter", - "smb://foo-computer/Foo-Printer", - "smb://foo-computer/workgroup/Foo-Printer", - "smb://foo-computer/Foo Printer"); - $bad = array("", - "http://google.com", - "smb:/foo/bar", - "smb://", - "smb:///bar", - "smb://@foo/bar", - "smb://bob:@foo/bar", - "smb://:secret@foo/bar", - "smb://foo/bar/baz/quux", - "smb://foo-computer//FooPrinter"); - foreach($good as $item) { - $this -> assertTrue(preg_match(WindowsPrintConnector::REGEX_SMB, $item) == 1, "Windows samba regex should pass '$item'."); - } - foreach($bad as $item) { - $this -> assertTrue(preg_match(WindowsPrintConnector::REGEX_SMB, $item) != 1, "Windows samba regex should fail '$item'."); - } - } - - public function testPrinterNameRegex() { - $good = array("a", - "ab", - "a b", - "a-b", - "Abcd Efg-", - "-a" - ); - $bad = array("", - " ", - "a ", - " a", - " a ", - "a/B", - "A:b" - ); - foreach($good as $item) { - $this -> assertTrue(preg_match(WindowsPrintConnector::REGEX_PRINTERNAME, $item) == 1, "Windows printer name regex should pass '$item'."); - } - foreach($bad as $item) { - $this -> assertTrue(preg_match(WindowsPrintConnector::REGEX_PRINTERNAME, $item) != 1, "Windows printer name regex should fail '$item'."); - } - } -} diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_transparent.gif b/htdocs/includes/mike42/escpos-php/test/unit/resources/black_transparent.gif deleted file mode 100644 index 6c54bad9eea..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_transparent.gif and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_transparent.png b/htdocs/includes/mike42/escpos-php/test/unit/resources/black_transparent.png deleted file mode 100644 index b43bbb85cc0..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_transparent.png and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.bmp b/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.bmp deleted file mode 100644 index 0acbf66506f..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.bmp and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.gif b/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.gif deleted file mode 100644 index 0a044a671f5..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.gif and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.jpg b/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.jpg deleted file mode 100644 index 6539cece59e..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.jpg and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.png b/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.png deleted file mode 100644 index 33ba331fa1e..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/black_white.png and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.bmp b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.bmp deleted file mode 100644 index 2ee723c59d8..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.bmp and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.gif b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.gif deleted file mode 100644 index 49b19dbc179..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.gif and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.jpg b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.jpg deleted file mode 100644 index d059f431b26..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.jpg and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.png b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.png deleted file mode 100644 index 52e6ba9ffd3..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_black.png and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.bmp b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.bmp deleted file mode 100644 index e47e0ef6175..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.bmp and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.gif b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.gif deleted file mode 100644 index 7881ce629ac..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.gif and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.jpg b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.jpg deleted file mode 100644 index 516a965c73e..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.jpg and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.png b/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.png deleted file mode 100644 index 4231a4bb540..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/canvas_white.png and /dev/null differ diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/demo.php b/htdocs/includes/mike42/escpos-php/test/unit/resources/demo.php deleted file mode 100644 index 67ea53c1bfd..00000000000 --- a/htdocs/includes/mike42/escpos-php/test/unit/resources/demo.php +++ /dev/null @@ -1,19 +0,0 @@ - readImage("doc.pdf[5]"); - $im -> destroy(); -} catch(ImagickException $e) { - echo "Error: " . $e -> getMessage() . "\n"; -} - -$im = new Imagick(); -try { - ob_start(); - @$im -> readImage("doc.pdf[5]"); - ob_end_clean(); - $im -> destroy(); -} catch(ImagickException $e) { - echo "Error: " . $e -> getMessage() . "\n"; -} - diff --git a/htdocs/includes/mike42/escpos-php/test/unit/resources/doc.pdf b/htdocs/includes/mike42/escpos-php/test/unit/resources/doc.pdf deleted file mode 100644 index 22247b918db..00000000000 Binary files a/htdocs/includes/mike42/escpos-php/test/unit/resources/doc.pdf and /dev/null differ diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config index 500460e8ab5..8992916acaf 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions index b648e20c2b0..f9d69784ae2 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config index b959379b133..cef47e9502d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIVISION/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions index 1599ccd1815..1db4d30bb1c 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config index 7e2ba9d2891..ff7e29899cc 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions index 8214f384878..ce85641a3c9 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config index 00acff8bc34..f008e61cc90 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config index 8f7d9e084ec..fa16f5639df 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rath ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #¡NULO! DIV0 = #¡DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions index aa065969f3d..51ce48b3153 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config index 36bc3fc70b8..a481864a6fa 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ # Symbol not known, should it be a € (Euro)? ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #TYHJÄ! DIV0 = #JAKO/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions index c10b3b9f381..7bed722a641 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config index 80f7d5411a6..2240d6b9f8b 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions index cce977b15bc..8d25f6ac193 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config index c6c315814c4..dec7cbde15d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions index 941c1b740d0..4abce13b91b 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config index 97af8b9a570..f862a02d72d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULLO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions index 862cf8302c8..b9219a6a4ce 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config index a14b476c945..7377a181df0 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #LEEG! DIV0 = #DEEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions index 79b7acd1ef9..b6b8296ef04 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config index e3e3cc4f786..15fcc128640 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions index 3cccce42a1d..57a80a7a406 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config index ea111797270..fb1e7b13d9d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = zł ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ZERO! DIV0 = #DZIEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions index 5607f8f672c..2e5697973c1 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config index d39c5c63438..e99aad6bea4 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = R$ ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config index 5e486bb29ff..36df63cc012 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config index 098c8075d29..205c342ada4 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = р ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ПУСТО! DIV0 = #ДЕЛ/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions index 86bcd4f63a7..324c3df2a81 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config index c2094c06249..454e52ef52f 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #Skärning! DIV0 = #Division/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config index cca084b2ba5..8a103d3c196 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = YTL ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #BOŞ! DIV0 = #SAYI/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions index 3e7c225f402..79645214714 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/index.php b/htdocs/index.php index 7279eebe80f..37ea818817a 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -115,7 +115,7 @@ $boxstatFromHook = ''; // Load translation files required by page $langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts')); -if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) +if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { $object=new stdClass(); $parameters=array(); @@ -212,7 +212,7 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT 'askprice', 'projects', 'expensereports', - 'holidays', + 'holiday', 'donations' ); // Dashboard Icon lines @@ -283,26 +283,27 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT DOL_URL_ROOT.'/don/list.php?leftmenu=donations' ); // Translation lang files - $langfile=array("users", - "companies", - "prospects", - "suppliers", - "companies", - "members", - "products", - "products", - "propal", - "orders", - "bills", - "contracts", - "interventions", - "bills", - "bills", - "supplier_proposal", - "projects", - "trips", - "holiday", - "donations" + $langfile=array( + "users", + "companies", + "prospects", + "suppliers", + "companies", + "members", + "products", + "products", + "propal", + "orders", + "bills", + "contracts", + "interventions", + "bills", + "bills", + "supplier_proposal", + "projects", + "trips", + "holiday", + "donations", ); @@ -353,34 +354,34 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0; -//Array that contains all WorkboardResponse classes to process them + //Array that contains all WorkboardResponse classes to process them $dashboardlines = array(); -// Do not include sections without management permission + // Do not include sections without management permission require_once DOL_DOCUMENT_ROOT . '/core/class/workboardresponse.class.php'; -// Number of actions to do (late) + // Number of actions to do (late) if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) { include_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; $board = new ActionComm($db); $dashboardlines[$board->element] = $board->load_board($user); } -// Number of project opened + // Number of project opened if (!empty($conf->projet->enabled) && $user->rights->projet->lire) { include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; $board = new Project($db); $dashboardlines[$board->element] = $board->load_board($user); } -// Number of tasks to do (late) + // Number of tasks to do (late) if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) { include_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; $board = new Task($db); $dashboardlines[$board->element] = $board->load_board($user); } -// Number of commercial proposals opened (expired) + // Number of commercial proposals opened (expired) if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; $board = new Propal($db); @@ -389,7 +390,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed"); } -// Number of commercial proposals opened (expired) + // Number of commercial proposals opened (expired) if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { include_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php'; $board = new SupplierProposal($db); @@ -398,14 +399,14 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed"); } -// Number of customer orders a deal + // Number of customer orders a deal if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; $board = new Commande($db); $dashboardlines[$board->element] = $board->load_board($user); } -// Number of suppliers orders a deal + // Number of suppliers orders a deal if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) { include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php'; $board = new CommandeFournisseur($db); @@ -413,7 +414,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting'); } -// Number of services enabled (delayed) + // Number of services enabled (delayed) if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { include_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php'; $board = new Contrat($db); @@ -421,22 +422,22 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { // Number of active services (expired) $dashboardlines[$board->element . '_active'] = $board->load_board($user, "active"); } -// Number of invoices customers (has paid) + // Number of invoices customers (has paid) if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; $board = new Facture($db); $dashboardlines[$board->element] = $board->load_board($user); } -// Number of supplier invoices (has paid) + // Number of supplier invoices (has paid) if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) { include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; $board = new FactureFournisseur($db); $dashboardlines[$board->element] = $board->load_board($user); } -// Number of transactions to conciliate - if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) { + // Number of transactions to conciliate + if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid) { include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; $board = new Account($db); $nb = $board::countAccountToReconcile(); // Get nb of account to reconciliate @@ -445,35 +446,35 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } } -// Number of cheque to send - if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) { + // Number of cheque to send + if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) { include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; $board = new RemiseCheque($db); $dashboardlines['RemiseCheque'] = $board->load_board($user); } -// Number of foundation members - if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->societe_id) { + // Number of foundation members + if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) { include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; $board = new Adherent($db); $dashboardlines['Adherent'] = $board->load_board($user); } -// Number of expense reports to approve + // Number of expense reports to approve if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) { include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; $board = new ExpenseReport($db); $dashboardlines['ExpenseReport'] = $board->load_board($user, 'toapprove'); } -// Number of expense reports to pay + // Number of expense reports to pay if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) { include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; $board = new ExpenseReport($db); $dashboardlines['ExpenseReport'] = $board->load_board($user, 'topay'); } -// Number of holidays to approve + // Number of holidays to approve if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) { include_once DOL_DOCUMENT_ROOT . '/holiday/class/holiday.class.php'; $board = new Holiday($db); @@ -591,11 +592,11 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } -// Calculate total nb of late + // Calculate total nb of late $totallate = $totaltodo = 0; -//Remove any invalid response -//load_board can return an integer if failed or WorkboardResponse if OK + //Remove any invalid response + //load_board can return an integer if failed or WorkboardResponse if OK $valid_dashboardlines = array(); foreach ($dashboardlines as $infoKey => $tmp) { if ($tmp instanceof WorkboardResponse) { @@ -603,7 +604,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } } -// We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop + // We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop foreach ($valid_dashboardlines as $board) { if ($board->nbtodolate > 0) { $totaltodo += $board->nbtodo; @@ -645,7 +646,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $boxwork .= ''; $boxwork .= '
'.$langs->trans("FreshInstall").''; + // Show line of first install choice + $choice = '
'.$langs->trans("FreshInstall").''; $choice .= ''; $choice .= $langs->trans("FreshInstallDesc"); @@ -429,15 +428,16 @@ else } else { - $choice .= $langs->trans("InstallNotAllowed"); + $choice .= ($foundrecommandedchoice ? '' : '').$langs->trans("InstallNotAllowed").($foundrecommandedchoice ? '' : ''); } - $choice .= '
'.$langs->trans("Upgrade").'
'.$newversionfrom.$newversionfrombis.' -> '.$newversionto.'
'; $choice .= $langs->trans("UpgradeDesc"); @@ -542,7 +542,7 @@ else } if ($disabled) { - $choice .= ''.$langs->trans("NotAvailable").''; + $choice .= ''.$langs->trans("NotYetAvailable").''; } else { @@ -557,9 +557,9 @@ else $choice .= '
'; foreach ($available_choices as $choice) { @@ -580,7 +581,6 @@ else print '
'."\n"; if (count($notavailable_choices)) { - print '
'; print '> '.$langs->trans('ShowNotAvailableOptions').'...'; print '
'; diff --git a/htdocs/install/default.css b/htdocs/install/default.css index 0e1e23f8f2c..7a3bb7b3290 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -82,6 +82,9 @@ div.soustitre { .minwidth400imp { min-width: 400px !important; } .minwidth500imp { min-width: 500px !important; } +tr.trlineforchoice { + height: 4em; +} /* Force values for small screen 570 */ @media only screen and (max-width: 570px) diff --git a/htdocs/install/doctemplates/adherent/1/photos/person5.jpeg b/htdocs/install/doctemplates/adherent/1/photos/person5.jpeg new file mode 100644 index 00000000000..3d541f760b8 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/1/photos/person5.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/1/photos/thumbs/person5_mini.jpeg b/htdocs/install/doctemplates/adherent/1/photos/thumbs/person5_mini.jpeg new file mode 100644 index 00000000000..9cc8db56f70 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/1/photos/thumbs/person5_mini.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/1/photos/thumbs/person5_small.jpeg b/htdocs/install/doctemplates/adherent/1/photos/thumbs/person5_small.jpeg new file mode 100644 index 00000000000..fce9527b378 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/1/photos/thumbs/person5_small.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/2/photos/pierrecurie.jpg b/htdocs/install/doctemplates/adherent/2/photos/pierrecurie.jpg new file mode 100644 index 00000000000..8ea6696ba45 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/2/photos/pierrecurie.jpg differ diff --git a/htdocs/install/doctemplates/adherent/2/photos/thumbs/pierrecurie_mini.jpg b/htdocs/install/doctemplates/adherent/2/photos/thumbs/pierrecurie_mini.jpg new file mode 100644 index 00000000000..fcb7cbb0f74 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/2/photos/thumbs/pierrecurie_mini.jpg differ diff --git a/htdocs/install/doctemplates/adherent/2/photos/thumbs/pierrecurie_small.jpg b/htdocs/install/doctemplates/adherent/2/photos/thumbs/pierrecurie_small.jpg new file mode 100644 index 00000000000..3595b041ca2 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/2/photos/thumbs/pierrecurie_small.jpg differ diff --git a/htdocs/install/doctemplates/adherent/3/photos/person9.jpeg b/htdocs/install/doctemplates/adherent/3/photos/person9.jpeg new file mode 100644 index 00000000000..7aff8dccefe Binary files /dev/null and b/htdocs/install/doctemplates/adherent/3/photos/person9.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/3/photos/thumbs/person9_mini.jpeg b/htdocs/install/doctemplates/adherent/3/photos/thumbs/person9_mini.jpeg new file mode 100644 index 00000000000..21e769f345d Binary files /dev/null and b/htdocs/install/doctemplates/adherent/3/photos/thumbs/person9_mini.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/3/photos/thumbs/person9_small.jpeg b/htdocs/install/doctemplates/adherent/3/photos/thumbs/person9_small.jpeg new file mode 100644 index 00000000000..a9e67763dec Binary files /dev/null and b/htdocs/install/doctemplates/adherent/3/photos/thumbs/person9_small.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/4/photos/person2.jpeg b/htdocs/install/doctemplates/adherent/4/photos/person2.jpeg new file mode 100644 index 00000000000..285010bb7b3 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/4/photos/person2.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/4/photos/thumbs/person2_mini.jpeg b/htdocs/install/doctemplates/adherent/4/photos/thumbs/person2_mini.jpeg new file mode 100644 index 00000000000..4a3277d3754 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/4/photos/thumbs/person2_mini.jpeg differ diff --git a/htdocs/install/doctemplates/adherent/4/photos/thumbs/person2_small.jpeg b/htdocs/install/doctemplates/adherent/4/photos/thumbs/person2_small.jpeg new file mode 100644 index 00000000000..1c0bbd6d2d7 Binary files /dev/null and b/htdocs/install/doctemplates/adherent/4/photos/thumbs/person2_small.jpeg differ diff --git a/htdocs/install/doctemplates/boms/template_bom.odt b/htdocs/install/doctemplates/boms/template_bom.odt new file mode 100644 index 00000000000..9eea32e4197 Binary files /dev/null and b/htdocs/install/doctemplates/boms/template_bom.odt differ diff --git a/htdocs/install/doctemplates/invoices/index.html b/htdocs/install/doctemplates/invoices/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/mrps/template_mo.odt b/htdocs/install/doctemplates/mrps/template_mo.odt new file mode 100644 index 00000000000..7545fe73a34 Binary files /dev/null and b/htdocs/install/doctemplates/mrps/template_mo.odt differ diff --git a/htdocs/install/doctemplates/orders/index.html b/htdocs/install/doctemplates/orders/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/products/index.html b/htdocs/install/doctemplates/products/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/projects/index.html b/htdocs/install/doctemplates/projects/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/proposals/index.html b/htdocs/install/doctemplates/proposals/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/shipments/index.html b/htdocs/install/doctemplates/shipments/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/supplier_proposals/index.html b/htdocs/install/doctemplates/supplier_proposals/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/tasks/index.html b/htdocs/install/doctemplates/tasks/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/thirdparties/index.html b/htdocs/install/doctemplates/thirdparties/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/usergroups/index.html b/htdocs/install/doctemplates/usergroups/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/doctemplates/users/index.html b/htdocs/install/doctemplates/users/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index c953790f8c0..b800f5f6ad4 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -118,19 +118,21 @@ if (! empty($force_install_message))
+ > " - + > " - + > trans("Examples").":
"; ?> @@ -214,19 +217,15 @@ if (! empty($force_install_message)) - + + >
trans("CheckToForceHttps"); ?>
trans("DatabaseName"); ?> trans("ServerAddressDescription"); ?> @@ -360,9 +353,7 @@ if (! empty($force_install_message)) name="db_port" id="db_port" value="" - + > trans("ServerPortDescription"); ?> @@ -377,9 +368,7 @@ if (! empty($force_install_message)) id="db_prefix" name="db_prefix" value="" - + > trans("DatabasePrefixDescription"); ?> trans("CheckToCreateDatabase"); ?> @@ -410,9 +395,7 @@ if (! empty($force_install_message)) id="db_user" name="db_user" value="" - + > trans("AdminLogin"); ?> trans("AdminPassword"); ?> trans("CheckToCreateUser"); ?> @@ -478,9 +456,7 @@ if (! empty($force_install_message)) name="db_user_root" class="needroot" value="" - 0 && ! empty($force_install_databaserootlogin)) { - print ' disabled'; - } ?> + 0 && ! empty($force_install_databaserootlogin)) { print ' disabled'; } ?> > trans("DatabaseRootLoginDescription"); ?> @@ -516,9 +492,7 @@ if (! empty($force_install_message)) } // Do not autofill password for remote access print dol_escape_htmltag($autofill); ?>" - 0 && ! empty($force_install_databaserootpass)) { - print ' disabled'; // May be removed by javascript - } ?> + 0 && ! empty($force_install_databaserootpass)) { print ' disabled'; /* May be removed by javascript*/ } ?> > trans("KeepEmptyIfNoPassword"); ?> diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index 98eac2437fa..dc6544fc2be 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -72,7 +72,7 @@ function checkLinkedElements($sourcetype, $targettype) $out = $langs->trans('SourceType').': '.$sourcetype.' => '.$langs->trans('TargetType').': '.$targettype.' '; - $sql = 'SELECT * FROM '.MAIN_DB_PREFIX .'element_element'; + $sql = 'SELECT rowid, fk_source, fk_target FROM '.MAIN_DB_PREFIX .'element_element'; $sql.= ' WHERE sourcetype="'.$sourcetype.'" AND targettype="'.$targettype.'"'; $resql=$db->query($sql); if ($resql) diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index abc961b49d5..406bfe88dbc 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -119,6 +119,14 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_MODIFY','Intervention modified','Executed when a intervention is modified','ficheinter',19); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_CREATE','Project creation','Executed when a project is created','project',140); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_MODIFY','Project modified','Executed when a project is modified','project',142); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_VALIDATE','BOM validated','Executed when a BOM is validated','bom',400); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_UNVALIDATE','BOM unvalidated','Executed when a BOM is unvalidated','bom',401); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',402); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',403); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',404); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_VALIDATE','MO validated','Executed when a MO is validated','bom',410); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_PRODUCED','MO disabled','Executed when a MO is produced','bom',411); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_DELETE','MO deleted','Executed when a MO is deleted','bom',412); -- actions not enabled by default : they are excluded when we enable the module Agenda (except TASK_...) insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_CREATE','Task created','Executed when a project task is created','project',150); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',151); diff --git a/htdocs/install/mysql/data/llx_c_socialnetworks.sql b/htdocs/install/mysql/data/llx_c_socialnetworks.sql new file mode 100644 index 00000000000..829cbbf0294 --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_socialnetworks.sql @@ -0,0 +1,55 @@ +-- +-- 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 . +-- +-- + +-- +-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors +-- de l'install et tous les sigles '--' sont supprimés. +-- + +-- socialnetworks + +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'facebook', 'Facebook', 'https://www.facebook.com/{socialid}', 'fa-facebook', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'skype', 'Skype', 'https://www.skype.com/{socialid}', 'fa-skype', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'twitter', 'Twitter', 'https://www.twitter.com/{socialid}', 'fa-twitter', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'linkedin', 'LinkedIn', 'https://www.linkedin.com/{socialid}', 'fa-linkedin', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'instagram', 'Instagram', 'https://www.instagram.com/{socialid}', 'fa-instagram', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'snapchat', 'Snapchat', '{socialid}', 'fa-snapchat', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'googleplus', 'GooglePlus', 'https://www.googleplus.com/{socialid}', 'fa-google-plus-g', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'youtube', 'Youtube', 'https://www.youtube.com/{socialid}', 'fa-youtube', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'whatsapp', 'Whatsapp', '{socialid}', 'fa-whatsapp', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'tumblr', 'Tumblr', 'https://www.tumblr.com/{socialid}', 'fa-tumblr', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'vero', 'Vero', 'https://vero.co/{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'viadeo', 'Viadeo', 'https://fr.viadeo.com/fr/{socialid}', 'fa-viadeo', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'slack', 'Slack', '{socialid}', 'fa-slack', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'xing', 'Xing', '{socialid}', 'fa-xing', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'meetup', 'Meetup', '{socialid}', 'fa-meetup', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'pinterest', 'Pinterest', '{socialid}', 'fa-pinterest', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'flickr', 'Flickr', '{socialid}', 'fa-flickr', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, '500px', '500px', '{socialid}', 'fa-500px', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'giphy', 'Giphy', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'gifycat', 'Gificat', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'dailymotion', 'Dailymotion', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'vimeo', 'Vimeo', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'periscope', 'Periscope', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'twitch', 'Twitch', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'discord', 'Discord', '{socialid}', 'fa-discord', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'wikipedia', 'Wikipedia', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'reddit', 'Reddit', '{socialid}', 'fa-reddit', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'quora', 'Quora', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'tripadvisor', 'Tripadvisor', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'mastodon', 'Mastodon', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'diaspora', 'Diaspora', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'viber', 'Viber', '{socialid}', '', 0); diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 39027d92e72..be438ce66df 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -46,9 +46,27 @@ UPDATE llx_c_units SET scale = -3, active = 0 WHERE code IN ('L'); UPDATE llx_c_units SET label = 'VolumeUnitm3' WHERE code IN ('M3'); UPDATE llx_c_units SET label = 'SurfaceUnitm2' WHERE code IN ('M2'); +ALTER TABLE llx_adherent_type ADD UNIQUE INDEX uk_adherent_type_libelle (libelle, entity); + -- For v11 +ALTER TABLE llx_don ADD COLUMN fk_user_modif integer; + +ALTER TABLE llx_expeditiondet ADD INDEX idx_expeditiondet_fk_origin_line (fk_origin_line); + +ALTER TABLE llx_rights_def ADD COLUMN module_position INTEGER NOT NULL DEFAULT 0; +ALTER TABLE llx_rights_def ADD COLUMN family_position INTEGER NOT NULL DEFAULT 0; + +UPDATE llx_rights_def SET subperms = 'write' WHERE perms = 'fiscalyear' AND module = 'accounting' AND subperms IS NULL; + +ALTER TABLE llx_bom_bom ADD COLUMN duration double(8,4) DEFAULT NULL; +ALTER TABLE llx_bom_bomline ADD COLUMN position integer NOT NULL DEFAULT 0; +ALTER TABLE llx_bom_bomline ADD COLUMN qty_frozen smallint DEFAULT 0; +ALTER TABLE llx_bom_bomline ADD COLUMN disable_stock_change smallint DEFAULT 0; + +ALTER TABLE llx_bom_bomline DROP COLUMN rank; + create table llx_categorie_warehouse ( fk_categorie integer NOT NULL, @@ -76,6 +94,8 @@ ALTER TABLE llx_holiday_extrafields ADD INDEX idx_holiday_extrafields (fk_object ALTER TABLE llx_societe_rib MODIFY label varchar(200); +ALTER TABLE llx_societe ADD COLUMN logo_squarred varchar(255); + insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300); create table llx_entrepot_extrafields @@ -93,7 +113,8 @@ ALTER TABLE llx_extrafields ADD COLUMN printable boolean DEFAULT FALSE; ALTER TABLE llx_facture ADD COLUMN retained_warranty real DEFAULT NULL after situation_final; ALTER TABLE llx_facture ADD COLUMN retained_warranty_date_limit date DEFAULT NULL after retained_warranty; ALTER TABLE llx_facture ADD COLUMN retained_warranty_fk_cond_reglement integer DEFAULT NULL after retained_warranty_date_limit; - +ALTER TABLE llx_facture ADD COLUMN date_closing datetime DEFAULT NULL after date_valid; +ALTER TABLE llx_facture ADD COLUMN fk_user_closing integer DEFAULT NULL after fk_user_valid; ALTER TABLE llx_c_shipment_mode ADD COLUMN entity integer DEFAULT 1 NOT NULL; @@ -125,6 +146,9 @@ ALTER TABLE llx_stock_mouvement ADD COLUMN fk_projet INTEGER NOT NULL DEFAULT 0 ALTER TABLE llx_oauth_token ADD COLUMN fk_soc integer DEFAULT NULL after token; + +ALTER TABLE llx_adherent_type ADD COLUMN duration varchar(6) DEFAULT NULL after morphy; + ALTER TABLE llx_mailing ADD COLUMN tms timestamp; ALTER TABLE llx_mailing_cibles ADD COLUMN tms timestamp; @@ -226,15 +250,70 @@ INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, m INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-REPUBLICDAY', 0, 117, '', 0, 1, 26, 1); INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-GANDI', 0, 117, '', 0, 10, 2, 1); + +create table llx_c_socialnetworks +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, + code varchar(100), + label varchar(150), + url text, + icon varchar(20), + active tinyint DEFAULT 1 NOT NULL +)ENGINE=innodb; + +ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code (code); + +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'facebook', 'Facebook', 'https://www.facebook.com/{socialid}', 'fa-facebook', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'skype', 'Skype', 'https://www.skype.com/{socialid}', 'fa-skype', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'twitter', 'Twitter', 'https://www.twitter.com/{socialid}', 'fa-twitter', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'linkedin', 'LinkedIn', 'https://www.linkedin.com/{socialid}', 'fa-linkedin', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'instagram', 'Instagram', 'https://www.instagram.com/{socialid}', 'fa-instagram', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'snapchat', 'Snapchat', '{socialid}', 'fa-snapchat', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'googleplus', 'GooglePlus', 'https://www.googleplus.com/{socialid}', 'fa-google-plus-g', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'youtube', 'Youtube', 'https://www.youtube.com/{socialid}', 'fa-youtube', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'whatsapp', 'Whatsapp', '{socialid}', 'fa-whatsapp', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'tumblr', 'Tumblr', 'https://www.tumblr.com/{socialid}', 'fa-tumblr', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'vero', 'Vero', 'https://vero.co/{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'viadeo', 'Viadeo', 'https://fr.viadeo.com/fr/{socialid}', 'fa-viadeo', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'slack', 'Slack', '{socialid}', 'fa-slack', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'xing', 'Xing', '{socialid}', 'fa-xing', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'meetup', 'Meetup', '{socialid}', 'fa-meetup', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'pinterest', 'Pinterest', '{socialid}', 'fa-pinterest', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'flickr', 'Flickr', '{socialid}', 'fa-flickr', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, '500px', '500px', '{socialid}', 'fa-500px', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'giphy', 'Giphy', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'gifycat', 'Gificat', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'dailymotion', 'Dailymotion', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'vimeo', 'Vimeo', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'periscope', 'Periscope', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'twitch', 'Twitch', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'discord', 'Discord', '{socialid}', 'fa-discord', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'wikipedia', 'Wikipedia', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'reddit', 'Reddit', '{socialid}', 'fa-reddit', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'quora', 'Quora', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'tripadvisor', 'Tripadvisor', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'mastodon', 'Mastodon', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'diaspora', 'Diaspora', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'viber', 'Viber', '{socialid}', '', 0); + +ALTER TABLE llx_adherent ADD COLUMN socialnetworks text DEFAULT NULL AFTER email; +ALTER TABLE llx_societe ADD COLUMN socialnetworks text DEFAULT NULL AFTER email; +ALTER TABLE llx_socpeople ADD COLUMN socialnetworks text DEFAULT NULL AFTER email; +ALTER TABLE llx_user ADD COLUMN socialnetworks text DEFAULT NULL AFTER personal_email; + +ALTER TABLE llx_product ADD COLUMN net_measure float; +ALTER TABLE llx_product ADD COLUMN net_measure_units tinyint; + create table llx_adherent_type_lang ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_type integer DEFAULT 0 NOT NULL, - lang varchar(5) DEFAULT 0 NOT NULL, - label varchar(255) NOT NULL, - description text, - email text, - import_key varchar(14) DEFAULT NULL + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_type integer DEFAULT 0 NOT NULL, + lang varchar(5) DEFAULT 0 NOT NULL, + label varchar(255) NOT NULL, + description text, + email text, + import_key varchar(14) DEFAULT NULL )ENGINE=innodb; create table llx_fichinter_rec @@ -311,3 +390,105 @@ create table llx_fichinterdet_rec ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_start datetime DEFAULT NULL AFTER product_type; ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_end datetime DEFAULT NULL AFTER date_start; + +--List of parcels details related to an expedition +create table llx_expedition_package +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_expedition integer NOT NULL, + description varchar(255), --Description of goods in the package (required by the custom) + value double(24,8) DEFAULT 0,--Value (Price of the content, for insurance & custom) + fk_parcel_type integer, -- Type or package, linked to llx_c_shipment_parcel_type (eg: 1=enveloppe, 2=package, 3=palette, 4=other) + height float, -- height + width float, -- width + size float, -- depth + size_units integer, -- unit of all sizes (height, width, depth) + weight float, -- weight + weight_units integer, -- unit of weight + dangerous_goods smallint DEFAULT 0, -- 0 = no dangerous goods or 1 = Explosives, 2 = Flammable Gases, 3 = Flammable Liquids, 4 = Flammable solids, 5 = Oxidizing, 6 = Toxic & Infectious, 7 = Radioactive, 8 = Corrosives, 9 = Miscellaneous (see https://en.wikipedia.org/wiki/Dangerous_goods). I'm not sure if just register 0 (no) or 1 (yes) is enough. + tail_lift smallint DEFAULT 0, -- 0 = no tail lift required to load/unload package(s), 1 = a tail lift is required to load/unload package(s). Sometime tail lift load can be different than tail lift delivery so maybe adding a new table line. + rang integer DEFAULT 0 +)ENGINE=innodb; + +--Dictionary of package type +create table llx_c_shipment_package_type +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + label varchar(50) NOT NULL, -- Short name + description varchar(255), -- Description + active integer DEFAULT 1 NOT NULL, -- Active or not + entity integer DEFAULT 1 NOT NULL -- Multi company id +)ENGINE=innodb; + +CREATE TABLE llx_product_fournisseur_price_extrafields ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_product_fournisseur_price_extrafields ADD INDEX idx_product_fournisseur_price_extrafields (fk_object); + +CREATE TABLE llx_mrp_mo( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + entity integer DEFAULT 1 NOT NULL, + label varchar(255), + qty real NOT NULL, + fk_warehouse integer, + fk_soc integer, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + model_pdf varchar(255), + import_key varchar(14), + status integer NOT NULL, + fk_product integer NOT NULL, + date_start_planned datetime, + date_end_planned datetime, + fk_bom integer, + fk_project integer + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; + +ALTER TABLE llx_bom_bom ADD COLUMN model_pdf varchar(255); +ALTER TABLE llx_mrp_mo ADD COLUMN model_pdf varchar(255); + +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_ref (ref); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_entity (entity); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_soc (fk_soc); +ALTER TABLE llx_mrp_mo ADD CONSTRAINT fk_mrp_mo_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_status (status); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_product (fk_product); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_date_start_planned (date_start_planned); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_date_end_planned (date_end_planned); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_bom (fk_bom); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_project (fk_project); + + +create table llx_mrp_mo_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_mrp_mo_extrafields ADD INDEX idx_fk_object(fk_object); + + +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_VALIDATE','BOM validated','Executed when a BOM is validated','bom',400); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_UNVALIDATE','BOM unvalidated','Executed when a BOM is unvalidated','bom',401); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',402); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',403); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',404); + +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_VALIDATE','MO validated','Executed when a MO is validated','bom',410); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_PRODUCED','MO disabled','Executed when a MO is produced','bom',411); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_DELETE','MO deleted','Executed when a MO is deleted','bom',412); + +ALTER TABLE llx_comment ADD COLUMN fk_user_modif integer DEFAULT NULL; diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 4d87203b068..69bdea770c9 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -71,6 +71,8 @@ UPDATE llx_user set api_key = null where api_key = ''; UPDATE llx_c_email_templates SET position = 0 WHERE position IS NULL; +-- DELETE FROM llx_c_email_templates WHERE label = '(SendAnEMailToMember)'; -- Now it is '(SendingAnEMailToMemner)' + -- delete foreign key that should never exists ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency; @@ -471,7 +473,7 @@ UPDATE llx_accounting_bookkeeping set date_creation = tms where date_creation IS -- Note to make all deposit as payed when there is already a discount generated from it. --drop table tmp_invoice_deposit_mark_as_available; --create table tmp_invoice_deposit_mark_as_available as select * from llx_facture as f where f.type = 3 and f.paye = 0 and f.rowid in (select fk_facture_source from llx_societe_remise_except); ---update llx_facture set paye = 1 where rowid in (select rowid from tmp_invoice_deposit_mark_as_available); +--update llx_facture set paye = 1, fk_statut = 2 where rowid in (select rowid from tmp_invoice_deposit_mark_as_available); diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index b071e31eb27..cb96ab98164 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -48,6 +48,7 @@ create table llx_adherent country integer, email varchar(255), + socialnetworks text DEFAULT NULL, -- json with socialnetworks skype varchar(255), twitter varchar(255), -- facebook varchar(255), -- diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql index 5a2dee3b12b..1b675c5e3fd 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.sql @@ -25,13 +25,14 @@ create table llx_adherent_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, -- multi company id + entity integer DEFAULT 1 NOT NULL, tms timestamp, statut smallint NOT NULL DEFAULT 0, libelle varchar(50) NOT NULL, morphy varchar(3) NOT NULL, + duration varchar(6) DEFAULT NULL, subscription varchar(3) NOT NULL DEFAULT 'yes', vote varchar(3) NOT NULL DEFAULT 'yes', note text, - mail_valid text -- mail envoye a la validation + mail_valid text )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bom_bom.sql b/htdocs/install/mysql/tables/llx_bom_bom.sql index d66c3f9ffbf..f1e80d927f9 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom.sql @@ -26,13 +26,15 @@ CREATE TABLE llx_bom_bom( fk_product integer, qty double(24,8), efficiency double(8,4) DEFAULT 1, + duration double(8,4) DEFAULT NULL, date_creation datetime NOT NULL, date_valid datetime, tms timestamp, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, - import_key varchar(14), + import_key varchar(14), + model_pdf varchar(255), status integer NOT NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bom_bomline.sql b/htdocs/install/mysql/tables/llx_bom_bomline.sql index cb7079cf16a..3fa1c2be528 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline.sql @@ -22,7 +22,9 @@ CREATE TABLE llx_bom_bomline( description text, import_key varchar(14), qty double(24,8) NOT NULL, + qty_frozen smallint DEFAULT 0, + disable_stock_change smallint DEFAULT 0, efficiency double(8,4) NOT NULL DEFAULT 1, - position integer NOT NULL + position integer NOT NULL DEFAULT 0 -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_shipment_package_type b/htdocs/install/mysql/tables/llx_c_shipment_package_type new file mode 100644 index 00000000000..e510352eba2 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_shipment_package_type @@ -0,0 +1,9 @@ +--Dictionary of package type +create table llx_c_shipment_package_type +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + label varchar(50) NOT NULL, -- Short name + description varchar(255), -- Description + active integer DEFAULT 1 NOT NULL, -- Active or not + entity integer DEFAULT 1 NOT NULL -- Multi company id +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_socialnetworks.key.sql b/htdocs/install/mysql/tables/llx_c_socialnetworks.key.sql new file mode 100644 index 00000000000..2b7dcdc9d4e --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_socialnetworks.key.sql @@ -0,0 +1,19 @@ +-- ======================================================================== +-- +-- 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 . +-- +-- ======================================================================== + + +ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code (code); diff --git a/htdocs/install/mysql/tables/llx_c_socialnetworks.sql b/htdocs/install/mysql/tables/llx_c_socialnetworks.sql new file mode 100644 index 00000000000..b2d0b44c371 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_socialnetworks.sql @@ -0,0 +1,27 @@ +-- ======================================================================== +-- +-- 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 . +-- +-- ======================================================================== + +create table llx_c_socialnetworks +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, + code varchar(100), + label varchar(150), + url text, + icon varchar(20), + active tinyint DEFAULT 1 NOT NULL +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_comment.sql b/htdocs/install/mysql/tables/llx_comment.sql index d881c84c0e3..22b2c40b9f1 100644 --- a/htdocs/install/mysql/tables/llx_comment.sql +++ b/htdocs/install/mysql/tables/llx_comment.sql @@ -22,6 +22,7 @@ CREATE TABLE llx_comment ( tms timestamp, description text NOT NULL, fk_user_author integer DEFAULT NULL, + fk_user_modif integer DEFAULT NULL, fk_element integer DEFAULT NULL, element_type varchar(50) DEFAULT NULL, entity integer DEFAULT 1, diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index ee17fdd1e67..f03e82d6143 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -47,6 +47,7 @@ create table llx_don fk_projet integer NULL, -- Donation is given for a project ? datec datetime, -- Create date fk_user_author integer NOT NULL, + fk_user_modif integer, date_valid datetime, -- date de validation fk_user_valid integer NULL, note_private text, diff --git a/htdocs/install/mysql/tables/llx_expedition_package.sql b/htdocs/install/mysql/tables/llx_expedition_package.sql new file mode 100644 index 00000000000..2f8d97a26a9 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_expedition_package.sql @@ -0,0 +1,18 @@ +--List of parcels details related to an expedition +create table llx_expedition_package +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_expedition integer NOT NULL, + description varchar(255), --Description of goods in the package (required by the custom) + value double(24,8) DEFAULT 0,--Value (Price of the content, for insurance & custom) + fk_package_type integer, -- Type or package, linked to llx_c_shipment_parcel_type (eg: 1=enveloppe, 2=package, 3=palette, 4=other) + height float, -- height + width float, -- width + size float, -- depth + size_units integer, -- unit of all sizes (height, width, depth) + weight float, -- weight + weight_units integer, -- unit of weight + dangerous_goods smallint DEFAULT 0, -- 0 = no dangerous goods or 1 = Explosives, 2 = Flammable Gases, 3 = Flammable Liquids, 4 = Flammable solids, 5 = Oxidizing, 6 = Toxic & Infectious, 7 = Radioactive, 8 = Corrosives, 9 = Miscellaneous (see https://en.wikipedia.org/wiki/Dangerous_goods). I'm not sure if just register 0 (no) or 1 (yes) is enough. + tail_lift smallint DEFAULT 0, -- 0 = no tail lift required to load/unload package(s), 1 = a tail lift is required to load/unload package(s). Sometime tail lift load can be different than tail lift delivery so maybe adding a new table line. + rang integer DEFAULT 0 +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expeditiondet.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet.key.sql index 915602f51ae..b37ae457fe3 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet.key.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet.key.sql @@ -19,4 +19,5 @@ ALTER TABLE llx_expeditiondet ADD INDEX idx_expeditiondet_fk_expedition (fk_expedition); +ALTER TABLE llx_expeditiondet ADD INDEX idx_expeditiondet_fk_origin_line (fk_origin_line); ALTER TABLE llx_expeditiondet ADD CONSTRAINT fk_expeditiondet_fk_expedition FOREIGN KEY (fk_expedition) REFERENCES llx_expedition (rowid); diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 2247010fe7a..3b49ef04010 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -41,6 +41,7 @@ create table llx_facture date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation tms timestamp, -- date creation/modification + date_closing datetime, -- date de cloture paye smallint DEFAULT 0 NOT NULL, amount double(24,8) DEFAULT 0 NOT NULL, remise_percent real DEFAULT 0, -- remise relative @@ -62,7 +63,8 @@ create table llx_facture fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- user validating - + fk_user_closing integer, -- user closing + module_source varchar(32), -- name of module when invoice generated by a dedicated module (POS, ...) pos_source varchar(32), -- name of POS station when invoice is generated by a POS module fk_fac_rec_source integer, -- facture rec source diff --git a/htdocs/install/mysql/tables/llx_mrp_mo.key.sql b/htdocs/install/mysql/tables/llx_mrp_mo.key.sql new file mode 100644 index 00000000000..5c218763ff6 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_mrp_mo.key.sql @@ -0,0 +1,33 @@ +-- 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/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_ref (ref); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_entity (entity); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_soc (fk_soc); +ALTER TABLE llx_mrp_mo ADD CONSTRAINT fk_mrp_mo_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_status (status); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_product (fk_product); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_date_start_planned (date_start_planned); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_date_end_planned (date_end_planned); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_bom (fk_bom); +ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_project (fk_project); +-- END MODULEBUILDER INDEXES + +--ALTER TABLE llx_mrp_mo ADD UNIQUE INDEX uk_mrp_mo_fieldxy(fieldx, fieldy); + +--ALTER TABLE llx_mrp_mo ADD CONSTRAINT llx_mrp_mo_fk_field FOREIGN KEY (fk_field) REFERENCES llx_mrp_myotherobject(rowid); + diff --git a/htdocs/install/mysql/tables/llx_mrp_mo.sql b/htdocs/install/mysql/tables/llx_mrp_mo.sql new file mode 100644 index 00000000000..19f48e27e8a --- /dev/null +++ b/htdocs/install/mysql/tables/llx_mrp_mo.sql @@ -0,0 +1,41 @@ +-- 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/. + + +CREATE TABLE llx_mrp_mo( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + entity integer DEFAULT 1 NOT NULL, + label varchar(255), + qty real NOT NULL, + fk_warehouse integer, + fk_soc integer, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + import_key varchar(14), + model_pdf varchar(255), + status integer NOT NULL, + fk_product integer NOT NULL, + date_start_planned datetime, + date_end_planned datetime, + fk_bom integer, + fk_project integer + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.key.sql b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.key.sql new file mode 100644 index 00000000000..5b280acc41f --- /dev/null +++ b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.key.sql @@ -0,0 +1,19 @@ +-- Copyright (C) 2019 Alicealalalamdskfldmjgdfgdfhfghgfh Adminson +-- +-- 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/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_mrp_myobject_extrafields ADD INDEX idx_fk_object(fk_object); +-- END MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql new file mode 100644 index 00000000000..9245ac1c341 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql @@ -0,0 +1,23 @@ +-- Copyright (C) 2019 Alicealalalamdskfldmjgdfgdfhfghgfh Adminson +-- +-- 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/. + +create table llx_mrp_myobject_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 858c89e8d2e..e8e7bb1233c 100755 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -69,6 +69,8 @@ create table llx_product accountancy_code_sell_export varchar(32), -- Selling accountancy code for vat export accountancy_code_buy varchar(32), -- Buying accountancy code partnumber varchar(32), -- Part/Serial number. TODO To use it into screen if not a duplicate of barcode. + net_measure float DEFAULT NULL, + net_measure_units tinyint DEFAULT NULL, weight float DEFAULT NULL, weight_units tinyint DEFAULT NULL, length float DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.key.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.key.sql new file mode 100644 index 00000000000..b0d9345b604 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2011 Laurent Destailleur +-- +-- 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 . +-- +-- =================================================================== + + +ALTER TABLE llx_product_fournisseur_price_extrafields ADD INDEX idx_product_fournisseur_price_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql new file mode 100644 index 00000000000..51d5499e825 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql @@ -0,0 +1,24 @@ +-- ============================================================================ +-- Copyright (C) 2011 Laurent Destailleur +-- +-- 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 . +-- +-- ============================================================================ + +Create Table llx_product_fournisseur_price_extrafields ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_rights_def.sql b/htdocs/install/mysql/tables/llx_rights_def.sql index f9bbb57c2e2..1cfcdbe25ef 100644 --- a/htdocs/install/mysql/tables/llx_rights_def.sql +++ b/htdocs/install/mysql/tables/llx_rights_def.sql @@ -22,6 +22,8 @@ create table llx_rights_def id integer NOT NULL, libelle varchar(255), module varchar(64), + module_position integer NOT NULL DEFAULT 0, + family_position integer NOT NULL DEFAULT 0, entity integer DEFAULT 1 NOT NULL, perms varchar(50), subperms varchar(50), diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 4db88defc68..fc3100b823d 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -34,7 +34,7 @@ create table llx_societe statut tinyint DEFAULT 0, -- statut parent integer, - status tinyint DEFAULT 1, -- cessation d'activité ( 1 -- en activité, 0 -- cessation d'activité) + status tinyint DEFAULT 1, -- cessation d'activité ( 1 -- en activité, 0 -- cessation d'activité) code_client varchar(24), -- code client code_fournisseur varchar(24), -- code founisseur @@ -50,7 +50,8 @@ create table llx_societe fax varchar(20), -- fax number url varchar(255), -- email varchar(128), -- - + + socialnetworks text DEFAULT NULL, -- json with socialnetworks skype varchar(255), -- twitter varchar(255), -- facebook varchar(255), -- @@ -60,7 +61,7 @@ create table llx_societe googleplus varchar(255), -- youtube varchar(255), -- whatsapp varchar(255), -- - + fk_effectif integer DEFAULT 0, -- fk_typent integer DEFAULT 0, -- fk_forme_juridique integer DEFAULT 0, -- juridical status @@ -107,11 +108,12 @@ create table llx_societe supplier_order_min_amount double(24,8) DEFAULT NULL, -- min amount for supplier orders default_lang varchar(6), -- default language logo varchar(255) DEFAULT NULL, + logo_squarred varchar(255) DEFAULT NULL, canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default) fk_entrepot integer DEFAULT 0, -- if we need a link between third party and warehouse webservices_url varchar(255), -- supplier webservice url webservices_key varchar(128), -- supplier webservice key - + tms timestamp, -- last modification date datec datetime, -- creation date fk_user_creat integer NULL, -- utilisateur qui a cree l'info diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index 99338d4a206..fceb2044649 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -41,7 +41,8 @@ create table llx_socpeople phone_mobile varchar(30), fax varchar(30), email varchar(255), - + + socialnetworks text DEFAULT NULL, -- json with socialnetworks jabberid varchar(255), skype varchar(255), twitter varchar(255), -- @@ -52,7 +53,7 @@ create table llx_socpeople googleplus varchar(255), -- youtube varchar(255), -- whatsapp varchar(255), -- - + photo varchar(255), no_email smallint NOT NULL DEFAULT 0, -- deprecated. Use table llx_mailing_unsubscribe instead priv smallint NOT NULL DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index a5ff97a0e15..16170267bee 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -24,7 +24,7 @@ create table llx_user ref_ext varchar(50), -- reference into an external system (not used by dolibarr) ref_int varchar(50), -- reference into an internal system (deprecated) - + employee tinyint DEFAULT 1, -- 1 if user is an employee fk_establishment integer DEFAULT 0, @@ -48,14 +48,15 @@ create table llx_user fk_state integer DEFAULT 0, fk_country integer DEFAULT 0, birth date, -- birthday - job varchar(128), + job varchar(128), office_phone varchar(20), office_fax varchar(20), user_mobile varchar(20), personal_mobile varchar(20), email varchar(255), personal_email varchar(255), - + + socialnetworks text DEFAULT NULL, -- json with socialnetworks jabberid varchar(255), skype varchar(255), twitter varchar(255), -- @@ -66,7 +67,7 @@ create table llx_user googleplus varchar(255), -- youtube varchar(255), -- whatsapp varchar(255), -- - + signature text DEFAULT NULL, admin smallint DEFAULT 0, module_comm smallint DEFAULT 1, diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 517b5843f30..b46e9713983 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -1297,7 +1297,7 @@ if ($ok && GETPOST('clean_perm_table', 'alpha')) { $listofmods.=($listofmods?',':'')."'".$val."'"; } - $sql = 'SELECT id, libelle, module from '.MAIN_DB_PREFIX.'rights_def WHERE module not in ('.$listofmods.') AND id > 100000'; + $sql = 'SELECT id, libelle as label, module from '.MAIN_DB_PREFIX.'rights_def WHERE module not in ('.$listofmods.') AND id > 100000'; $resql = $db->query($sql); if ($resql) { @@ -1310,7 +1310,7 @@ if ($ok && GETPOST('clean_perm_table', 'alpha')) $obj=$db->fetch_object($resql); if ($obj->id > 0) { - print '
Found line with id '.$obj->id.', label "'.$obj->libelle.'" of module "'.$obj->module.'" to delete'; + print '
Found line with id '.$obj->id.', label "'.$obj->label.'" of module "'.$obj->module.'" to delete'; if (GETPOST('clean_perm_table', 'alpha') == 'confirmed') { $sqldelete = 'DELETE FROM '.MAIN_DB_PREFIX.'rights_def WHERE id = '.$obj->id; diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 9f589de42b1..62d984bf1f3 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -586,7 +586,6 @@ if (! $error && $db->connected && $action == "set") if ($result > 0 && $resultbis > 0) { - print '
'; print $langs->trans("UserCreation").' : '; print $dolibarr_main_db_user; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 3554df8f6bc..232cee40440 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -64,7 +64,10 @@ $error = 0; // Ne fonctionne que si on est pas en safe_mode. $err=error_reporting(); error_reporting(0); -@set_time_limit(300); +if (! empty($conf->global->MAIN_OVERRIDE_TIME_LIMIT)) + @set_time_limit((int) $conf->global->MAIN_OVERRIDE_TIME_LIMIT); +else + @set_time_limit(600); error_reporting($err); $setuplang=GETPOST("selectlang", 'aZ09', 3)?GETPOST("selectlang", 'aZ09', 3):'auto'; @@ -448,6 +451,16 @@ if (! GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'a { migrate_user_photospath(); } + + // Scripts for 11.0 + $afterversionarray=explode('.', '10.0.9'); + $beforeversionarray=explode('.', '11.0.9'); + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { + migrate_users_socialnetworks(); + migrate_members_socialnetworks(); + migrate_contacts_socialnetworks(); + migrate_thirdparties_socialnetworks(); + } } // Code executed only if migration is LAST ONE. Must always be done. @@ -2373,7 +2386,6 @@ function migrate_stocks($db, $langs, $conf) $resql2=$db->query($sql); if ($resql2) { - } else { @@ -2450,7 +2462,6 @@ function migrate_menus($db, $langs, $conf) $resql2=$db->query($sql); if ($resql2) { - } else { @@ -4925,3 +4936,369 @@ On les corrige: update llx_facture set paye=1, fk_statut=2 where close_code is null and rowid in (...) */ + +/** + * Migrate users fields facebook and co to socialnetworks + * + * @return void + */ +function migrate_users_socialnetworks() +{ + global $db, $langs; + // skype,twitter,facebook,linkedin,instagram,snapchat,googleplus,youtube,whatsapp + $error = 0; + $db->begin(); + print '
'; + $sql = 'SELECT rowid, socialnetworks'; + $sql .= ', skype, twitter, facebook, linkedin, instagram, snapchat, googleplus, youtube, whatsapp FROM '.MAIN_DB_PREFIX.'user WHERE '; + $sql .= ' skype IS NOT NULL OR skype !=""'; + $sql .= ' OR twitter IS NOT NULL OR twitter !=""'; + $sql .= ' OR facebook IS NOT NULL OR facebook!=""'; + $sql .= ' OR linkedin IS NOT NULL OR linkedin!=""'; + $sql .= ' OR instagram IS NOT NULL OR instagram!=""'; + $sql .= ' OR snapchat IS NOT NULL OR snapchat!=""'; + $sql .= ' OR googleplus IS NOT NULL OR googleplus!=""'; + $sql .= ' OR youtube IS NOT NULL OR youtube!=""'; + $sql .= ' OR whatsapp IS NOT NULL OR whatsapp!=""'; + //print $sql; + $resql = $db->query($sql); + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + $arraysocialnetworks = array(); + if (!empty($obj->skype)) { + $arraysocialnetworks['skype'] = $obj->skype; + } + if (!empty($obj->twitter)) { + $arraysocialnetworks['twitter'] = $obj->twitter; + } + if (!empty($obj->facebook)) { + $arraysocialnetworks['facebook'] = $obj->facebook; + } + if (!empty($obj->linkedin)) { + $arraysocialnetworks['linkedin'] = $obj->linkedin; + } + if (!empty($obj->instagram)) { + $arraysocialnetworks['instagram'] = $obj->instagram; + } + if (!empty($obj->snapchat)) { + $arraysocialnetworks['snapchat'] = $obj->snapchat; + } + if (!empty($obj->googleplus)) { + $arraysocialnetworks['googleplus'] = $obj->googleplus; + } + if (!empty($obj->youtube)) { + $arraysocialnetworks['youtube'] = $obj->youtube; + } + if (!empty($obj->whatsapp)) { + $arraysocialnetworks['whatsapp'] = $obj->whatsapp; + } + if ($obj->socialnetworks == '' || is_null($obj->socialnetworks)) { + $obj->socialnetworks = '[]'; + } + $socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true)); + $sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'user SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"'; + $sqlupd.= ', skype=null'; + $sqlupd.= ', twitter=null'; + $sqlupd.= ', facebook=null'; + $sqlupd.= ', linkedin=null'; + $sqlupd.= ', instagram=null'; + $sqlupd.= ', snapchat=null'; + $sqlupd.= ', googleplus=null'; + $sqlupd.= ', youtube=null'; + $sqlupd.= ', whatsapp=null'; + $sqlupd.= ' WHERE rowid='.$obj->rowid; + //print $sqlupd."
"; + $resqlupd = $db->query($sqlupd); + if (! $resqlupd) { + dol_print_error($db); + $error++; + } + } + } else { + $error++; + } + if (! $error) { + $db->commit(); + } else { + dol_print_error($db); + $db->rollback(); + } + print ''.$langs->trans('MigrationUsersSocialNetworks')."
\n"; + print '
'; + $error = 0; + $db->begin(); + print '
'; + $sql = 'SELECT rowid, socialnetworks'; + $sql .= ', skype, twitter, facebook, linkedin, instagram, snapchat, googleplus, youtube, whatsapp FROM '.MAIN_DB_PREFIX.'adherent WHERE '; + $sql .= ' skype IS NOT NULL OR skype!=""'; + $sql .= ' OR twitter IS NOT NULL OR twitter!=""'; + $sql .= ' OR facebook IS NOT NULL OR facebook!=""'; + $sql .= ' OR linkedin IS NOT NULL OR linkedin!=""'; + $sql .= ' OR instagram IS NOT NULL OR instagram!=""'; + $sql .= ' OR snapchat IS NOT NULL OR snapchat!=""'; + $sql .= ' OR googleplus IS NOT NULL OR googleplus!=""'; + $sql .= ' OR youtube IS NOT NULL OR youtube!=""'; + $sql .= ' OR whatsapp IS NOT NULL OR whatsapp!=""'; + //print $sql; + $resql = $db->query($sql); + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + $arraysocialnetworks = array(); + if (!empty($obj->skype)) { + $arraysocialnetworks['skype'] = $obj->skype; + } + if (!empty($obj->twitter)) { + $arraysocialnetworks['twitter'] = $obj->twitter; + } + if (!empty($obj->facebook)) { + $arraysocialnetworks['facebook'] = $obj->facebook; + } + if (!empty($obj->linkedin)) { + $arraysocialnetworks['linkedin'] = $obj->linkedin; + } + if (!empty($obj->instagram)) { + $arraysocialnetworks['instagram'] = $obj->instagram; + } + if (!empty($obj->snapchat)) { + $arraysocialnetworks['snapchat'] = $obj->snapchat; + } + if (!empty($obj->googleplus)) { + $arraysocialnetworks['googleplus'] = $obj->googleplus; + } + if (!empty($obj->youtube)) { + $arraysocialnetworks['youtube'] = $obj->youtube; + } + if (!empty($obj->whatsapp)) { + $arraysocialnetworks['whatsapp'] = $obj->whatsapp; + } + if ($obj->socialnetworks == '' || is_null($obj->socialnetworks)) { + $obj->socialnetworks = '[]'; + } + $socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true)); + $sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'adherent SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"'; + $sqlupd.= ', skype=null'; + $sqlupd.= ', twitter=null'; + $sqlupd.= ', facebook=null'; + $sqlupd.= ', linkedin=null'; + $sqlupd.= ', instagram=null'; + $sqlupd.= ', snapchat=null'; + $sqlupd.= ', googleplus=null'; + $sqlupd.= ', youtube=null'; + $sqlupd.= ', whatsapp=null'; + $sqlupd.= ' WHERE rowid='.$obj->rowid; + //print $sqlupd."
"; + $resqlupd = $db->query($sqlupd); + if (! $resqlupd) { + dol_print_error($db); + $error++; + } + } + } else { + $error++; + } + if (! $error) { + $db->commit(); + } else { + dol_print_error($db); + $db->rollback(); + } + print ''.$langs->trans('MigrationMembersSocialNetworks')."
\n"; + print '
'; + $sql = 'SELECT rowid, socialnetworks'; + $sql .= ', jabberid, skype, twitter, facebook, linkedin, instagram, snapchat, googleplus, youtube, whatsapp FROM '.MAIN_DB_PREFIX.'socpeople WHERE '; + $sql .= ' jabberid IS NOT NULL OR jabberid!=""'; + $sql .= ' OR skype IS NOT NULL OR skype!=""'; + $sql .= ' OR twitter IS NOT NULL OR twitter!=""'; + $sql .= ' OR facebook IS NOT NULL OR facebook!=""'; + $sql .= ' OR linkedin IS NOT NULL OR linkedin!=""'; + $sql .= ' OR instagram IS NOT NULL OR instagram!=""'; + $sql .= ' OR snapchat IS NOT NULL OR snapchat!=""'; + $sql .= ' OR googleplus IS NOT NULL OR googleplus!=""'; + $sql .= ' OR youtube IS NOT NULL OR youtube!=""'; + $sql .= ' OR whatsapp IS NOT NULL OR whatsapp!=""'; + //print $sql; + $resql = $db->query($sql); + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + $arraysocialnetworks = array(); + if (!empty($obj->jabberid)) { + $arraysocialnetworks['jabber'] = $obj->jabberid; + } + if (!empty($obj->skype)) { + $arraysocialnetworks['skype'] = $obj->skype; + } + if (!empty($obj->twitter)) { + $arraysocialnetworks['twitter'] = $obj->twitter; + } + if (!empty($obj->facebook)) { + $arraysocialnetworks['facebook'] = $obj->facebook; + } + if (!empty($obj->linkedin)) { + $arraysocialnetworks['linkedin'] = $obj->linkedin; + } + if (!empty($obj->instagram)) { + $arraysocialnetworks['instagram'] = $obj->instagram; + } + if (!empty($obj->snapchat)) { + $arraysocialnetworks['snapchat'] = $obj->snapchat; + } + if (!empty($obj->googleplus)) { + $arraysocialnetworks['googleplus'] = $obj->googleplus; + } + if (!empty($obj->youtube)) { + $arraysocialnetworks['youtube'] = $obj->youtube; + } + if (!empty($obj->whatsapp)) { + $arraysocialnetworks['whatsapp'] = $obj->whatsapp; + } + if ($obj->socialnetworks == '' || is_null($obj->socialnetworks)) { + $obj->socialnetworks = '[]'; + } + $socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true)); + $sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'socpeople SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"'; + $sqlupd.= ', jabberid=null'; + $sqlupd.= ', skype=null'; + $sqlupd.= ', twitter=null'; + $sqlupd.= ', facebook=null'; + $sqlupd.= ', linkedin=null'; + $sqlupd.= ', instagram=null'; + $sqlupd.= ', snapchat=null'; + $sqlupd.= ', googleplus=null'; + $sqlupd.= ', youtube=null'; + $sqlupd.= ', whatsapp=null'; + $sqlupd.= ' WHERE rowid='.$obj->rowid; + //print $sqlupd."
"; + $resqlupd = $db->query($sqlupd); + if (! $resqlupd) { + dol_print_error($db); + $error++; + } + } + } else { + $error++; + } + if (! $error) { + $db->commit(); + } else { + dol_print_error($db); + $db->rollback(); + } + print ''.$langs->trans('MigrationContactsSocialNetworks')."
\n"; + print '
'; + $sql = 'SELECT rowid, socialnetworks'; + $sql .= ', skype, twitter, facebook, linkedin, instagram, snapchat, googleplus, youtube, whatsapp FROM '.MAIN_DB_PREFIX.'societe WHERE '; + $sql .= ' skype IS NOT NULL OR skype!=""'; + $sql .= ' OR twitter IS NOT NULL OR twitter!=""'; + $sql .= ' OR facebook IS NOT NULL OR facebook!=""'; + $sql .= ' OR linkedin IS NOT NULL OR linkedin!=""'; + $sql .= ' OR instagram IS NOT NULL OR instagram!=""'; + $sql .= ' OR snapchat IS NOT NULL OR snapchat!=""'; + $sql .= ' OR googleplus IS NOT NULL OR googleplus!=""'; + $sql .= ' OR youtube IS NOT NULL OR youtube!=""'; + $sql .= ' OR whatsapp IS NOT NULL OR whatsapp!=""'; + //print $sql; + $resql = $db->query($sql); + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + $arraysocialnetworks = array(); + if (!empty($obj->skype)) { + $arraysocialnetworks['skype'] = $obj->skype; + } + if (!empty($obj->twitter)) { + $arraysocialnetworks['twitter'] = $obj->twitter; + } + if (!empty($obj->facebook)) { + $arraysocialnetworks['facebook'] = $obj->facebook; + } + if (!empty($obj->linkedin)) { + $arraysocialnetworks['linkedin'] = $obj->linkedin; + } + if (!empty($obj->instagram)) { + $arraysocialnetworks['instagram'] = $obj->instagram; + } + if (!empty($obj->snapchat)) { + $arraysocialnetworks['snapchat'] = $obj->snapchat; + } + if (!empty($obj->googleplus)) { + $arraysocialnetworks['googleplus'] = $obj->googleplus; + } + if (!empty($obj->youtube)) { + $arraysocialnetworks['youtube'] = $obj->youtube; + } + if (!empty($obj->whatsapp)) { + $arraysocialnetworks['whatsapp'] = $obj->whatsapp; + } + if ($obj->socialnetworks == '' || is_null($obj->socialnetworks)) { + $obj->socialnetworks = '[]'; + } + $socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true)); + $sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'societe SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"'; + $sqlupd.= ', skype=null'; + $sqlupd.= ', twitter=null'; + $sqlupd.= ', facebook=null'; + $sqlupd.= ', linkedin=null'; + $sqlupd.= ', instagram=null'; + $sqlupd.= ', snapchat=null'; + $sqlupd.= ', googleplus=null'; + $sqlupd.= ', youtube=null'; + $sqlupd.= ', whatsapp=null'; + $sqlupd.= ' WHERE rowid='.$obj->rowid; + //print $sqlupd."
"; + $resqlupd = $db->query($sqlupd); + if (! $resqlupd) { + dol_print_error($db); + $error++; + } + } + } else { + $error++; + } + if (! $error) { + $db->commit(); + } else { + dol_print_error($db); + $db->rollback(); + } + print ''.$langs->trans('MigrationThirdpartiesSocialNetworks')."
\n"; + print '
'.$langs->trans("Warehouse").''.$entrepot->libelle.''.$entrepot->label.'
'; + print '
'; if ($num_prod) { @@ -708,7 +706,7 @@ else * Boutons actions */ - if ($user->societe_id == 0) + if ($user->socid == 0) { print '
'; diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index f075eaadc20..c962d1d352e 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -64,10 +64,16 @@ class Livraison extends CommonObject public $ref_customer; public $date_delivery; // Date really received + + /** + * @var integer|string date_creation + */ public $date_creation; + public $date_valid; public $model_pdf; + /** * Constructor * @@ -823,44 +829,44 @@ class Livraison extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { // phpcs:enable global $langs; if ($mode==0) { - if ($statut==-1) return $langs->trans('StatusDeliveryCanceled'); - elseif ($statut==0) return $langs->trans('StatusDeliveryDraft'); - elseif ($statut==1) return $langs->trans('StatusDeliveryValidated'); + if ($status==-1) return $langs->trans('StatusDeliveryCanceled'); + elseif ($status==0) return $langs->trans('StatusDeliveryDraft'); + elseif ($status==1) return $langs->trans('StatusDeliveryValidated'); } elseif ($mode==1) { - if ($statut==-1) return $langs->trans($this->statuts[$statut]); - elseif ($statut==0) return $langs->trans($this->statuts[$statut]); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]); + if ($status==-1) return $langs->trans($this->statuts[$status]); + elseif ($status==0) return $langs->trans($this->statuts[$status]); + elseif ($status==1) return $langs->trans($this->statuts[$status]); } elseif ($mode == 3) { - if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); - if ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); - if ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); + if ($status==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); + if ($status==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); + if ($status==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); } elseif ($mode == 4) { - if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5').' '.$langs->trans('StatusDeliveryCanceled'); - elseif ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0').' '.$langs->trans('StatusDeliveryDraft'); - elseif ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4').' '.$langs->trans('StatusDeliveryValidated'); + if ($status==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5').' '.$langs->trans('StatusDeliveryCanceled'); + elseif ($status==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0').' '.$langs->trans('StatusDeliveryDraft'); + elseif ($status==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4').' '.$langs->trans('StatusDeliveryValidated'); } elseif ($mode == 6) { - if ($statut==-1) return $langs->trans('StatusDeliveryCanceled').' '.img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); - elseif ($statut==0) return $langs->trans('StatusDeliveryDraft').' '.img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); - elseif ($statut==1) return $langs->trans('StatusDeliveryValidated').' '.img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); + if ($status==-1) return $langs->trans('StatusDeliveryCanceled').' '.img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); + elseif ($status==0) return $langs->trans('StatusDeliveryDraft').' '.img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); + elseif ($status==1) return $langs->trans('StatusDeliveryValidated').' '.img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); } } @@ -1051,7 +1057,6 @@ class Livraison extends CommonObject $langs->load("deliveries"); if (! dol_strlen($modele)) { - $modele = 'typhon'; if ($this->modelpdf) { diff --git a/htdocs/loan/calcmens.php b/htdocs/loan/calcmens.php index 7e3d1f83a8f..5cde353105f 100644 --- a/htdocs/loan/calcmens.php +++ b/htdocs/loan/calcmens.php @@ -49,7 +49,6 @@ $output[$echance]=array('cap_rest'=>$cap_rest,'cap_rest_str'=>price($cap_rest),' $echance++; $capital=$cap_rest; while ($echance<=$nbterm) { - $mens = round($object->calcMonthlyPayments($capital, $rate, $nbterm-$echance+1), 2, PHP_ROUND_HALF_UP); $int = ($capital*($rate/12)); diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 066399320d8..e741ce869fc 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -44,7 +44,7 @@ $projectid = GETPOST('projectid', 'int'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'loan', $id, '', ''); $object = new Loan($db); @@ -263,7 +263,7 @@ if ($action == 'create') dol_fiche_head(); - print '
'; + print '
'; // Label print ''; @@ -487,7 +487,7 @@ if ($id > 0) print '
'; print '
'; - print '
'.$langs->trans("Label").'
'; + print '
'; // Capital if ($action == 'edit') diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index c8e241186d2..66fdfbc25a2 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -41,6 +41,9 @@ class Loan extends CommonObject */ public $table_element='loan'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'bill'; /** @@ -63,7 +66,13 @@ class Loan extends CommonObject public $account_capital; public $account_insurance; public $account_interest; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $date_modification; public $date_validation; @@ -402,12 +411,12 @@ class Loan extends CommonObject /** * Return label for given status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=Label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label, 5=Short label + Picto * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - public function LibStatut($statut, $mode = 0, $alreadypaid = -1) + public function LibStatut($status, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -415,38 +424,38 @@ class Loan extends CommonObject if ($mode == 0 || $mode == 1) { - if ($statut == 0) return $langs->trans("Unpaid"); - elseif ($statut == 1) return $langs->trans("Paid"); + if ($status == 0) return $langs->trans("Unpaid"); + elseif ($status == 1) return $langs->trans("Paid"); } elseif ($mode == 2) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 3) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 4) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 5) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 6) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } else return "Error, mode/status not found"; diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index c9a8fd9354e..c5335496313 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -94,6 +94,10 @@ class LoanSchedule extends CommonObject */ public $total; + public $type_code; + public $type_label; + + /** * Constructor * @@ -213,7 +217,7 @@ class LoanSchedule extends CommonObject $sql.= " t.fk_bank,"; $sql.= " t.fk_user_creat,"; $sql.= " t.fk_user_modif,"; - $sql.= " pt.code as type_code, pt.libelle as type_libelle,"; + $sql.= " pt.code as type_code, pt.libelle as type_label,"; $sql.= ' b.fk_account'; $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepayment = pt.id"; @@ -245,7 +249,7 @@ class LoanSchedule extends CommonObject $this->fk_user_modif = $obj->fk_user_modif; $this->type_code = $obj->type_code; - $this->type_libelle = $obj->type_libelle; + $this->type_label = $obj->type_label; $this->bank_account = $obj->fk_account; $this->bank_line = $obj->fk_bank; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index c938fe92c80..eb0508c3768 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -90,6 +90,10 @@ class PaymentLoan extends CommonObject */ public $fk_user_modif; + public $type_code; + public $type_label; + + /** * Constructor * @@ -208,7 +212,7 @@ class PaymentLoan extends CommonObject $sql.= " t.fk_bank,"; $sql.= " t.fk_user_creat,"; $sql.= " t.fk_user_modif,"; - $sql.= " pt.code as type_code, pt.libelle as type_libelle,"; + $sql.= " pt.code as type_code, pt.libelle as type_label,"; $sql.= ' b.fk_account'; $sql.= " FROM ".MAIN_DB_PREFIX."payment_loan as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepayment = pt.id"; @@ -242,7 +246,7 @@ class PaymentLoan extends CommonObject $this->fk_user_modif = $obj->fk_user_modif; $this->type_code = $obj->type_code; - $this->type_libelle = $obj->type_libelle; + $this->type_label = $obj->type_label; $this->bank_account = $obj->fk_account; $this->bank_line = $obj->fk_bank; @@ -545,8 +549,6 @@ class PaymentLoan extends CommonObject $result=''; - if (empty($this->ref)) $this->ref=$this->lib; - if (!empty($this->id)) { $link = ''; diff --git a/htdocs/loan/createschedule.php b/htdocs/loan/createschedule.php index 3871afe2cba..88942b4cae7 100644 --- a/htdocs/loan/createschedule.php +++ b/htdocs/loan/createschedule.php @@ -38,10 +38,8 @@ $object->fetch($loanid); $langs->loadLangs(array("compta","bills","loan")); if ($action == 'createecheancier') { - $i=1; while($i <$object->nbterm+1){ - $date = GETPOST('hi_date'.$i, 'int'); $mens = GETPOST('mens'.$i); $int = GETPOST('hi_interets'.$i); @@ -69,10 +67,8 @@ if ($action == 'createecheancier') { } if ($action == 'updateecheancier') { - $i=1; while($i <$object->nbterm+1){ - $mens = GETPOST('mens'.$i); $int = GETPOST('hi_interets'.$i); $id = GETPOST('hi_rowid'.$i); @@ -144,7 +140,7 @@ if(count($echeance->lines)>0) }else{ print ''; } -print '
'; +print '
'; print ''; $colspan = 6; if (count($echeance->lines)>0) $colspan++; diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 0cbcec2f209..a4bed07949e 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -40,7 +40,7 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'loan', $id, '', ''); // Get parameters diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index b4fb8851ad0..618345518ed 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -38,7 +38,7 @@ $action=GETPOST('action', 'aZ09'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'loan', $id, '', ''); diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 7af7d55fb43..c77d6b1c855 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -32,7 +32,7 @@ $langs->loadLangs(array("loan","compta","banks","bills")); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'loan', '', '', ''); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 29b9df4bf70..f2a3aa3a877 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -33,7 +33,7 @@ $langs->loadLangs(array("bills","banks","companies","loan")); $id=GETPOST("id", 'int'); $action=GETPOST('action', 'aZ09'); $confirm=GETPOST('confirm'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; // TODO ajouter regle pour restreindre acces paiement //$result = restrictedArea($user, 'facture', $id,''); @@ -146,7 +146,7 @@ if ($action == 'valide') } -print '
'; +print '
'; // Ref print ''; @@ -210,7 +210,7 @@ if ($resql) $i = 0; $total = 0; - print '
'.$langs->trans('Ref').'
'; + print '
'; print ''; print ''; print ''; @@ -271,7 +271,7 @@ print '
'; /* if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { - if ($user->societe_id == 0 && $payment->statut == 0 && $_GET['action'] == '') + if ($user->socid == 0 && $payment->statut == 0 && $_GET['action'] == '') { if ($user->rights->facture->paiement) { diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 6742b0b1c04..b3b08c365f7 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -38,9 +38,9 @@ $last=GETPOST('last'); // Security check $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } $loan = new Loan($db); @@ -276,7 +276,7 @@ if ($action == 'create') dol_fiche_end(); - print '
'.$langs->trans('Loan').''.$langs->trans('Label').'
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index dd0febdc634..106d7d1f71d 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -45,10 +45,8 @@ $head=loan_prepare_head($object); dol_fiche_head($head, 'FinancialCommitment', $langs->trans("Loan"), -1, 'bill'); if ($action == 'createecheancier') { - $i=1; while($i <$object->nbterm+1){ - $date = GETPOST('hi_date'.$i, 'int'); $mens = GETPOST('mens'.$i); $int = GETPOST('hi_interets'.$i); @@ -76,10 +74,8 @@ if ($action == 'createecheancier') { } if ($action == 'updateecheancier') { - $i=1; while($i <$object->nbterm+1){ - $mens = GETPOST('mens'.$i); $int = GETPOST('hi_interets'.$i); $id = GETPOST('hi_rowid'.$i); @@ -150,7 +146,7 @@ if(count($echeance->lines)>0) }else{ print ''; } -print '
'.$langs->trans("DateDue").''.$langs->trans("LoanCapital").'
'; +print '
'; print ''; $colspan = 6; if (count($echeance->lines)>0) $colspan++; diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index 6a1967bccf9..d8b5c7ed36e 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -379,7 +379,7 @@ class MailmanSpip return count($lists); } else - { + { $this->error="ADHERENT_MAILMAN_URL not defined"; return -1; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 75c0190ddcd..858f73afa05 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1020,7 +1020,7 @@ $heightforframes=50; // Init menu manager if (! defined('NOREQUIREMENU')) { - if (empty($user->societe_id)) // If internal user or not defined + if (empty($user->socid)) // If internal user or not defined { $conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED); } @@ -1048,7 +1048,7 @@ if (! defined('NOREQUIREMENU')) include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$file_menu; } } - $menumanager = new MenuManager($db, empty($user->societe_id)?0:1); + $menumanager = new MenuManager($db, empty($user->socid)?0:1); $menumanager->loadMenu(); } @@ -1195,7 +1195,7 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) */ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $disablejmobile = 0, $disablenofollow = 0) { - global $db, $conf, $langs, $user, $hookmanager; + global $db, $conf, $langs, $user, $mysoc, $hookmanager; top_httphead(); @@ -1224,13 +1224,26 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Favicon - $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico', 1); + $favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png'; + if (! empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; if (empty($conf->dol_use_jmobile)) print ''."\n"; // Not required into an Android webview + //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; + // Mobile appli like icon + $manifest = DOL_URL_ROOT . '/theme/'.$conf->theme.'/manifest.json.php'; + if(!empty($manifest)){ + print ''."\n"; + } + + if(!empty($conf->global->THEME_ELDY_TOPMENU_BACK1)) { + // TODO: use auto theme color switch + print '' . "\n"; + } + // Auto refresh page if (GETPOST('autorefresh', 'int') > 0) print ''; @@ -1264,7 +1277,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (GETPOSTISSET('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen', 'int'); } if (GETPOSTISSET('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover', 'int'); } if (GETPOSTISSET('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile', 'int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile', 'int'); } - if (GETPOSTISSET('THEME_AGRESSIVITY_RATIO')) { $themeparam.='&THEME_AGRESSIVITY_RATIO='.GETPOST('THEME_AGRESSIVITY_RATIO', 'int'); } + if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) { $themeparam.='&THEME_AGRESSIVENESS_RATIO='.GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); } if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax) { @@ -1603,9 +1616,6 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead print ''; - $searchInput = ''; @@ -2043,26 +2044,26 @@ function top_menu_search(User $user, Translate $langs) '; - return $html; } @@ -2181,7 +2181,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ include_once DOL_DOCUMENT_ROOT.'/bookmarks/bookmarks.lib.php'; $langs->load("bookmarks"); - $bookmarks=printBookmarksList($db, $langs); + $bookmarks=printBookmarksList(); } // Left column @@ -2567,12 +2567,13 @@ if (! function_exists("llxFooter")) print "\n".''."\n"; print "\n\n"; $hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id); + $url_for_ping = "https://ping.dolibarr.org/"; ?> '; + + +// Part to create +if ($action == 'create') +{ + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Mo")), '', 'cubes'); + + print ''; + print ''; + print ''; + print ''; + + dol_fiche_head(array(), ''); + + print '
'."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + + print '
'."\n"; + + dol_fiche_end(); + + ?> + + '; + print ''; + print '  '; + print ''; // Cancel for create does not post form if we don't know the backtopage + print ''; + + print ''; +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') +{ + print load_fiche_titre($langs->trans("MO"), '', 'cubes'); + + print '
'; + print ''; + print ''; + print ''; + print ''; + + dol_fiche_head(); + + $object->fields['fk_bom']['disabled'] = 1; + + print ''."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; + + print '
'; + + dol_fiche_end(); + + print '
'; + print '   '; + print '
'; + + print '
'; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) +{ + $res = $object->fetch_thirdparty(); + $res = $object->fetch_optionals(); + + $head = moPrepareHead($object); + dol_fiche_head($head, 'card', $langs->trans("MO"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') + { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMo'), $langs->trans('ConfirmDeleteMo'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + if ($action == 'deleteline') + { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + } + + // Confirmation of validation + if ($action == 'validate') + { + // We check that object has a temporary ref + $ref = substr($object->ref, 1, 4); + if ($ref == 'PROV') { + $object->fetch_product(); + $numref = $object->getNextNumRef($object->thirdparty); + } else { + $numref = $object->ref; + } + + $text = $langs->trans('ConfirmValidateMo', $numref); + /*if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('BOM_VALIDATE', $object->socid, $object); + }*/ + + $formquestion = array(); + if (!empty($conf->bom->enabled)) + { + $langs->load("mrp"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $forcecombo = 0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + ); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220); + } + + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMo', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + // Call Hook formConfirm + $parameters = array('lineid' => $lineid); + $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; + elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; + + // Print form confirm + print $formconfirm; + + + // Object card + // ------------------------------------------------------------ + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = '
'; + /* + // Ref bis + $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', null, null, '', 1);*/ + // Thirdparty + $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (!empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project').' '; + if ($permissiontoadd) + { + if ($action != 'classify') + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_soc, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= $proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + } + $morehtmlref .= '
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + print '
'; + print ''."\n"; + + // Common attributes + $keyforbreak = 'fk_warehouse'; + unset($object->fields['fk_project']); + unset($object->fields['fk_soc']); + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + + print '
'; + print '
'; + print '
'; + + print '
'; + + dol_fiche_end(); + + + /* + * Lines + */ + + if (!empty($object->table_element_line)) + { + // Show object lines + $result = $object->getLinesArray(); + + print '
+ + + + + '; + + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } + + print '
'; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) + { + print ''; + } + + if (!empty($object->lines)) + { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/mrp/tpl'); + } + + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') + { + if ($action != 'editline') + { + // Add products/services form + $object->formAddObjectLine(1, $mysoc, $soc, '/mrp/tpl'); + + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + } + } + + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) + { + print '
'; + } + print '
'; + + print "
\n"; + } + + + // Buttons for actions + + if ($action != 'presend' && $action != 'editline') { + print '
'."\n"; + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + + if (empty($reshook)) + { + // Send + //print '' . $langs->trans('SendMail') . ''."\n"; + + if ($user->rights->bom->write && $object->status == MO::STATUS_VALIDATED) + { + print ''.$langs->trans("SetToDraft").''; + } + + // Modify + if ($permissiontoadd) + { + print ''.$langs->trans("Modify").''."\n"; + } + else + { + print ''.$langs->trans('Modify').''."\n"; + } + + // Validate + if ($user->rights->mrp->write && $object->status == MO::STATUS_DRAFT) + { + if (is_array($object->lines) && count($object->lines) > 0) + { + print ''.$langs->trans("Validate").''; + } + else + { + print ''.$langs->trans("Validate").''; + } + } + + // Clone + if ($permissiontoadd) + { + print ''.$langs->trans("ToClone").''; + } + + // Delete (need delete permission, or if draft, just need create/modify permission) + if ($permissiontodelete) + { + print ''.$langs->trans('Delete').''."\n"; + } + else + { + print ''.$langs->trans('Delete').''."\n"; + } + } + print '
'."\n"; + } + + + // Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + if ($action != 'presend') + { + print '
'; + print ''; // ancre + + // Documents + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->mrp->dir_output.'/'.$objref; + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $user->rights->mrp->read; // If you can read, you can build the PDF to read content + $delallowed = $user->rights->mrp->create; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang); + + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('mo')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + + print '
'; + + $MAXEVENT = 10; + + $morehtmlright = ''; + $morehtmlright .= $langs->trans("SeeAll"); + $morehtmlright .= ''; + + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'mo', $socid, 1, '', $MAXEVENT, '', $morehtmlright); + + print '
'; + } + + //Select mail models is same action as presend + if (GETPOST('modelselected')) $action = 'presend'; + + // Presend form + $modelmail = 'mo'; + $defaulttopic = 'InformationMessage'; + $diroutput = $conf->mrp->dir_output; + $trackid = 'mo'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php new file mode 100644 index 00000000000..2c4d1b36c99 --- /dev/null +++ b/htdocs/mrp/mo_document.php @@ -0,0 +1,154 @@ + + * + * 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 . + */ + +/** + * \file mo_document.php + * \ingroup mrp + * \brief Tab for documents linked to Mo + */ + +// Load Dolibarr environment +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +dol_include_once('/mrp/class/mo.class.php'); +dol_include_once('/mrp/lib/mrp_mo.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("mrp","companies","other","mails")); + + +$action=GETPOST('action', 'aZ09'); +$confirm=GETPOST('confirm'); +$id=(GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$ref = GETPOST('ref', 'alpha'); + +// Security check - Protection if external user +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'mrp', $id); + +// Get parameters +$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 = $conf->liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (! $sortorder) $sortorder="ASC"; +if (! $sortfield) $sortfield="name"; +//if (! $sortfield) $sortfield="position_name"; + +// Initialize technical objects +$object=new Mo($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->mrp->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('modocument','globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +// 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->mrp->multidir_output[$object->entity?$object->entity:$conf->entity] . "/mo/" . dol_sanitizeFileName($object->id); +if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mrp->multidir_output[$object->entity?$object->entity:$conf->entity] . "/mo/" . dol_sanitizeFileName($object->ref); + + +/* + * Actions + */ + +include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$form = new Form($db); + +$title=$langs->trans("Mo").' - '.$langs->trans("Files"); +$help_url=''; +//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('', $title, $help_url); + +if ($object->id) +{ + /* + * Show tabs + */ + $head = moPrepareHead($object); + + dol_fiche_head($head, 'document', $langs->trans("MO"), -1, $object->picto); + + + // Build file list + $filearray=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC), 1); + $totalsize=0; + foreach($filearray as $key => $file) + { + $totalsize+=$file['size']; + } + + // Object card + // ------------------------------------------------------------ + $linkback = '' . $langs->trans("BackToList") . ''; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
'; + + print '
'; + print ''; + + // Number of files + print ''; + + // Total size + print ''; + + print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; + + print '
'; + + dol_fiche_end(); + + $modulepart = 'mrp'; + //$permission = $user->rights->mrp->create; + $permission = 1; + //$permtoedit = $user->rights->mrp->create; + $permtoedit = 1; + $param = '&id=' . $object->id; + + //$relativepathwithnofile='mo/' . dol_sanitizeFileName($object->id).'/'; + $relativepathwithnofile='mo/' . dol_sanitizeFileName($object->ref).'/'; + + include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; +} +else +{ + accessforbidden('', 0, 1); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php new file mode 100644 index 00000000000..6124101cffa --- /dev/null +++ b/htdocs/mrp/mo_list.php @@ -0,0 +1,571 @@ + + * + * 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 . + */ + +/** + * \file mo_list.php + * \ingroup mrp + * \brief List page for mo + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL',1); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL' + +// Load Dolibarr environment +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + +// load mrp libraries +require_once __DIR__ . '/class/mo.class.php'; + +// for other modules +//dol_include_once('/othermodule/class/otherobject.class.php'); + +// Load translation files required by the page +$langs->loadLangs(array("mrp","other")); + +$action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) +$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list +$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'molist'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + +$id = GETPOST('id', 'int'); + +// Load variable for pagination +$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 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +//if (! $sortfield) $sortfield="p.date_fin"; +//if (! $sortorder) $sortorder="DESC"; + +// Initialize technical objects +$object = new Mo($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->mrp->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('molist')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Default sort order (if not yet defined by previous GETPOST) +if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default search field. By default 1st field in definition. +if (! $sortorder) $sortorder="ASC"; + +// Security check +if (empty($conf->mrp->enabled)) accessforbidden('Module not enabled'); +$socid=0; +if ($user->socid > 0) // Protection if external user +{ + //$socid = $user->socid; + accessforbidden(); +} +//$result = restrictedArea($user, 'mrp', $id, ''); + + +// Initialize array of search criterias +$search_all=trim(GETPOST("search_all", 'alpha')); +$search=array(); +foreach($object->fields as $key => $val) +{ + if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha'); +} + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach($object->fields as $key => $val) +{ + if ($val['searchall']) $fieldstosearchall['t.'.$key]=$val['label']; +} + +// Definition of fields for list +$arrayfields=array(); +foreach($object->fields as $key => $val) +{ + // If $val['visible']==0, then we never show the field + if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); +} +// Extra fields +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) +{ + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } +} +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + + + +/* + * Actions + */ + +if (GETPOST('cancel', 'alpha')) { $action='list'; $massaction=''; } +if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; } + +$parameters=array(); +$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)) +{ + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + // 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 + { + foreach($object->fields as $key => $val) + { + $search[$key]=''; + } + $toselect=''; + $search_array_options=array(); + } + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') + || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) + { + $massaction=''; // Protection to avoid mass action if we force a new search during a mass action confirmation + } + + // Mass actions + $objectclass='Mo'; + $objectlabel='Mo'; + $permissiontoread = $user->rights->mrp->read; + $permissiontodelete = $user->rights->mrp->delete; + $uploaddir = $conf->mrp->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} + + + +/* + * View + */ + +$form=new Form($db); + +$now=dol_now(); + +//$help_url="EN:Module_Mo|FR:Module_Mo_FR|ES:Módulo_Mo"; +$help_url=''; +$title = $langs->trans('ListOfManufacturingOrders'); + + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +foreach($object->fields as $key => $val) +{ + $sql.='t.'.$key.', '; +} +// Add fields from extrafields +if (! empty($extrafields->attributes[$object->table_element]['label'])) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); +// Add fields from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql=preg_replace('/, $/', '', $sql); +$sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; +if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity($object->element).")"; +else $sql.=" WHERE 1 = 1"; +foreach($search as $key => $val) +{ + if ($key == 'status' && $search[$key] == -1) continue; + $mode_search=(($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); + if ($search[$key] != '') $sql.=natural_search($key, $search[$key], (($key == 'status')?2:$mode_search)); +} +if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all); +// Add where from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; + +/* If a group by is required +$sql.= " GROUP BY " +foreach($object->fields as $key => $val) +{ + $sql.='t.'.$key.', '; +} +// Add fields from extrafields +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql=preg_replace('/, $/','', $sql); +*/ + +$sql.=$db->order($sortfield, $sortorder); + +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0 + { + $page = 0; + $offset = 0; + } +} +// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) +{ + $num = $nbtotalofrecords; +} +else +{ + $sql.= $db->plimit($limit+1, $offset); + + $resql=$db->query($sql); + if (! $resql) + { + dol_print_error($db); + exit; + } + + $num = $db->num_rows($resql); +} + +// Direct jump if only one record found +if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) +{ + $obj = $db->fetch_object($resql); + $id = $obj->rowid; + header("Location: ".dol_buildpath('/mrp/mo_card.php', 1).'?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url); + +// Example : Adding jquery code +print ''; + +$arrayofselected=is_array($toselect)?$toselect:array(); + +$param=''; +if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); +foreach($search as $key => $val) +{ + if (is_array($search[$key]) && count($search[$key])) foreach($search[$key] as $skey) $param.='&search_'.$key.'[]='.urlencode($skey); + else $param.= '&search_'.$key.'='.urlencode($search[$key]); +} +if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + +// List of mass actions available +$arrayofmassactions = array( + //'validate'=>$langs->trans("Validate"), + //'generate_doc'=>$langs->trans("ReGeneratePDF"), + //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>$langs->trans("SendByMail"), +); +if ($user->rights->mrp->delete) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +$massactionbutton=$form->selectMassAction('', $arrayofmassactions); + +print '
'; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/mrp/mo_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->mrp->write); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cubes', 0, $newcardbutton, '', $limit); + +// Add code for pre mass action (confirmation or email presend form) +$topicmail="SendMoRef"; +$modelmail="mo"; +$objecttmp=new Mo($db); +$trackid='xxxx'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +if ($search_all) +{ + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print '
'.$langs->trans("FilterOnInto", $search_all) . join(', ', $fieldstosearchall).'
'; +} + +$moreforfilter = ''; +/*$moreforfilter.='
'; +$moreforfilter.= $langs->trans('MyFilter') . ': '; +$moreforfilter.= '
';*/ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; +else $moreforfilter = $hookmanager->resPrint; + +if (! empty($moreforfilter)) +{ + print '
'; + print $moreforfilter; + print '
'; +} + +$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; +$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); + +print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print ''."\n"; + + +// Fields title search +// -------------------------------------------------------------------- +print ''; +foreach($object->fields as $key => $val) +{ + $cssforfield=(empty($val['css'])?'':$val['css']); + if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print ''; + } +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + +// Fields from hook +$parameters=array('arrayfields'=>$arrayfields); +$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +// Action column +print ''; +print ''."\n"; + + +// Fields title label +// -------------------------------------------------------------------- +print ''; +foreach($object->fields as $key => $val) +{ + $cssforfield=(empty($val['css'])?'':$val['css']); + if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n"; + } +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; +// Hook fields +$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); +$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +// Action column +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +print ''."\n"; + + +// Detect if we need a fetch on each output line +$needToFetchEachLine=0; +if (is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) +{ + foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) + { + if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object + } +} + + +// Loop on record +// -------------------------------------------------------------------- +$i=0; +$totalarray=array(); +while ($i < min($num, $limit)) +{ + $obj = $db->fetch_object($resql); + if (empty($obj)) break; // Should not happen + + // Store properties in $object + $object->id = $obj->rowid; + foreach($object->fields as $key => $val) + { + if (property_exists($obj, $key)) $object->$key = $obj->$key; + } + + // Show here line of result + print ''; + foreach($object->fields as $key => $val) + { + $cssforfield=(empty($val['css'])?'':$val['css']); + if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + + if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield.=($cssforfield?' ':'').'right'; + + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print ''; + if ($key == 'status') print $object->getLibStatut(5); + elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), ''); + else print $object->showOutputField($val, $key, $obj->$key, ''); + print ''; + if (! $i) $totalarray['nbfield']++; + if (! empty($val['isameasure'])) + { + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.'.$key; + $totalarray['val']['t.'.$key] += $obj->$key; + } + } + } + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column + print ''; + if (! $i) $totalarray['nbfield']++; + + print ''; + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + + +// If no record found +if ($num == 0) +{ + $colspan=1; + foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; } + print ''; +} + + +$db->free($resql); + +$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print '
'; + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + else print ''; + print ''; +$searchpicto=$form->showFilterButtons(); +print $searchpicto; +print '
'; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected=0; + if (in_array($obj->rowid, $arrayofselected)) $selected=1; + print ''; + } + print '
'.$langs->trans("NoRecordFound").'
'."\n"; +print '
'."\n"; + +print '
'."\n"; + +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) +{ + $hidegeneratedfilelistifempty=1; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0; + + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + $formfile = new FormFile($db); + + // Show list of available documents + $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource.=str_replace('&', '&', $param); + + $filedir=$diroutputmassaction; + $genallowed=$user->rights->mrp->read; + $delallowed=$user->rights->mrp->write; + + print $formfile->showdocuments('massfilesarea_mrp', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php new file mode 100644 index 00000000000..aeb4630168d --- /dev/null +++ b/htdocs/mrp/mo_note.php @@ -0,0 +1,152 @@ + + * + * 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 . + */ + +/** + * \file mo_note.php + * \ingroup mrp + * \brief Car with notes on Mo + */ + +// Load Dolibarr environment +require '../main.inc.php'; + +dol_include_once('/mrp/class/mo.class.php'); +dol_include_once('/mrp/lib/mrp_mo.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("mrp","companies")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object=new Mo($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->mrp->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('monote','globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +// Security check - Protection if external user +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'mrp', $id); + +// 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->mrp->multidir_output[$object->entity] . "/" . $object->id; + +$permissionnote=1; +//$permissionnote=$user->rights->mrp->creer; // Used by the include of actions_setnotes.inc.php + + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once + + +/* + * View + */ + +$form = new Form($db); + +//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; +$help_url=''; +llxHeader('', $langs->trans('Mo'), $help_url); + +if ($id > 0 || ! empty($ref)) +{ + $object->fetch_thirdparty(); + + $head = moPrepareHead($object); + + dol_fiche_head($head, 'note', $langs->trans("MO"), -1, $object->picto); + + // Object card + // ------------------------------------------------------------ + $linkback = '' . $langs->trans("BackToList") . ''; + + $morehtmlref='
'; + /* + // 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.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->mrp->creer) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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.=''; + $morehtmlref.=$proj->ref; + $morehtmlref.=''; + } else { + $morehtmlref.=''; + } + } + }*/ + $morehtmlref.='
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + + + $cssclass="titlefield"; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print '
'; + + dol_fiche_end(); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php new file mode 100644 index 00000000000..c376cc80cae --- /dev/null +++ b/htdocs/mrp/mo_production.php @@ -0,0 +1,420 @@ + + * + * 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 . + */ + +/** + * \file mo_production.php + * \ingroup mrp + * \brief Page to make production on a MO + */ + +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies + + +// Load Dolibarr environment +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +dol_include_once('/mrp/class/mo.class.php'); +dol_include_once('/mrp/lib/mrp_mo.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', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mocard'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); +//$lineid = GETPOST('lineid', 'int'); + +// Initialize technical objects +$object = new Mo($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->mrp->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('mocard', 'globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$search_all = trim(GETPOST("search_all", 'alpha')); +$search = array(); +foreach ($object->fields as $key => $val) +{ + if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); +} + +if (empty($action) && empty($id) && empty($ref)) $action = 'view'; + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +// Security check - Protection if external user +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->statut == Mo::STATUS_DRAFT) ? 1 : 0); +//$result = restrictedArea($user, 'mrp', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); + +$permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->mrp->write; // Used by the include of actions_dellink.inc.php +$permissiontoadd = $user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && $object->status == 0); + + +/* + * Actions + * + * Put here all code to do according to value of "action" parameter + */ + +$parameters = array(); +$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)) +{ + $error = 0; + + $backurlforlist = dol_buildpath('/mrp/mo_list.php', 1); + + if (empty($backtopage) || ($cancel && empty($id))) { + //var_dump($backurlforlist);exit; + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; + else $backtopage = DOL_URL_ROOT.'/mrp/mo_card.php?id='.($id > 0 ? $id : '__ID__'); + } + $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record + + // Actions cancel, add, update, delete or clone + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + + // Actions when linking object each other + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; + + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + + // Action to move up and down lines of object + //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once + + if ($action == 'set_thirdparty' && $permissiontoadd) + { + $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MO_MODIFY'); + } + if ($action == 'classin' && $permissiontoadd) + { + $object->setProject(GETPOST('projectid', 'int')); + } + + // Actions to send emails + $trigger_name = 'MO_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_MO_TO'; + $trackid = 'mo'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; +} + + + + +/* + * View + */ + +$form = new Form($db); +$formproject = new FormProjets($db); + +llxHeader('', $langs->trans('Mo'), ''); + +// Example : Adding jquery code +print ''; + + + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) +{ + $res = $object->fetch_optionals(); + + $head = moPrepareHead($object); + dol_fiche_head($head, 'production', $langs->trans("MO"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') + { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMo'), $langs->trans('ConfirmDeleteMo'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + if ($action == 'deleteline') + { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + } + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMo', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + // Confirmation of action xxxx + if ($action == 'xxx') + { + $formquestion = array(); + /* + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) + ); + */ + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + } + + // Call Hook formConfirm + $parameters = array('lineid' => $lineid); + $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; + elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; + + // Print form confirm + print $formconfirm; + + + // Object card + // ------------------------------------------------------------ + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = '
'; + /* + // Ref bis + $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', null, null, '', 1);*/ + // Thirdparty + $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + // Project + if (!empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project').' '; + if ($user->rights->mrp->write) + { + if ($action != 'classify') + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } 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 .= $proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + } + $morehtmlref .= '
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + print '
'; + print ''."\n"; + + // Common attributes + $keyforbreak = 'qty'; + unset($object->fields['fk_project']); + unset($object->fields['fk_soc']); + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + + print '
'; + print '
'; + print '
'; + + print '
'; + + dol_fiche_end(); + + + /* + * Lines + */ + + if (!empty($object->table_element_line)) + { + // Show object lines + $result = $object->getLinesArray(); + + print '
+ + + + + '; + + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } + + print '
'; + if (!empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline') + { + print ''; + } + + if (!empty($object->lines)) + { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + } + + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') + { + if ($action != 'editline') + { + // Add products/services form + $object->formAddObjectLine(1, $mysoc, $soc); + + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + } + } + + if (!empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline') + { + print '
'; + } + print '
'; + + print "
\n"; + } + + + // Buttons for actions + /* + if ($action != 'presend' && $action != 'editline') { + print '
'."\n"; + $parameters=array(); + $reshook=$hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + + if (empty($reshook)) + { + // Send + print '' . $langs->trans('SendMail') . ''."\n"; + + // Modify + if (! empty($user->rights->mrp->write)) + { + print ''.$langs->trans("Modify").''."\n"; + } + else + { + print ''.$langs->trans('Modify').''."\n"; + } + + // Clone + if (! empty($user->rights->mrp->write)) + { + print ''; + } + + // Delete (need delete permission, or if draft, just need create/modify permission) + if (! empty($user->rights->mrp->delete) || (! empty($object->fields['status']) && $object->status == $object::STATUS_DRAFT && ! empty($user->rights->mrp->write))) + { + print ''.$langs->trans('Delete').''."\n"; + } + else + { + print ''.$langs->trans('Delete').''."\n"; + } + } + print '
'."\n"; + }*/ + + + if ($action != 'presend') + { + print '
'; + print ''; // ancre + + + + print '
'; + + + + print '
'; + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/mrp/modulebuilder.txt b/htdocs/mrp/modulebuilder.txt new file mode 100644 index 00000000000..24ea0d6eac5 --- /dev/null +++ b/htdocs/mrp/modulebuilder.txt @@ -0,0 +1,3 @@ +# DO NOT DELETE THIS FILE MANUALLY +# File to flag module built using official module template. +# When this file is present into a module directory, you can edit it with the module builder tool. Use ModuleBuilder if you want to delete module. \ No newline at end of file diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 1cdab974833..cdd8db1a0bd 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -171,7 +171,6 @@ if (empty($reshook)) } if ($action == 'edit') { - // Security check if (!$user->rights->opensurvey->write) accessforbidden(); } @@ -365,7 +364,6 @@ print ''."\n"; print '
'; if ($action != 'edit' && $user->rights->opensurvey->write) { - //Modify button print ''.$langs->trans("Modify") . ''; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 281c5188ecd..b1cdeac1f36 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -44,6 +44,9 @@ class Opensurveysondage extends CommonObject */ public $table_element='opensurvey_sondage'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'opensurvey'; public $id_sondage; @@ -267,7 +270,7 @@ class Opensurveysondage extends CommonObject $this->db->free($resql); } else - { + { $this->error="Error ".$this->db->lasterror(); $ret=-1; } @@ -381,7 +384,6 @@ class Opensurveysondage extends CommonObject if (! $error) { - $sql='DELETE FROM '.MAIN_DB_PREFIX."opensurvey_comments WHERE id_sondage = '".$this->db->escape($numsondage)."'"; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index ad7f78938c6..d411c084f8f 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -63,7 +63,7 @@ print load_fiche_titre($title, '', 'wrench'); print '
'; -print ''; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 202c236abc2..b772cef3705 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -75,7 +75,7 @@ if (!$user->rights->opensurvey->read) accessforbidden(); // Definition of fields for list $arrayfields=array(); -foreach($object->fields as $key => $val) +foreach($arrayfields as $key => $val) { // If $val['visible']==0, then we never show the field if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled'], 'position'=>$val['position']); @@ -85,13 +85,23 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count { foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) - $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) { + $arrayfields["ef.".$key] = array( + 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], + 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), + 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], + 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key]) + ); + } } } $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +$permissiontoread = $user->rights->opensurvey->read; +$permissiontoadd = $user->rights->opensurvey->write; +$permissiontodelete = $user->rights->opensurvey->delete; + /* * Actions @@ -127,8 +137,6 @@ if (empty($reshook)) // Mass actions $objectclass='Opensurveysondage'; $objectlabel='Opensurveysondage'; - $permtoread = $user->rights->opensurvey->read; - $permtodelete = $user->rights->opensurvey->write; $uploaddir = $conf->opensurvey->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -207,6 +215,9 @@ if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && } +// Output page +// -------------------------------------------------------------------- + llxHeader('', $title, $help_url); $arrayofselected=is_array($toselect)?$toselect:array(); @@ -225,7 +236,7 @@ $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->opensurvey->write) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +if ($permissiontodelete) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); @@ -242,8 +253,7 @@ print ''; print ''; print ''; -$newcardbutton=''; -$newcardbutton.= dolGetButtonTitle($langs->trans('NewSurvey'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/opensurvey/wizard/index.php', '', $user->rights->opensurvey->write); +$newcardbutton = dolGetButtonTitle($langs->trans('NewSurvey'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/opensurvey/wizard/index.php', '', $user->rights->opensurvey->write); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); @@ -304,7 +314,7 @@ $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print ''; @@ -327,6 +337,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; +// Action column print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; print ''."\n"; @@ -363,17 +374,21 @@ while ($i < min($num, $limit)) print ''; + if (! $i) $totalarray['nbfield']++; // Title print ''; + if (! $i) $totalarray['nbfield']++; // Type print ''; + if (! $i) $totalarray['nbfield']++; + print ''; + if (! $i) $totalarray['nbfield']++; // Nb of voters print''."\n"; + if (! $i) $totalarray['nbfield']++; print ''; + if (! $i) $totalarray['nbfield']++; print''."\n"; + if (! $i) $totalarray['nbfield']++; // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -413,37 +431,20 @@ while ($i < min($num, $limit)) print ''; } print ''; + if (! $i) $totalarray['nbfield']++; print ''."\n"; $i++; } // Show total line -if (isset($totalarray['pos'])) -{ - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) { - $colspan=1; + $colspan = 8; foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; } print ''; } @@ -473,8 +474,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n $urlsource.=str_replace('&', '&', $param); $filedir=$diroutputmassaction; - $genallowed=$user->rights->mymodule->read; - $delallowed=$user->rights->mymodule->create; + $genallowed=$permissiontoread; + $delallowed=$permissiontoadd; print $formfile->showdocuments('massfilesarea_mymodule', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); } diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index ad31d99e645..017779b74f7 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -180,7 +180,6 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format = // Add column (with format date) if (isset($_POST["ajoutercolonne"]) && $object->format == "D") { - // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -189,7 +188,6 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") if (isset($_POST["nouveaujour"]) && $_POST["nouveaujour"] != "vide" && isset($_POST["nouveaumois"]) && $_POST["nouveaumois"] != "vide" && isset($_POST["nouvelleannee"]) && $_POST["nouvelleannee"] != "vide") { - $nouvelledate=dol_mktime(0, 0, 0, $_POST["nouveaumois"], $_POST["nouveaujour"], $_POST["nouvelleannee"]); if (isset($_POST["nouvelleheuredebut"]) && $_POST["nouvelleheuredebut"]!="vide"){ @@ -622,7 +620,6 @@ print ''."\n"; // loop to show the delete link if ($user->rights->opensurvey->write) { for ($i = 0; isset($toutsujet[$i]); $i++) { - print ''."\n"; } } diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index 58d9108708b..a8a1f8248d1 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -86,7 +86,6 @@ if (isset($_POST["confirmecreation"])) if ($testremplissage != "ok" || (!$toutchoix)) { setEventMessages($langs->trans("ErrorOpenSurveyOneChoice"), null, 'errors'); } else { - //format du sondage AUTRE $_SESSION["formatsondage"]="A"; diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index a05d428b695..3692f79048e 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -42,7 +42,6 @@ $erreur = false; // Insert survey if (GETPOST('confirmation')) { - // We save hours entered if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) { @@ -537,8 +536,8 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) //si on voit une erreur, le fond de la case est rouge if (isset($errheure[$i][$j]) && $errheure[$i][$j]) { print ''."\n"; - } else { //sinon la case est vide normalement - + } else { + //sinon la case est vide normalement print ''."\n"; } } diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 56bca6bc1be..f8161cb2917 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -140,7 +140,7 @@ print ''."\n"; dol_fiche_head(); // Affichage des différents champs textes a remplir -print '
'.$langs->trans("OpenSurveyArea").'
'.$langs->trans("NbOfSurveys").''.$nbsondages.''; +print ''; $searchpicto=$form->showFilterButtons(); print $searchpicto; print '
'; print $opensurvey_static->getNomUrl(1); print ''.dol_htmlentities($obj->titre).''; $type=($obj->format=='A')?'classic':'date'; print img_picto('', dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'), 1), 'width="16"', 1); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate"); - print ''; + print ''; // Author if ($obj->fk_user_creat) { $userstatic = new User($db); @@ -386,22 +401,25 @@ while ($i < min($num, $limit)) } else { print dol_htmlentities($obj->nom_admin); } - print ''.$nbuser.''.dol_print_date($db->jdate($obj->date_fin), 'day'); if ($db->jdate($obj->date_fin) < $now && $obj->status == Opensurveysondage::STATUS_VALIDATED) { print img_warning($langs->trans("Expired")); } print ''.$opensurvey_static->getLibStatut(5).'
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
'.$langs->trans("NoRecordFound").'
'."\n"; +print '
'."\n"; print ''."\n"; if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 1d1b82bde62..8ac92f60f18 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -121,7 +121,7 @@ dol_fiche_head($head, 'payboxaccount', '', -1); print $langs->trans("PayBoxDesc")."
\n"; print '
'; -print '
'. $langs->trans("PollTitle") .'
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 608492ba455..7136b505f8a 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -136,7 +136,7 @@ if (! function_exists('curl_version')) print '
'; -print '
'.$langs->trans("AccountParameter").''.$langs->trans("Value").'
'; +print '
'; // Account Parameters print ''; diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php index ae2ea6861c7..2b3604ae13f 100644 --- a/htdocs/printing/admin/printing.php +++ b/htdocs/printing/admin/printing.php @@ -126,7 +126,7 @@ if ($mode == 'setup' && $user->admin) print $langs->trans("PrintingDriverDesc".$driver)."

\n"; - print '
'."\n"; + print '
'."\n"; print ''; print ''; print ''; @@ -243,7 +243,7 @@ if ($mode == 'config' && $user->admin) print $langs->trans("PrintingDesc")."

\n"; - print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'."\n"; + print '
'."\n"; print ''; print ''; @@ -295,7 +295,7 @@ if ($mode == 'test' && $user->admin) print $langs->trans('PrintTestDesc'.$driver)."

\n"; - print '
'.$langs->trans("Description").'
'; + print '
'; if (! empty($driver)) { require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php'; @@ -327,7 +327,7 @@ if ($mode == 'userconf' && $user->admin) print $langs->trans('PrintUserConfDesc'.$driver)."

\n"; - print '
'; + print '
'; print ''; print ''; print ''; @@ -341,7 +341,6 @@ if ($mode == 'userconf' && $user->admin) $sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid'; $resql = $db->query($sql); while ($row=$db->fetch_array($resql)) { - print ''; print ''; print ''; diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index 14bd92ca4ee..98bfc5a304c 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -161,7 +161,7 @@ if ($action != 'create_updater' && $action != 'edit_updater') { print load_fiche_titre($langs->trans("GlobalVariables"), '', ''); - print '
'.$langs->trans("User").''.$langs->trans("PrintModule").'
'.$row['login'].''.$row['module'].'
'; + print '
'; print ''; print ''; print ''; @@ -242,7 +242,7 @@ if ($action != 'create_variable' && $action != 'edit_variable') { print load_fiche_titre($langs->trans("GlobalVariableUpdaters"), '', ''); - print '
'.$langs->trans("Variable").''.$langs->trans("Description").'
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index f4105b040bb..ea3f8b5e663 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -35,13 +35,11 @@ if (! $user->admin || (empty($conf->product->enabled) && empty($conf->service->e */ if ($_POST) { - $var_percent = GETPOST('var_percent', 'array'); $var_min_percent = GETPOST('var_min_percent', 'array'); $fk_level = GETPOST('fk_level', 'array'); for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { - $check = isset($var_min_percent[$i]); if ($i != 1) { @@ -70,7 +68,6 @@ if ($_POST) { } if (!$check1 || !$check2) { - //If the level is between range but percent fields are empty, then we ensure it does not exist in DB if ($check1) { $db->query("DELETE FROM ".MAIN_DB_PREFIX."product_pricerules WHERE level = ".(int) $i); @@ -83,7 +80,6 @@ if ($_POST) { ".(int) $i.", ".$db->escape($i_fk_level).", ".$i_var_percent.", ".$i_var_min_percent.")"; if (!$db->query($sql)) { - //If we could not create, then we try updating $sql = "UPDATE ".MAIN_DB_PREFIX."product_pricerules SET fk_level = ".$db->escape($i_fk_level).", var_percent = ".$i_var_percent.", var_min_percent = ".$i_var_min_percent." WHERE level = ".$i; @@ -101,7 +97,8 @@ if ($_POST) { * View */ -$sql = "SELECT * FROM ".MAIN_DB_PREFIX."product_pricerules"; +$sql = "SELECT rowid, level, fk_level, var_percent, var_min_percent"; +$sql.= " FROM ".MAIN_DB_PREFIX."product_pricerules"; $query = $db->query($sql); $rules = array(); @@ -172,10 +169,10 @@ $genPriceOptions = function ($level) use ($price_options) { echo $langs->trans('SellingPrice').' '.$i; // Label of price $keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$i; - if (! empty($conf->global->$keyforlabel)) { - print ' - '.$langs->trans($conf->global->$keyforlabel); - } - ?> + if (! empty($conf->global->$keyforlabel)) { + print ' - '.$langs->trans($conf->global->$keyforlabel); + } + ?> diff --git a/htdocs/product/canvas/service/tpl/card_create.tpl.php b/htdocs/product/canvas/service/tpl/card_create.tpl.php index 65351371a71..d51e1541278 100644 --- a/htdocs/product/canvas/service/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_create.tpl.php @@ -81,12 +81,11 @@ dol_fiche_head('');
global->PRODUIT_MULTIPRICES) { ?> -
'.$langs->trans("VariableToUpdate").''.$langs->trans("Description").' diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 3f0a8e150d3..deafff12cfe 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -300,7 +300,7 @@ $dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']); print load_fiche_titre($langs->trans("ProductCodeChecker"), '', ''); -print ''."\n"; +print '
'."\n"; print ''."\n"; print ' '; print ' '; @@ -401,7 +401,7 @@ print '
'; print load_fiche_titre($langs->trans("ProductDocumentTemplates"), '', ''); -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -434,7 +434,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); @@ -484,7 +483,7 @@ foreach ($dirmodels as $reldir) } print ''; - // Info + // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); if ($module->type == 'pdf') @@ -538,7 +537,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''."\n"; print ''."\n"; diff --git a/htdocs/product/admin/product_supplier_extrafields.php b/htdocs/product/admin/product_supplier_extrafields.php new file mode 100644 index 00000000000..149178ead36 --- /dev/null +++ b/htdocs/product/admin/product_supplier_extrafields.php @@ -0,0 +1,132 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Marcos García + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2019 Tim Otte + * + * 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 . + */ + +/** + * \file htdocs/product/admin/product_supplier_extrafields.php + * \ingroup product + * \brief Page to setup extra fields of products + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'products')); + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$tmptype2label=ExtraFields::$type2label; +$type2label=array(''); +foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val); + +$action=GETPOST('action', 'alpha'); +$attrname=GETPOST('attrname', 'alpha'); +$elementtype='product_fournisseur_price'; //Must be the $element of the class that manage extrafield + +if (!$user->admin) accessforbidden(); + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + +$title = $langs->trans('ProductServiceSetup'); +$textobject = $langs->trans("ProductsAndServices"); +if (empty($conf->product->enabled)) +{ + $title = $langs->trans('ServiceSetup'); + $textobject = $langs->trans('Services'); +} +elseif (empty($conf->service->enabled)) +{ + $title = $langs->trans('ProductSetup'); + $textobject = $langs->trans('Products'); +} + +//$help_url='EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers'; +$help_url=''; +llxHeader('', $title, $help_url); + + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($title, $linkback, 'title_setup'); + + +$head = product_admin_prepare_head(); + +dol_fiche_head($head, 'supplierAttributes', $textobject, -1, 'product'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') +{ + print '
'; + print "".$langs->trans("NewAttribute").""; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Creation of an optional field */ +/* */ +/* ************************************************************************** */ + +if ($action == 'create') +{ + print '
'; + print load_fiche_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edition of an optional field */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && ! empty($attrname)) +{ + print "
"; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index 111992e4c81..ccdd666bc30 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -292,12 +292,11 @@ if (empty($mysoc->country_code)) } else { - print ''; print ''; print ''; - print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; + print '
'; print ''; print ''."\n"; print ''."\n"; diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index a264171f529..c6585f5e590 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -50,7 +50,7 @@ $search_agenda_label=GETPOST('search_agenda_label'); // Security check $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -if ($user->societe_id) $id=$user->societe_id; +if ($user->socid) $id=$user->socid; $result=restrictedArea($user, 'produit|service', $id, 'product&product'); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -132,7 +132,7 @@ if ($id > 0 || $ref) $object->next_prev_filter=" fk_product_type = ".$object->type; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index a772e9c3c4f..4f6eea5b903 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -99,7 +99,7 @@ if (! empty($action) && $action == 'fetch' && ! empty($id)) } // Multiprice - if (! $found && isset($price_level) && $price_level >= 1 && (! empty($conf->global->PRODUIT_MULTIPRICES))) // If we need a particular price + if (! $found && isset($price_level) && $price_level >= 1 && (! empty($conf->global->PRODUIT_MULTIPRICES))) // If we need a particular price // level (from 1 to 6) { $sql = "SELECT price, price_ttc, price_base_type, tva_tx"; @@ -125,7 +125,6 @@ if (! empty($action) && $action == 'fetch' && ! empty($id)) // Price by customer if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES) && ! empty($socid)) { - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; $prodcustprice = new Productcustomerprice($db); diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index a5365545f62..9c02fc35d16 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -181,19 +181,19 @@ class ActionsCardProduct // Weight $this->tpl['weight'] = $this->object->weight; - $this->tpl['weight_units'] = $formproduct->selectMeasuringUnits("weight_units", "weight", $this->object->weight_units); + $this->tpl['weight_units'] = $formproduct->selectMeasuringUnits("weight_units", "weight", $this->object->weight_units, 0, 2); // Length $this->tpl['length'] = $this->object->length; - $this->tpl['length_units'] = $formproduct->selectMeasuringUnits("length_units", "size", $this->object->length_units); + $this->tpl['length_units'] = $formproduct->selectMeasuringUnits("length_units", "size", $this->object->length_units, 0, 2); // Surface $this->tpl['surface'] = $this->object->surface; - $this->tpl['surface_units'] = $formproduct->selectMeasuringUnits("surface_units", "surface", $this->object->surface_units); + $this->tpl['surface_units'] = $formproduct->selectMeasuringUnits("surface_units", "surface", $this->object->surface_units, 0, 2); // Volume $this->tpl['volume'] = $this->object->volume; - $this->tpl['volume_units'] = $formproduct->selectMeasuringUnits("volume_units", "volume", $this->object->volume_units); + $this->tpl['volume_units'] = $formproduct->selectMeasuringUnits("volume_units", "volume", $this->object->volume_units, 0, 2); } if ($action == 'view') @@ -211,25 +211,25 @@ class ActionsCardProduct // Weight if ($this->object->weight != '') { - $this->tpl['weight'] = $this->object->weight." ".measuring_units_string($this->object->weight_units, "weight"); + $this->tpl['weight'] = $this->object->weight." ".measuringUnitString(0, "weight", $this->object->weight_units); } // Length if ($this->object->length != '') { - $this->tpl['length'] = $this->object->length." ".measuring_units_string($this->object->length_units, "size"); + $this->tpl['length'] = $this->object->length." ".measuringUnitString(0, "size", $this->object->length_units); } // Surface if ($this->object->surface != '') { - $this->tpl['surface'] = $this->object->surface." ".measuring_units_string($this->object->surface_units, "surface"); + $this->tpl['surface'] = $this->object->surface." ".measuringUnitString(0, "surface", $this->object->surface_units); } // Volume if ($this->object->volume != '') { - $this->tpl['volume'] = $this->object->volume." ".measuring_units_string($this->object->volume_units, "volume"); + $this->tpl['volume'] = $this->object->volume." ".measuringUnitString(0, "volume", $this->object->volume_units); } $this->tpl['fiche_end']=dol_get_fiche_end(); diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php index 9f8f44d9555..b12a0d41370 100644 --- a/htdocs/product/canvas/product/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php @@ -109,12 +109,11 @@ dol_fiche_head('');
global->PRODUIT_MULTIPRICES) { ?> -
'.$langs->trans("Parameters").''.$langs->trans("Value").'
@@ -122,7 +121,7 @@ dol_fiche_head('');
trans("SellingPrice"); ?> -price_base_type; ?> + price_base_type; ?>
trans("MinPrice"); ?>
trans("VATRate"); ?> -tva_tx; ?> + tva_tx; ?>
diff --git a/htdocs/product/canvas/product/tpl/card_view.tpl.php b/htdocs/product/canvas/product/tpl/card_view.tpl.php index 473b717c916..dc7fea3fc0e 100644 --- a/htdocs/product/canvas/product/tpl/card_view.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_view.tpl.php @@ -37,7 +37,7 @@ $linkback = ' -photos; ?> + photos; ?>
@@ -94,7 +93,7 @@ dol_fiche_head('');
trans("SellingPrice"); ?> -price_base_type; ?> + price_base_type; ?>
trans("MinPrice"); ?>
trans("VATRate"); ?> -tva_tx; ?> + tva_tx; ?>
diff --git a/htdocs/product/canvas/service/tpl/card_view.tpl.php b/htdocs/product/canvas/service/tpl/card_view.tpl.php index c789853868a..9008421bbe9 100644 --- a/htdocs/product/canvas/service/tpl/card_view.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_view.tpl.php @@ -37,7 +37,7 @@ $linkback = ' -photos; ?> + photos; ?>
'.$langs->trans("Weight").''; print ''; print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units')?GETPOST('weight_units', 'alpha'):(empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?0:$conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 2); print '
'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; @@ -1071,7 +1100,7 @@ else } if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) { - // Surface + // Brut Surface print '
'.$langs->trans("Surface").''; print ''; print $formproduct->selectMeasuringUnits("surface_units", "surface", GETPOSTISSET('surface_units')?GETPOST('surface_units', 'alpha'):'0', 0, 2); @@ -1079,12 +1108,21 @@ else } if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) { - // Volume + // Brut Volume print '
'.$langs->trans("Volume").''; print ''; print $formproduct->selectMeasuringUnits("volume_units", "volume", GETPOSTISSET('volume_units')?GETPOST('volume_units', 'alpha'):'0', 0, 2); print '
'.$langs->trans("NetMeasure").''; + print ''; + print $formproduct->selectMeasuringUnits("net_measure_units", '', GETPOSTISSET('net_measure_units')?GETPOST('net_measure_units', 'alpha'):(empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?0:$conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 0); + print '
'; + print '
'; // VAT print '
' . $langs->trans("VATRate") . ''; $defaultva = get_default_tva($mysoc, $mysoc); @@ -1155,7 +1193,7 @@ else } else { - print ''; + print '
'; // Price print ''; @@ -1180,7 +1218,7 @@ else } // Accountancy codes - print '
'.$langs->trans("SellingPrice").'
'; + print '
'; if (! empty($conf->accounting->enabled)) { @@ -1427,24 +1465,25 @@ else print $form->selectarray('finished', $statutarray, $object->finished); print ''; - // Weight + // Brut Weight print ''; + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { - // Length - print ''; + // Brut Length + print ''; } if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) { - // Surface + // Brut Surface print ''; } + + if (! empty($conf->global->PRODUCT_ADD_NET_MEASURE)) + { + // Net Measure + print ''; + } } // Units if($conf->global->PRODUCT_USE_UNITS) @@ -1518,7 +1566,7 @@ else print '
'; - print '
'.$langs->trans("Weight").''; print ' '; print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); print '
'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; - print 'x'; - print 'x'; - print ' '; - print $formproduct->selectMeasuringUnits("size_units", "size", $object->length_units, 0, 2); - print '
'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; + print 'x'; + print 'x'; + print ' '; + print $formproduct->selectMeasuringUnits("size_units", "size", $object->length_units, 0, 2); + print '
'.$langs->trans("Surface").''; print ' '; print $formproduct->selectMeasuringUnits("surface_units", "surface", $object->surface_units, 0, 2); @@ -1452,12 +1491,21 @@ else } if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) { - // Volume + // Brut Volume print '
'.$langs->trans("Volume").''; print ' '; print $formproduct->selectMeasuringUnits("volume_units", "volume", $object->volume_units, 0, 2); print '
'.$langs->trans("NetMeasure").''; + print ' '; + print $formproduct->selectMeasuringUnits($object->net_measure_units, '', 0, 0, 0); + print '
'; + print '
'; if (! empty($conf->accounting->enabled)) { @@ -1602,7 +1650,7 @@ else $object->next_prev_filter=" fk_product_type = ".$object->type; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -1788,9 +1836,8 @@ else print ''; } - //Parent product. + // Parent product. if (!empty($conf->variants->enabled) && ($object->isProduct() || $object->isService())) { - $combination = new ProductCombination($db); if ($combination->fetchByFkProductChild($object->id) > 0) { @@ -1834,27 +1881,28 @@ else print $object->getLibFinished(); print ''; - // Weight + // Brut Weight print '\n"; + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { - // Length + // Brut Length print '\n"; } + + if (! empty($conf->global->PRODUCT_ADD_NET_MEASURE)) + { + // Net Measure + print ''; } else - { + { $html .= '
'.$langs->trans("Weight").''; if ($object->weight != '') { - print $object->weight." ".measuring_units_string(0, "weight", $object->weight_units); + print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); } else { print ' '; } print "
'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; if ($object->length != '' || $object->width != '' || $object->height != '') { print $object->length; if ($object->width) print " x ".$object->width; if ($object->height) print " x ".$object->height; - print ' '.measuring_units_string(0, "size", $object->length_units); + print ' '.measuringUnitString(0, "size", $object->length_units); } else { @@ -1864,11 +1912,11 @@ else } if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) { - // Surface + // Brut Surface print '
'.$langs->trans("Surface").''; if ($object->surface != '') { - print $object->surface." ".measuring_units_string(0, "surface", $object->surface_units); + print $object->surface." ".measuringUnitString(0, "surface", $object->surface_units); } else { @@ -1878,11 +1926,11 @@ else } if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) { - // Volume + // Brut Volume print '
'.$langs->trans("Volume").''; if ($object->volume != '') { - print $object->volume." ".measuring_units_string(0, "volume", $object->volume_units); + print $object->volume." ".measuringUnitString(0, "volume", $object->volume_units); } else { @@ -1890,6 +1938,20 @@ else } print "
'.$langs->trans("NetMeasure").''; + if ($object->net_measure != '') + { + print $object->net_measure." ".measuringUnitString(0, "weight", $object->net_measure_units); + } + else + { + print ' '; + } + } } // Unit @@ -1968,8 +2030,10 @@ $formquestionclone=array( array('type' => 'text', 'name' => 'clone_ref','label' => $langs->trans("NewRefForClone"), 'value' => empty($tmpcode) ? $langs->trans("CopyOf").' '.$object->ref : $tmpcode, 'size'=>24), array('type' => 'checkbox', 'name' => 'clone_content','label' => $langs->trans("CloneContentProduct"), 'value' => 1), array('type' => 'checkbox', 'name' => 'clone_categories', 'label' => $langs->trans("CloneCategoriesProduct"), 'value' => 1), - array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true), ); +if (!empty($conf->global->PRODUIT_MULTIPRICES)) { + $formquestionclone[] = array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("CustomerPrices").')', 'value' => 0); +} if (! empty($conf->global->PRODUIT_SOUSPRODUITS)) { $formquestionclone[]=array('type' => 'checkbox', 'name' => 'clone_composition', 'label' => $langs->trans('CloneCompositionProduct'), 'value' => 1); @@ -2005,17 +2069,17 @@ if ($action != 'create' && $action != 'edit') { if ($usercancreate) { - if (! isset($object->no_button_edit) || $object->no_button_edit <> 1) print ''; + if (! isset($object->no_button_edit) || $object->no_button_edit <> 1) print 'id.'">'.$langs->trans("Modify").''; if (! isset($object->no_button_copy) || $object->no_button_copy <> 1) { if (! empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) { - print '
'.$langs->trans('ToClone').'
'."\n"; + print ''.$langs->trans('ToClone').''."\n"; } else { - print ''; + print 'id.'">'.$langs->trans("ToClone").''; } } } @@ -2027,21 +2091,21 @@ if ($action != 'create' && $action != 'edit') { if (! empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) { - print '
'.$langs->trans('Delete').'
'."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { - print ''; + print 'id.'">'.$langs->trans("Delete").''; } } else { - print ''; + print ''.$langs->trans("Delete").''; } } else { - print ''; + print ''.$langs->trans("Delete").''; } } @@ -2075,7 +2139,7 @@ if (! empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action = $html .= '
'; $html .= $langs->trans("AddToDraftProposals").''; $html .= $langs->trans("NoDraftProposals"); diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 2a9f407bf54..947e4292c1a 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2019 Cedric Ancelin * * 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 @@ -59,15 +60,11 @@ class Products extends DolibarrApi } /** - * Get properties of a product object (from its ID, Ref, Ref_ext or Barcode) + * Get properties of a product object by id * * Return an array with product information. - * TODO implement getting a product by ref or by $ref_ext * * @param int $id ID of product - * @param string $ref Ref of element - * @param string $ref_ext Ref ext of element - * @param string $barcode Barcode of element * @param int $includestockdata Load also information about stock (slower) * @return array|mixed Data without useless information * @@ -75,32 +72,72 @@ class Products extends DolibarrApi * @throws 403 * @throws 404 */ - public function get($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0) + public function get($id, $includestockdata = 0) { - if (empty($id) && empty($ref) && empty($ref_ext) && empty($barcode)) { - throw new RestException(400, 'bad value for parameter id, ref, ref_ext or barcode'); - } + return $this->_fetch($id, '', '', '', $includestockdata); + } - $id = (empty($id)?0:$id); + /** + * Get properties of a product object by ref + * + * Return an array with product information. + * + * @param string $ref Ref of element + * @param int $includestockdata Load also information about stock (slower) + * + * @return array|mixed Data without useless information + * + * @url GET byRef/{ref} + * + * @throws 401 + * @throws 403 + * @throws 404 + */ + public function getByRef($ref, $includestockdata = 0) + { + return $this->_fetch('', $ref, '', '', $includestockdata); + } - if(! DolibarrApiAccess::$user->rights->produit->lire) { - throw new RestException(403); - } + /** + * Get properties of a product object by ref_ext + * + * Return an array with product information. + * + * @param string $ref_ext Ref_ext of element + * @param int $includestockdata Load also information about stock (slower) + * + * @return array|mixed Data without useless information + * + * @url GET byRefExt/{ref_ext} + * + * @throws 401 + * @throws 403 + * @throws 404 + */ + public function getByRefExt($ref_ext, $includestockdata = 0) + { + return $this->_fetch('', '', $ref_ext, '', $includestockdata); + } - $result = $this->product->fetch($id, $ref, $ref_ext, $barcode); - if(! $result ) { - throw new RestException(404, 'Product not found'); - } - - if(! DolibarrApi::_checkAccessToResource('product', $this->product->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - if ($includestockdata) { - $this->product->load_stock(); - } - - return $this->_cleanObjectDatas($this->product); + /** + * Get properties of a product object by barcode + * + * Return an array with product information. + * + * @param string $barcode Barcode of element + * @param int $includestockdata Load also information about stock (slower) + * + * @return array|mixed Data without useless information + * + * @url GET byBarcode/{barcode} + * + * @throws 401 + * @throws 403 + * @throws 404 + */ + public function getByBarcode($barcode, $includestockdata = 0) + { + return $this->_fetch('', '', '', $barcode, $includestockdata); } /** @@ -247,7 +284,12 @@ class Products extends DolibarrApi $this->product->$field = $value; } - $result = $this->product->update($id, DolibarrApiAccess::$user, 1, 'update'); + $updatetype = false; + if ($this->product->type != $oldproduct->type && ($this->product->isProduct() || $this->product->isService())) { + $updatetype = true; + } + + $result = $this->product->update($id, DolibarrApiAccess::$user, 1, 'update', $updatetype); // If price mode is 1 price per product if ($result > 0 && ! empty($conf->global->PRODUCT_PRICE_UNIQ)) { @@ -408,12 +450,13 @@ class Products extends DolibarrApi * Get prices per customer for a product * * @param int $id ID of product + * @param string $thirdparty_id Thirdparty id to filter orders of (example '1') {@pattern /^[0-9,]*$/i} * * @return mixed * * @url GET {id}/selling_multiprices/per_customer */ - public function getCustomerPricesPerCustomer($id) + public function getCustomerPricesPerCustomer($id, $thirdparty_id = '') { global $conf; @@ -430,12 +473,20 @@ class Products extends DolibarrApi throw new RestException(404, 'Product not found'); } - if ($result < 0) { - throw new RestException(503, 'Error when retrieve prices list : '.array_merge(array($this->product->error), $this->product->errors)); + if ($result > 0) { + require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; + $prodcustprice = new Productcustomerprice($this->db); + $filter = array(); + $filter['t.fk_product'] .= $id; + if ($thirdparty_id) $filter['t.fk_soc'] .= $thirdparty_id; + $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); } - throw new RestException(501, 'Feature not yet available'); - //return $result; + if ( empty($prodcustprice->lines)) { + throw new RestException(404, 'Prices not found'); + } + + return $prodcustprice->lines; } /** @@ -531,7 +582,7 @@ class Products extends DolibarrApi { global $db, $conf; $obj_ret = array(); - $socid = DolibarrApiAccess::$user->societe_id ? DolibarrApiAccess::$user->societe_id : ''; + $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; $sql = "SELECT t.rowid, t.ref, t.ref_ext"; $sql.= " FROM ".MAIN_DB_PREFIX."product as t"; if ($category > 0) { @@ -691,4 +742,48 @@ class Products extends DolibarrApi } return $product; } + + /** + * Get properties of a product object + * + * Return an array with product information. + * + * @param int $id ID of product + * @param string $ref Ref of element + * @param string $ref_ext Ref ext of element + * @param string $barcode Barcode of element + * @param int $includestockdata Load also information about stock (slower) + * @return array|mixed Data without useless information + * + * @throws 401 + * @throws 403 + * @throws 404 + */ + private function _fetch($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0) + { + if (empty($id) && empty($ref) && empty($ref_ext) && empty($barcode)) { + throw new RestException(400, 'bad value for parameter id, ref, ref_ext or barcode'); + } + + $id = (empty($id)?0:$id); + + if(! DolibarrApiAccess::$user->rights->produit->lire) { + throw new RestException(403); + } + + $result = $this->product->fetch($id, $ref, $ref_ext, $barcode); + if(! $result ) { + throw new RestException(404, 'Product not found'); + } + + if(! DolibarrApi::_checkAccessToResource('product', $this->product->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + if ($includestockdata) { + $this->product->load_stock(); + } + + return $this->_cleanObjectDatas($this->product); + } } diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 33bf1240c92..72fd475e6ae 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -258,12 +258,25 @@ class FormProduct if ($empty) $out.=''; foreach($this->cache_warehouses as $id => $arraytypes) { + $label=''; + if ($showfullpath) $label.=$arraytypes['full_label']; + else $label.=$arraytypes['label']; + if (($fk_product || ($showstock > 0)) && ($arraytypes['stock'] != 0 || ($showstock > 0))) + { + if ($arraytypes['stock'] <= 0) { + $label.=' ('.$langs->trans("Stock").':'.$arraytypes['stock'].')'; + } + else + { + $label.=' ('.$langs->trans("Stock").':'.$arraytypes['stock'].')'; + } + } + $out.=''; } $out.=''; @@ -327,12 +340,12 @@ class FormProduct /** * Return a combo box with list of units - * For the moment, units labels are defined in measuring_units_string + * Units labels are defined in llx_c_units * * @param string $name Name of HTML field * @param string $measuring_style Unit to show: weight, size, surface, volume, time * @param string $default Preselected value - * @param int $adddefault Add empty unit called "Default" + * @param int|string $adddefault 1=Add empty unit called "Default", ''=Add empty value * @param int $mode 1=Use short label as value, 0=Use rowid, 2=Use scale (power) * @return string */ @@ -346,24 +359,26 @@ class FormProduct // TODO Use a cache require_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php'; $measuringUnits = new CUnits($db); + + $filter = array(); + $filter['t.active'] = 1; + if ($measuring_style) $filter['t.unit_type'] = $measuring_style; + $result = $measuringUnits->fetchAll( '', '', 0, 0, - array( - 't.unit_type' => $measuring_style, - 't.active' => 1, - ) + $filter ); if ($result < 0) { dol_print_error($db); return -1; } else { $return .= '
'; diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index 026c036bc97..9b16db0eef9 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -177,7 +177,7 @@ print ''; +print ''; // Price expression selector print '
'.$langs->trans("PriceExpressionSelected").''; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index ef0d1bc1c85..777c467ad67 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -8,7 +8,8 @@ * Copyright (C) 2014 Ion Agorria * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Ferran Marcet - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Tim Otte * * 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 @@ -33,6 +34,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.class.php'; @@ -53,6 +55,8 @@ $cost_price=GETPOST('cost_price', 'alpha'); $backtopage=GETPOST('backtopage', 'alpha'); $error=0; +$extrafields = new ExtraFields($db); + // If socid provided by ajax company selector if (! empty($_REQUEST['search_fourn_id'])) { @@ -64,7 +68,7 @@ if (! empty($_REQUEST['search_fourn_id'])) // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); if (empty($user->rights->fournisseur->lire)) accessforbidden(); @@ -138,6 +142,7 @@ if (empty($reshook)) $action = ''; $result=$object->remove_product_fournisseur_price($rowid); if($result > 0){ + $db->query("DELETE FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields WHERE fk_object = $rowid"); setEventMessages($langs->trans("PriceRemoved"), null, 'mesgs'); }else{ $error++; @@ -146,7 +151,7 @@ if (empty($reshook)) } } - if ($action == 'updateprice') + if ($action == 'save_price') { $id_fourn=GETPOST("id_fourn"); if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn"); @@ -257,6 +262,35 @@ if (empty($reshook)) if (isset($_POST['ref_fourn_price_id'])) $object->fetch_product_fournisseur_price($_POST['ref_fourn_price_id']); + $extralabels=$extrafields->fetch_name_optionals_label("product_fournisseur_price"); + $extrafield_values = $extrafields->getOptionalsFromPost("product_fournisseur_price"); + + $sql = ""; + $resql = $db->query("SELECT * FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields WHERE fk_object = " . $object->product_fourn_price_id); + // Insert a new extrafields row, if none exists + if ($db->num_rows($resql) != 1) { + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields (fk_object, "; + foreach ($extrafield_values as $key => $value) { + $sql .= str_replace('options_', '', $key) . ', '; + } + $sql = substr($sql, 0, strlen($sql)-2) . ") VALUES (" . $object->product_fourn_price_id . ", "; + foreach ($extrafield_values as $key => $value) { + $sql .= '"' . $value . '", '; + } + $sql = substr($sql, 0, strlen($sql)-2) . ')'; + } + // else update the existing one + else { + $sql = "UPDATE " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields SET "; + foreach ($extrafield_values as $key => $value) { + $sql .= str_replace('options_', '', $key) . ' = "' . $value . '", '; + } + $sql = substr($sql, 0, strlen($sql)-2) . ' WHERE fk_object = ' . $object->product_fourn_price_id; + } + + // Execute the sql command from above + $db->query($sql); + $newprice = price2num(GETPOST("price", "alpha")); if ($conf->multicurrency->enabled) @@ -362,7 +396,7 @@ if ($id > 0 || $ref) $object->next_prev_filter=" fk_product_type = ".$object->type; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -402,7 +436,7 @@ if ($id > 0 || $ref) // Form to add or update a price - if (($action == 'add_price' || $action == 'updateprice' ) && $usercancreate) + if (($action == 'add_price' || $action == 'update_price' ) && $usercancreate) { $langs->load("suppliers"); @@ -418,11 +452,11 @@ if ($id > 0 || $ref) print ''; print ''; - print ''; + print ''; dol_fiche_head(); - print ''; + print '
'; // Supplier print ''; } + $extrafields->fetch_name_optionals_label("product_fournisseur_price"); + $extralabels=$extrafields->attributes["product_fournisseur_price"]['label']; + // Extrafields + $resql = $db->query("SELECT * FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields WHERE fk_object = " . $rowid); + if (!empty($extralabels)) { + if ($db->num_rows($resql) != 1) { + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { + print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '') . '>' . $langs->trans($value) . ''; + } + } + } else { + $resql = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { + print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '') . '>' . $langs->trans($value) . ''; + } + } + } + } + if (is_object($hookmanager)) { $parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$object->id); @@ -754,7 +809,7 @@ SCRIPT; print "\n
\n"; - if ($action != 'add_price' && $action != 'updateprice') + if ($action != 'add_price' && $action != 'update_price') { $parameters=array(); $reshook=$hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -789,7 +844,7 @@ SCRIPT; // Suppliers list title print '
'; - print '
'.$langs->trans("Supplier").''; @@ -730,6 +764,27 @@ SCRIPT; print '
' . $extrafields->showInputField($key, '', '', '', '', '', 0, 'product_fournisseur_price') . '
' . $extrafields->showInputField($key, $resql->{$key}, '', '', '', '', 0, 'product_fournisseur_price') . '
'; + print '
'; $param="&id=".$object->id; @@ -817,6 +872,19 @@ SCRIPT; print_liste_field_titre("BarcodeType", $_SERVER["PHP_SELF"], "pfp.fk_barcode_type", "", $param, '', $sortfield, $sortorder, 'center '); } print_liste_field_titre("DateModification", $_SERVER["PHP_SELF"], "pfp.tms", "", $param, '', $sortfield, $sortorder, 'right '); + + // fetch optionals attributes and labels + $extrafields->fetch_name_optionals_label("product_fournisseur_price"); + $extralabels=$extrafields->attributes["product_fournisseur_price"]['label']; + if (!empty($extralabels)) { + foreach ($extralabels as $key => $value) { + // Show field if not hidden + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + print_liste_field_titre($value, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); + } + } + } + if (is_object($hookmanager)) { $parameters=array('id_fourn'=>$id_fourn, 'prod_id'=>$object->id); @@ -938,6 +1006,25 @@ SCRIPT; print dol_print_date(($productfourn->fourn_date_modification ? $productfourn->fourn_date_modification : $productfourn->date_modification), "dayhour"); print ''; + // Extrafields + $resql = $db->query("SELECT * FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields WHERE fk_object = " . $productfourn->product_fourn_price_id); + if (! empty($extralabels)) { + if ($db->num_rows($resql) != 1) { + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + print ""; + } + } + } else { + $resql = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + print '"; + } + } + } + } + if (is_object($hookmanager)) { $parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$object->id); @@ -948,7 +1035,7 @@ SCRIPT; print '
' . $extrafields->showOutputField($key, $resql->{$key}) . "'; if ($usercancreate) { - print ''.img_edit().""; + print ''.img_edit().""; print '   '; print ''.img_picto($langs->trans("Remove"), 'delete').''; } diff --git a/htdocs/product/index.php b/htdocs/product/index.php index a92d2cd071a..651b2f5aea4 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -95,6 +95,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print ''; print ''; + print '
'; print ''; $i=0; foreach($listofsearchfields as $key => $value) @@ -107,6 +108,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele $i++; } print '
'; + print '
'; print ''; print '
'; } @@ -143,7 +145,7 @@ while ($objp = $db->fetch_object($result)) if ($conf->use_javascript_ajax) { print '
'; - print ''; + print '
'; print ''; print '
'.$langs->trans("Statistics").'
'; @@ -194,7 +196,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; print '
'; print '
'; - print ''; + print '
'; print ''; print ''; } // Duration - if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) + if (! empty($arrayfields['p.duration']['checked'])) { print ''; @@ -748,7 +752,7 @@ if ($resql) if (! empty($arrayfields['p.barcode']['checked'])) { print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"], "p.barcode", "", $param, "", $sortfield, $sortorder); } - if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) { + if (! empty($arrayfields['p.duration']['checked'])) { print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"], "p.duration", "", $param, '', $sortfield, $sortorder, 'center '); } if (! empty($arrayfields['p.weight']['checked'])) print_liste_field_titre($arrayfields['p.weight']['label'], $_SERVER["PHP_SELF"], "p.weight", "", $param, '', $sortfield, $sortorder, 'center '); @@ -921,7 +925,7 @@ if ($resql) } // Duration - if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) + if (! empty($arrayfields['p.duration']['checked'])) { print '
'.$langs->trans("Categories").'
'; $sql = "SELECT c.label, count(*) as nb"; @@ -266,7 +268,7 @@ print '
'; /* - * Last modified products + * Latest modified products */ $max=15; $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,"; @@ -297,13 +299,13 @@ if ($result) if (isset($_GET["type"]) && $_GET["type"] == 1) $transRecordedType = $langs->trans("LastRecordedServices", $max); print '
'; - print ''; + print '
'; - $colnb=4; + $colnb=2; if (empty($conf->global->PRODUIT_MULTIPRICES)) $colnb++; print ''; - print ''; while ($i < $num) @@ -359,10 +361,10 @@ if ($result) else print price($objp->price).' '.$langs->trans("HT"); print ''; } - print '"; - print '"; print "\n"; diff --git a/htdocs/product/inventory/ajax/ajax.inventory.php b/htdocs/product/inventory/ajax/ajax.inventory.php index f94a383f666..ced76050e31 100644 --- a/htdocs/product/inventory/ajax/ajax.inventory.php +++ b/htdocs/product/inventory/ajax/ajax.inventory.php @@ -6,45 +6,45 @@ require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; $get = GETPOST('get', 'alpha'); $put = GETPOST('put', 'alpha'); - switch ($put) - { - case 'qty': - if (empty($user->rights->stock->creer)) { echo -1; exit; } +switch ($put) +{ + case 'qty': + if (empty($user->rights->stock->creer)) { echo -1; exit; } - $fk_det_inventory = GETPOST('fk_det_inventory'); + $fk_det_inventory = GETPOST('fk_det_inventory'); - $det = new InventoryLine($db); - if( $det->fetch($fk_det_inventory)) - { - $det->qty_view+=GETPOST('qty'); - $res = $det->update($user); + $det = new InventoryLine($db); + if( $det->fetch($fk_det_inventory)) + { + $det->qty_view+=GETPOST('qty'); + $res = $det->update($user); - echo $det->qty_view; - } - else - { - echo -2; - } + echo $det->qty_view; + } + else + { + echo -2; + } - break; + break; - case 'pmp': - if (empty($user->rights->stock->creer) || empty($user->rights->stock->changePMP)) { echo -1; exit; } + case 'pmp': + if (empty($user->rights->stock->creer) || empty($user->rights->stock->changePMP)) { echo -1; exit; } - $fk_det_inventory = GETPOST('fk_det_inventory'); + $fk_det_inventory = GETPOST('fk_det_inventory'); - $det = new InventoryLine($db); - if( $det->fetch($fk_det_inventory)) - { - $det->new_pmp=price2num(GETPOST('pmp')); - $det->update($user); + $det = new InventoryLine($db); + if( $det->fetch($fk_det_inventory)) + { + $det->new_pmp=price2num(GETPOST('pmp')); + $det->update($user); - echo $det->new_pmp; - } - else - { - echo -2; - } + echo $det->new_pmp; + } + else + { + echo -2; + } - break; - } + break; +} diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index eb9181c8060..2659d325676 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -72,8 +72,8 @@ if (empty($action) && empty($id) && empty($ref)) $action='view'; include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. // Security check - Protection if external user -//if ($user->societe_id > 0) access_forbidden(); -//if ($user->societe_id > 0) $socid = $user->societe_id; +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'mymodule', $id); if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) @@ -148,7 +148,7 @@ jQuery(document).ready(function() { // Part to create if ($action == 'create') { - print load_fiche_titre($langs->trans("NewInventory", $langs->transnoentitiesnoconv("MyInventory")), '', 'products'); + print load_fiche_titre($langs->trans("NewInventory"), '', 'products'); print ''; print ''; @@ -183,7 +183,7 @@ if ($action == 'create') // Part to edit record if (($id || $ref) && $action == 'edit') { - print load_fiche_titre($langs->trans("Inventory")); + print load_fiche_titre($langs->trans("Inventory"), '', 'products'); print ''; print ''; @@ -193,7 +193,7 @@ if (($id || $ref) && $action == 'edit') dol_fiche_head(); - print '
'.$transRecordedType.''.$langs->trans("FullList").''; + print ''.$langs->trans("FullList").''; print '
'; + print ''; print $product_static->LibStatut($objp->tosell, 3, 0); print "'; + print ''; print $product_static->LibStatut($objp->tobuy, 3, 1); print "
'."\n"; + print '
'."\n"; // Common attributes include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; @@ -218,7 +218,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $res = $object->fetch_optionals(); $head = inventoryPrepareHead($object); - dol_fiche_head($head, 'inventory', $langs->trans("Inventory"), -1, 'inventory'); + dol_fiche_head($head, 'card', $langs->trans("Inventory"), -1, 'stock'); $formconfirm = ''; @@ -340,6 +340,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''.$langs->trans('Modify').''."\n"; } + if ($permissiontoadd) + { + print ''.$langs->trans("Validate").''."\n"; + } + else + { + print ''.$langs->trans('Validate').''."\n"; + } + if ($permissiontodelete) { print ''.$langs->trans('Delete').''."\n"; @@ -382,7 +391,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $MAXEVENT = 10; - $morehtmlright = ''; + $morehtmlright = ''; $morehtmlright.= $langs->trans("SeeAll"); $morehtmlright.= ''; diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 2445934b98c..e93942d16d4 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -54,22 +54,29 @@ class Inventory extends CommonObject */ public $picto = 'stock'; + const STATUS_DRAFT = 0; + const STATUS_VALIDATED = 1; + const STATUS_RECORDED = 2; + const STATUS_CANCELED = -1; /** - * 'type' if the field format. + * 'type' if the field format ('integer', 'integer:Class:pathtoclass', 'varchar(x)', 'double(24,8)', 'text', 'html', 'datetime', 'timestamp', 'float') * 'label' the translation key. * 'enabled' is a condition when the field must be managed. * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * 'default' is a default value for creation (can still be replaced by the global setup of default values) * 'index' if we want an index in database. * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). * 'position' is the sort order of field. * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). + * 'css' is the CSS style to use on field. For example: 'maxwidth200' * 'help' is a string visible as a tooltip on field * 'comment' is not used. You can store here any text of your choice. It is not used by application. - * 'default' is a default value for creation (can still be replaced by the global setup of default values) - * 'showoncombobox' if field must be shown into the label of combobox + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel") */ // BEGIN MODULEBUILDER PROPERTIES @@ -85,18 +92,15 @@ class Inventory extends CommonObject 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'InventoryForASpecificProduct'), 'date_inventory' => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>1, 'position'=>35), - 'date_validation' => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>502,), - 'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>512,), - 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), - //'date_valid' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>502), + 'date_validation' => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>502), 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510), 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), - //'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), + 'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>512), 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), - 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>4, 'enabled'=>1, 'position'=>1000, 'default'=>0, 'arrayofkeyval'=>array(0=>'ToDo', 1=>'Done', -1=>'Cancel')), + 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>4, 'enabled'=>1, 'position'=>1000, 'default'=>0, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Recorded', -1=>'Canceled')), ); /** @@ -392,49 +396,11 @@ class Inventory extends CommonObject // phpcs:enable global $langs; - if ($mode == 0) - { - $prefix=''; - if ($status == 0) return $langs->trans('Draft'); - elseif ($status == 1) return $langs->trans('Enabled'); - elseif ($status == -1) return $langs->trans('Canceled'); - } - elseif ($mode == 1) - { - if ($status == 0) return $langs->trans('Draft'); - elseif ($status == 1) return $langs->trans('Enabled'); - elseif ($status == -1) return $langs->trans('Canceled'); - } - elseif ($mode == 2) - { - if ($status == 0) return img_picto($langs->trans('Draft'), 'statut0').' '.$langs->trans('Draft'); - elseif ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == -1) return img_picto($langs->trans('Canceled'), 'statut6').' '.$langs->trans('Canceled'); - } - elseif ($mode == 3) - { - if ($status == 0) return img_picto($langs->trans('Draft'), 'statut0'); - elseif ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == -1) return img_picto($langs->trans('Canceled'), 'statut6'); - } - elseif ($mode == 4) - { - if ($status == 0) return img_picto($langs->trans('Draft'), 'statut0').' '.$langs->trans('Draft'); - elseif ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == -1) return img_picto($langs->trans('Canceled'), 'statut6').' '.$langs->trans('Canceled'); - } - elseif ($mode == 5) - { - if ($status == 0) return $langs->trans('Draft').' '.img_picto($langs->trans('Draft'), 'statut0'); - elseif ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == -1) return $langs->trans('Canceled').' '.img_picto($langs->trans('Canceled'), 'statut6'); - } - elseif ($mode == 6) - { - if ($status == 0) return $langs->trans('Draft').' '.img_picto($langs->trans('Draft'), 'statut0'); - elseif ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == -1) return $langs->trans('Canceled').' '.img_picto($langs->trans('Canceled'), 'statut6'); - } + $labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); + $labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); + + return dolGetStatus($labelStatus[$status], $labelStatus[$status], '', 'status'.$status, $mode); } /** diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php new file mode 100644 index 00000000000..4ee108595e6 --- /dev/null +++ b/htdocs/product/inventory/inventory.php @@ -0,0 +1,303 @@ + + * + * 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 . + */ + +/** + * \file htdocs/product/inventory/inventory.php + * \ingroup inventory + * \brief Tabe to enter counting + */ + +require '../../main.inc.php'; +include_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array("stocks","other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectcard'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); + +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) +{ + $result = restrictedArea($user, 'stock', $id); +} +else +{ + $result = restrictedArea($user, 'stock', $id, '', 'inventory_advance'); +} + +// Initialize technical objects +$object=new Inventory($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->stock->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('inventorycard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$search_all=trim(GETPOST("search_all", 'alpha')); +$search=array(); +foreach($object->fields as $key => $val) +{ + if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha'); +} + +if (empty($action) && empty($id) && empty($ref)) $action='view'; + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +// Security check - Protection if external user +//if ($user->socid > 0) access_forbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'mymodule', $id); + +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) +{ + $permissiontoadd = $user->rights->stock->creer; + $permissiontodelete = $user->rights->stock->supprimer; +} +else +{ + $permissiontoadd = $user->rights->stock->inventory_advance->write; + $permissiontodelete = $user->rights->stock->inventory_advance->write; +} + + +/* + * Actions + */ + +$parameters=array(); +$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)) +{ + $error=0; + + $backurlforlist = DOL_URL_ROOT.'/product/inventory/list.php'; + + if (empty($backtopage) || ($cancel && empty($id))) { + //var_dump($backurlforlist);exit; + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; + else $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.($id > 0 ? $id : '__ID__'); + } + + + // Actions cancel, add, update, delete or clone + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + + // Actions when linking object each other + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; + + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + + // Actions to send emails + /*$trigger_name='MYOBJECT_SENTBYMAIL'; + $autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; + $trackid='myobject'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';*/ +} + + + + +/* + * View + */ + +$form=new Form($db); + +llxHeader('', $langs->trans('Inventory'), ''); + +// Example : Adding jquery code +print ''; + + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) +{ + $res = $object->fetch_optionals(); + + $head = inventoryPrepareHead($object); + dol_fiche_head($head, 'inventory', $langs->trans("Inventory"), -1, 'stock'); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteInventory'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + if ($action == 'deleteline') + { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + } + + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMyObject', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + // Call Hook formConfirm + $parameters = array('lineid' => $lineid); + $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; + elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint; + + // Print form confirm + print $formconfirm; + + + // Object card + // ------------------------------------------------------------ + $linkback = '' . $langs->trans("BackToList") . ''; + + $morehtmlref='
'; + /* + // Ref bis + $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->inventory->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->inventory->creer, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->inventory->creer) + { + if ($action != 'classify') + { + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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.=$proj->getNomUrl(); + } else { + $morehtmlref.=''; + } + } + } + */ + $morehtmlref.='
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + print '
'; + print '
'."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; + + // Other attributes. Fields from hook formObjectOptions and Extrafields. + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + + print '
'; + print '
'; + print '
'; + + print '
'; + + dol_fiche_end(); + + + // Buttons for actions + if ($action != 'presend' && $action != 'editline') { + print '
'."\n"; + $parameters=array(); + $reshook=$hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + + if (empty($reshook)) + { + if ($object->status == Inventory::STATUS_DRAFT) + { + if ($permissiontoadd) + { + print ''.$langs->trans("Validate").''."\n"; + } + else + { + print ''.$langs->trans('Validate').''."\n"; + } + } + + if ($object->status == Inventory::STATUS_VALIDATED) + { + if ($permissiontoadd) + { + print ''.$langs->trans("RecordVerb").''."\n"; + } + else + { + print ''.$langs->trans('RecordVerb').''."\n"; + } + } + } + print '
'."\n"; + } + + include DOL_DOCUMENT_ROOT.'/product/inventory/tpl/inventory.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/product/inventory/lib/inventory.lib.php b/htdocs/product/inventory/lib/inventory.lib.php index 361a89c923c..e0af60588ed 100644 --- a/htdocs/product/inventory/lib/inventory.lib.php +++ b/htdocs/product/inventory/lib/inventory.lib.php @@ -69,7 +69,8 @@ function inventoryPrepareHead(&$inventory, $title = 'Inventory', $get = '') global $langs; return array( - array(dol_buildpath('/product/inventory/card.php?id='.$inventory->id.$get, 1), $langs->trans($title),'inventory') + array(dol_buildpath('/product/inventory/card.php?id='.$inventory->id.$get, 1), $langs->trans('Card'), 'card'), + array(dol_buildpath('/product/inventory/inventory.php?id='.$inventory->id.$get, 1), $langs->trans('Inventory'), 'inventory') ); } diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php index f2e4853908d..ac2ac589200 100644 --- a/htdocs/product/inventory/list.php +++ b/htdocs/product/inventory/list.php @@ -21,6 +21,7 @@ * \brief List page for inventory */ +// Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -30,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; // Load translation files required by the page $langs->loadLangs(array("stocks","other")); -$action = GETPOST('action', 'alpha')?GETPOST('action', 'alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation @@ -47,7 +48,7 @@ $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 +if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -67,9 +68,9 @@ if (! $sortorder) $sortorder="ASC"; // Security check $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) // Protection if external user { - //$socid = $user->societe_id; + //$socid = $user->socid; accessforbidden(); } if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) @@ -101,10 +102,10 @@ $arrayfields=array(); foreach($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field - if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled'], 'position'=>$val['position']); + if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) { @@ -119,8 +120,6 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); /* * Actions - * - * Put here all code to do according to value of "$action" parameter */ if (GETPOST('cancel', 'alpha')) { $action='list'; $massaction=''; } @@ -154,8 +153,8 @@ if (empty($reshook)) // Mass actions $objectclass='Inventory'; $objectlabel='Inventory'; - $permtoread = $user->rights->stock->lire; - $permtodelete = $user->rights->stock->supprimer; + $permissiontoread = $user->rights->stock->lire; + $permissiontodelete = $user->rights->stock->supprimer; $uploaddir = $conf->stock->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -164,8 +163,6 @@ if (empty($reshook)) /* * View - * - * Put here all code to render page */ $form=new Form($db); @@ -192,10 +189,10 @@ if (! empty($extrafields->attributes[$object->table_element]['label'])) { $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; -$sql=preg_replace('/, $/', '', $sql); +$sql=preg_replace('/,\s*$/', '', $sql); $sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."myobject_extrafields as ef on (t.rowid = ef.fk_object)"; -if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity('myobject').")"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; +if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity($object->element).")"; else $sql.=" WHERE 1 = 1"; foreach($search as $key => $val) { @@ -218,11 +215,14 @@ foreach($object->fields as $key => $val) $sql.='t.'.$key.', '; } // Add fields from extrafields -foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); +} // Add where from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; +$sql=preg_replace('/, $/','', $sql); */ $sql.=$db->order($sortfield, $sortorder); @@ -231,18 +231,17 @@ $sql.=$db->order($sortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0 { $page = 0; $offset = 0; } } -// if total resultset is smaller the limit, no need to do paging. +// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { - $resql = $result; $num = $nbtotalofrecords; } else @@ -274,21 +273,6 @@ if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && llxHeader('', $title, $help_url); -// Example : Adding jquery code -print ''; - $arrayofselected=is_array($toselect)?$toselect:array(); $param=''; @@ -296,7 +280,8 @@ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&con if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); foreach($search as $key => $val) { - $param.= '&search_'.$key.'='.urlencode($search[$key]); + if (is_array($search[$key]) && count($search[$key])) foreach($search[$key] as $skey) $param.='&search_'.$key.'[]='.urlencode($skey); + else $param.= '&search_'.$key.'='.urlencode($search[$key]); } if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); // Add $param from extra fields @@ -308,7 +293,7 @@ $arrayofmassactions = array( //'builddoc'=>$langs->trans("PDFMerge"), ); if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); -if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); print '
'; @@ -321,7 +306,9 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, '', '', $limit); +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bom/bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->bom->write); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit); // Add code for pre mass action (confirmation or email presend form) $topicmail="Information"; @@ -330,7 +317,7 @@ $objecttmp=new Inventory($db); $trackid='inve'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) +if ($search_all) { foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); print '
'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'
'; @@ -366,11 +353,18 @@ print ''; foreach($object->fields as $key => $val) { - $align=''; - if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center'; - if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; - if ($key == 'status') $align.=($align?' ':'').'center'; - if (! empty($arrayfields['t.'.$key]['checked'])) print ''; + $cssforfield=(empty($val['css'])?'':$val['css']); + if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print ''; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -392,11 +386,15 @@ print ''."\n"; print ''; foreach($object->fields as $key => $val) { - $align=''; - if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center'; - if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; - if ($key == 'status') $align.=($align?' ':'').'center'; - if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n"; + $cssforfield=(empty($val['css'])?'':$val['css']); + if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield.=($cssforfield?' ':'').'right'; + if (! empty($arrayfields['t.'.$key]['checked'])) + { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield?'class="'.$cssforfield.'"':''), $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n"; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -404,13 +402,15 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; +// Action column +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print ''."\n"; // Detect if we need a fetch on each output line $needToFetchEachLine=0; -if (! empty($extrafields->attributes[$object->table_element]['computed'])) { +if (is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) +{ foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) { if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object @@ -437,16 +437,21 @@ while ($i < min($num, $limit)) print ''; foreach($object->fields as $key => $val) { - $align=''; - if (in_array($val['type'], array('date','datetime','timestamp'))) $align.=($align?' ':'').'center'; - if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap'; - if ($key == 'status') $align.=($align?' ':'').'center'; + $cssforfield=(empty($val['css'])?'':$val['css']); + if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; + + if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield.=($cssforfield?' ':'').'right'; + if (! empty($arrayfields['t.'.$key]['checked'])) { - print ''; - print $object->showOutputField($val, $key, $obj->$key, ''); + print ''; + if ($key == 'status') print $object->getLibStatut(5); + elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), ''); + else print $object->showOutputField($val, $key, $obj->$key, ''); print ''; if (! $i) $totalarray['nbfield']++; if (! empty($val['isameasure'])) @@ -463,7 +468,7 @@ while ($i < min($num, $limit)) $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column - print ''; if (! $i) $totalarray['nbfield']++; - print ''; + print ''."\n"; $i++; } // Show total line -if (isset($totalarray['pos'])) -{ - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) diff --git a/htdocs/product/inventory/tpl/inventory.tpl.php b/htdocs/product/inventory/tpl/inventory.tpl.php index 8d85b20dc43..992557505db 100644 --- a/htdocs/product/inventory/tpl/inventory.tpl.php +++ b/htdocs/product/inventory/tpl/inventory.tpl.php @@ -8,207 +8,7 @@ if (empty($conf) || ! is_object($conf)) } ?> - - -status != 1) { ?> - trans('AddInventoryProduct'); ?> : - - - - - - - -
- - - - - -
Cet inventaire est validé
- - - - - -
'; + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + else print ''; + print '
'; + print ''; if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected=0; @@ -473,32 +478,14 @@ while ($i < min($num, $limit)) print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
- $row) { - - $total_pmp+=$row['pmp_stock']; - $total_pa+=$row['pa_stock']; - $total_pmp_actual+=$row['pmp_actual']; - $total_pa_actual+=$row['pa_actual']; - - if($i%20 === 0) - { - _headerList($view); - } // Fin IF principal - ?> - - - - barcode->enabled)) { ?> - - - - - - - global->INVENTORY_USE_MIN_PA_IF_NO_LAST_PA)){ - echo ''; - $total_current_pa+=$row['current_pa_stock']; - } - - ?> - - - - - rights->stock->changePMP)) { - echo ''; - } - ?> - - global->INVENTORY_USE_MIN_PA_IF_NO_LAST_PA)){ - echo ''; - $total_current_pa_actual+=$row['current_pa_actual']; - } - - ?> - - - - - - - -
  '.price($row['current_pa_stock']).'   - - '.$row['pmp_new'].''.price($row['current_pa_actual']).'
- - status != 1) { ?> -
- - - trans('Modify') ?> - rights->stock->changePMP)) { - echo ''.$langs->trans('ApplyPMP').''; - } - - if ($can_validate == 1) { ?> - trans('RegulateStock') ?> - - - - - - - trans('Flush'); ?> -     - trans('Delete') ?> - -
- - status == 1) { ?> -
- - - - trans('Delete') ?> - - -
- - -

Date de création : getDate('datec') ?> -
Dernière mise à jour : getDate('tms') ?>

+TODO... diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 50b1347da6b..d9369fcb148 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -171,7 +171,7 @@ $arrayfields=array( 'p.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1), 'p.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled) && ! empty($conf->service->enabled))), 'p.barcode'=>array('label'=>$langs->trans("Gencod"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), - 'p.duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>($contextpage != 'productlist'), 'enabled'=>(! empty($conf->service->enabled))), + 'p.duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>($contextpage != 'productlist'), 'enabled'=>(! empty($conf->service->enabled) && (string) $type == '1')), 'p.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled))), 'p.length'=>array('label'=>$langs->trans("Length"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled) && ! empty($conf->global->PRODUCT_DISABLE_SIZE))), 'p.surface'=>array('label'=>$langs->trans("Surface"), 'checked'=>0, 'enabled'=>(! empty($conf->product->enabled) && ! empty($conf->global->PRODUCT_DISABLE_SURFACE))), @@ -253,8 +253,8 @@ if (empty($reshook)) if ((string) $search_type == '1') { $objectlabel='Services'; } if ((string) $search_type == '0') { $objectlabel='Products'; } - $permtoread = $user->rights->produit->lire; - $permtodelete = $user->rights->produit->supprimer; + $permissiontoread = $user->rights->produit->lire; + $permissiontodelete = $user->rights->produit->supprimer; $uploaddir = $conf->product->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -485,6 +485,8 @@ if ($resql) if($type == Product::TYPE_SERVICE) $rightskey='service'; if($user->rights->{$rightskey}->creer) { + $oldtype=$type; + if ($type === "") { $newcardbutton.= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0'); $type = Product::TYPE_SERVICE; @@ -492,7 +494,9 @@ if ($resql) $label='NewProduct'; if($type == Product::TYPE_SERVICE) $label='NewService'; $newcardbutton.= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type); - } + + $type=$oldtype; + } print '
'; if ($optioncss != '') print ''; @@ -604,7 +608,7 @@ if ($resql) print '
'; print ''; @@ -939,9 +943,9 @@ if ($resql) $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } print $duration_value; - print (! empty($duration_unit) && isset($dur[$duration_unit]) ? ' '.$langs->trans($dur[$duration_unit]) : ''); + print ((! empty($duration_unit) && isset($dur[$duration_unit]) && $duration_value != '') ? ' '.$langs->trans($dur[$duration_unit]) : ''); } - else + elseif (! preg_match('/^[a-z]$/i', $obj->duration)) // If duration is a simple char (like 's' of 'm'), we do not show value { print $obj->duration; } diff --git a/htdocs/product/note.php b/htdocs/product/note.php index c9a8bc6b1f9..d5593acfb78 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -40,7 +40,7 @@ $action = GETPOST('action', 'aZ09'); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); $object = new Product($db); @@ -98,7 +98,7 @@ if ($id > 0 || ! empty($ref)) $object->next_prev_filter=" fk_product_type = ".$object->type; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index a25ba2808d5..95bf2b965a2 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -36,7 +36,7 @@ $langs->load('propal'); $type=GETPOST("type", "int"); // Security check -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result=restrictedArea($user, 'produit|service'); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -157,7 +157,7 @@ else print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $totalnboflines, ''); -print ''; +print '
'; print ""; print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 4d6183ef39f..471c1775552 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -62,7 +62,7 @@ $search_soc = GETPOST('search_soc'); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); -if ($user->societe_id) $socid = $user->societe_id; +if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); if ($id > 0 || ! empty($ref)) @@ -203,7 +203,6 @@ if (empty($reshook)) // Multiprices if (! $error && (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { - $newprice = GETPOST('price', 'array'); $newprice_min = GETPOST('price_min', 'array'); $newpricebase = GETPOST('multiprices_base_type', 'array'); @@ -336,7 +335,6 @@ if (empty($reshook)) $db->begin(); foreach ($pricestoupdate as $key => $val) { - $newprice = $val['price']; if ($val['price'] < $val['price_min'] && !empty($object->fk_price_expression)) { @@ -477,10 +475,10 @@ if (empty($reshook)) { $priceid = GETPOST('priceid', 'int'); if (!empty($rowid)) { - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "product_price_by_qty"; - $sql .= " WHERE fk_product_price = " . $priceid; + $sql = "DELETE FROM " . MAIN_DB_PREFIX . "product_price_by_qty"; + $sql .= " WHERE fk_product_price = " . $priceid; - $result = $db->query($sql); + $result = $db->query($sql); } else { setEventMessages(('delete_price_by_qty'.$langs->transnoentities(MissingIds)), null, 'errors'); } @@ -492,7 +490,6 @@ if (empty($reshook)) * **************************************************** */ if ($action == 'add_customer_price_confirm' && !$cancel && ($user->rights->produit->creer || $user->rights->service->creer)) { - $maxpricesupplier = $object->min_recommended_price(); $update_child_soc = GETPOST('updatechildprice', 'int'); @@ -709,7 +706,7 @@ $linkback = ''; + $positiverates=''; + if (price2num($object->multiprices_tva_tx[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_tva_tx[$soc->price_level]); + if (price2num($object->multiprices_localtax1_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax1_tx[$soc->price_level]); + if (price2num($object->multiprices_localtax2_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax2_tx[$soc->price_level]); + if (empty($positiverates)) $positiverates='0'; + echo vatrate($positiverates.($object->default_vat_code?' ('.$object->default_vat_code.')':''), '%', $object->tva_npr); + //print vatrate($object->multiprices_tva_tx[$soc->price_level], true); + print ''; } else { @@ -794,10 +791,10 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI { if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility { - // We show only vat for level 1 - print ''; - print ''; - print ''; + // We show only vat for level 1 + print ''; + print ''; + print ''; } else { @@ -1160,7 +1157,7 @@ if ($action == 'edit_vat' && ($user->rights->produit->creer || $user->rights->se dol_fiche_head(''); - print '
'; + // TVA + print '
' . $langs->trans("DefaultTaxRate") . ''; - $positiverates=''; - if (price2num($object->multiprices_tva_tx[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_tva_tx[$soc->price_level]); - if (price2num($object->multiprices_localtax1_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax1_tx[$soc->price_level]); - if (price2num($object->multiprices_localtax2_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax2_tx[$soc->price_level]); - if (empty($positiverates)) $positiverates='0'; - echo vatrate($positiverates.($object->default_vat_code?' ('.$object->default_vat_code.')':''), '%', $object->tva_npr); - //print vatrate($object->multiprices_tva_tx[$soc->price_level], true); - print '
' . $langs->trans("DefaultTaxRate") . '' . vatrate($object->multiprices_tva_tx[1], true) . '
' . $langs->trans("DefaultTaxRate") . '' . vatrate($object->multiprices_tva_tx[1], true) . '
'; + print '
'; // VAT print '
' . $langs->trans("DefaultTaxRate") . ''; @@ -1194,7 +1191,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) dol_fiche_head(''); - print ''; + print '
'; // VAT print '
' . $langs->trans("DefaultTaxRate") . ''; @@ -1466,7 +1463,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ //else print_barre_liste($langs->trans("PriceByCustomerLog"),'','','','','','', 0, 0, 'title_accountancy.png'); print '
'; - print ''; + print '
'; print ''; print ''; @@ -1662,7 +1659,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) dol_fiche_head(); - print '
' . $langs->trans("AppliedPricesFrom") . '
'; + print '
'; print ''; print ''; print '
' . $langs->trans('ThirdParty') . ''; @@ -1749,7 +1746,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) dol_fiche_head(); - print ''; + print '
'; print ''; print ''; $staticsoc = new Societe($db); @@ -1859,7 +1856,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print ''; print ''; - print '
' . $langs->trans('ThirdParty') . '
'; + print '
'; print ''; print ''; @@ -1979,7 +1976,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print ''; print ''; - print '
' . $langs->trans("ThirdParty") . '
'; + print '
'; if (count($prodcustprice->lines) > 0 || $search_soc) { diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 99980f879c8..3054aebfa9d 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $langs->loadLangs(array('products', 'stocks')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service'); @@ -369,7 +369,6 @@ if ($resql) { if($nb_warehouse>1) { foreach($warehouses_list as &$wh) { - print ''; diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 66cae5ecb56..dcdd0e2588d 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; $langs->loadLangs(array('products', 'stocks', 'productbatch')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service'); diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 36cd2d0e9dc..d87b6f7604f 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -50,7 +50,7 @@ $mesg = ''; $graphfiles=array(); $socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; // Security check $fieldvalue = (! empty($id) ? $id : $ref); @@ -137,7 +137,7 @@ if ($result && (! empty($id) || ! empty($ref))) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', '', '', '', 0, '', '', 1); + dol_banner_tab($object, 'ref', $linkback, ($user->socid?0:1), 'ref', '', '', '', 0, '', '', 1); dol_fiche_end(); } @@ -173,7 +173,7 @@ if ($result || empty($id)) print ''; print ''; - print '
'; print empty($product->stock_warehouse[$wh['id']]->real) ? '0' : $product->stock_warehouse[$wh['id']]->real; print '
'; + print '
'; print ''; if (empty($id)) @@ -401,7 +401,7 @@ if ($result || empty($id)) $linktoregenerate='id).((string) $type != ''?'&type='.$type:'').'&action=recalcul&mode='.$mode.'&search_year='.$search_year.'&search_categ='.$search_categ.'">'.img_picto($langs->trans("ReCalculate").' ('.$dategenerated.')', 'refresh').''; // Show graph - print '
'.$langs->trans("Filter").'
'; + print '
'; // Label print '
'; print $graphfiles[$key]['label']; diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 58d65810772..e819110c344 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -40,7 +40,7 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); $socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -104,7 +104,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 56746cb33bc..ae3b642355a 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -39,8 +39,8 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (! empty($user->societe_id)) - $socid = $user->societe_id; +if (! empty($user->socid)) + $socid = $user->socid; $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -109,7 +109,7 @@ if ($id > 0 || ! empty($ref)) { $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index f779ced92ee..8a14c3f19a4 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -37,7 +37,7 @@ $ref = GETPOST('ref', 'alpha'); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 3ee0cb5de1a..6c5379d1ddb 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -41,7 +41,7 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); $socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -122,7 +122,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -234,7 +234,7 @@ if ($id > 0 || ! empty($ref)) while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); - + if ($objp->type == Facture::TYPE_CREDIT_NOTE) $objp->qty=-($objp->qty); $total_ht+=$objp->total_ht; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 78ee704293d..70643e9c996 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -41,7 +41,7 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -105,7 +105,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -127,7 +127,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->fournisseur->facture->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as line_total_ht,"; - $sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty"; + $sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle as label, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s"; @@ -221,7 +221,8 @@ if ($id > 0 || ! empty($ref)) $supplierinvoicestatic->id = $objp->facid; $supplierinvoicestatic->ref = $objp->ref; $supplierinvoicestatic->ref_supplier = $objp->ref_supplier; - $supplierinvoicestatic->libelle = $objp->libelle; + $supplierinvoicestatic->libelle = $objp->label; + $supplierinvoicestatic->label = $objp->label; $supplierinvoicestatic->total_ht = $objp->total_ht; $supplierinvoicestatic->total_ttc = $objp->total_ttc; $supplierinvoicestatic->total_tva = $objp->total_tva; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 0b8ae599809..4c58a6fb982 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -40,7 +40,7 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); $socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -105,7 +105,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php index fbab22a0d2f..0dc19a47691 100644 --- a/htdocs/product/stats/supplier_proposal.php +++ b/htdocs/product/stats/supplier_proposal.php @@ -40,7 +40,7 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); $socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -105,7 +105,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 31af63242a1..41e91b04d0c 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -68,8 +68,8 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || ! empty($ref)) { $ret = $object->fetch($id, $ref); -// if ($ret > 0) -// $ret = $object->fetch_thirdparty(); + // if ($ret > 0) + // $ret = $object->fetch_thirdparty(); if ($ret <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; @@ -223,7 +223,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->stock->dir_output; - $permissioncreate = $user->rights->stock->creer; + $permissiontoadd = $user->rights->stock->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -255,7 +255,7 @@ if ($action == 'create') dol_fiche_head(); - print ''; + print '
'; // Ref print ''; @@ -378,7 +378,7 @@ else $morehtmlref.=''; $shownav = 1; - if ($user->societe_id && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); @@ -386,12 +386,11 @@ else print '
'; print '
'; - print '
'.$langs->trans("Ref").'
'; + print '
'; // Parent entrepot $e = new Entrepot($db); if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) { - print ''; @@ -429,30 +428,26 @@ else print ""; // Last movement - $sql = "SELECT max(m.datem) as datem"; - $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; - $sql .= " WHERE m.fk_entrepot = '".$object->id."'"; - $resqlbis = $db->query($sql); - if ($resqlbis) - { - $obj = $db->fetch_object($resqlbis); - $lastmovementdate=$db->jdate($obj->datem); + if (!empty($user->rights->stock->mouvement->lire)) { + $sql = "SELECT max(m.datem) as datem"; + $sql .= " FROM " . MAIN_DB_PREFIX . "stock_mouvement as m"; + $sql .= " WHERE m.fk_entrepot = '" . $object->id . "'"; + $resqlbis = $db->query($sql); + if ($resqlbis) { + $obj = $db->fetch_object($resqlbis); + $lastmovementdate = $db->jdate($obj->datem); + } else { + dol_print_error($db); + } + print '"; } - else - { - dol_print_error($db); - } - print '"; // Other attributes include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; @@ -509,7 +504,7 @@ else /* ************************************************************************** */ print '
'; - print '
'.$langs->trans("ParentWarehouse").''; print $e->getNomUrl(3); print '
' . $langs->trans("LastMovement") . ''; + if ($lastmovementdate) { + print dol_print_date($lastmovementdate, 'dayhour') . ' '; + print '(' . $langs->trans("FullList") . ')'; + } else { + print $langs->trans("None"); + } + print "
'.$langs->trans("LastMovement").''; - if ($lastmovementdate) - { - print dol_print_date($lastmovementdate, 'dayhour').' '; - print '('.$langs->trans("FullList").')'; - } - else - { - print $langs->trans("None"); - } - print "
'; + print '
'; print ""; print_liste_field_titre("Product", "", "p.ref", "&id=".$id, "", "", $sortfield, $sortorder); print_liste_field_titre("Label", "", "p.label", "&id=".$id, "", "", $sortfield, $sortorder); @@ -670,7 +665,7 @@ else dol_fiche_head($head, 'card', $langs->trans("Warehouse"), 0, 'stock'); - print '
'; + print '
'; // Ref print ''; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 824934992bf..a8a9a3a55b8 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -44,26 +44,20 @@ class Entrepot extends CommonObject */ public $table_element='entrepot'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='stock'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe /** - * Warehouse closed, inactive + * @var string Label + * @deprecated */ - const STATUS_CLOSED = 0; - - /** - * Warehouse open and operations for customer shipping, supplier dispatch, internal stock transfers/corrections allowed. - */ - const STATUS_OPEN_ALL = 1; - - /** - * Warehouse open and operations for stock transfers/corrections allowed (not for customer shipping and supplier dispatch). - */ - const STATUS_OPEN_INTERNAL = 2; - public $libelle; + public $label; + /** * @var string description */ @@ -95,6 +89,45 @@ class Entrepot extends CommonObject // List of short language codes for status public $statuts = array(); + /** + * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + */ + public $fields=array( + 'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>10), + 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-2, 'showoncombobox'=>1, 'position'=>25), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>30), + 'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-2, 'position'=>35), + 'lieu' =>array('type'=>'varchar(64)', 'label'=>'LocationSummary', 'enabled'=>1, 'visible'=>-2, 'position'=>40), + 'fk_parent' =>array('type'=>'integer', 'label'=>'ParentWarehouse', 'enabled'=>1, 'visible'=>-2, 'position'=>41), + 'address' =>array('type'=>'varchar(255)', 'label'=>'Address', 'enabled'=>1, 'visible'=>-2, 'position'=>45), + 'zip' =>array('type'=>'varchar(10)', 'label'=>'Zip', 'enabled'=>1, 'visible'=>-2, 'position'=>50), + 'town' =>array('type'=>'varchar(50)', 'label'=>'Town', 'enabled'=>1, 'visible'=>-2, 'position'=>55), + 'fk_departement' =>array('type'=>'integer', 'label'=>'State', 'enabled'=>1, 'visible'=>0, 'position'=>60), + 'fk_pays' =>array('type'=>'integer', 'label'=>'Country', 'enabled'=>1, 'visible'=>-2, 'position'=>65), + //'fk_user_author' =>array('type'=>'integer', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-2, 'position'=>82), + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), + //'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportKey', 'enabled'=>1, 'visible'=>-2, 'position'=>1000), + //'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPDF', 'enabled'=>1, 'visible'=>0, 'position'=>1010), + 'statut' =>array('type'=>'tinyint(4)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-2, 'position'=>200), + ); + + /** + * Warehouse closed, inactive + */ + const STATUS_CLOSED = 0; + + /** + * Warehouse open and operations for customer shipping, supplier dispatch, internal stock transfers/corrections allowed. + */ + const STATUS_OPEN_ALL = 1; + + /** + * Warehouse open and operations for stock transfers/corrections allowed (not for customer shipping and supplier dispatch). + */ + const STATUS_OPEN_INTERNAL = 2; + + /** * Constructor * @@ -419,7 +452,7 @@ class Entrepot extends CommonObject $this->id = $obj->rowid; $this->fk_parent = $obj->fk_parent; $this->ref = $obj->label; - $this->label = $obj->label; // deprecated + $this->label = $obj->label; $this->libelle = $obj->label; // deprecated $this->description = $obj->description; $this->statut = $obj->statut; @@ -618,49 +651,23 @@ class Entrepot extends CommonObject /** * Return label of a given status * - * @param int $statut Status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; + $statusType = 'status5'; + if ($status > 0) $statusType = 'status4'; + $langs->load('stocks'); + $label = $langs->trans($this->statuts[$status]); + $labelshort = $langs->trans($this->statuts[$status]); - $picto = 'statut5'; - $label = $langs->trans($this->statuts[$statut]); - - - if ($mode == 0) - { - return $label; - } - elseif ($mode == 1) - { - return $label; - } - elseif ($mode == 2) - { - if ($statut > 0) $picto = 'statut4'; - return img_picto($label, $picto).' '.$label; - } - elseif ($mode == 3) - { - if ($statut > 0) $picto = 'statut4'; - return img_picto($label, $picto).' '.$label; - } - elseif ($mode == 4) - { - if ($statut > 0) $picto = 'statut4'; - return img_picto($label, $picto).' '.$label; - } - elseif ($mode == 5) - { - if ($statut > 0) $picto = 'statut4'; - return $label.' '.img_picto($label, $picto); - } + return dolGetStatus($label, $labelshort, '', $statusType, $mode); } @@ -829,7 +836,6 @@ class Entrepot extends CommonObject $langs->load("stocks"); if (! dol_strlen($modele)) { - $modele = 'standard'; if ($this->modelpdf) { diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 3a660a03d9a..a85b375b085 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -585,7 +585,7 @@ class MouvementStock extends CommonObject $sql .= " t.batch,"; $sql .= " t.eatby,"; $sql .= " t.sellby,"; - $sql .= " t.fk_projet"; + $sql .= " t.fk_projet as fk_project"; $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; $sql.= ' WHERE 1 = 1'; //if (null !== $ref) { @@ -618,6 +618,7 @@ class MouvementStock extends CommonObject $this->batch = $obj->batch; $this->eatby = $this->db->jdate($obj->eatby); $this->sellby = $this->db->jdate($obj->sellby); + $this->fk_project = $obj->fk_project; } // Retreive all extrafield @@ -947,8 +948,8 @@ class MouvementStock extends CommonObject $result=dol_include_once('/'.$origintype.'/class/'.$origintype.'.class.php'); if ($result) { - $classname = ucfirst($origintype); - $origin = new $classname($this->db); + $classname = ucfirst($origintype); + $origin = new $classname($this->db); } } break; @@ -1108,7 +1109,6 @@ class MouvementStock extends CommonObject $langs->load("stocks"); if (! dol_strlen($modele)) { - $modele = 'stdmovement'; if ($this->modelpdf) { diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index f08b290f0b9..f5604cbacdb 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -45,6 +45,9 @@ class Productlot extends CommonObject */ public $table_element = 'product_lot'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='barcode'; /** @@ -53,6 +56,19 @@ class Productlot extends CommonObject */ public $ismultientitymanaged = 1; + /** + * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + */ + public $fields=array( + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), + 'batch' =>array('type'=>'varchar(30)', 'label'=>'Batch', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'comment'=>'Batch'), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20), + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), + 'fk_user_creat'=>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'), + 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511) + ); + /** * @var int Entity */ @@ -488,11 +504,11 @@ class Productlot extends CommonObject /** * Return label of a given status * - * @param int $statut Status + * @param int $status Status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index 97e1aadd087..a53b669c183 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -276,7 +276,6 @@ class ProductStockEntrepot extends CommonObject $resql = $this->db->query($sql); if ($resql) { - while ($obj = $this->db->fetch_object($resql)) { $lines[$obj->rowid] = array( 'id'=>$obj->rowid diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index c6eed274793..838c01b7b6f 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -60,7 +60,7 @@ if ($_GET["id"]) dol_fiche_head($head, 'value', $langs->trans("Warehouse"), 0, 'stock'); - print '
'.$langs->trans("Ref").'
'; + print '
'; // Ref print '
'.$langs->trans("Ref").''; diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index e4786ae5a5a..ea39a0caf42 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -61,12 +61,13 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print ''; print ''; - print ''; + print '
'; + print '
'; print ""; print ''; print "'; - print "
'.$langs->trans("Search").'
"; print $langs->trans("Warehouse").':

"; + print "

"; } @@ -85,7 +86,8 @@ if ($result) $i = 0; - print ''; + print '
'; + print '
'; print ''; if ($num) @@ -105,6 +107,7 @@ if ($result) $db->free($result); } print "
'.$langs->trans("Warehouses").'
"; + print ''; } else { @@ -137,7 +140,8 @@ if ($resql) { $num = $db->num_rows($resql); - print ''; + print '
'; + print '
'; print ""; print ''; print ''; @@ -185,6 +189,7 @@ if ($resql) $db->free($resql); print "
'.$langs->trans("LastMovements", min($num, $max)).''.$langs->trans("Product").'
"; + print ''; } //print '
'; diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index 3314fcf642c..692fe17a83d 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -60,7 +60,7 @@ $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; $morehtmlref.=''; $shownav = 1; -if ($user->societe_id && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; +if ($user->socid && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index ae39ba63f3b..a87f1a28621 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -28,34 +28,50 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; // Load translation files required by the page -$langs->load("stocks"); +$langs->loadLangs(array("stocks","other")); -// Security check -$result=restrictedArea($user, 'stock'); +$action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) +$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list +$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'stocklist'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); +$search_all=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $search_ref=GETPOST("sref", "alpha")?GETPOST("sref", "alpha"):GETPOST("search_ref", "alpha"); $search_label=GETPOST("snom", "alpha")?GETPOST("snom", "alpha"):GETPOST("search_label", "alpha"); $search_status=GETPOST("search_status", "int"); +// Load variable for pagination $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; -$sortfield = GETPOST("sortfield"); -$sortorder = GETPOST("sortorder"); +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); +$page = GETPOST('page', 'int'); +if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; if (! $sortfield) $sortfield="e.ref"; if (! $sortorder) $sortorder="ASC"; -$page = GETPOST("page"); -if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $limit * $page; + +// Security check +$result=restrictedArea($user, 'stock'); + $year = strftime("%Y", time()); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Entrepot($db); -$hookmanager->initHooks(array('stocklist')); $extrafields = new ExtraFields($db); +$diroutputmassaction=$conf->inventory->dir_output . '/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('stocklist')); -// fetch optionals attributes and labels +// Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -69,30 +85,69 @@ $fieldstosearchall = array( 'e.town'=>'Town', ); - -// Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +// Definition of fields for list +$arrayfields=array( + 'stockqty'=>array('type'=>'float', 'label'=>'PhysicalStock', 'enabled'=>1, 'visible'=>-2, 'position'=>70), + 'estimatedvalue'=>array('type'=>'float', 'label'=>'EstimatedStockValue', 'enabled'=>1, 'visible'=>-2, 'position'=>71), + 'sellvalue'=>array('type'=>'float', 'label'=>'EstimatedStockValueSell', 'enabled'=>1, 'visible'=>-2, 'position'=>72), +); +foreach($object->fields as $key => $val) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + // If $val['visible']==0, then we never show the field + if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); } +// Extra fields +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) +{ + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } +} +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); /* * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; +if (GETPOST('cancel', 'alpha')) { $action='list'; $massaction=''; } +if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; } -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers +$parameters=array(); +$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)) { - $search_ref=""; - $sall=""; - $search_label=""; - $search_status=""; - $search_array_options=array(); + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + // 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 + { + $search_ref=""; + $sall=""; + $search_label=""; + $search_status=""; + $toselect=''; + $search_array_options=array(); + } + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') + || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) + { + $massaction=''; // Protection to avoid mass action if we force a new search during a mass action confirmation + } + + // Mass actions + $objectclass='Entrepot'; + $objectlabel='Warehouse'; + $permissiontoread = $user->rights->stock->lire; + $permissiontodelete = $user->rights->stock->supprimer; + $uploaddir = $conf->stock->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -103,6 +158,14 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $form=new Form($db); $warehouse=new Entrepot($db); +$now=dol_now(); + +$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; +$title = $langs->trans("ListOfWarehouses"); + + +// Build and execute select +// -------------------------------------------------------------------- $sql = "SELECT e.rowid, e.ref, e.statut, e.lieu, e.address, e.zip, e.town, e.fk_pays, e.fk_parent,"; $sql.= " SUM(p.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sellvalue, SUM(ps.reel) as stockqty"; // Add fields from extrafields @@ -115,16 +178,16 @@ if (! empty($extrafields->attributes[$object->table_element]['label'])) { $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; -//$sql=preg_replace('/, $/', '', $sql); -$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e"; +$sql=preg_replace('/,\s*$/', '', $sql); +$sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as e"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (e.rowid = ef.fk_object)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON e.rowid = ps.fk_entrepot"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON ps.fk_product = p.rowid"; -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (e.rowid = ef.fk_object)"; $sql.= " WHERE e.entity IN (".getEntity('stock').")"; if ($search_ref) $sql.= natural_search("e.ref", $search_ref); // ref if ($search_label) $sql.= natural_search("e.lieu", $search_label); // label if ($search_status != '' && $search_status >= 0) $sql.= " AND e.statut = ".$search_status; -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -149,189 +212,308 @@ if ($result) } } $sql.= $db->order($sortfield, $sortorder); -$sql.= $db->plimit($limit+1, $offset); -$result = $db->query($sql); -if ($result) +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $num = $db->num_rows($result); - - $i = 0; - - $help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; - llxHeader("", $langs->trans("ListOfWarehouses"), $help_url); - - $param=''; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; - if ($search_ref) $param.="&search_ref=".urlencode($search_ref); - if ($search_label) $param.="&search_label=".urlencode($search_label); - if ($search_status) $param.="&search_status=".urlencode($search_status); - if ($sall) $param.="&sall=".urlencode($sall); - - // Add $param from extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - - $newcardbutton=''; - if ($user->rights->stock->creer) + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0 { - $newcardbutton=''.$langs->trans('MenuNewWarehouse').''; - $newcardbutton.= ''; - $newcardbutton.= ''; + $page = 0; + $offset = 0; } - - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - - print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'generic', 0, $newcardbutton, '', $limit); - - if ($sall) - { - foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); - print '
'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'
'; - } - - $moreforfilter=''; - - print '
'; - print ''."\n"; - - // Fields title search - print ''; - - print ''; - - print ''; - - print ''; - - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; - - print ''; - - print ''; - - print ''; - - print ''; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stockqty", '', $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "estimatedvalue", '', $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch '); - print "\n"; - - if ($num) - { - $warehouse=new Entrepot($db); - $var=false; - $totalarray=array(); - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); - - $warehouse->id = $obj->rowid; - $warehouse->ref = $obj->ref; - $warehouse->label = $obj->ref; - $warehouse->lieu = $obj->lieu; - $warehouse->fk_parent = $obj->fk_parent; - $warehouse->statut = $obj->statut; - - print ''; - print ''; - if (! $i) $totalarray['nbfield']++; - // Location - print ''; - if (! $i) $totalarray['nbfield']++; - - // Stock qty - print ''; - if (! $i) $totalarray['nbfield']++; - - // PMP value - print ''; - if (! $i) $totalarray['nbfield']++; - - // Selling value - print ''; - if (! $i) $totalarray['nbfield']++; - - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - - // Status - print ''; - if (! $i) $totalarray['nbfield']++; - - print ''; - if (! $i) $totalarray['nbfield']++; - - print "\n"; - - - $i++; - } - - if ($totalnboflines-$offset <= $limit) - { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - } - } - - $db->free($result); - - print "
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print $form->selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1); - print ''; - $searchpicto=$form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print '
' . $warehouse->getNomUrl(1) . ''.$obj->lieu.''.price2num($obj->stockqty, 5).''; - if (price2num($obj->estimatedvalue, 'MT')) print price(price2num($obj->estimatedvalue, 'MT'), 1); - else print ''; - print ''; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($obj->sellvalue, 'MT'), 1); - else - { - $htmltext=$langs->trans("OptionMULTIPRICESIsOn"); - print $form->textwithtooltip($langs->trans("Variable"), $htmltext); - } - print ''.$warehouse->LibStatut($obj->statut, 5).'
'.$langs->trans("Total").''.price2num($totalStock, 5).''.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).''; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency); - else - { - $htmltext=$langs->trans("OptionMULTIPRICESIsOn"); - print $form->textwithtooltip($langs->trans("Variable"), $htmltext); - } - print '
"; - print "
"; - - print ''; +} +// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) +{ + $num = $nbtotalofrecords; } else { - dol_print_error($db); + $sql.= $db->plimit($limit+1, $offset); + + $resql=$db->query($sql); + if (! $resql) + { + dol_print_error($db); + exit; + } + + $num = $db->num_rows($resql); +} + +// Direct jump if only one record found +if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) +{ + $obj = $db->fetch_object($resql); + $id = $obj->rowid; + header("Location: ".DOL_URL_ROOT.'/product/stock/card.php?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url); + +$arrayofselected=is_array($toselect)?$toselect:array(); + +$param=''; +if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); +if ($search_ref) $param.="&search_ref=".urlencode($search_ref); +if ($search_label) $param.="&search_label=".urlencode($search_label); +if ($search_status) $param.="&search_status=".urlencode($search_status); +if ($search_all) $param.="&search_all=".urlencode($search_all); +if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + +// List of mass actions available +$arrayofmassactions = array( + //'presend'=>$langs->trans("SendByMail"), + //'builddoc'=>$langs->trans("PDFMerge"), +); +//if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +$massactionbutton=$form->selectMassAction('', $arrayofmassactions); + +print '
'; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +$newcardbutton = dolGetButtonTitle($langs->trans('MenuNewWarehouse'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->stock->creer); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); + +// Add code for pre mass action (confirmation or email presend form) +$topicmail="Information"; +$modelmail="warehouse"; +$objecttmp=new Entrepot($db); +$trackid='ware'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + + +if ($search_all) +{ + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print '
'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'
'; +} + +$moreforfilter = ''; +/*$moreforfilter.='
'; + $moreforfilter.= $langs->trans('MyFilter') . ': '; + $moreforfilter.= '
';*/ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; +else $moreforfilter = $hookmanager->resPrint; + +if (! empty($moreforfilter)) +{ + print '
'; + print $moreforfilter; + print '
'; +} + +$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; +$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); + +print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print ''."\n"; + +// Fields title search +// -------------------------------------------------------------------- +print ''; + +print ''; + +print ''; + +print ''; +print ''; +print ''; + +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; +// Fields from hook +$parameters=array('arrayfields'=>$arrayfields); +$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +// Status +print ''; + +// Action column +print ''; +print ''."\n"; + +// Fields title label +// -------------------------------------------------------------------- +print ''; +print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); +print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", $param, "", $sortfield, $sortorder); +print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stockqty", '', $param, '', $sortfield, $sortorder, 'right '); +print_liste_field_titre("EstimatedStockValue", $_SERVER["PHP_SELF"], "estimatedvalue", '', $param, '', $sortfield, $sortorder, 'right '); +print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; +// Hook fields +$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); +$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', $param, '', $sortfield, $sortorder, 'right '); +// Action column +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +print ''."\n"; + +// Loop on record +// -------------------------------------------------------------------- +$i=0; +$totalarray=array(); +if ($num) +{ + $warehouse=new Entrepot($db); + + $totalarray=array(); + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($resql); + if (empty($obj)) break; // Should not happen + + $warehouse->id = $obj->rowid; + $warehouse->ref = $obj->ref; + $warehouse->label = $obj->ref; + $warehouse->lieu = $obj->lieu; + $warehouse->fk_parent = $obj->fk_parent; + $warehouse->statut = $obj->statut; + + // Show here line of result + print ''; + print ''; + if (! $i) $totalarray['nbfield']++; + // Location + print ''; + if (! $i) $totalarray['nbfield']++; + + // Stock qty + print ''; + if (! $i) $totalarray['nbfield']++; + + // PMP value + print ''; + if (! $i) $totalarray['nbfield']++; + + // Selling value + print ''; + if (! $i) $totalarray['nbfield']++; + + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + // Status + print ''; + if (! $i) $totalarray['nbfield']++; + + // Action column + print ''; + if (! $i) $totalarray['nbfield']++; + + print ''."\n"; + + + $i++; + } + + if ($totalnboflines-$offset <= $limit) + { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + } +} + +$db->free($resql); + +$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print '
'; +print ''; +print ''; +print ''; +print ''; +print $form->selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1); +print ''; +$searchpicto=$form->showFilterButtons(); +print $searchpicto; +print '
' . $warehouse->getNomUrl(1) . ''.$obj->lieu.''.price2num($obj->stockqty, 5).''; + if (price2num($obj->estimatedvalue, 'MT')) print price(price2num($obj->estimatedvalue, 'MT'), 1); + else print ''; + print ''; + if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($obj->sellvalue, 'MT'), 1); + else + { + $htmltext=$langs->trans("OptionMULTIPRICESIsOn"); + print $form->textwithtooltip($langs->trans("Variable"), $htmltext); + } + print ''.$warehouse->LibStatut($obj->statut, 5).''; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected=0; + if (in_array($obj->rowid, $arrayofselected)) $selected=1; + print ''; + } + print '
'.$langs->trans("Total").''.price2num($totalStock, 5).''.price(price2num($total, 'MT'), 1, $langs, 0, 0, -1, $conf->currency).''; + if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalsell, 'MT'), 1, $langs, 0, 0, -1, $conf->currency); + else + { + $htmltext=$langs->trans("OptionMULTIPRICESIsOn"); + print $form->textwithtooltip($langs->trans("Variable"), $htmltext); + } + print '
'."\n"; +print '
'."\n"; + +print '
'."\n"; + +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) +{ + $hidegeneratedfilelistifempty=1; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0; + + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + $formfile = new FormFile($db); + + // Show list of available documents + $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource.=str_replace('&', '&', $param); + + $filedir=$diroutputmassaction; + $genallowed=$user->rights->mymodule->read; + $delallowed=$user->rights->mymodule->create; + + print $formfile->showdocuments('massfilesarea_mymodule', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); } // End of page diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 08e48477264..81fbd774111 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -35,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $langs->loadLangs(array('products', 'stocks', 'orders', 'productbatch')); // Security check -if ($user->societe_id) { - $socid = $user->societe_id; +if ($user->socid) { + $socid = $user->socid; } $result=restrictedArea($user, 'produit|service'); @@ -125,11 +125,9 @@ if ($action == 'addline') // Warning, don't forget lines already added into the $_SESSION['massstockmove'] if ($producttmp->hasbatch()) { - } else { - } } @@ -197,7 +195,7 @@ if ($action == 'createmovements') if (empty($conf->productbatch->enabled) || ! $product->hasbatch()) // If product does not need lot/serial { // Remove stock - $result1=$product->correct_stock( + $result1=$product->correct_stock( $user, $id_sw, $qty, @@ -213,7 +211,7 @@ if ($action == 'createmovements') } // Add stock - $result2=$product->correct_stock( + $result2=$product->correct_stock( $user, $id_tw, $qty, @@ -245,7 +243,7 @@ if ($action == 'createmovements') } // Remove stock - $result1=$product->correct_stock_batch( + $result1=$product->correct_stock_batch( $user, $id_sw, $qty, @@ -264,7 +262,7 @@ if ($action == 'createmovements') } // Add stock - $result2=$product->correct_stock_batch( + $result2=$product->correct_stock_batch( $user, $id_tw, $qty, @@ -341,7 +339,7 @@ print ''; print '
'; -print ''; +print '
'; //print '
'; $param=''; @@ -441,7 +439,7 @@ print ''; $codemove=(isset($_POST["codemove"])?GETPOST("codemove", 'alpha'):dol_print_date(dol_now(), '%Y%m%d%H%M%S')); $labelmovement=GETPOST("label")?GETPOST('label'):$langs->trans("StockTransfer").' '.dol_print_date($now, '%Y-%m-%d %H:%M'); -print '
'; +print '
'; print ''; print ''; print '
'.$langs->trans("InventoryCode").''; diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 0278e1572e6..cef869d6a21 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -413,7 +413,7 @@ if ($action == "transfert_stock" && ! $cancel) // The builddoc action for object of a movement must be on the movement card // Actions to build doc $upload_dir = $conf->stock->dir_output . "movement/"; -$permissioncreate = $user->rights->stock->creer; +$permissiontoadd = $user->rights->stock->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -421,8 +421,8 @@ if (empty($reshook) && $action != 'remove_file') { $objectclass='MouvementStock'; $objectlabel='Movements'; - $permtoread = $user->rights->stock->lire; - $permtodelete = $user->rights->stock->supprimer; + $permissiontoread = $user->rights->stock->lire; + $permissiontodelete = $user->rights->stock->supprimer; $uploaddir = $conf->stock->dir_output . "/movement/"; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -444,14 +444,16 @@ $formproduct=new FormProduct($db); if (!empty($conf->projet->enabled)) $formproject=new FormProjets($db); $sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,"; -$sql.= " e.ref as stock, e.rowid as entrepot_id, e.lieu,"; +$sql.= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu,"; $sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,"; $sql.= " m.batch, m.price,"; $sql.= " m.type_mouvement,"; $sql.= " pl.rowid as lotid, pl.eatby, pl.sellby,"; $sql.= " u.login, u.photo, u.lastname, u.firstname"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -565,7 +567,7 @@ if ($resql) $morehtmlref.=''; $shownav = 1; - if ($user->societe_id && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); @@ -574,7 +576,7 @@ if ($resql) print '
'; print '
'; - print ''; + print '
'; print ''; @@ -976,7 +978,8 @@ if ($resql) $productlot->sellby= $objp->sellby; $warehousestatic->id=$objp->entrepot_id; - $warehousestatic->libelle=$objp->stock; + $warehousestatic->libelle=$objp->warehouse_ref; // deprecated + $warehousestatic->label=$objp->warehouse_ref; $warehousestatic->lieu=$objp->lieu; $arrayofuniqueproduct[$objp->rowid]=$objp->produit; @@ -1048,7 +1051,7 @@ if ($resql) if (! empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code - print '
'.'array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500) ); +// Security check +if (!$user->rights->stock->mouvement->lire) { + accessforbidden(); +} /* @@ -198,7 +202,7 @@ if ($action == "correct_stock") $eatby=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); $sellby=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); - $result=$product->correct_stock_batch( + $result=$product->correct_stock_batch( $user, $id, GETPOST("nbpiece", 'int'), @@ -213,7 +217,7 @@ if ($action == "correct_stock") } else { - $result=$product->correct_stock( + $result=$product->correct_stock( $user, $id, GETPOST("nbpiece", 'int'), @@ -425,11 +429,13 @@ $sql.= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu, e.fk_parent, e. $sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,"; $sql.= " m.batch, m.price,"; $sql.= " m.type_mouvement,"; -$sql.= " m.fk_projet,"; +$sql.= " m.fk_projet as fk_project,"; $sql.= " pl.rowid as lotid, pl.eatby, pl.sellby,"; $sql.= " u.login, u.photo, u.lastname, u.firstname"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -543,7 +549,7 @@ if ($resql) $morehtmlref.=''; $shownav = 1; - if ($user->societe_id && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); @@ -552,7 +558,7 @@ if ($resql) print '
'; print '
'; - print ''; + print '
'; print ''; @@ -853,7 +859,7 @@ if ($resql) } if (! empty($arrayfields['m.fk_projet']['checked'])) { - // fk_projet + // fk_project print ''; @@ -980,7 +986,7 @@ if ($resql) $warehousestatic->id=$objp->entrepot_id; $warehousestatic->ref=$objp->warehouse_ref; - $warehousestatic->libelle=$objp->warehouse_ref; + $warehousestatic->libelle=$objp->warehouse_ref; // deprecated $warehousestatic->label=$objp->warehouse_ref; $warehousestatic->lieu=$objp->lieu; $warehousestatic->fk_parent = $objp->fk_parent; @@ -1109,9 +1115,9 @@ if ($resql) } if (! empty($arrayfields['m.fk_projet']['checked'])) { - // fk_projet + // fk_project print ''; } // Action column diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index b91c5d9c5ec..2932ba43d5b 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -76,7 +76,7 @@ if (!empty($batchnumber)) { } // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit&stock', $id, 'product&product', '', '', $fieldid); @@ -121,7 +121,6 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer)) { - $seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $desiredstock = GETPOST('desiredstock'); @@ -136,7 +135,6 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) } if($maj_ok) { - $pse = new ProductStockEntrepot($db); if ($pse->fetch(0, $id, GETPOST('fk_entrepot', 'int')) > 0) { // Update @@ -159,7 +157,6 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->creer)) { - $pse = new ProductStockEntrepot($db); $pse->fetch(GETPOST('fk_productstockwarehouse', 'int')); @@ -377,7 +374,7 @@ if ($action == "transfert_stock" && ! $cancel) if (! $error) { // Remove stock - $result1=$object->correct_stock_batch( + $result1=$object->correct_stock_batch( $user, $srcwarehouseid, GETPOST("nbpiece", 'int'), @@ -392,7 +389,7 @@ if ($action == "transfert_stock" && ! $cancel) if (! $error) { // Add stock - $result2=$object->correct_stock_batch( + $result2=$object->correct_stock_batch( $user, GETPOST("id_entrepot_destination", 'int'), GETPOST("nbpiece", 'int'), @@ -466,7 +463,6 @@ if ($action == "transfert_stock" && ! $cancel) // Update batch information if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save')) { - $pdluo = new Productbatch($db); $result=$pdluo->fetch(GETPOST('pdluoid', 'int')); @@ -552,7 +548,7 @@ if ($id > 0 || $ref) $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; - if ($user->societe_id && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -562,7 +558,6 @@ if ($id > 0 || $ref) print '
'; print '  '; print ''; - if ($objp->fk_projet != 0) print $movement->get_origin($objp->fk_projet, 'project'); + if ($objp->fk_project != 0) print $movement->get_origin($objp->fk_project, 'project'); print '
'; if (! $variants) { - if ($conf->productbatch->enabled) { print ''; // Last movement - $sql = "SELECT max(m.datem) as datem"; - $sql .= " FROM " . MAIN_DB_PREFIX . "stock_mouvement as m"; - $sql .= " WHERE m.fk_product = '" . $object->id . "'"; - $resqlbis = $db->query($sql); - if ($resqlbis) { - $obj = $db->fetch_object($resqlbis); - $lastmovementdate = $db->jdate($obj->datem); - } else { - dol_print_error($db); + if (!empty($user->rights->stock->mouvement->lire)) + { + $sql = "SELECT max(m.datem) as datem"; + $sql .= " FROM " . MAIN_DB_PREFIX . "stock_mouvement as m"; + $sql .= " WHERE m.fk_product = '" . $object->id . "'"; + $resqlbis = $db->query($sql); + if ($resqlbis) { + $obj = $db->fetch_object($resqlbis); + $lastmovementdate = $db->jdate($obj->datem); + } else { + dol_print_error($db); + } + print '"; } - print '"; } print "
' . $langs->trans("ManageLotSerial") . ''; print $object->getLibStatut(0, 2); @@ -699,24 +694,27 @@ if ($id > 0 || $ref) print '
' . $langs->trans("LastMovement") . ''; + if ($lastmovementdate) { + print dol_print_date($lastmovementdate, 'dayhour') . ' '; + print '(' . $langs->trans("FullList") . ')'; + } else { + print '' . $langs->trans("None") . ''; + } + print "
' . $langs->trans("LastMovement") . ''; - if ($lastmovementdate) { - print dol_print_date($lastmovementdate, 'dayhour') . ' '; - print '(' . $langs->trans("FullList") . ')'; - } else { - print '' . $langs->trans("None") . ''; - } - print "
"; @@ -757,14 +755,13 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { - if (empty($action) && $object->id) { print "
\n"; if ($user->rights->stock->mouvement->creer) { - if (! $variants) { + if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { print '' . $langs->trans("CorrectStock") . ''; } else @@ -780,7 +777,7 @@ if (empty($reshook)) //if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch()) if ($user->rights->stock->mouvement->creer) { - if (! $variants) { + if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { print '' . $langs->trans("TransferStock") . ''; } else @@ -804,8 +801,8 @@ if (! $variants) { */ print '
'; + print ''; - print '
'; print ''; print ''; print ''; @@ -896,7 +893,7 @@ if (! $variants) { print "\n" . ''; print '
' . $langs->trans("Warehouse") . '' . $langs->trans("NumberOfUnit") . '
'; print '
'; - print ''; + print '
'; print ''; print ''; print ''; print ''; - print ''; + print ''; + print ''; } } } @@ -932,12 +930,13 @@ if (! $variants) { } } else dol_print_error($db); + // Total line print ''; print ''; print ''; -// Value purchase + // Value purchase print ''; @@ -945,12 +944,13 @@ if (! $variants) { if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : ' '); else print $langs->trans("Variable"); print ''; -// Value to sell + // Value to sell print ''; print ""; + print "
'; print $form->selectDate($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0); @@ -924,7 +921,8 @@ if (! $variants) { print '' . dol_print_date($pdluo->eatby, 'day') . '' . dol_print_date($pdluo->sellby, 'day') . '' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '
' . $langs->trans("Total") . ':' . price2num($total, 'MS') . ''; print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : ' '); // This value may have rounding errors print ''; print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : ' '; print ''; if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1); else print $langs->trans("Variable"); print '
"; print ''; @@ -963,7 +963,7 @@ if (! $variants) { print ''; print ''; } - print ''; + print '
'; if (!empty($user->rights->produit->creer)) { print ''; print ''; @@ -1073,6 +1073,7 @@ if (! $variants) { print ''; print ''; print ''; + print ''; print ''; } else diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 76a4b0a46f7..d65f311acbb 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -53,7 +53,7 @@ if (empty($action) && empty($id) && empty($ref)) $action='list'; // Protection if external user -if ($user->societe_id > 0) +if ($user->socid > 0) { //accessforbidden(); } @@ -87,7 +87,7 @@ $hookmanager->initHooks(array('productlotcard','globalcard')); $permissionnote = $user->rights->stock->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->stock->creer; // Used by the include of actions_dellink.inc.php -$permissionedit = $user->rights->stock->creer; // Used by the include of actions_lineupdown.inc.php +$permissiontoadd = $user->rights->stock->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $usercanread = $user->rights->produit->lire; $usercancreate = $user->rights->produit->creer; @@ -180,7 +180,7 @@ if (empty($reshook)) { // Creation KO if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); + else setEventMessages($object->error, null, 'errors'); $action='create'; } } @@ -252,7 +252,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->productbatch->multidir_output[$conf->entity]; - $permissioncreate = $usercancreate; + $permissiontoadd = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -318,7 +318,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $linkback = '' . $langs->trans("BackToList") . ''; $shownav = 1; - if ($user->societe_id && ! in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'id', $linkback, $shownav, 'rowid', 'batch'); @@ -369,7 +369,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($reshook)) { -/*TODO if ($user->rights->stock->lire) + /*TODO if ($user->rights->stock->lire) { print ''."\n"; } @@ -378,7 +378,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { print ''."\n"; } -*/ + */ } print ''."\n"; diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php index 320f1aee9ec..5fb9cc23bca 100644 --- a/htdocs/product/stock/productlot_document.php +++ b/htdocs/product/stock/productlot_document.php @@ -48,7 +48,7 @@ $confirm= GETPOST('confirm', 'alpha'); // Security check $fieldvalue = (! empty($id) ? $id : ''); $fieldtype = 'rowid'; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -92,7 +92,6 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - // Action submit/delete file/link include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } @@ -111,7 +110,6 @@ llxHeader('', $langs->trans('ProductLot'), ''); if ($object->id) { - $head = productlot_prepare_head($object); dol_fiche_head($head, 'documents', $langs->trans("Batch"), -1, 'barcode'); @@ -134,7 +132,7 @@ if ($object->id) $linkback = '' . $langs->trans("BackToList") . ''; $shownav = 1; - if ($user->societe_id && ! in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'id', $linkback, $shownav, 'rowid', 'batch'); diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 65453585e0f..4c306dc1702 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -67,9 +67,9 @@ if (! $sortorder) $sortorder="ASC"; // Protection if external user $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; //accessforbidden(); } @@ -105,13 +105,16 @@ $arrayfields=array( //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); // Load object if id or ref is provided as parameter if (($id > 0 || ! empty($ref)) && $action != 'add') @@ -155,8 +158,8 @@ if (empty($reshook)) { $objectclass='ProductLot'; $objectlabel='LotSerial'; - $permtoread = $user->rights->stock->read; - $permtodelete = $user->rights->stock->delete; + $permissiontoread = $user->rights->stock->read; + $permissiontodelete = $user->rights->stock->delete; $uploaddir = $conf->stock->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -213,7 +216,9 @@ $sql.= " p.ref as product_ref,"; $sql.= " p.label as product_label,"; $sql.= " p.tobatch"; // Add fields for extrafields -foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -412,7 +417,6 @@ if ($resql) $obj = $db->fetch_object($resql); if ($obj) { - $productlot->id = $obj->rowid; $productlot->batch = $obj->batch; @@ -510,25 +514,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield'])) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 6e7cdbc585b..dbab10c0bf4 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -38,8 +38,8 @@ require_once './lib/replenishment.lib.php'; $langs->loadLangs(array('products', 'stocks', 'orders')); // Security check -if ($user->societe_id) { - $socid = $user->societe_id; +if ($user->socid) { + $socid = $user->socid; } $result=restrictedArea($user, 'produit|service'); @@ -140,7 +140,6 @@ if ($action == 'order' && isset($_POST['valid'])) if ($qty) { //might need some value checks - $obj = $db->fetch_object($resql); $line = new CommandeFournisseurLigne($db); $line->qty = $qty; $line->fk_product = $idprod; @@ -179,7 +178,7 @@ if ($action == 'order' && isset($_POST['valid'])) $error=$db->lasterror(); dol_print_error($db); } - $db->free($resql); + unset($_POST['fourn' . $i]); } unset($_POST[$i]); @@ -492,7 +491,7 @@ if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alph $filters .= '&mode=' . $mode; $filters .= '&fk_supplier=' . $fk_supplier; $filters .= '&fk_entrepot=' . $fk_entrepot; -print_barre_liste( + print_barre_liste( $texte, $page, 'replenish.php', @@ -511,7 +510,7 @@ print_barre_liste( $filters .= '&mode=' . $mode; $filters .= '&fk_supplier=' . $fk_supplier; $filters .= '&fk_entrepot=' . $fk_entrepot; -print_barre_liste( + print_barre_liste( $texte, $page, 'replenish.php', @@ -524,7 +523,7 @@ print_barre_liste( } print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table -print '
' . $formproduct->selectWarehouses('', 'fk_entrepot') . '
'.$langs->trans("Total").''.$stock_total.'
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).'
'; +print '
'; $param = (isset($type)? '&type=' . $type : ''); $param .= '&fourn_id=' . $fourn_id . '&snom='. $snom . '&salert=' . $salert . '&draftorder='.$draftorder; diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index d618e40ab38..13f7cca301f 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -3,6 +3,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Regis Houssin * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2019 Juanjo Menent * * 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 @@ -37,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->loadLangs(array('products', 'stocks', 'orders')); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service'); $sall = GETPOST('search_all', 'alphanohtml'); @@ -140,7 +141,9 @@ if (GETPOST('statut', 'int')) { $sql .= ' GROUP BY cf.rowid, cf.ref, cf.date_creation, cf.fk_statut'; $sql .= ', cf.total_ttc, cf.fk_user_author, u.login, s.rowid, s.nom'; $sql .= $db->order($sortfield, $sortorder); -$sql .= $db->plimit($limit+1, $offset); +if (! $sproduct) { + $sql .= $db->plimit($limit+1, $offset); +} $resql = $db->query($sql); if ($resql) @@ -167,7 +170,7 @@ if ($resql) print ''; - print '
'; + print '
'; print ''; print ''; - for ($idw = 0; $idw < 7; $idw++) + for ($idw = 0; $idw < 7; $idw++) { - $cssweekend=''; - if (($idw + 1) < $numstartworkingday || ($idw + 1) > $numendworkingday) // This is a day is not inside the setup of working days, so we use a week-end css. - { - $cssweekend='weekend'; - } + $cssweekend=''; + if (($idw + 1) < $numstartworkingday || ($idw + 1) > $numendworkingday) // This is a day is not inside the setup of working days, so we use a week-end css. + { + $cssweekend='weekend'; + } - $tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd'); + $tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd'); - $cssonholiday=''; - if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday '; - elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning '; - elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon '; + $cssonholiday=''; + if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday '; + elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning '; + elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon '; - print ''; - } + print ''; + } print ''; } diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 56998cdfc99..bd6c5eacc47 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -306,7 +306,7 @@ print ''; print ''; print ''; -print '
'. @@ -257,7 +260,7 @@ if ($resql) $userstatic = new User($db); - while ($i < min($num, $conf->liste_limit)) + while ($i < min($num, $sproduct?$num:$conf->liste_limit)) { $obj = $db->fetch_object($resql); diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index a17ce086e6c..9f0c4dd376e 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -62,32 +62,32 @@ if (empty($conf) || ! is_object($conf)) { print ''; print ''; print ''; - print ''; + print '
'; // Warehouse or product print ''; - if ($object->element == 'product') - { - print ''; - print ''; - } - if ($object->element == 'stock') - { - print ''; - print ''; - } +if ($object->element == 'product') +{ + print ''; + print ''; +} +if ($object->element == 'stock') +{ + print ''; + print ''; +} print ''; print ''; print ''; @@ -96,37 +96,37 @@ if (empty($conf) || ! is_object($conf)) { print ''; print ''; print ''; - if (! empty($conf->projet->enabled)) - { - print ''; - print ''; - } +if (! empty($conf->projet->enabled)) +{ + print ''; + print ''; +} print ''; // Serial / Eat-by date - if (! empty($conf->productbatch->enabled) && +if (! empty($conf->productbatch->enabled) && (($object->element == 'product' && $object->hasbatch()) || ($object->element == 'stock')) ) - { - print ''; - print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; - print ''; - print ''; - print ''; - print ''; - print ''; - } +{ + print ''; + print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; + print ''; + print ''; + print ''; + print ''; + print ''; +} // Label of mouvement of id of inventory $valformovementlabel=((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref)); diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 2f02df78eec..f796827587e 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -40,18 +40,18 @@ if (empty($conf) || ! is_object($conf)) { $pdluo = new Productbatch($db); - if ($pdluoid > 0) - { - $result=$pdluo->fetch($pdluoid); - if ($result > 0) - { - $pdluoid=$pdluo->id; - } - else - { - dol_print_error($db, $pdluo->error, $pdluo->errors); - } - } +if ($pdluoid > 0) +{ + $result=$pdluo->fetch($pdluoid); + if ($result > 0) + { + $pdluoid=$pdluo->id; + } + else + { + dol_print_error($db, $pdluo->error, $pdluo->errors); + } +} print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic'); @@ -62,28 +62,28 @@ if (empty($conf) || ! is_object($conf)) { print ''; print ''; print ''; - if ($pdluoid) - { - print ''; - } - print '
'.$langs->trans("Warehouse").''; - print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); - print '   '; - print ''.$langs->trans("Product").''; - print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); - print '   '; - print ''.$langs->trans("Warehouse").''; + print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); + print '   '; + print ''.$langs->trans("Product").''; + print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); + print '   '; + print ''.$langs->trans("NumberOfUnit").'
'.$langs->trans("UnitPurchaseValue").''.$langs->trans('Project').''; - $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); - print ''.$langs->trans('Project').''; + $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); + print '
'; - print ''; - print '
'.$langs->trans("EatByDate").''; - $eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); - print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); - print ''.$langs->trans("SellByDate").''; - $sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); - print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); - print '
'; + print ''; + print '
'.$langs->trans("EatByDate").''; + $eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); + print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); + print ''.$langs->trans("SellByDate").''; + $sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); + print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); + print '
'; +if ($pdluoid) +{ + print ''; +} + print '
'; // Source warehouse or product print ''; - if ($object->element == 'product') - { - print ''; - print ''; - } - if ($object->element == 'stock') - { - print ''; - print ''; - } +if ($object->element == 'product') +{ + print ''; + print ''; +} +if ($object->element == 'stock') +{ + print ''; + print ''; +} print ''; // Serial / Eat-by date - if (! empty($conf->productbatch->enabled) && +if (! empty($conf->productbatch->enabled) && (($object->element == 'product' && $object->hasbatch()) || ($object->element == 'stock')) ) - { - print ''; - print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; - print ''; +{ + print ''; + print 'element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").''; + print ''; - print ''; - print ''; - print ''; - print ''; - } + print ''; + print ''; + print ''; + print ''; +} // Label $valformovementlabel=(GETPOST("label")?GETPOST("label"):$langs->trans("MovementTransferStock", $productref)); diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 341e2e3ec45..32ffebdba76 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -83,7 +83,7 @@ if ($result) print_barre_liste($langs->trans("EnhancedValueOfWarehouses"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num); - print '
'.$langs->trans("WarehouseSource").''; - print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1); - print ''.$langs->trans("Product").''; - print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); - print ''.$langs->trans("WarehouseSource").''; + print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1); + print ''.$langs->trans("Product").''; + print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); + print ''.$langs->trans("WarehouseTarget").''; print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1); @@ -92,35 +92,35 @@ if (empty($conf) || ! is_object($conf)) { print '
'; - if ($pdluoid > 0) - { - // If form was opened for a specific pdluoid, field is disabled - print ''; - print ''; - } - else - { - print ''; - } - print '
'; + if ($pdluoid > 0) + { + // If form was opened for a specific pdluoid, field is disabled + print ''; + print ''; + } + else + { + print ''; + } + print '
'.$langs->trans("EatByDate").''; - print $form->selectDate(($d_eatby?$d_eatby:$pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled - print ''.$langs->trans("SellByDate").''; - print $form->selectDate(($d_sellby?$d_sellby:$pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled - print '
'.$langs->trans("EatByDate").''; + print $form->selectDate(($d_eatby?$d_eatby:$pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled + print ''.$langs->trans("SellByDate").''; + print $form->selectDate(($d_sellby?$d_sellby:$pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled + print '
'; + print '
'; print ""; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", "", "", $sortfield, $sortorder); print_liste_field_titre("LocationSummary", $_SERVER["PHP_SELF"], "e.lieu", "", "", "", $sortfield, $sortorder); diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 054947183ab..efdaebab889 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -42,7 +42,7 @@ $cancel=GETPOST('cancel', 'alpha'); // Security check $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); @@ -203,7 +203,7 @@ dol_fiche_head($head, 'translation', $titre, 0, $picto); $linkback = ''.$langs->trans("BackToList").''; $shownav = 1; -if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; +if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', '', '', '', 0, '', '', 1); @@ -250,7 +250,7 @@ if ($action == 'edit') print "
".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
"; print '
'; - print '
'; + print '
'; print ''; print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); @@ -288,7 +288,7 @@ elseif ($action != 'add') print '
'; print '
'; - print ''; + print '
'; print ''; print ''; if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) @@ -321,7 +321,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service dol_fiche_head(); - print '
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'; + print '
'; print ''; diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 7a8e3ff2591..cea14170602 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -36,7 +36,7 @@ if ($search_project_user == $user->id) $mine = 1; // Security check $socid=0; -if ($user->societe_id > 0) $socid=$user->societe_id; +if ($user->socid > 0) $socid=$user->socid; //$result = restrictedArea($user, 'projet', $projectid); if (!$user->rights->projet->lire) accessforbidden(); @@ -111,6 +111,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print ''; print ''; + print '
'; print '
'.$langs->trans('Language').''; print $formadmin->select_language('', 'forcelangprod', 0, $object->multilangs, 1); print '
'; $i=0; foreach($listofsearchfields as $key => $value) @@ -123,6 +124,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele $i++; } print '
'; + print '
'; print ''; print '
'; } @@ -130,7 +132,8 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele /* Affichage de la liste des projets d'aujourd'hui */ -print ''; +print '
'; +print '
'; print ''; print ''; print ''; @@ -179,13 +182,15 @@ print ''; print ''; print "\n"; print "
'.$langs->trans('ActivityOnProjectToday').''.$langs->trans("Time").''.$langs->trans('Total').''.convertSecondToTime($total, 'allhourmin').'
"; +print ''; print '
'; /* Affichage de la liste des projets d'hier */ -print ''; +print '
'; +print '
'; print ''; print ''; print ''; @@ -234,6 +239,7 @@ print ''; print ''; print "\n"; print "
'.$langs->trans('ActivityOnProjectYesterday').''.$langs->trans("Time").''.$langs->trans('Total').''.convertSecondToTime($total, 'allhourmin').'
"; +print '
'; @@ -243,7 +249,8 @@ if ($db->type != 'pgsql') print '
'; // Affichage de la liste des projets de la semaine - print ''; + print '
'; + print '
'; print ''; print ''; print ''; @@ -291,7 +298,7 @@ if ($db->type != 'pgsql') print ''; print ''; print "\n"; - print "
'.$langs->trans("ActivityOnProjectThisWeek").''.$langs->trans("Time").''.$langs->trans('Total').''.convertSecondToTime($total, 'allhourmin').'

"; + print "

"; } */ @@ -299,7 +306,8 @@ if ($db->type != 'pgsql') /* Affichage de la liste des projets du mois */ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH)) { - print ''; + print '
'; + print '
'; print ''; print ''; print ''; @@ -343,12 +351,14 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH)) print ''; print "\n"; print "
'.$langs->trans("ActivityOnProjectThisMonth").': '.dol_print_date($now, "%B %Y").''.$langs->trans("Time").''.convertSecondToTime($total, 'allhourmin').'
"; + print ''; } /* Affichage de la liste des projets de l'annee */ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR)) { - print '
'; + print '
'; + print '
'; print ''; print ''; print ''; @@ -393,6 +403,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR)) print ''; print "\n"; print "
'.$langs->trans("ActivityOnProjectThisYear").': '.strftime("%Y", $now).''.$langs->trans("Time").''.convertSecondToTime($total, 'allhourmin').'
"; + print ''; } if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_SHOW_TASK_LIST_ON_PROJECT_AREA)) @@ -467,7 +478,8 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S //print load_fiche_titre($langs->trans("TasksOnOpenedProject"),'','').'
'; - print ''; + print '
'; + print '
'; print ''; //print ''; print ''; @@ -566,6 +578,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S } print "
'.$langs->trans('TaskRessourceLinks').''.$langs->trans('OpenedProjects').'
"; + print ''; $db->free($resql); diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index b07b41c1b88..77dcaa641d2 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -56,7 +56,7 @@ $hookmanager->initHooks(array('timesheetperdaycard')); // Security check $socid=0; // For external user, no check is done on company because readability is managed by public status of project and assignement. -//if ($user->societe_id > 0) $socid=$user->societe_id; +//if ($user->socid > 0) $socid=$user->socid; $result = restrictedArea($user, 'projet', $projectid); $now=dol_now(); diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index f5db207a42e..8af733394bf 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -56,7 +56,7 @@ $hookmanager->initHooks(array('timesheetperweekcard')); // Security check $socid=0; // For external user, no check is done on company because readability is managed by public status of project and assignement. -// if ($user->societe_id > 0) $socid=$user->societe_id; +// if ($user->socid > 0) $socid=$user->socid; $result = restrictedArea($user, 'projet', $projectid); $now=dol_now(); @@ -813,23 +813,23 @@ if (count($tasksarray) > 0) print ' - '.$langs->trans("ExpectedWorkedHours").': '.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).''; print '
 
 
 
'; +print '
'; print ''; print "\n"; print ''."\n"; @@ -349,7 +349,7 @@ print '
'; print load_fiche_titre($langs->trans("ProjectsNumberingModules"), '', ''); -print '
".$langs->trans("Parameters")."'.$langs->trans("Value").'
'; +print '
'; print ''; print ''; print ''; @@ -450,7 +450,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) // Task numbering module print load_fiche_titre($langs->trans("TasksNumberingModules"), '', ''); - print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; + print '
'; print ''; print ''; print ''; @@ -867,7 +867,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print "\n"; print ''."\n"; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 4c04ee6ee23..51af2f2b14d 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -71,7 +71,7 @@ if ($id > 0 || ! empty($ref)) // Security check $socid=GETPOST('socid', 'int'); -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $object->id, 'projet&project'); // fetch optionals attributes and labels @@ -205,9 +205,11 @@ if (empty($reshook)) { $db->commit(); - if ($backtopage) + if (! empty($backtopage)) { - header("Location: ".$backtopage.'&projectid='.$object->id); + $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $backtopage); // New method to autoselect project after a New on another form object creation + $backtopage = $backtopage.'&projectid='.$object->id; // Old method + header("Location: ".$backtopage); exit; } else @@ -507,7 +509,7 @@ if ($action == 'create' && $user->rights->projet->creer) dol_fiche_head(); - print '
".$langs->trans("Parameters")."'.$langs->trans("Value").'
'; + print '
'; $defaultref=''; $modele = empty($conf->global->PROJECT_ADDON)?'mod_project_simple':$conf->global->PROJECT_ADDON; @@ -595,7 +597,7 @@ if ($action == 'create' && $user->rights->projet->creer) print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1); } else print $text; - print ' '.$langs->trans("AddThirdParty").''; + if (! GETPOSTISSET('backtopage')) print ' '.$langs->trans("AddThirdParty").''; print ''; } @@ -784,7 +786,7 @@ elseif ($object->id > 0) { dol_fiche_head($head, 'project', $langs->trans("Project"), 0, ($object->public?'projectpub':'project')); - print '
'; + print '
'; // Ref $suggestedref=$object->ref; @@ -1166,19 +1168,18 @@ elseif ($object->id > 0) { if ($action != "edit" && $action != 'presend' ) { - // Create event /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a // "workflow" action so should appears somewhere else on // page. { - print ''; + print '' . $langs->trans("AddAction") . ''; }*/ // Send if ($object->statut != 2) { - print ''; + print '' . $langs->trans('SendMail').''; } // Modify @@ -1186,11 +1187,11 @@ elseif ($object->id > 0) { if ($userWrite > 0) { - print ''; + print ''.$langs->trans("Modify").''; } else { - print ''; + print ''.$langs->trans('Modify').''; } } @@ -1199,11 +1200,11 @@ elseif ($object->id > 0) { if ($userWrite > 0) { - print ''; + print ''.$langs->trans("Validate").''; } else { - print ''; + print ''.$langs->trans('Validate').''; } } @@ -1212,11 +1213,11 @@ elseif ($object->id > 0) { if ($userWrite > 0) { - print ''; + print ''.$langs->trans("Close").''; } else { - print ''; + print ''.$langs->trans('Close').''; } } @@ -1225,11 +1226,11 @@ elseif ($object->id > 0) { if ($userWrite > 0) { - print ''; + print ''.$langs->trans("ReOpen").''; } else { - print ''; + print ''.$langs->trans('ReOpen').''; } } @@ -1239,52 +1240,52 @@ elseif ($object->id > 0) if (! empty($conf->propal->enabled) && $user->rights->propal->creer) { $langs->load("propal"); - print ''; + print ''.$langs->trans("AddProp").''; } if (! empty($conf->commande->enabled) && $user->rights->commande->creer) { $langs->load("orders"); - print ''; + print ''.$langs->trans("CreateOrder").''; } if (! empty($conf->facture->enabled) && $user->rights->facture->creer) { $langs->load("bills"); - print ''; + print ''.$langs->trans("CreateBill").''; } if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer) { $langs->load("supplier_proposal"); - print ''; + print ''.$langs->trans("AddSupplierProposal").''; } if (! empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->creer) { $langs->load("suppliers"); - print ''; + print ''.$langs->trans("AddSupplierOrder").''; } if (! empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->creer) { $langs->load("suppliers"); - print ''; + print ''.$langs->trans("AddSupplierInvoice").''; } if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { $langs->load("interventions"); - print ''; + print ''.$langs->trans("AddIntervention").''; } if (! empty($conf->contrat->enabled) && $user->rights->contrat->creer) { $langs->load("contracts"); - print ''; + print ''.$langs->trans("AddContract").''; } if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->creer) { $langs->load("trips"); - print ''; + print ''.$langs->trans("AddTrip").''; } if (! empty($conf->don->enabled) && $user->rights->don->creer) { $langs->load("donations"); - print ''; + print ''.$langs->trans("AddDonation").''; } } @@ -1293,11 +1294,11 @@ elseif ($object->id > 0) { if ($userWrite > 0) { - print ''; + print ''.$langs->trans('ToClone').''; } else { - print ''; + print ''.$langs->trans('ToClone').''; } } @@ -1306,11 +1307,11 @@ elseif ($object->id > 0) { if ($userDelete > 0 || ($object->statut == 0 && $user->rights->projet->creer)) { - print ''; + print ''.$langs->trans("Delete").''; } else { - print ''; + print ''.$langs->trans('Delete').''; } } } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index e14cd53c3c3..e049945f235 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -60,6 +60,9 @@ class Project extends CommonObject */ public $ismultientitymanaged = 1; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'projectpub'; /** @@ -401,7 +404,7 @@ class Project extends CommonObject $result = 1; } else - { + { $this->db->rollback(); $result = -1; } @@ -1222,7 +1225,7 @@ class Project extends CommonObject // No filter. Use this if user has permission to see all project } - $sql.= $filter; + $sql.= $filter; //print $sql; $resql = $this->db->query($sql); @@ -1453,7 +1456,7 @@ class Project extends CommonObject // Security check $socid=0; - if ($user->societe_id > 0) $socid = $user->societe_id; + if ($user->socid > 0) $socid = $user->socid; $tasksarray=$taskstatic->getTasksArray(0, 0, $fromid, $socid, 0); @@ -1533,7 +1536,7 @@ class Project extends CommonObject // Security check $socid=0; - if ($user->societe_id > 0) $socid = $user->societe_id; + if ($user->socid > 0) $socid = $user->socid; $tasksarray=$taskstatic->getTasksArray(0, 0, $this->id, $socid, 0); @@ -1671,7 +1674,6 @@ class Project extends CommonObject $langs->load("projects"); if (! dol_strlen($modele)) { - $modele = 'baleine'; if ($this->modelpdf) { @@ -1723,23 +1725,23 @@ class Project extends CommonObject $num = $this->db->num_rows($resql); $i = 0; // Loop on each record found, so each couple (project id, task id) - while ($i < $num) + while ($i < $num) { - $obj=$this->db->fetch_object($resql); - $day=$this->db->jdate($obj->task_date); // task_date is date without hours - if (empty($daylareadyfound[$day])) - { - $this->weekWorkLoad[$day] = $obj->task_duration; - $this->weekWorkLoadPerTask[$day][$obj->fk_task] = $obj->task_duration; - } - else - { - $this->weekWorkLoad[$day] += $obj->task_duration; - $this->weekWorkLoadPerTask[$day][$obj->fk_task] += $obj->task_duration; - } - $daylareadyfound[$day]=1; - $i++; - } + $obj=$this->db->fetch_object($resql); + $day=$this->db->jdate($obj->task_date); // task_date is date without hours + if (empty($daylareadyfound[$day])) + { + $this->weekWorkLoad[$day] = $obj->task_duration; + $this->weekWorkLoadPerTask[$day][$obj->fk_task] = $obj->task_duration; + } + else + { + $this->weekWorkLoad[$day] += $obj->task_duration; + $this->weekWorkLoadPerTask[$day][$obj->fk_task] += $obj->task_duration; + } + $daylareadyfound[$day]=1; + $i++; + } $this->db->free($resql); return 1; } @@ -1765,7 +1767,7 @@ class Project extends CommonObject global $conf, $langs; // For external user, no check is done on company because readability is managed by public status of project and assignement. - //$socid=$user->societe_id; + //$socid=$user->socid; $projectsListId = null; if (! $user->rights->projet->all->lire) $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 66bb8a23e45..c10e9915c3b 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -47,6 +47,9 @@ class Task extends CommonObject */ public $fk_element='fk_task'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'task'; /** @@ -852,15 +855,15 @@ class Task extends CommonObject $sql.=" t.rowid, t.ref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut,"; $sql.=" t.dateo, t.datee, t.planned_workload, t.rang,"; $sql.=" s.rowid, s.nom, s.email,"; - $sql.=" p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount"; - if (!empty($extrafields->attributes['projet']['label'])) - { - foreach ($extrafields->attributes['projet']['label'] as $key => $val) $sql.=($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key : ''); - } - if (!empty($extrafields->attributes['projet_task']['label'])) - { - foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) $sql.=($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key : ''); - } + $sql.=" p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount"; + if (!empty($extrafields->attributes['projet']['label'])) + { + foreach ($extrafields->attributes['projet']['label'] as $key => $val) $sql.=($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key : ''); + } + if (!empty($extrafields->attributes['projet_task']['label'])) + { + foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) $sql.=($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key : ''); + } } $sql.= " ORDER BY p.ref, t.rang, t.dateo"; @@ -1839,13 +1842,15 @@ class Task extends CommonObject /** * Return status label for an object * - * @param int $statut Id statut + * @param int $status Id status * @param integer $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable + global $langs; + // list of Statut of the task $this->statuts[0]='Draft'; $this->statuts[1]='ToDo'; @@ -1858,63 +1863,61 @@ class Task extends CommonObject $this->statuts_short[3]='Completed'; $this->statuts_short[4]='Transfered'; - global $langs; - if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3'); - elseif ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); - elseif ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); - elseif ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5'); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1'); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3'); + elseif ($status==3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + elseif ($status==4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + elseif ($status==5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5').' '.$langs->trans($this->statuts[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts[$status]); + elseif ($status==3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); + elseif ($status==4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); + elseif ($status==5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - /*if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); - elseif ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); - elseif ($statut==2) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); - elseif ($statut==3) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==4) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==5) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + /*if ($status==0) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0'); + elseif ($status==1) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1'); + elseif ($status==2) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3'); + elseif ($status==3) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==4) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==5) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5'); */ //else return $this->progress.' %'; return ' '; } elseif ($mode == 6) { - /*if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); - elseif ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==4) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==5) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + /*if ($status==0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0'); + elseif ($status==1) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1'); + elseif ($status==2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3'); + elseif ($status==3) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==4) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==5) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5'); */ //else return $this->progress.' %'; return ' '; @@ -1938,7 +1941,6 @@ class Task extends CommonObject $langs->load("projects"); if (! dol_strlen($modele)) { - $modele = 'nodefault'; if ($this->modelpdf) { @@ -1967,7 +1969,7 @@ class Task extends CommonObject global $conf, $langs; // For external user, no check is done on company because readability is managed by public status of project and assignement. - //$socid=$user->societe_id; + //$socid=$user->socid; $projectstatic = new Project($this->db); $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); @@ -2040,7 +2042,7 @@ class Task extends CommonObject // phpcs:enable global $user; - $mine=0; $socid=$user->societe_id; + $mine=0; $socid=$user->socid; $projectstatic = new Project($this->db); $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $mine, 1, $socid); @@ -2062,7 +2064,6 @@ class Task extends CommonObject $resql=$this->db->query($sql); if ($resql) { - // This assignment in condition is not a bug. It allows walking the results. while ($obj=$this->db->fetch_object($resql)) { diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index b535b0f6ada..a7478163f47 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -49,7 +49,7 @@ $planned_workload=((GETPOST('planned_workloadhour', 'int')!='' || GETPOST('plann // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if (! $user->rights->projet->lire) accessforbidden(); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -118,7 +118,7 @@ print '
'; print '
'; print '
'; -print '
'; +print '
'; // Visibility print '
' . $langs->trans("Visibility") . ''; @@ -150,7 +150,7 @@ print '
'; print '
'; print '
'; -print ''; +print '
'; // Description print '
' . $langs->trans("Description") . ''; diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index a1735e20ad6..82eb598190b 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -47,7 +47,7 @@ if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($ob // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); $hookmanager->initHooks(array('projectcontactcard','globalcard')); diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index e16e90982a6..f77419f2e75 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -42,7 +42,7 @@ $mine = (GETPOST('mode', 'alpha') == 'mine' ? 1 : 0); // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result=restrictedArea($user, 'projet', $id, 'projet&project'); $object = new Project($db); @@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 87873054c29..56d01faa342 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -83,17 +83,16 @@ if (! isset($_POST['datesrfc']) && ! isset($_POST['datesday']) && ! empty($conf- //$dates=dol_time_plus_duree($datee, -1, 'y'); $dates=dol_get_first_day($tmp['year'], 1); } -if ($id == '' && $projectid == '' && $ref == '') +if ($id == '' && $ref == '') { - dol_print_error('', 'Bad parameter'); - exit; + setEventMessage($langs->trans('ErrorBadParameters'), 'errors'); + header('Location: list.php'); + exit(); } $mine = $_REQUEST['mode']=='mine' ? 1 : 0; //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects -$projectid=$id; // For backward compatibility - $object = new Project($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once @@ -101,8 +100,8 @@ if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($ob // Security check $socid=$object->socid; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. -$result = restrictedArea($user, 'projet', $projectid, 'projet&project'); +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. +$result = restrictedArea($user, 'projet', $object->id, 'projet&project'); $hookmanager->initHooks(array('projectOverview')); @@ -523,7 +522,6 @@ $parameters=array('listofreferent'=>$listofreferent); $resHook = $hookmanager->executeHooks('completeListOfReferent', $parameters, $object, $action); if(!empty($hookmanager->resArray)) { - $listofreferent = array_merge($listofreferent, $hookmanager->resArray); } @@ -539,9 +537,8 @@ if ($action=="addelement") } elseif ($action == "unlink") { - $tablename = GETPOST("tablename", "aZ09"); - $projectField = GETPOST("projectfield", "aZ09"); + $projectField = GETPOST('projectfield', 'aZ09') ? GETPOST('projectfield', 'aZ09') : 'fk_projet'; $elementselectid = GETPOST("elementselect", "int"); $result = $object->remove_element($tablename, $elementselectid, $projectField); @@ -560,7 +557,7 @@ $showdatefilter=0; if (! $showdatefilter) { print '
'; - print ''; + print ''; print ''; print ''; print ''; @@ -591,7 +588,7 @@ if (!empty($conf->stock->enabled)) $langs->load('stocks'); print load_fiche_titre($langs->trans("Profit"), '', 'title_accountancy'); -print ''; +print '
'; print ''; print ''; print ''; @@ -783,7 +780,7 @@ foreach ($listofreferent as $key => $value) if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, $exclude_select_element)) { $selectList=$formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300', -2, !empty($project_field)?$project_field:'fk_projet'); - if (! $selectList || ($selectList<0)) + if ($selectList<0) { setEventMessages($formproject->error, $formproject->errors, 'errors'); } @@ -791,7 +788,7 @@ foreach ($listofreferent as $key => $value) { // Define form with the combo list of elements to link $addform.='
'; - $addform.=''; + $addform.=''; $addform.=''; $addform.=''; $addform.=''; @@ -818,7 +815,7 @@ foreach ($listofreferent as $key => $value) print load_fiche_titre($langs->trans($title), $addform, ''); print "\n".''."\n"; - print '
'.$langs->trans("Element").''.$langs->trans("Number").'
'; + print '
'; print ''; // Remove link column @@ -865,8 +862,8 @@ foreach ($listofreferent as $key => $value) if (canApplySubtotalOn($tablename)) { - // Sort - $elementarray = sortElementsByClientName($elementarray); + // Sort + $elementarray = sortElementsByClientName($elementarray); } $num=count($elementarray); @@ -918,7 +915,7 @@ foreach ($listofreferent as $key => $value) { if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true { - print ''; + print ''; print img_picto($langs->trans('Unlink'), 'unlink'); print ''; } @@ -1079,9 +1076,9 @@ foreach ($listofreferent as $key => $value) if ($othermessage) print $othermessage; if (isset($total_ht_by_line)) { - if (! $qualifiedfortotal) print ''; - print price($total_ht_by_line); - if (! $qualifiedfortotal) print ''; + if (! $qualifiedfortotal) print ''; + print price($total_ht_by_line); + if (! $qualifiedfortotal) print ''; } if ($warning) print ' '.img_warning($warning); print ''; @@ -1126,9 +1123,9 @@ foreach ($listofreferent as $key => $value) if ($othermessage) print $othermessage; if (isset($total_ttc_by_line)) { - if (! $qualifiedfortotal) print ''; - print price($total_ttc_by_line); - if (! $qualifiedfortotal) print ''; + if (! $qualifiedfortotal) print ''; + print price($total_ttc_by_line); + if (! $qualifiedfortotal) print ''; } if ($warning) print ' '.img_warning($warning); print ''; diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 6dba419c68f..725d99fb673 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -46,7 +46,7 @@ if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($ob // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); // Load translation files required by the page @@ -260,7 +260,6 @@ $tasksarray=$task->getTasksArray(0, 0, ($object->id ? $object->id : $id), $socid if (count($tasksarray)>0) { - // Show Gant diagram from $taskarray using JSGantt $dateformat=$langs->trans("FormatDateShortJQuery"); // Used by include ganttchart.inc.php later @@ -378,6 +377,8 @@ if (count($tasksarray)>0) //var_dump($dateformatinput); //var_dump($dateformatinput2); + print '
'; + print '
'; print '
'."\n"; diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php index 618170607bd..8c92cabf363 100644 --- a/htdocs/projet/graph_opportunities.inc.php +++ b/htdocs/projet/graph_opportunities.inc.php @@ -35,11 +35,11 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $valsamount[$obj->opp_status]=$obj->opp_amount; $totalnb+=$obj->nb; if ($obj->opp_status) $totaloppnb+=$obj->nb; - if (! in_array($obj->code, array('WON', 'LOST'))) + if (! in_array($obj->code, array('WON', 'LOST'))) { - $totalamount+=$obj->opp_amount; - $ponderated_opp_amount+=$obj->ponderated_opp_amount; - } + $totalamount+=$obj->opp_amount; + $ponderated_opp_amount+=$obj->ponderated_opp_amount; + } } $total+=$row[0]; } @@ -50,26 +50,25 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $ponderated_opp_amount = $ponderated_opp_amount / 100; print '
'; - print '
'; + print '
'; print ''."\n"; $listofstatus=array_keys($listofoppstatus); foreach ($listofstatus as $status) { - $labelstatus = ''; + $labelStatus = ''; $code = dol_getIdFromCode($db, $status, 'c_lead_status', 'rowid', 'code'); - if ($code) $labelstatus = $langs->trans("OppStatus".$code); - if (empty($labelstatus)) $labelstatus=$listofopplabel[$status]; + if ($code) $labelStatus = $langs->trans("OppStatus".$code); + if (empty($labelStatus)) $labelStatus=$listofopplabel[$status]; - //$labelstatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')'; - //$labelstatus .= ' - '.price2num($listofoppstatus[$status]).'%'; + //$labelStatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')'; + //$labelStatus .= ' - '.price2num($listofoppstatus[$status]).'%'; - $dataseries[]=array($labelstatus, (isset($valsamount[$status])?(float) $valsamount[$status]:0)); + $dataseries[]=array($labelStatus, (isset($valsamount[$status])?(float) $valsamount[$status]:0)); if (! $conf->use_javascript_ajax) { - print ''; - print ''; + print ''; print ''; print "\n"; } diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 27f41935910..15c98b4d1fc 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -45,7 +45,7 @@ if ($search_project_user == $user->id) $mine = 1; // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if (!$user->rights->projet->lire) accessforbidden(); $sortfield = GETPOST("sortfield", 'alpha'); @@ -139,18 +139,20 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print ''; print ''; + print '
'; print '
'.$langs->trans("Statistics").' - '.$langs->trans("OpportunitiesStatusForOpenedProjects").'
'.$labelstatus.''.$labelStatus.''.price((isset($valsamount[$status])?(float) $valsamount[$status]:0), 0, '', 1, -1, -1, $conf->currency).'
'; $i=0; foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''; - print ''; + print ''; print ''; if ($i == 0) print ''; print ''; $i++; } print '
'.$langs->trans("Search").'
'; + print '
'; print ''; print '
'; } @@ -169,7 +171,7 @@ print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppst print '
'; -// Last modified projects +// Latest modified projects $sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.tms as datem,"; $sql.= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; @@ -184,7 +186,7 @@ $resql=$db->query($sql); if ($resql) { print '
'; - print ''; + print '
'; print ''; print ''; @@ -195,7 +197,6 @@ if ($resql) $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; @@ -242,7 +243,7 @@ if ($resql) } print ''; print ''; - print ''; + print ''; print ''; $i++; } @@ -257,7 +258,7 @@ $companystatic=new Societe($db); // We need a clean new object for next loop // Open project per thirdparty print '
'; -print '
'.$langs->trans("LatestModifiedProjects", $max).'
'.dol_print_date($db->jdate($obj->datem), 'day').''.$projectstatic->LibStatut($obj->fk_statut, 5).''.$projectstatic->LibStatut($obj->fk_statut, 3).'
'; +print '
'; print ''; print_liste_field_titre("OpenedProjectsByThirdparties", $_SERVER["PHP_SELF"], "s.nom", "", "", '', $sortfield, $sortorder); print_liste_field_titre("NbOfProjects", "", "", "", "", '', $sortfield, $sortorder, 'right '); diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index 207bd245d08..ff361e75d3d 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -62,7 +62,7 @@ $search_agenda_label=GETPOST('search_agenda_label'); // Security check $id = GETPOST("id", 'int'); $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result=restrictedArea($user, 'projet', $id, ''); if (!$user->rights->projet->lire) accessforbidden(); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 59d727c5027..61a96af9f58 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -48,7 +48,7 @@ $title = $langs->trans("Projects"); // Security check $socid = (is_numeric($_GET["socid"]) ? $_GET["socid"] : 0 ); -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if ($socid > 0) { $soc = new Societe($db); @@ -76,7 +76,6 @@ $search_categ=GETPOST("search_categ", 'alpha'); $search_ref=GETPOST("search_ref", 'alpha'); $search_label=GETPOST("search_label", 'alpha'); $search_societe=GETPOST("search_societe", 'alpha'); -$search_year=GETPOST("search_year", 'int'); $search_status=GETPOST("search_status", 'int'); $search_opp_status=GETPOST("search_opp_status", 'alpha'); $search_opp_percent=GETPOST("search_opp_percent", 'alpha'); @@ -141,13 +140,16 @@ $arrayfields=array( 'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); @@ -175,7 +177,6 @@ if (empty($reshook)) $search_ref=""; $search_label=""; $search_societe=""; - $search_year=""; $search_status=-1; $search_opp_status=-1; $search_opp_amount=''; @@ -201,8 +202,8 @@ if (empty($reshook)) // Mass actions $objectclass='Project'; $objectlabel='Project'; - $permtoread = $user->rights->projet->lire; - $permtodelete = $user->rights->projet->supprimer; + $permissiontoread = $user->rights->projet->lire; + $permissiontodelete = $user->rights->projet->supprimer; $uploaddir = $conf->projet->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -293,8 +294,10 @@ $sql.= ", s.rowid as socid, s.nom as name, s.email"; $sql.= ", cls.code as opp_status_code"; // We'll need these fields in order to filter by categ if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_project"; -// Add fields for extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +// Add fields from extrafields +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -831,11 +834,11 @@ while ($i < min($num, $limit)) if (strcmp($obj->opp_amount, '')) { print price($obj->opp_amount, 1, $langs, 1, -1, -1, ''); - $totalarray['totalopp'] += $obj->opp_amount; + $totalarray['val']['p.opp_amount'] += $obj->opp_amount; } print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totaloppfield']=$totalarray['nbfield']; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='p.opp_amount'; } // Opp percent if (! empty($arrayfields['p.opp_percent']['checked'])) @@ -852,11 +855,11 @@ while ($i < min($num, $limit)) if ($obj->budget_amount != '') { print price($obj->budget_amount, 1, $langs, 1, -1, -1); - $totalarray['totalbudget'] += $obj->budget_amount; + $totalarray['val']['p.budget_amount'] += $obj->budget_amount; } print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalbudgetfield']=$totalarray['nbfield']; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='p.budget_amount'; } // Usage opportunity if (! empty($arrayfields['p.usage_opportunity']['checked'])) @@ -937,24 +940,7 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['totaloppfield']) || isset($totalarray['totalbudgetfield'])) -{ - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totaloppfield'] == $i) print ''; - elseif ($totalarray['totalbudgetfield'] == $i) print ''; - else print ''; - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index ef324bb63bb..73c9d39d64d 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -43,7 +43,7 @@ if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($ob // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); $permissionnote=$user->rights->projet->creer; // Used by the include of actions_setnotes.inc.php diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index 9353f968116..84f4a7c14a3 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -38,10 +38,10 @@ $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); $userid=GETPOST('userid', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $nowyear=strftime("%Y", dol_now()); $year = GETPOST('year')>0?GETPOST('year'):$nowyear; @@ -108,7 +108,7 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) unset($data1); if ($nocolor) -$px->SetDataColor(array ( + $px->SetDataColor(array ( array ( 220, 220, @@ -130,9 +130,9 @@ $px->SetDataColor(array ( )); $px->SetTitle($langs->trans('OpportunitiesStatusForProjects')); $result=$px->draw($filenamenb, $fileurlnb); - if ($result<0) { - setEventMessages($px->error, null, 'errors'); - } + if ($result<0) { + setEventMessages($px->error, null, 'errors'); + } } else { setEventMessages(null, $mesgs, 'errors'); } @@ -273,7 +273,7 @@ print '
'; print '
'; -print '
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalopp'], 1, $langs, 1, -1, -1).''.price($totalarray['totalbudget'], 1, $langs, 1, -1, -1).'
'; +print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -296,7 +296,7 @@ print ''; print '

'; print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -346,7 +346,7 @@ print ''; print '
'; -$stringtoshow.= '
'.$langs->trans("Year").''.$langs->trans("NbOfProjects").'
- - @@ -150,30 +152,28 @@ if ($conf->global->TAKEPOS_CUSTOM_RECEIPT && $conf->global->TAKEPOS_SHOW_CUSTOME -global->TAKEPOS_TICKET_VAT_GROUPPED):?> -global->TAKEPOS_TICKET_VAT_GROUPPED) { $vat_groups = array(); foreach ($object->lines as $line) { - if(!array_key_exists($line->tva_tx, $vat_groups)){ + if(!array_key_exists($line->tva_tx, $vat_groups)) { $vat_groups[$line->tva_tx] = 0; } $vat_groups[$line->tva_tx] += $line->total_tva; } - foreach($vat_groups as $key => $val){ - ?> + foreach($vat_groups as $key => $val) { + ?> - - +} else { ?> - + diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index c49479c7ce1..8966c575f9f 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -63,7 +63,7 @@ if ($conf->browser->layout == 'phone') if ($_SESSION["takeposterminal"]!="" && $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT==1) { $_SESSION["basiclayout"]=1; - header("Location: invoice.php?mobilepage=invoice"); + header("Location: phone.php?mobilepage=invoice"); exit; } } @@ -254,7 +254,7 @@ function LoadProducts(position, issubcat) { idata=0; //product data counter $.getJSON('/takepos/ajax/ajax.php?action=getProducts&category='+currentcat, function(data) { console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs"); - + console.log(data); while (ishow < maxproduct) { //console.log("ishow"+ishow+" idata="+idata); console.log(data[idata]); @@ -407,7 +407,7 @@ function Refresh() { function New() { // If we go here,it means $conf->global->TAKEPOS_BAR_RESTAURANT is not defined console.log("New with place = , js place="+place); - var r = confirm(' 0 ? $langs->trans("ConfirmDeletionOfThisPOSSale") : $langs->trans("ConfirmDiscardOfThisPOSSale")); ?>'); + var r = confirm(' 0 ? $langs->transnoentitiesnoconv("ConfirmDeletionOfThisPOSSale") : $langs->transnoentitiesnoconv("ConfirmDiscardOfThisPOSSale")); ?>'); if (r == true) { $("#poslines").load("invoice.php?action=delete&place="+place, function() { //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); @@ -419,7 +419,7 @@ function New() { function Search2() { console.log("Search2 Call ajax search to replace products"); pageproducts=0; - jQuery(".catwatermark").hide(); + jQuery(".wrapper2 .catwatermark").hide(); $.getJSON('/takepos/ajax/ajax.php?action=search&term='+$('#search').val(), function(data) { for (i = 0; i < ; i++) { if (typeof (data[i]) == "undefined"){ @@ -539,10 +539,18 @@ function TakeposPrintingTemp(){ function OpenDrawer(){ console.log("OpenDrawer"); $.ajax({ - type: "POST", - url: 'http://global->TAKEPOS_PRINT_SERVER;?>:8111/print', - data: "opendrawer" - }); + type: "POST", + url: 'http://global->TAKEPOS_PRINT_SERVER;?>:8111/print', + data: "opendrawer" + }); +} + +function DolibarrOpenDrawer() { + console.log("DolibarrOpenDrawer"); + $.ajax({ + type: "GET", + url: "", + }); } function MoreActions(totalactions){ @@ -562,23 +570,23 @@ function MoreActions(totalactions){ } } +// Popup to select the terminal to use function TerminalsDialog() { jQuery("#dialog-info").dialog({ resizable: false, - height:220, - width:400, + height: global->TAKEPOS_NUM_TERMINALS / 3 * 20); ?>, + width: dol_optimize_smallscreen ? 316 : 400); ?>, modal: true, buttons: { - Terminal1: function() { + 'trans("Terminal")) ?> 1': function() { location.href='takepos.php?setterminal=1'; } global->TAKEPOS_NUM_TERMINALS; $i++) { - print " - , - Terminal".$i.": function() { + print ", + '".dol_escape_js($langs->trans("Terminal"))." ".$i."': function() { location.href='takepos.php?setterminal=".$i."'; } "; @@ -701,8 +709,11 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) //add temp ticket button if ($conf->global->TAKEPOS_BAR_RESTAURANT) { - if ($conf->global->TAKEPOSCONNECTOR) $menus[$r++]=array('title'=>'
'.$langs->trans("Receipt").'
','action'=>'TakeposPrinting(placeid);'); - else $menus[$r++]=array('title'=>'
'.$langs->trans("Receipt").'
','action'=>'Print(placeid);'); + if ($conf->global->TAKEPOSCONNECTOR) { + $menus[$r++]=array('title'=>'
'.$langs->trans("Receipt").'
','action'=>'TakeposPrinting(placeid);'); + } else { + $menus[$r++]=array('title'=>'
'.$langs->trans("Receipt").'
','action'=>'Print(placeid);'); + } } if ($conf->global->TAKEPOSCONNECTOR && $conf->global->TAKEPOS_ORDER_NOTES==1) { @@ -713,6 +724,12 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) if ($conf->global->TAKEPOSCONNECTOR) { $menus[$r++]=array('title'=>'
'.$langs->trans("DOL_OPEN_DRAWER").'
', 'action'=>'OpenDrawer();'); } +if ($conf->global->TAKEPOS_DOLIBARR_PRINTER) { + $menus[$r++] = array( + 'title' => '
'.$langs->trans("DOL_OPEN_DRAWER").'
', + 'action' => 'DolibarrOpenDrawer();', + ); +} $hookmanager->initHooks(array('takeposfrontend')); $reshook=$hookmanager->executeHooks('ActionButtons'); @@ -747,7 +764,7 @@ $menus[$r++]=array('title'=>'< print ' '; print ''.img_picto('', 'searchclear').''; print ''; -?> + ?> @@ -759,7 +776,7 @@ $menus[$r++]=array('title'=>'< $count=0; while ($count < $MAXCATEG) { - ?> + ?>
id="catdiv"> '<
+
- @@ -794,7 +811,7 @@ $menus[$r++]=array('title'=>'< $count=0; while ($count < $MAXPRODUCT) { - ?> + ?>
onclick="MoreProducts('less');" onclick="MoreProducts('more');" > '<
+
- diff --git a/htdocs/theme/common/dolibarr_logo_256x256.png b/htdocs/theme/common/dolibarr_logo_256x256.png new file mode 100644 index 00000000000..970f841001b Binary files /dev/null and b/htdocs/theme/common/dolibarr_logo_256x256.png differ diff --git a/htdocs/theme/dolibarr_logo_squarred_alpha.png b/htdocs/theme/dolibarr_logo_squarred_alpha.png new file mode 100644 index 00000000000..06e69ad8b7b Binary files /dev/null and b/htdocs/theme/dolibarr_logo_squarred_alpha.png differ diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php index 0f635941a8e..75dcde0c2e4 100644 --- a/htdocs/theme/eldy/badges.inc.php +++ b/htdocs/theme/eldy/badges.inc.php @@ -22,6 +22,11 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> box-sizing: border-box; } +.badge-status { + font-size: 1em; + padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */ +} + .badge-pill, .tabs .badge { padding-right: .5em; padding-left: .5em; @@ -31,15 +36,15 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> .badge-dot { padding: 0; border-radius: 50%; - padding: 0.25rem; - vertical-align: middle; + padding: 0.45em; + vertical-align: text-top; } a.badge:focus, a.badge:hover { text-decoration: none; } -.liste_titre .badge { +.liste_titre .badge:not(.nochangebackground) { background-color: ; color: #fff; } @@ -168,10 +173,12 @@ a.badge-dark:focus, a.badge-dark:hover { background-color: ; } + /* -* STATUS BADGES -*/ - div.divButAction { margin-bottom: 1.4em; } -div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused { +div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete, +div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete { margin-bottom: 1.4em !important; } div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused { @@ -61,7 +62,8 @@ span.butAction, span.butActionDelete { cursor: pointer; } -.tableforfieldcreate a.butActionNew>span.fa-plus-circle, a.butActionNew>span.fa-plus-circle:hover, +.tableforfieldcreate a.butActionNew>span.fa-plus-circle, .tableforfieldcreate a.butActionNew>span.fa-plus-circle:hover, +.tableforfieldedit a.butActionNew>span.fa-plus-circle, .tableforfieldedit a.butActionNew>span.fa-plus-circle:hover, span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover, a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover, span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover, @@ -167,10 +169,9 @@ TITLE BUTTON .btnTitle, a.btnTitle { display: inline-block; - padding: 6px 12px; - font-size: 14px + padding: 4px 12px 4px 12px; font-weight: 400; - line-height: 1.4; + /* line-height: 1; */ text-align: center; white-space: nowrap; vertical-align: middle; @@ -192,6 +193,7 @@ TITLE BUTTON font-size: 12px; font-weight: 300; background-color: #fbfbfb; + border: 1px solid #fff; } .btnTitle > .btnTitle-icon{ @@ -203,12 +205,13 @@ TITLE BUTTON } .btnTitle:hover, a.btnTitle:hover { + border: 1px solid #bbb; border-radius: 3px; position: relative; margin: 0 0 0 10px; text-align: center; - color: #ffffff; - background-color: rgb(); + /* color: #ffffff; + background-color: rgb(); */ font-size: 12px; text-decoration: none; box-shadow: none; @@ -222,7 +225,7 @@ TITLE BUTTON } .btnTitle:hover .btnTitle-label{ - color: #ffffff; + /* color: #ffffff; */ } .btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{ @@ -243,9 +246,37 @@ div.pagination li:first-child a.btnTitle{ color: #aaa; } +/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */ +@media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2) ? round($nbtopmenuentries * 69, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */ +{ + .btnTitle, a.btnTitle { + display: inline-block; + padding: 4px 4px 4px 4px; + min-width: unset; + } +} global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (! $user->admin)) { ?> .butActionRefused, .butActionNewRefused, .btnTitle.refused { display: none !important; } - + + +/* + * BTN LINK + */ + +.btn-link{ + margin-right: 5px; + border: 1px solid #ddd; + color: #333; + padding: 5px 10px; + border-radius:1em; + text-decoration: none !important; +} + +.btn-link:hover{ + background-color: #ddd; + border: 1px solid #ddd; +} diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 4ffb781a33b..30643b0076f 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -2,7 +2,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> /*
'; +$stringtoshow.= '
'; if ($mesg) { print $mesg; } else { $stringtoshow.= $px1->show(); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 3d4077790c7..f16a9070325 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -66,8 +66,7 @@ $search_progressdeclare=GETPOST('search_progressdeclare'); $object = new Project($db); $taskstatic = new Task($db); -$extrafields_project = new ExtraFields($db); -$extrafields_task = new ExtraFields($db); +$extrafields = new ExtraFields($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); @@ -75,13 +74,13 @@ if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($ob if ($id > 0 || ! empty($ref)) { // fetch optionals attributes and labels - $extrafields_project->fetch_name_optionals_label($object->table_element); + $extrafields->fetch_name_optionals_label($object->table_element); } -$extrafields_task->fetch_name_optionals_label($taskstatic->table_element); +$extrafields->fetch_name_optionals_label($taskstatic->table_element); // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); $diroutputmassaction=$conf->projet->dir_output . '/tasks/temp/massgeneration/'.$user->id; @@ -115,14 +114,17 @@ $arrayfields=array( 't.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), //'t.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); -// Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +// Extra fields project +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); /* @@ -161,8 +163,8 @@ if (empty($reshook)) // Mass actions $objectclass='Task'; $objectlabel='Tasks'; - $permtoread = $user->rights->projet->lire; - $permtodelete = $user->rights->projet->supprimer; + $permissiontoread = $user->rights->projet->lire; + $permissiontodelete = $user->rights->projet->supprimer; $uploaddir = $conf->projet->dir_output.'/tasks'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -260,8 +262,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) $task->progress = $progress; // Fill array 'array_options' with data from add form - $extrafields->fetch_name_optionals_label($task->table_element); - $ret = $extrafields_task->setOptionalsFromPost(null, $task); + $ret = $extrafields->setOptionalsFromPost(null, $task); $taskid = $task->create($user); @@ -604,9 +605,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $taskstatic, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields_task->attribute_label)) + if (empty($reshook) && ! empty($extrafields[$taskstatic->table_element]['label'])) { - print $taskstatic->showOptionals($extrafields_task, 'edit'); // Do not use $object here that is object of project + print $taskstatic->showOptionals($extrafields, 'edit'); // Do not use $object here that is object of project but use $taskstatic } print '
'; @@ -635,17 +636,19 @@ elseif ($id > 0 || ! empty($ref)) $arrayfields['t.task_date_start']=array('label'=>$langs->trans("DateStart"), 'checked'=>1); $arrayfields['t.task_date_end']=array('label'=>$langs->trans("DateEnd"), 'checked'=>1); // Extra fields - if (is_array($extrafields_task->attribute_label) && count($extrafields_task->attribute_label)) + if (is_array($extrafields->attributes[$taskstatic->table_element]['label']) && count($extrafields->attributes[$taskstatic->table_element]['label']) > 0) { - foreach($extrafields_task->attribute_label as $key => $val) + foreach($extrafields->attributes[$taskstatic->table_element]['label'] as $key => $val) { - if (! empty($extrafields_task->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields_task->attribute_label[$key], 'checked'=>(($extrafields_task->attribute_list[$key]<0)?0:1), 'position'=>$extrafields_task->attribute_pos[$key], 'enabled'=>(abs($extrafields_task->attribute_list[$key])!=3 && $extrafields_task->attribute_perms[$key])); + if (! empty($extrafields->attributes[$taskstatic->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$taskstatic->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$taskstatic->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$taskstatic->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$taskstatic->table_element]['list'][$key])!=3 && $extrafields->attributes[$taskstatic->table_element]['perms'][$key])); } } + $arrayfields = dol_sort_array($arrayfields, 'position'); print '
'; -// Link to create task + // Link to create task $linktocreatetaskParam = array(); $linktocreatetaskUserRight = false; if ($user->rights->projet->all->creer || $user->rights->projet->creer) { @@ -787,8 +790,8 @@ elseif ($id > 0 || ! empty($ref)) print_liste_field_titre("TaskProgressSummary", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center '); if ($object->usage_bill_time) { - print_liste_field_titre("TimeToBill", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("TimeBilled", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("TimeToBill", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("TimeBilled", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right '); } if (! empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', '', $sortfield, $sortorder); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'width="80"', $sortfield, $sortorder, 'center maxwidthsearch '); diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index d9a251b3c53..565a459bf9e 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -49,7 +49,7 @@ $planned_workload=((GETPOST('planned_workloadhour', 'int')!='' || GETPOST('plann // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if (! $user->rights->projet->lire) accessforbidden(); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -148,7 +148,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print ''; + print '
'; // Usage print '
'; @@ -234,7 +234,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print ''; + print '
'; // Description print ''; + $htmlforlines.= '" onclick="LoadPlace(\'' . $row['label'] . '\')">'; $htmlforlines.= ''; $htmlforlines.= ''."\n"; } $htmlforlines.= '
'.$langs->trans("Description").''; @@ -306,7 +306,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print ''; + print '
'; // Nb comments print ''; + $htmlforlines.= '" onclick="AddProduct(\'' . $place . '\', ' . $row->id . ')">'; $htmlforlines.= ''; $htmlforlines.= ''."\n"; } $htmlforlines.= '
'.$langs->trans("NbComments").''; diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 2448088c6b1..c60f1baef99 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -42,7 +42,7 @@ $project_ref=GETPOST('project_ref', 'alpha'); // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. //$result = restrictedArea($user, 'projet', $id, 'projet_task'); if (! $user->rights->projet->lire) accessforbidden(); @@ -356,7 +356,7 @@ if ($id > 0 || ! empty($ref)) /* * Lines of contacts */ -/* + /* // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl')); foreach($dirtpls as $reldir) @@ -364,12 +364,12 @@ if ($id > 0 || ! empty($ref)) $res=@include dol_buildpath($reldir.'/contacts.tpl.php'); if ($res) break; } -*/ + */ /* * Add a new contact line */ - print ''; + print '
'; if ($action != 'editline' && $user->rights->projet->creer) { diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 52795f7a249..1944de13f61 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -46,7 +46,7 @@ $project_ref = GETPOST('project_ref', 'alpha'); // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. //$result=restrictedArea($user,'projet',$id,''); if (!$user->rights->projet->lire) accessforbidden(); diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 0b0a598167b..5215c82a062 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -83,7 +83,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if (!$user->rights->projet->lire) accessforbidden(); $diroutputmassaction=$conf->projet->dir_output . '/tasks/temp/massgeneration/'.$user->id; @@ -184,8 +184,8 @@ if (empty($reshook)) // Mass actions $objectclass='Task'; $objectlabel='Tasks'; - $permtoread = $user->rights->projet->lire; - $permtodelete = $user->rights->projet->supprimer; + $permissiontoread = $user->rights->projet->lire; + $permissiontodelete = $user->rights->projet->supprimer; $uploaddir = $conf->projet->dir_output.'/tasks'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -271,7 +271,9 @@ if (! empty($arrayfields['t.tobill']['checked']) || ! empty($arrayfields['t.bill $sql.=" , SUM(tt.task_duration * ".$db->ifsql("invoice_id IS NULL", "1", "0").") as tobill, SUM(tt.task_duration * ".$db->ifsql("invoice_id IS NULL", "0", "1").") as billed"; } // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -328,6 +330,7 @@ if (! empty($arrayfields['t.tobill']['checked']) || ! empty($arrayfields['t.bill // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); + } } $sql.= $db->order($sortfield, $sortorder); @@ -730,6 +733,8 @@ while ($i < min($num, $limit)) //else print '--:--'; print ''; if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.planned_workload'; + $totalarray['val']['t.planned_workload'] += $obj->planned_workload; if (! $i) $totalarray['totalplannedworkloadfield']=$totalarray['nbfield']; $totalarray['totalplannedworkload'] += $obj->planned_workload; } @@ -746,6 +751,8 @@ while ($i < min($num, $limit)) else print ''; print ''; if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.duration_effective'; + $totalarray['val']['t.duration_effective'] += $obj->duration_effective; if (! $i) $totalarray['totaldurationeffectivefield']=$totalarray['nbfield']; $totalarray['totaldurationeffective'] += $obj->duration_effective; } @@ -772,8 +779,10 @@ while ($i < min($num, $limit)) } print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalprogress_declaredfield']=$totalarray['nbfield']; - $totalarray['totaldurationdeclared'] += $obj->planned_workload * $obj->progress / 100; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.progress'; + $totalarray['val']['t.progress'] += ($obj->planned_workload * $obj->progress / 100); + if (! $i) $totalarray['totalprogress_declaredfield']=$totalarray['nbfield']; + $totalarray['totaldurationdeclared'] += $obj->planned_workload * $obj->progress / 100; } // Progress summary if (! empty($arrayfields['t.progress_summary']['checked'])) @@ -784,7 +793,7 @@ while ($i < min($num, $limit)) } print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalprogress_summary']=$totalarray['nbfield']; + if (! $i) $totalarray['totalprogress_summary']=$totalarray['nbfield']; } // Time not billed if (! empty($arrayfields['t.tobill']['checked'])) @@ -793,6 +802,7 @@ while ($i < min($num, $limit)) if ($obj->usage_bill_time) { print convertSecondToTime($obj->tobill, 'allhourmin'); + $totalarray['val']['t.tobill'] += $obj->tobill; $totalarray['totaltobill'] += $obj->tobill; } else @@ -801,6 +811,7 @@ while ($i < min($num, $limit)) } print ''; if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.tobill'; if (! $i) $totalarray['totaltobillfield']=$totalarray['nbfield']; } // Time billed @@ -810,6 +821,7 @@ while ($i < min($num, $limit)) if ($obj->usage_bill_time) { print convertSecondToTime($obj->billed, 'allhourmin'); + $totalarray['val']['t.billed'] += $obj->billed; $totalarray['totalbilled'] += $obj->billed; } else @@ -818,6 +830,7 @@ while ($i < min($num, $limit)) } print ''; if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.billed'; if (! $i) $totalarray['totalbilledfield']=$totalarray['nbfield']; } // Extra fields @@ -867,8 +880,9 @@ while ($i < min($num, $limit)) $i++; } // Show total line +//include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['totalplannedworkloadfield']) || isset($totalarray['totalprogress_calculatedfield']) - || isset($totalarray['totaltobill']) || isset($totalarray['totalbilled'])) + || isset($totalarray['totaltobill']) || isset($totalarray['totalbilled'])) { print ''; $i=0; @@ -886,7 +900,7 @@ if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['tota elseif ($totalarray['totalprogress_declaredfield'] == $i) print ''; elseif ($totalarray['totaltobillfield'] == $i) print ''; elseif ($totalarray['totalbilledfield'] == $i) print ''; - else print ''; + else print ''; } print ''; } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index de2707bf734..42dbaa48cc2 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -40,7 +40,7 @@ $project_ref = GETPOST('project_ref', 'alpha'); // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if (!$user->rights->projet->lire) accessforbidden(); //$result = restrictedArea($user, 'projet', $id, '', 'task'); // TODO ameliorer la verification diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php index c94a412be9c..18091baabe9 100644 --- a/htdocs/projet/tasks/stats/index.php +++ b/htdocs/projet/tasks/stats/index.php @@ -38,10 +38,10 @@ $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); $userid=GETPOST('userid', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $nowyear=strftime("%Y", dol_now()); $year = GETPOST('year')>0?GETPOST('year'):$nowyear; @@ -140,7 +140,7 @@ print '
'; print '
'; -print '
'.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationdeclared'] / $totalarray['totalplannedworkload'], 2).' %' : '').''.convertSecondToTime($totalarray['totaltobill'], $plannedworkloadoutputformat).''.convertSecondToTime($totalarray['totalbilled'], $plannedworkloadoutputformat).'
'; +print '
'; print ''; // Company /*print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -165,7 +165,7 @@ print '

'; print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -197,7 +197,7 @@ print ''; print '
'; -$stringtoshow.= '
'.$langs->trans("Year").''.$langs->trans("NbOfTasks").'
'; +$stringtoshow.= '
'; if ($mesg) { print $mesg; } else { $stringtoshow.= $px1->show(); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index d9730946377..50b4ddd168a 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -48,7 +48,7 @@ $planned_workload=((GETPOST('planned_workloadhour', 'int')!='' || GETPOST('plann // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if (! $user->rights->projet->lire) accessforbidden(); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -321,7 +321,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print ''; + print '
'; // Description print '
'.$langs->trans("Description").''; @@ -388,7 +388,7 @@ if ($id > 0 || ! empty($ref)) dol_fiche_head($head, 'task_task', $langs->trans("Task"), 0, 'projecttask', 0, '', ''); - print ''; + print '
'; // Ref print ''; @@ -509,7 +509,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print '
'.$langs->trans("Ref").'
'; + print '
'; // Task parent print '
'.$langs->trans("ChildOfTask").''; @@ -550,7 +550,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print ''; + print '
'; // Progress declared print '"; // Note Private - if ($object->note_private && ! $user->societe_id) + if ($object->note_private && ! $user->socid) { print ''; print ''; @@ -846,7 +844,7 @@ if ($action == 'create') print ' x '; print ' x '; print ' '; - $text=$formproduct->selectMeasuringUnits("size_units", "size"); + $text=$formproduct->selectMeasuringUnits("size_units", "size", GETPOST('size_units', 'int'), 0, 2); $htmltext=$langs->trans("KeepEmptyForAutoCalculation"); print $form->textwithpicto($text, $htmltext); print ''; @@ -870,17 +868,16 @@ if ($action == 'create') $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $recept, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) { + // Here $object can be of an object Order + $extrafields->fetch_name_optionals_label($object->table_element); + if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element]['label'])) { // copy from order - $orderExtrafields = new Extrafields($db); - $orderExtrafieldLabels = $orderExtrafields->fetch_name_optionals_label($object->table_element); - if ($object->fetch_optionals($object->id, $orderExtrafieldLabels) > 0) { + if ($object->fetch_optionals() > 0) { $recept->array_options = array_merge($recept->array_options, $object->array_options); } print $object->showOptionals($extrafields, 'edit'); } - // Incoterms if (!empty($conf->incoterm->enabled)) { @@ -952,30 +949,27 @@ if ($action == 'create') print ''; - print '
'; - - print '
'.$langs->trans("ProgressDeclared").''; @@ -616,7 +616,7 @@ if ($id > 0 || ! empty($ref)) { if (! $object->hasChildren() && ! $object->hasTimeSpent()) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 2eb6697be82..fa7efdfa2a5 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -68,7 +68,7 @@ $search_valuebilled=GETPOST('search_valuebilled', 'int'); // Security check $socid=0; -//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. if (!$user->rights->projet->lire) accessforbidden(); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -88,11 +88,9 @@ $hookmanager->initHooks(array('projecttasktime','globalcard')); $object = new Task($db); $projectstatic = new Project($db); -$extrafields_project = new ExtraFields($db); -$extrafields_task = new ExtraFields($db); - -$extrafields_project->fetch_name_optionals_label($projectstatic->table_element); -$extrafields_task->fetch_name_optionals_label($object->table_element); +$extrafields = new ExtraFields($db); +$extrafields->fetch_name_optionals_label($projectstatic->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); /* @@ -761,7 +759,6 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('tasktimelist')); - $extrafields = new ExtraFields($db); // Definition of fields for list $arrayfields=array(); @@ -777,13 +774,15 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $arrayfields['value'] =array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>(empty($conf->salaries->enabled)?0:1)); $arrayfields['valuebilled'] =array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>(((! empty($conf->global->PROJECT_HIDE_TASKS) || empty($conf->global->PROJECT_BILL_TIME_SPENT))?0:1) && $projectstatic->usage_bill_time)); // Extra fields - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } + $arrayfields = dol_sort_array($arrayfields, 'position'); $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); @@ -975,7 +974,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) if (! empty($id)) print ''; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print ''; + print '
'; print ''; print ''; @@ -1283,6 +1282,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) } print ''; if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='t.task_duration'; + $totalarray['val']['t.task_duration'] += $task_time->task_duration; if (! $i) $totalarray['totaldurationfield']=$totalarray['nbfield']; $totalarray['totalduration'] += $task_time->task_duration; } @@ -1295,11 +1296,13 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print price($value, 1, $langs, 1, -1, -1, $conf->currency); print ''; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalvaluefield']=$totalarray['nbfield']; - $totalarray['totalvalue'] += $value; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='value'; + $totalarray['val']['value'] += $value; + if (! $i) $totalarray['totalvaluefield']=$totalarray['nbfield']; + $totalarray['totalvalue'] += $value; } - // Invoiced - Value billed + // Invoiced if (! empty($arrayfields['valuebilled']['checked'])) { print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totaldurationfield'] == $i) print ''; - elseif ($totalarray['totalvaluefield'] == $i) print ''; - //elseif ($totalarray['totalvaluebilledfield'] == $i) print ''; - else print ''; - } - print ''; + print ''; + $i=0; + while ($i < $totalarray['nbfield']) + { + $i++; + if ($i == 1) + { + if ($num < $limit && empty($offset)) print ''; + else print ''; + } + elseif ($totalarray['totaldurationfield'] == $i) print ''; + elseif ($totalarray['totalvaluefield'] == $i) print ''; + //elseif ($totalarray['totalvaluebilledfield'] == $i) print ''; + else print ''; + } + print ''; } - if (! count($tasks)) { $totalnboffields = 1; diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index d2f11419ef9..9b76f2b90b3 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -220,7 +220,7 @@ if ($format == 'rss') $result=readfile($outputfile); if (! $result) print 'File '.$outputfile.' was empty.'; - // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); + // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); exit; } else diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 84a703b6690..a77300fc209 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -71,7 +71,6 @@ if ($resql) $num = $db->num_rows($resql); if ($num) { - print "
'.$langs->trans("Date").''; // invoice_id and invoice_line_id @@ -1688,27 +1691,27 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) } // Show total line + //include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; if (isset($totalarray['totaldurationfield']) || isset($totalarray['totalvaluefield'])) { - print '
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.convertSecondToTime($totalarray['totalduration'], 'allhourmin').''.price($totalarray['totalvalue']).''.price($totalarray['totalvaluebilled']).'
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.convertSecondToTime($totalarray['totalduration'], 'allhourmin').''.price($totalarray['totalvalue']).''.price($totalarray['totalvaluebilled']).'
"; print ''; diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index adb6aa03c8d..48cdd1508e8 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -115,7 +115,7 @@ if (! empty($tag) && ($unsuscrib=='1')) */ // Update status communication of email (new usage) - $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe (date_creat, entity, email) VALUES ('".$db->idate(dol_now())."', ".$obj->entity.", '".$obj->email."')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe (date_creat, entity, email) VALUES ('".$db->idate(dol_now())."', ".$db->escape($obj->entity).", '".$db->escape($obj->email)."')"; $resql=$db->query($sql); //if (! $resql) dol_print_error($db); No test on errors, may fail if already unsubscribed diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5fd655f73ac..7cd935c4d2c 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -560,7 +560,6 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) else { $adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE); - //print $adht->libelle; print ''; } // Moral/Physic attribute diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 5dce7eed5c6..14f19ef94b5 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -125,7 +125,7 @@ if ($result) $param="&statut=$statut&sortorder=$sortorder&sortfield=$sortfield"; print_barre_liste($langs->trans("ListOfValidatedPublicMembers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, 0, ''); - print '
'; + print '
'; print ''; print ''; diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index c5317eba00f..6a0748f8f84 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -270,8 +270,6 @@ if ($action != 'dosign') { if ($found && ! $error) // We are in a management option and no error { - - } else { diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index ac926f12112..a548e849c7a 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -294,7 +294,6 @@ print ''."\n"; //The survey has expired, users can't vote or do any action if (!$canbemodified) { - print '

'.$langs->trans('SurveyExpiredInfo').'

'; llxFooterSurvey(); diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 5b4547650f7..4a3d08f6602 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1725,6 +1725,7 @@ if ($action != 'dopayment') { // If STRIPE_PICTO_FOR_PAYMENT is 'cb' we show a picto of a crdit card instead of stripe print '
'; + print ''; print '
'; print ''.$langs->trans("CreditOrDebitCard").''; print '
'; @@ -1799,7 +1800,6 @@ print '
'; // Add more content on page for some services if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment mode { - // Stripe if (GETPOST('dopayment_stripe', 'alpha')) { @@ -1859,12 +1859,12 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment $service = 'StripeLive'; $servicestatus = 1; - if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha')) { $service = 'StripeTest'; $servicestatus = 0; } + $stripe = new Stripe($db); $stripeacc = $stripe->getStripeAccount($service); $stripecu = null; @@ -1872,49 +1872,47 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { - $paymentintent=$stripe->getPaymentIntent($amount, $currency, $tag, 'Stripe payment: '.$fulltag.(is_object($object)?' ref='.$object->ref:''), $object, $stripecu, $stripeacc, $servicestatus); + $noidempotency_key = (GETPOSTISSET('noidempotency') ? GETPOST('noidempotency', 'int') : 0); // By default noidempotency is unset, so we must use a different tag/ref for each payment. If set, we can pay several times the same tag/ref. + $paymentintent=$stripe->getPaymentIntent($amount, $currency, $tag, 'Stripe payment: '.$fulltag.(is_object($object)?' ref='.$object->ref:''), $object, $stripecu, $stripeacc, $servicestatus, 0, 'automatic', false, null, 0, $noidempotency_key); + // The paymentintnent has status 'requires_payment_method' (even if paymentintent was already payed) + //var_dump($paymentintent); if ($stripe->error) setEventMessages($stripe->error, null, 'errors'); } } //if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || ! empty($paymentintent)) //{ - print ' -
'.dolGetFirstLastname($langs->trans("Firstname"), $langs->trans("Lastname")).'
- '; + print '
'; + print ' + + -
'; - if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { - print '
'; - } + if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) + { + print '
'; + } - print ' -
+ print '
'; + print ''; - '; + if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) + { + print '
'; + } - if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { - print '
'; - } + print '
+ +
'; - print '
- -
+ print ' + +
'; - - + print '
'; + print ''; + print ''; -
- -
'; - - print ''; - print ''; - - print ' -
'; + print '
'; //} if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) @@ -2007,7 +2005,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment { print $e->getMessage(); } - ?> + ?> // Code for payment with option STRIPE_USE_NEW_CHECKOUT set // Create a Stripe client. @@ -2050,11 +2048,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment }); - global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { - ?> + ?> // Code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION set // Create a Stripe client. @@ -2154,11 +2152,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment } }); - + ?> // Old code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION off and STRIPE_USE_NEW_CHECKOUT off // Create a Stripe client. @@ -2210,7 +2208,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment global->STRIPE_USE_3DSECURE)) // Ask credit card directly, no 3DS test { - ?> + ?> /* Use token */ stripe.createToken(card).then(function(result) { if (result.error) { @@ -2222,11 +2220,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment stripeTokenHandler(result.token); } }); - + ?> /* Use 3DS source */ stripe.createSource(card).then(function(result) { if (result.error) { @@ -2238,7 +2236,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment stripeSourceHandler(result.source); } }); - }); @@ -2292,7 +2290,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment form.submit(); } - '; diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 71729422ad2..f634d49ebac 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -156,7 +156,6 @@ if ($event->type == 'payout.created') { if ($result > 0) { - $subject = $societeName.' - [NOTIFICATION] Stripe payout scheduled'; if (!empty($user->email)) { $sendto = dolGetFirstLastname($user->firstname, $user->lastname) . " <".$user->email.">"; @@ -279,15 +278,12 @@ elseif ($event->type == 'payout.paid') { } } elseif ($event->type == 'customer.source.created') { - //TODO: save customer's source } elseif ($event->type == 'customer.source.updated') { - //TODO: update customer's source } elseif ($event->type == 'customer.source.delete') { - //TODO: delete customer's source } elseif ($event->type == 'customer.deleted') { diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 71befc802ae..c0ce22d69ed 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -27,7 +27,6 @@ if (empty($usedolheader)) - Test page @@ -345,7 +344,6 @@ if (! empty($usedolheader)) { llxFooter(); } else { ?> - diff --git a/htdocs/public/theme/common/company.png b/htdocs/public/theme/common/company.png new file mode 100644 index 00000000000..b6abd4432af Binary files /dev/null and b/htdocs/public/theme/common/company.png differ diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 1af807aab7b..0bde25460e3 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -78,7 +78,6 @@ if (GETPOST('addfile', 'alpha') && ! GETPOST('add', 'alpha')) { // Remove file if (GETPOST('removedfile', 'alpha') && !GETPOST('add', 'alpha')) { - include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; // Set tmp directory @@ -349,7 +348,7 @@ llxHeaderTicket($langs->trans("CreateTicket"), "", 0, 0, $arrayofjs, $arrayofcss print '
'; if ($action != "infos_success") { - $formticket->withfromsocid = isset($socid) ? $socid : $user->societe_id; + $formticket->withfromsocid = isset($socid) ? $socid : $user->socid; $formticket->withtitletopic = 1; $formticket->withcompany = 0; $formticket->withusercreate = 1; diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 50b435fef26..9829aa03f7b 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -96,7 +96,6 @@ if ($action == "view_ticketlist") { $ret = $object->fetch('', '', $track_id); if ($ret && $object->id > 0) { - // vérifie si l'adresse email est bien dans les contacts du ticket $contacts = $object->liste_contact(-1, 'external'); foreach ($contacts as $contact) { diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index cba62da8cba..c641007ecf1 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -72,7 +72,7 @@ $line_id = GETPOST('lineid', 'int')?GETPOST('lineid', 'int'):''; // Security check $socid=''; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; if ($origin == 'reception') $result=restrictedArea($user, $origin, $id); else { @@ -102,7 +102,6 @@ $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($object->table_element); $extrafields->fetch_name_optionals_label($object->table_element_line); - // Load object. Make an object->fetch include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once @@ -216,7 +215,6 @@ if (empty($reshook)) // Create reception if ($action == 'add' && $user->rights->reception->creer) { - $error = 0; $predef = ''; @@ -562,12 +560,12 @@ if (empty($reshook)) { if ($lines[$i]->id == $line_id) { - // delete single warehouse line - $line->id = $line_id; - if (! $error && $line->delete($user) < 0) - { - $error++; - } + // delete single warehouse line + $line->id = $line_id; + if (! $error && $line->delete($user) < 0) + { + $error++; + } } unset($_POST["lineid"]); } @@ -822,7 +820,7 @@ if ($action == 'create') print "
'.$langs->trans("NotePrivate").''; @@ -835,7 +833,7 @@ if ($action == 'create') print '
'; print $langs->trans("Weight"); print ' '; - $text=$formproduct->selectMeasuringUnits("weight_units", "weight", GETPOST('weight_units', 'int')); + $text=$formproduct->selectMeasuringUnits("weight_units", "weight", GETPOST('weight_units', 'int'), 0, 2); $htmltext=$langs->trans("KeepEmptyForAutoCalculation"); print $form->textwithpicto($text, $htmltext); print '
'; - + print '
'; // Load receptions already done for same order $object->loadReceptions(); @@ -1116,59 +1110,57 @@ if ($action == 'create') $stock = + $product->stock_warehouse[$dispatchLines[$indiceAsked]['ent']]->real; // Convert to number $deliverableQty=$dispatchLines[$indiceAsked]['qty']; + // Quantity to send + print ''; - - // Quantity to send - print ''; - - // Stock - if (! empty($conf->stock->enabled)) + else { - print ''; + } + + if (!empty($conf->productbatch->enabled)) + { + if (!empty($product->status_batch)) + { + print ''; + print ''; + print ''; } - - if (!empty($conf->productbatch->enabled)) - { - if (!empty($product->status_batch)) - { - print ''; - print ''; - print ''; - } - else { - print ''; - } + else { + print ''; } - print "\n"; + } + print "\n"; } //Display lines extrafields @@ -1374,7 +1366,7 @@ elseif ($id || $ref) print '
'; print '
'; - print '
'; + if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + if (GETPOST('qtyl'.$indiceAsked, 'int')) $defaultqty=GETPOST('qtyl'.$indiceAsked, 'int'); + print ''; + print ''; + } + else print $langs->trans("NA"); + print ''; - if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) + // Stock + if (! empty($conf->stock->enabled)) + { + print ''; + if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Type of product need stock change ? { - if (GETPOST('qtyl'.$indiceAsked, 'int')) $defaultqty=GETPOST('qtyl'.$indiceAsked, 'int'); - print ''; - print ''; + // Show warehouse combo list + $ent = "entl".$indiceAsked; + $idl = "idl".$indiceAsked; + $tmpentrepot_id = is_numeric(GETPOST($ent, 'int'))?GETPOST($ent, 'int'):$warehouse_id; + if ($line->fk_product > 0) + { + print ''; + print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 0, 0, $line->fk_product, '', 1); + } } - else print $langs->trans("NA"); - print ''; - if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Type of product need stock change ? - { - // Show warehouse combo list - $ent = "entl".$indiceAsked; - $idl = "idl".$indiceAsked; - $tmpentrepot_id = is_numeric(GETPOST($ent, 'int'))?GETPOST($ent, 'int'):$warehouse_id; - if ($line->fk_product > 0) - { - print ''; - print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 0, 0, $line->fk_product, '', 1); - } - } - else - { - print $langs->trans("Service"); - } + print $langs->trans("Service"); + } + print ''; + print $form->selectDate($dispatchLines[$indiceAsked]['DLC'], 'dlc' . $indiceAsked, '', '', 1, ""); + print ''; + print $form->selectDate($dispatchLines[$indiceAsked]['DLUO'], 'dluo' . $indiceAsked, '', '', 1, ""); print ''; - print $form->selectDate($dispatchLines[$indiceAsked]['DLC'], 'dlc' . $indiceAsked, '', '', 1, ""); - print ''; - print $form->selectDate($dispatchLines[$indiceAsked]['DLUO'], 'dluo' . $indiceAsked, '', '', 1, ""); - print '
'; + print '
'; // Linked documents if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) @@ -1447,7 +1439,7 @@ elseif ($id || $ref) print ''; print ''; print ''; - print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units); + print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); print ' '; print ' '; print ''; @@ -1455,16 +1447,14 @@ elseif ($id || $ref) else { print $object->trueWeight; - print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units, "weight"):''; + print ($object->trueWeight && $object->weight_units!='')?' '.measuringUnitString(0, "weight", $object->weight_units):''; } // Calculated if ($totalWeight > 0) { if (!empty($object->trueWeight)) print ' ('.$langs->trans("SumOfProductWeights").': '; - //print $totalWeight.' '.measuring_units_string(0,"weight"); print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no'); - //if (empty($object->trueWeight)) print ' ('.$langs->trans("Calculated").')'; if (!empty($object->trueWeight)) print ')'; } print ''; @@ -1472,19 +1462,19 @@ elseif ($id || $ref) // Width print ''; // Height print ''; @@ -1500,7 +1490,7 @@ elseif ($id || $ref) // Depth print ''; // Volume @@ -1520,15 +1510,13 @@ elseif ($id || $ref) { if ($volumeUnit < 50) { - //print $calculatedVolume.' '.measuring_units_string($volumeUnit,"volume"); print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no'); } - else print $calculatedVolume.' '.measuring_units_string($volumeUnit, "volume"); + else print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); } if ($totalVolume > 0) { if ($calculatedVolume) print ' ('.$langs->trans("SumOfProductVolumes").': '; - //print $totalVolume.' '.measuring_units_string(0,"volume"); print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no'); //if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')'; if ($calculatedVolume) print ')'; @@ -1632,7 +1620,7 @@ elseif ($id || $ref) print '
'; print '
'; - print '
'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->reception->creer).''; print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->reception->creer); - print ($object->trueWidth && $object->width_units!='')?' '.measuring_units_string($object->width_units, "size"):''; + print ($object->trueWidth && $object->width_units!='')?' '.measuringUnitString(0, "size", $object->width_units):''; print '
'.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->rights->reception->creer).''; - if($action=='edittrueHeight') + if ($action=='edittrueHeight') { print '
'; print ''; print ''; print ''; print ''; - print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units); + print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2); print ' '; print ' '; print '
'; @@ -1492,7 +1482,7 @@ elseif ($id || $ref) else { print $object->trueHeight; - print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string($object->height_units, "size"):''; + print ($object->trueHeight && $object->height_units!='')?' '.measuringUnitString(0, "size", $object->height_units):''; } print '
'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->reception->creer).''; print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->reception->creer); - print ($object->trueDepth && $object->depth_units!='')?' '.measuring_units_string($object->depth_units, "size"):''; + print ($object->trueDepth && $object->depth_units!='')?' '.measuringUnitString(0, "size", $object->depth_units):''; print '
'; + print '
'; print ''; // # if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) @@ -1793,8 +1781,6 @@ elseif ($id || $ref) print ''; // Volume print ''; @@ -2033,7 +2019,7 @@ elseif ($id || $ref) * Boutons actions */ - if (($user->societe_id == 0) && ($action!='presend')) + if (($user->socid == 0) && ($action!='presend')) { print '
'; @@ -2041,7 +2027,6 @@ elseif ($id || $ref) $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { - if ($object->statut == Reception::STATUS_DRAFT && $num_prod > 0) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->reception->creer)) diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 3fee3376ebe..7fab05f0e6b 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -48,7 +48,11 @@ class Reception extends CommonObject public $table_element="reception"; public $table_element_line="commande_fournisseur_dispatch"; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - public $picto = 'reception'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'reception'; public $socid; public $ref_supplier; @@ -80,8 +84,14 @@ class Reception extends CommonObject * @var int */ public $date_reception; - public $date_creation; - public $date_valid; + + /** + * @var integer|string date_creation + */ + public $date_creation; + + + public $date_valid; public $meths; public $listmeths; // List of carriers @@ -110,6 +120,13 @@ class Reception extends CommonObject $this->statuts[0] = 'StatusReceptionDraft'; $this->statuts[1] = 'StatusReceptionValidated'; $this->statuts[2] = 'StatusReceptionProcessed'; + + // List of short language codes for status + $this->statutshorts = array(); + $this->statutshorts[-1] = 'StatusReceptionCanceledShort'; + $this->statutshorts[0] = 'StatusReceptionDraftShort'; + $this->statutshorts[1] = 'StatusReceptionValidatedShort'; + $this->statutshorts[2] = 'StatusReceptionProcessedShort'; } /** @@ -134,7 +151,6 @@ class Reception extends CommonObject $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/reception/"); // Load file with numbering class (if found) @@ -1137,45 +1153,23 @@ class Reception extends CommonObject /** * Return label of a status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { - // phpcs:enable - global $langs; + // phpcs:enable + global $langs; - if ($mode==0) - { - if ($statut==0) return $langs->trans($this->statuts[$statut]); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]); - } - elseif ($mode==1) - { - if ($statut==0) return $langs->trans('StatusReceptionDraftShort'); - elseif ($statut==1) return $langs->trans('StatusReceptionValidatedShort'); - elseif ($statut==2) return $langs->trans('StatusReceptionProcessedShort'); - } - elseif ($mode == 3) - { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return img_picto($langs->trans('StatusReceptionProcessed'), 'statut6'); - } - elseif ($mode == 4) - { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans('StatusReceptionProcessed'), 'statut6').' '.$langs->trans('StatusReceptionProcessed'); - } - elseif ($mode == 5) - { - if ($statut==0) return $langs->trans('StatusReceptionDraftShort').' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return $langs->trans('StatusReceptionValidatedShort').' '.img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return $langs->trans('StatusReceptionProcessedShort').' '.img_picto($langs->trans('StatusReceptionProcessedShort'), 'statut6'); - } + $labelStatus = $langs->trans($this->statuts[$status]); + $labelStatusShort = $langs->trans($this->statutshorts[$status]); + + $statusType = 'status'.$status; + if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } /** diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index c49eec5c82d..da074c420b5 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -44,7 +44,7 @@ $ref=GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'reception', $id, ''); $object = new Reception($db); diff --git a/htdocs/reception/index.php b/htdocs/reception/index.php index 17b5cd03c06..fb4967436e2 100644 --- a/htdocs/reception/index.php +++ b/htdocs/reception/index.php @@ -58,11 +58,12 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; - print '
'; - - $text=$lines[$i]->product->getNomUrl(1); $text.= ' - '.$label; $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($lines[$i]->product->description)); @@ -1960,13 +1946,13 @@ elseif ($id || $ref) // Weight print ''; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->product->weight*$lines[$i]->qty.' '.measuring_units_string($lines[$i]->product->weight_units, "weight"); + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->product->weight*$lines[$i]->qty.' '.measuringUnitString(0, "weight", $lines[$i]->product->weight_units); else print ' '; print ''; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->product->volume*$lines[$i]->qty.' '.measuring_units_string($lines[$i]->product->volume_units, "volume"); + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->product->volume*$lines[$i]->qty.' '.measuringUnitString(0, "volume", $lines[$i]->product->volume_units); else print ' '; print '
'; + print '
'; + print '
'; print ''; print ''; - print "
'.$langs->trans("Search").'
'; print $langs->trans("Reception").':

\n"; + print "

\n"; } /* @@ -93,7 +94,8 @@ if ($resql) $num = $db->num_rows($resql); if ($num) { - print ''; + print '
'; + print '
'; print ''; print ''; $i = 0; @@ -116,7 +118,7 @@ if ($resql) print ''; $i++; } - print "
'.$langs->trans("ReceptionsToValidate").'

"; + print "

"; } } @@ -143,7 +145,8 @@ if ($resql) $langs->load("orders"); $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; while ($i < $num) @@ -172,7 +175,7 @@ if ($resql) print ''; $i++; } - print "
'.$langs->trans("SuppliersOrdersToProcess").'

"; + print "

"; } } @@ -203,7 +206,8 @@ if ( $resql ) if ($num) { $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; while ($i < $num) @@ -231,7 +235,7 @@ if ( $resql ) print ''; $i++; } - print "
'.$langs->trans("SuppliersOrdersInProcess").'

"; + print "

"; } } else dol_print_error($db); @@ -263,7 +267,8 @@ if ($resql) if ($num) { $i = 0; - print ''; + print '
'; + print '
'; print ''; print ''; while ($i < $num) @@ -289,7 +294,7 @@ if ($resql) print ''; $i++; } - print "
'.$langs->trans("LastReceptions", $num).'

"; + print "

"; } $db->free($resql); } diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index 65fdf153dd4..989339590b3 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -34,10 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -$langs->load("receptions"); -$langs->load("deliveries"); -$langs->load('companies'); -$langs->load('bills'); +$langs->loadLangs(array("sendings", "receptions", "deliveries", 'companies', 'bills')); $socid=GETPOST('socid', 'int'); $massaction=GETPOST('massaction', 'alpha'); @@ -45,7 +42,7 @@ $toselect = GETPOST('toselect', 'array'); // Security check $receptionid = GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'reception', $receptionid, ''); $diroutputmassaction=$conf->reception->dir_output . '/temp/massgeneration/'.$user->id; @@ -79,13 +76,15 @@ $contextpage='receptionlist'; $viewstatut=GETPOST('viewstatut'); +$object = new Reception($db); + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('receptionlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('reception'); -$search_array_options=$extrafields->getOptionalsFromPost(null, '', 'search_'); +$extrafields->fetch_name_optionals_label($object->table_element); +$search_array_options = (array) $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" $fieldstosearchall = array( @@ -111,15 +110,17 @@ $arrayfields=array( 'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), 'e.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(!empty($conf->global->WORKFLOW_BILL_ON_RECEPTION))) ); - // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); /* @@ -145,7 +146,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_town=''; $search_zip=""; $search_state=""; - $search_type=''; $search_country=''; $search_type_thirdparty=''; $search_billed=''; @@ -156,7 +156,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' if (empty($reshook)) { if ($massaction == 'confirm_createbills') { - $receptions = GETPOST('toselect', 'array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); $validate_invoices = GETPOST('validate_invoices', 'int'); @@ -306,29 +305,28 @@ if (empty($reshook)) { $fk_parent_line = 0; } - $result = $object->addline( - $desc, - $lines[$i]->subprice, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->qty, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $date_start, - $date_end, - 0, - $lines[$i]->info_bits, - 'HT', - $product_type, - $i, - false, - 0, - null, - $lines[$i]->rowid, - 0, - $lines[$i]->ref_supplier - + $result = $object->addline( + $desc, + $lines[$i]->subprice, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->qty, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $date_start, + $date_end, + 0, + $lines[$i]->info_bits, + 'HT', + $product_type, + $i, + false, + 0, + null, + $lines[$i]->rowid, + 0, + $lines[$i]->ref_supplier ); $rcp->add_object_linked('facture_fourn_det', $result); @@ -381,7 +379,7 @@ if (empty($reshook)) // Fac builddoc $donotredirect = 1; $upload_dir = $conf->fournisseur->facture->dir_output; - $permissioncreate=$user->rights->fournisseur->facture->creer; + $permissiontoadd=$user->rights->fournisseur->facture->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -395,7 +393,6 @@ if (empty($reshook)) } else { - $db->rollback(); $action='create'; $_GET["origin"]=$_POST["origin"]; @@ -427,7 +424,9 @@ $sql.= " typent.code as typent_code,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= ' e.date_creation as date_creation, e.tms as date_update'; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -474,7 +473,7 @@ foreach ($search_array_options as $key => $val) { $crit=$val; $tmpkey=preg_replace('/search_options_/', '', $key); - $typ=$extrafields->attribute_type[$tmpkey]; + $typ=$extrafields->attributes[$object->table_element]['type'][$tmpkey]; $mode=0; if (in_array($typ, array('int','double','real'))) $mode=1; // Search on a numeric if (in_array($typ, array('sellist')) && $crit != '0' && $crit != '-1') $mode=2; // Search on a foreign key int @@ -533,9 +532,9 @@ if ($resql) } - $arrayofmassactions = array( -// 'presend'=>$langs->trans("SendByMail"), -); + $arrayofmassactions = array( + // 'presend'=>$langs->trans("SendByMail"), + ); if($user->rights->fournisseur->facture->creer)$arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisSupplier"); if($massaction == 'createbills') $arrayofmassactions=array(); @@ -628,8 +627,9 @@ if ($resql) print '
'; print ''."\n"; - // Fields title search - print ''; + // Fields title search + // -------------------------------------------------------------------- + print ''; // Ref if (! empty($arrayfields['e.ref']['checked'])) { @@ -694,28 +694,8 @@ if ($resql) print ''; } // Extra fields - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) - { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($arrayfields["ef.".$key]['checked'])) - { - $align=$extrafields->getAlignFlag($key); - $typeofextrafield=$extrafields->attribute_type[$key]; - print ''; - } - } - } + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + // Fields from hook $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook @@ -902,23 +882,8 @@ if ($resql) } // Extra fields - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) - { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($arrayfields["ef.".$key]['checked'])) - { - print ''; - if (! $i) $totalarray['nbfield']++; - } - } - } + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index ab8659004bb..5a2e8745cb7 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -48,7 +48,7 @@ $action=GETPOST('action', 'alpha'); // Security check $socid=''; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result=restrictedArea($user, $origin, $origin_id); $object = new Reception($db); @@ -97,7 +97,6 @@ $form = new Form($db); if ($id > 0 || ! empty($ref)) { - $head=reception_prepare_head($object); dol_fiche_head($head, 'note', $langs->trans("Reception"), -1, 'sending'); diff --git a/htdocs/reception/stats/index.php b/htdocs/reception/stats/index.php index 76315ccce03..8c79daf76ea 100644 --- a/htdocs/reception/stats/index.php +++ b/htdocs/reception/stats/index.php @@ -35,10 +35,10 @@ $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); $userid=GETPOST('userid', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $nowyear=strftime("%Y", dol_now()); @@ -74,7 +74,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/receptionsnbinyear-'.$user->id.'-'.$year.'.png'; } @@ -114,7 +114,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/receptionsamountinyear-'.$user->id.'-'.$year.'.png'; } @@ -152,7 +152,7 @@ if (! $mesg) /* $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->societe_id) +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/receptionsaverage-'.$user->id.'-'.$year.'.png'; } @@ -221,7 +221,7 @@ print '
'; print '
'; print ''; - print '
 '; - if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select'))) - { - $crit=$val; - $tmpkey=preg_replace('/search_options_/', '', $key); - $searchclass=''; - if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring'; - if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum'; - print ''; - } - print ''; - $tmpkey='options_'.$key; - print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1); - print '
'; + print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -244,7 +244,7 @@ print '
'; print '

'; //} -print ''; +print '
'; print ''; print ''; print ''; @@ -289,7 +289,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("NbOfReceptions").'
'; } -print $langs->trans('TotalTTC'); -print ' : '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).''; -print '
'.$sectionwithinvoicelink; -print ''; if ($_SESSION["basiclayout"]!=1) { print ''; @@ -604,16 +625,14 @@ if ($_SESSION["basiclayout"]==1) $htmlforlines = ''; foreach ($categories as $row){ $htmlforlines.= ''; + $htmlforlines.= '" onclick="LoadProducts(' . $row['id'] . ');">'; $htmlforlines.= ''; $htmlforlines.= ''."\n"; } $htmlforlines.= '
'; +print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield']; - $totalarray['totalht'] += $obj->total_ht; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='sp.total_ht'; + $totalarray['val']['sp.total_ht'] += $obj->total_ht; } // Amount VAT if (! empty($arrayfields['sp.total_vat']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; - $totalarray['totalvat'] += $obj->total_vat; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='sp.total_vat'; + $totalarray['val']['sp.total_vat'] += $obj->total_vat; } // Amount TTC if (! empty($arrayfields['sp.total_ttc']['checked'])) { print '\n"; if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield']; - $totalarray['totalttc'] += $obj->total_ttc; + if (! $i) $totalarray['pos'][$totalarray['nbfield']]='sp.total_ttc'; + $totalarray['val']['sp.total_ttc'] += $obj->total_ttc; } $userstatic->id=$obj->fk_user_author; @@ -829,30 +831,7 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield']) - || isset($totalarray['totalvatfield']) - || isset($totalarray['totalttcfield']) - || isset($totalarray['totalamfield']) - || isset($totalarray['totalrtpfield']) - ) - { - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totalhtfield'] == $i) print ''; - elseif ($totalarray['totalvatfield'] == $i) print ''; - elseif ($totalarray['totalttcfield'] == $i) print ''; - else print ''; - } - print ''; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; $db->free($resql); diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index b827117d7c5..0e12da2c104 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -40,7 +40,7 @@ $ref=GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'supplier_proposal', $id, 'supplier_proposal'); $object = new SupplierProposal($db); @@ -98,20 +98,21 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->supplier_proposal->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); diff --git a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php index 05cf99f3170..c87bb46adf3 100644 --- a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php @@ -24,39 +24,38 @@ if (empty($conf) || ! is_object($conf)) exit; } -?> - +print "\n"; - $objectlink) { $ilink++; $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> + ?> + if ($user->rights->supplier_proposal->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> - 1) { @@ -72,6 +71,5 @@ if (count($linkedObjectBlock) > 1) - +print "\n"; diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 179fa1deccb..dd369e233b9 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -71,7 +71,6 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) $result=include_once $conffile; // Load conf file if ($result) { - if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // For backward compatibility //Mysql driver support has been removed in favor of mysqli diff --git a/htdocs/takepos/ChangeLog.md b/htdocs/takepos/ChangeLog.md deleted file mode 100644 index 7b623eaa252..00000000000 --- a/htdocs/takepos/ChangeLog.md +++ /dev/null @@ -1,5 +0,0 @@ -# CHANGELOG TAKEPOS FOR DOLIBARR ERP CRM - -## 1.0 -Initial version - diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php index 92333394edc..ee936015352 100644 --- a/htdocs/takepos/admin/receipt.php +++ b/htdocs/takepos/admin/receipt.php @@ -41,12 +41,12 @@ $langs->loadLangs(array("admin", "cashdesk", "commercial")); if (GETPOST('action', 'alpha') == 'set') { $db->begin(); - + $res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_RECEIPT_NAME", GETPOST('TAKEPOS_RECEIPT_NAME', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_SHOW_CUSTOMER", GETPOST('TAKEPOS_SHOW_CUSTOMER', 'alpha'), 'chaine', 0, '', $conf->entity); - + dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); if (! $res > 0) $error++; @@ -85,7 +85,7 @@ print ''; print ''; -print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); @@ -310,7 +310,7 @@ dol_fiche_end(); // TODO USe code similar to commande/stats/index.php instead of this one. /* -print ''; +print '
'; print ''; print ''; diff --git a/htdocs/reception/stats/month.php b/htdocs/reception/stats/month.php index 958d1fbd314..3dd2dd39300 100644 --- a/htdocs/reception/stats/month.php +++ b/htdocs/reception/stats/month.php @@ -63,7 +63,7 @@ if (! $mesg) $px->draw($filename, $fileurl); } -print '
'.$langs->trans("Year").''.$langs->trans("NbOfReceptions").'
'; +print '
'; print ''; print ' - - - + + + + if ($user->rights->reception->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?> - 1) { diff --git a/htdocs/resource/agenda.php b/htdocs/resource/agenda.php index 0f2e79ef86f..803190ec699 100644 --- a/htdocs/resource/agenda.php +++ b/htdocs/resource/agenda.php @@ -37,6 +37,13 @@ require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; // Load translation files required by the page $langs->load("companies"); +// 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); @@ -48,21 +55,6 @@ else } $search_agenda_label=GETPOST('search_agenda_label'); -// Security check -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -if ($user->societe_id) $id=$user->societe_id; -// Protection if external user -if ($user->socid > 0) -{ - accessforbidden(); -} - -if( ! $user->rights->resource->read) -{ - accessforbidden(); -} - $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); @@ -74,9 +66,20 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield='a.datep,a.id'; if (! $sortorder) $sortorder='DESC,DESC'; -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$object = new DolResource($db); +$object->fetch($id, $ref); + +// Initialize technical objects +//$object=new MyObject($db); +$extrafields = new ExtraFields($db); $hookmanager->initHooks(array('agendaresource')); +// Security check +if( ! $user->rights->resource->read) +{ + accessforbidden(); +} + /* * Actions @@ -110,10 +113,9 @@ if (empty($reshook)) */ $contactstatic = new Contact($db); - $form = new Form($db); -if ($id > 0 || $ref) +if ($object->id > 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -121,9 +123,6 @@ if ($id > 0 || $ref) $langs->load("companies"); $picto = 'resource'; - $object = new Dolresource($db); - $result = $object->fetch($id); - $title=$langs->trans("Agenda"); if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/productnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->ref." - ".$title; llxHeader('', $title); @@ -138,13 +137,15 @@ if ($id > 0 || $ref) $linkback = ''.$langs->trans("BackToList").''; - $shownav = 1; - if ($user->societe_id && ! in_array('resource', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + $morehtmlref='
'; + $morehtmlref.='
'; - dol_banner_tab($object, 'id', $linkback, $shownav, 'id'); + $shownav = 1; + if ($user->socid && ! in_array('resource', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); print '
'; - print '
'; print '
'; @@ -153,11 +154,9 @@ if ($id > 0 || $ref) if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) { - print '
'; - - $param='&id='.$id; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + $param='&id='.$object->id.'&socid='.$socid; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); print_barre_liste($langs->trans("ActionsOnResource"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1); diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 2b4092671dc..1ad5c03ef98 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -63,9 +63,9 @@ $extrafields->fetch_name_optionals_label($object->table_element); -/******************************************************************* - * ACTIONS - ********************************************************************/ +/* + * Actions + */ $hookmanager->initHooks(array('resource', 'resource_card','globalcard')); $parameters=array('resource_id'=>$id); @@ -211,18 +211,17 @@ if (empty($reshook)) } -/*************************************************** -* VIEW -* -* Put here all code to build page -****************************************************/ +/* + * View + */ + $title = $langs->trans($action == 'create' ? 'AddResource' : 'ResourceSingular'); llxHeader('', $title, ''); $form = new Form($db); $formresource = new FormResource($db); -if ($action == 'create' || $object->fetch($id) > 0) +if ($action == 'create' || $object->fetch($id, $ref) > 0) { if ($action == 'create') { @@ -245,7 +244,7 @@ if ($action == 'create' || $object->fetch($id) > 0) print ''; print ''; - print '
Nombre d reception par mois'; print $px->show(); diff --git a/htdocs/reception/tpl/linkedobjectblock.tpl.php b/htdocs/reception/tpl/linkedobjectblock.tpl.php index 7669408f6d6..e4bae7558d1 100644 --- a/htdocs/reception/tpl/linkedobjectblock.tpl.php +++ b/htdocs/reception/tpl/linkedobjectblock.tpl.php @@ -42,38 +42,38 @@ $langs->load("receptions"); $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); $total=0; $ilink=0; -foreach($linkedObjectBlock as $key => $objectlink) +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; -?> + ?>
trans("Reception"); ?> - global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print ' + global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print ' getNomUrl(1); ?>date_delivery, 'day'); ?>getNomUrl(1); ?>date_delivery, 'day'); ?> rights->reception->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> getLibStatut(3); ?> - element != 'order_supplier') { - ?> - ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> - element != 'order_supplier') { ?> + ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> +
'; + print '
'; // Ref print ''; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index c85f040f896..db64c635fd5 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -39,7 +39,10 @@ class Dolresource extends CommonObject */ public $table_element='resource'; - public $picto = 'resource'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'resource'; public $resource_id; public $resource_type; diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index c61bd6453c4..00a92ecc115 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -140,7 +140,6 @@ class FormResource if ($outputmode != 2) { - $out.= '     '; $out.= ''; @@ -188,7 +187,6 @@ class FormResource { foreach($resourcestat->cache_code_type_resource as $id => $arraytypes) { - // We discard empty line if showempty is on because an empty line has already been output. if ($empty && empty($arraytypes['code'])) continue; diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php index 872078ac51d..3e2a004e194 100644 --- a/htdocs/resource/contact.php +++ b/htdocs/resource/contact.php @@ -39,7 +39,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'resource', $id, 'resource'); $object = new DolResource($db); diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php index fef78e8088c..e023134b9f5 100644 --- a/htdocs/resource/document.php +++ b/htdocs/resource/document.php @@ -44,7 +44,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'resource', $id, 'resource'); @@ -82,7 +82,7 @@ $form = new Form($db); llxHeader('', $langs->trans("Resource")); -if ($object->id) +if ($object->id > 0) { $object->fetch_thirdparty(); @@ -100,7 +100,7 @@ if ($object->id) } - $linkback = '' . $langs->trans("BackToList") . ''; + $linkback = '' . $langs->trans("BackToList") . ''; $morehtmlref='
'; diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index cbc0202b042..62fc5ca9a9c 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -315,7 +315,6 @@ else $act = fetchObjectByElement($element_id, $element, $element_ref); if (is_object($act)) { - $head=actions_prepare_head($act); dol_fiche_head($head, 'resources', $langs->trans("Action"), -1, 'action'); @@ -358,7 +357,7 @@ else } $morehtmlref.='
'; - dol_banner_tab($act, 'element_id', $linkback, ($user->societe_id?0:1), 'id', 'ref', $morehtmlref, '&element='.$element, 0, '', ''); + dol_banner_tab($act, 'element_id', $linkback, ($user->socid?0:1), 'id', 'ref', $morehtmlref, '&element='.$element, 0, '', ''); print '
'; @@ -446,7 +445,6 @@ else { $socstatic = fetchObjectByElement($element_id, $element, $element_ref); if (is_object($socstatic)) { - $savobject = $object; $object = $socstatic; @@ -455,12 +453,12 @@ else dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), -1, 'company'); - dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom', '', '&element='.$element); + dol_banner_tab($socstatic, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom', '', '&element='.$element); print '
'; print '
'; - print '
'.$langs->trans("ResourceFormLabel_ref").'
'; + print '
'; // Alias name (commercial, trademark or alias name) print '
' . $langs->trans('AliasNames') . ''; @@ -552,7 +550,6 @@ else if (is_object($product)) { - $head = product_prepare_head($product); $titre=$langs->trans("CardProduct".$product->type); $picto=($product->type==Product::TYPE_SERVICE?'service':'product'); @@ -560,7 +557,7 @@ else dol_fiche_head($head, 'resources', $titre, -1, $picto); $shownav = 1; - if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; + if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; dol_banner_tab($product, 'ref', '', $shownav, 'ref', 'ref', '', '&element='.$element); dol_fiche_end(); diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index ee1ec735086..ae1b4ffb7f7 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -71,7 +71,7 @@ foreach ($search_array_options as $key => $val) { $crit=$val; $tmpkey=preg_replace('/search_options_/', '', $key); - $typ=$extrafields->attribute_type[$tmpkey]; + $typ=$extrafields->attributes[$object->table_element]['type'][$tmpkey]; if ($val != '') { $param.='&search_options_'.$tmpkey.'='.urlencode($val); } @@ -113,19 +113,17 @@ $arrayfields = array( ), ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { - foreach ($extrafields->attribute_label as $key => $val) { - $typeofextrafield=$extrafields->attribute_type[$key]; - if ($typeofextrafield!='separate') { - $arrayfields["ef." . $key] = array( - 'label' => $extrafields->attribute_label[$key], - 'checked' => $extrafields->attribute_list[$key], - 'position' => $extrafields->attribute_pos[$key], - 'enabled' => $extrafields->attribute_perms[$key] - ); - } +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) +{ + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); } } +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index 8c7f106285f..322088ef317 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -37,7 +37,7 @@ $ref = GETPOST('ref', 'alpha'); $action=GETPOST('action', 'alpha'); // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'resource', $id, 'resource'); $object = new DolResource($db); diff --git a/htdocs/salaries/admin/salaries.php b/htdocs/salaries/admin/salaries.php index abccb11b4f1..db97de6a21a 100644 --- a/htdocs/salaries/admin/salaries.php +++ b/htdocs/salaries/admin/salaries.php @@ -95,7 +95,7 @@ print ''; /* * Params */ -print ''; +print '
'; print ''; print ''; print '\n"; diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 50d384545c1..bf26e5426b9 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -48,7 +48,7 @@ $projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOS // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'salaries', '', '', ''); $object = new PaymentSalary($db); @@ -258,7 +258,7 @@ if ($action == 'create') dol_fiche_head('', ''); - print '
'.$langs->trans("Parameters").''.$langs->trans("Value")."
'; + print '
'; // Date payment print '
'; @@ -371,7 +371,6 @@ if ($action == 'create') if ($id) { - $head=salaries_prepare_head($object); dol_fiche_head($head, 'card', $langs->trans("SalaryPayment"), -1, 'payment'); @@ -391,19 +390,20 @@ if ($id) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->salaries->write) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); @@ -423,7 +423,7 @@ if ($id) print '
'; print '
'; - print ''; + print '
'; // Label print ''; diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 2c9a0d1349d..5aee0a83a29 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -434,7 +434,6 @@ class PaymentSalary extends CommonObject $result = $this->db->query($sql); if ($result) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_salary"); if ($this->id > 0) diff --git a/htdocs/salaries/document.php b/htdocs/salaries/document.php index a7b92d63efb..7bd9a14a718 100644 --- a/htdocs/salaries/document.php +++ b/htdocs/salaries/document.php @@ -45,7 +45,7 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'salaries', '', '', ''); diff --git a/htdocs/salaries/info.php b/htdocs/salaries/info.php index 5ba53c45665..a96db0cbd5f 100644 --- a/htdocs/salaries/info.php +++ b/htdocs/salaries/info.php @@ -36,7 +36,7 @@ $action=GETPOST('action', 'aZ09'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'salaries', '', '', ''); diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 816b734ea23..51fd8462180 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -33,7 +33,7 @@ $langs->loadLangs(array("compta","salaries","bills","hrm")); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'salaries', '', '', ''); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -226,7 +226,7 @@ if ($result) $userstatic->admin=$obj->admin; $userstatic->login=$obj->login; $userstatic->email=$obj->email; - $userstatic->societe_id=$obj->fk_soc; + $userstatic->socid=$obj->fk_soc; $userstatic->statut=$obj->status; $salstatic->id=$obj->rowid; diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php index a301dc927a1..1cc61ebc0b6 100644 --- a/htdocs/salaries/stats/index.php +++ b/htdocs/salaries/stats/index.php @@ -38,7 +38,7 @@ $id = GETPOST('id', 'int'); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'salaries', '', '', ''); $nowyear=strftime("%Y", dol_now()); @@ -193,7 +193,7 @@ print '
'; // Show filter box print '
'; -print '
'.$langs->trans("Label").''.$object->label.'
'; +print '
'; print ''; // User print '
'.$langs->trans("Filter").'
'.$langs->trans("User").''; @@ -211,7 +211,7 @@ print ''; print '

'; print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -253,7 +253,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("Number").'
'; +print ' -control->tpl['suppliercategory']) > 0) { ?> + control->tpl['suppliercategory']) > 0) { ?> - + barcode->enabled)) { ?> +if (! empty($conf->barcode->enabled)) { ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php index 487da67c593..976b00962d8 100644 --- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php @@ -56,7 +56,7 @@ if (empty($conf) || ! is_object($conf)) @@ -96,7 +96,7 @@ if (empty($conf) || ! is_object($conf)) control->tpl['ismodifiable_suppliercode']) { ?> - control->tpl['suppliercode']; ?> + control->tpl['suppliercode']; ?> @@ -113,7 +113,7 @@ if ($this->control->tpl['fournisseur']) { - diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index e7e122b9114..b1e5d052adc 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -25,19 +25,15 @@ if (empty($conf) || ! is_object($conf)) $object = $GLOBALS['objcanvas']->control->object; -?> - -\n"; $head = societe_prepare_head($object); dol_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company'); -?> - -control->tpl['error']) echo $this->control->tpl['error']; ?> -control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?> +if ($this->control->tpl['error']) echo $this->control->tpl['error']; +if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
'; if ($mesg) { print $mesg; } else { print $px1->show(); diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 56b92c42057..93893060f75 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -311,17 +311,17 @@ if ($action == 'sethideinactivethirdparty') } } if($action=='setonsearchandlistgooncustomerorsuppliercard'){ - $setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity); - if (! $res > 0) $error++; - if (! $error) - { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans("Error"), null, 'errors'); - } + $setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity); + if (! $res > 0) $error++; + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } } /* @@ -351,7 +351,7 @@ foreach ($conf->modules_parts['models'] as $mo) $dirsociete[]=$mo.'core/modules print load_fiche_titre($langs->trans("CompanyCodeChecker"), '', ''); print '
'; -print ''."\n"; +print '
'."\n"; print ''."\n"; print ' '; print ' '; @@ -440,7 +440,7 @@ print "
"; print load_fiche_titre($langs->trans("AccountCodeManager"), '', ''); print '
'; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -544,7 +544,7 @@ else } print '
'; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -667,7 +667,7 @@ print '
'; print load_fiche_titre($langs->trans("CompanyIdProfChecker"), '', ''); print '
'; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print ''; print ''; @@ -768,7 +768,7 @@ print ''; print ''; print '
'; -print '
'.$langs->trans("Name").''.$langs->trans("Description").'
'; +print '
'; print ''; print "\n"; print ''."\n"; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 231174a0afa..ae2622d7f93 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -47,7 +47,7 @@ $search_agenda_label=GETPOST('search_agenda_label'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $socid, '&societe'); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -117,7 +117,7 @@ if ($socid > 0) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 28f2ec7306b..aafcd8ffc69 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -266,7 +266,7 @@ abstract class ActionsCardCommon $this->tpl['showhead']=dol_get_fiche_head($head, 'card', '', 0, 'company'); $this->tpl['showend']=dol_get_fiche_end(); - $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'socid', '', ($user->socid?0:1), 'rowid', 'nom'); $this->tpl['checkcustomercode'] = $this->object->check_codeclient(); $this->tpl['checksuppliercode'] = $this->object->check_codefournisseur(); diff --git a/htdocs/societe/canvas/company/tpl/card_create.tpl.php b/htdocs/societe/canvas/company/tpl/card_create.tpl.php index 0557f8608f9..80e0a23bdd6 100644 --- a/htdocs/societe/canvas/company/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_create.tpl.php @@ -32,15 +32,15 @@ if (empty($conf) || ! is_object($conf)) control->tpl['error']; ?> use_javascript_ajax) { ?> -control->tpl['ajax_selecttype']; ?> + control->tpl['ajax_selecttype']; ?>
-trans("ThirdPartyType") ?>:   + trans("ThirdPartyType") ?>:   -trans("CompanyFoundation"); ?>     + trans("CompanyFoundation"); ?>     trans("Individual"); ?> (trans("ToCreateContactWithSameName") ?>)

-control->tpl['ajax_selectcountry']; ?> + control->tpl['ajax_selectcountry']; ?> control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?> @@ -96,14 +96,15 @@ if (empty($conf) || ! is_object($conf))
-control->tpl['suppliercategory']) > 0) { ?> + control->tpl['suppliercategory']) > 0) { ?> - + barcode->enabled)) { ?> +if (! empty($conf->barcode->enabled)) { ?> diff --git a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php index f2de27c0ba1..3f1740d395c 100644 --- a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php @@ -23,7 +23,6 @@ if (empty($conf) || ! is_object($conf)) exit; } - $contact = $GLOBALS['objcanvas']->control->object; ?> @@ -59,7 +58,7 @@ $contact = $GLOBALS['objcanvas']->control->object; @@ -99,7 +98,7 @@ $contact = $GLOBALS['objcanvas']->control->object; control->tpl['ismodifiable_suppliercode']) { ?> - control->tpl['suppliercode']; ?> + control->tpl['suppliercode']; ?> @@ -116,12 +115,11 @@ if ($this->control->tpl['fournisseur']) { - -barcode->enabled)) { ?> +if (! empty($conf->barcode->enabled)) { ?> @@ -209,9 +207,9 @@ for ($i=1; $i<=4; $i++) { - +control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?> +if(!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
".$langs->trans("Parameters")."'.$langs->trans("Value").'
trans('SupplierCategory'); ?> control->tpl['select_suppliercategory']; ?>
trans('Gencod'); ?> control->tpl['prefix_customercode'] || $this->control->tpl['prefix_suppliercode']) && $this->control->tpl['prefix_comm']) { ?> - control->tpl['prefix_comm']; ?> + control->tpl['prefix_comm']; ?> @@ -78,7 +77,7 @@ $contact = $GLOBALS['objcanvas']->control->object; control->tpl['ismodifiable_customercode']) { ?> - control->tpl['customercode']; ?> + control->tpl['customercode']; ?> trans('SupplierCategory'); ?> control->tpl['select_suppliercategory']; ?>
trans('Gencod'); ?> trans("DefaultLang"); ?> control->tpl['select_lang']; ?>

diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php index 69e7dc48171..9048b272995 100644 --- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php @@ -25,10 +25,8 @@ if (empty($conf) || ! is_object($conf)) $soc = $GLOBALS['objcanvas']->control->object; -?> - -\n"; $head = societe_prepare_head($soc); diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index 54d09bf3c29..8493027bef7 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php @@ -32,15 +32,15 @@ if (empty($conf) || ! is_object($conf)) control->tpl['error']; ?> use_javascript_ajax) { ?> -control->tpl['ajax_selecttype']; ?> + control->tpl['ajax_selecttype']; ?>
-trans("ThirdPartyType") ?>:   + trans("ThirdPartyType") ?>:   -trans("CompanyFoundation"); ?>     + trans("CompanyFoundation"); ?>     trans("Individual"); ?> (trans("ToCreateContactWithSameName") ?>)

-control->tpl['ajax_selectcountry']; ?> + control->tpl['ajax_selectcountry']; ?>
" method="POST" name="formsoc"> @@ -106,14 +106,15 @@ if (empty($conf) || ! is_object($conf))
trans('SupplierCategory'); ?> control->tpl['select_suppliercategory']; ?>
trans('Gencod'); ?> control->tpl['prefix_customercode'] || $this->control->tpl['prefix_suppliercode']) && $this->control->tpl['prefix_comm']) { ?> - control->tpl['prefix_comm']; ?> + control->tpl['prefix_comm']; ?> @@ -75,7 +75,7 @@ if (empty($conf) || ! is_object($conf)) control->tpl['ismodifiable_customercode']) { ?> - control->tpl['customercode']; ?> + control->tpl['customercode']; ?> trans('SupplierCategory'); ?> control->tpl['select_suppliercategory']; ?>
@@ -230,6 +226,5 @@ $result=show_contacts($conf, $langs, $db, $object); // Projects list $result=show_projects($conf, $langs, $db, $object); -?> - +print "\n"; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 986ff4c61fc..6b375679052 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -47,7 +47,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; -$langs->loadLangs(array("companies","commercial","bills","banks","users")); +$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users")); +if (! empty($conf->adherent->enabled)) $langs->load("members"); if (! empty($conf->categorie->enabled)) $langs->load("categories"); if (! empty($conf->incoterm->enabled)) $langs->load("incoterm"); if (! empty($conf->notification->enabled)) $langs->load("mails"); @@ -60,7 +61,7 @@ $backtopage = GETPOST('backtopage', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; if (empty($socid) && $action == 'view') $action='create'; $object = new Societe($db); @@ -69,6 +70,8 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); +$socialnetworks = getArrayOfSocialNetworks(); + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartycard','globalcard')); @@ -146,7 +149,7 @@ if (empty($reshook)) $object->client = $object->client | $soc_origin->client; $object->fournisseur = $object->fournisseur | $soc_origin->fournisseur; $listofproperties=array( - 'address', 'zip', 'town', 'state_id', 'country_id', 'phone', 'phone_pro', 'fax', 'email', 'skype', 'twitter', 'facebook', 'linkedin', 'url', 'barcode', + 'address', 'zip', 'town', 'state_id', 'country_id', 'phone', 'phone_pro', 'fax', 'email', 'skype', 'twitter', 'facebook', 'linkedin', 'socialnetworks', 'url', 'barcode', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'tva_intra', 'effectif_id', 'forme_juridique', 'remise_percent', 'remise_supplier_percent', 'mode_reglement_supplier_id', 'cond_reglement_supplier_id', 'name_bis', 'stcomm_id', 'outstanding_limit', 'price_level', 'parent', 'default_lang', 'ref', 'ref_ext', 'import_key', 'fk_incoterms', 'fk_multicurrency', @@ -406,11 +409,19 @@ if (empty($reshook)) $object->town = GETPOST('town', 'alpha'); $object->country_id = GETPOST('country_id', 'int'); $object->state_id = GETPOST('state_id', 'int'); - $object->skype = GETPOST('skype', 'alpha'); - $object->twitter = GETPOST('twitter', 'alpha'); - $object->facebook = GETPOST('facebook', 'alpha'); - $object->linkedin = GETPOST('linkedin', 'alpha'); - $object->phone = GETPOST('phone', 'alpha'); + //$object->skype = GETPOST('skype', 'alpha'); + //$object->twitter = GETPOST('twitter', 'alpha'); + //$object->facebook = GETPOST('facebook', 'alpha'); + //$object->linkedin = GETPOST('linkedin', 'alpha'); + $object->socialnetworks = array(); + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml')!='') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } + $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); $object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); @@ -598,11 +609,11 @@ if (empty($reshook)) { case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form - $errors[] = "ErrorFileSizeTooLarge"; - break; + $errors[] = "ErrorFileSizeTooLarge"; + break; case 3: //uploaded file was only partially uploaded - $errors[] = "ErrorFilePartiallyUploaded"; - break; + $errors[] = "ErrorFilePartiallyUploaded"; + break; } } // Gestion du logo de la société @@ -624,15 +635,16 @@ if (empty($reshook)) { $db->commit(); - if (! empty($backtopage)) + if (! empty($backtopage)) { - if (preg_match('/\?/', $backtopage)) $backtopage.='&socid='.$object->id; + $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $backtopage); // New method to autoselect project after a New on another form object creation + if (preg_match('/\?/', $backtopage)) $backtopage.='&socid='.$object->id; // Old method header("Location: ".$backtopage); exit; } else { - $url=$_SERVER["PHP_SELF"]."?socid=".$object->id; + $url=$_SERVER["PHP_SELF"]."?socid=".$object->id; // Old method if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url=DOL_URL_ROOT."/comm/card.php?socid=".$object->id; elseif ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; @@ -762,11 +774,11 @@ if (empty($reshook)) { case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form - $errors[] = "ErrorFileSizeTooLarge"; - break; + $errors[] = "ErrorFileSizeTooLarge"; + break; case 3: //uploaded file was only partially uploaded - $errors[] = "ErrorFilePartiallyUploaded"; - break; + $errors[] = "ErrorFilePartiallyUploaded"; + break; } } // Gestion du logo de la société @@ -775,7 +787,6 @@ if (empty($reshook)) // Update linked member if (! $error && $object->fk_soc > 0) { - $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id; if (! $object->db->query($sql)) @@ -816,6 +827,7 @@ if (empty($reshook)) if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) { $object->fetch($socid); + $object->oldcopy = clone $object; $result = $object->delete($socid, $user); if ($result > 0) @@ -859,7 +871,7 @@ if (empty($reshook)) // Actions to build doc $id = $socid; $upload_dir = $conf->societe->dir_output; - $permissioncreate=$user->rights->societe->creer; + $permissiontoadd=$user->rights->societe->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -972,10 +984,18 @@ else $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); $object->state_id = GETPOST('state_id', 'int'); - $object->skype = GETPOST('skype', 'alpha'); - $object->twitter = GETPOST('twitter', 'alpha'); - $object->facebook = GETPOST('facebook', 'alpha'); - $object->linkedin = GETPOST('linkedin', 'alpha'); + //$object->skype = GETPOST('skype', 'alpha'); + //$object->twitter = GETPOST('twitter', 'alpha'); + //$object->facebook = GETPOST('facebook', 'alpha'); + //$object->linkedin = GETPOST('linkedin', 'alpha'); + $object->socialnetworks = array(); + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml')!='') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); @@ -1152,7 +1172,7 @@ else dol_fiche_head(null, 'card', '', 0, ''); - print '
'; + print '
'; // Name, firstname print ''; } + // Phone / Fax + print ''; + print ''; + print ''; + print ''; + // Email / Web - print ''; + print ''; print ''; - print ''; + print ''; print ''; - if (! empty($conf->socialnetworks->enabled)) - { - // Skype - if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - { - print ''; - print ''; - } - // Twitter - if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - { - print ''; - print ''; - } - // Facebook - if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - { - print ''; - print ''; - } - // LinkedIn - if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - { - print ''; - print ''; + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + print ''; + print ''; + print ''; + print ''; + } elseif (!empty($object->socialnetworks[$key])) { + print ''; + } } } - // Phone / Fax - print ''; - print ''; - print ''; - print ''; + // if (! empty($conf->socialnetworks->enabled)) + // { + // // Skype + // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) + // { + // print ''; + // print ''; + // } + // // Twitter + // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) + // { + // print ''; + // print ''; + // } + // // Facebook + // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) + // { + // print ''; + // print ''; + // } + // // LinkedIn + // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) + // { + // print ''; + // print ''; + // } + // } // Prof ids $i=1; $j=0; @@ -1610,10 +1645,18 @@ else $object->town = GETPOST('town', 'alpha'); $object->country_id = GETPOST('country_id')?GETPOST('country_id', 'int'):$mysoc->country_id; $object->state_id = GETPOST('state_id', 'int'); - $object->skype = GETPOST('skype', 'alpha'); - $object->twitter = GETPOST('twitter', 'alpha'); - $object->facebook = GETPOST('facebook', 'alpha'); - $object->linkedin = GETPOST('linkedin', 'alpha'); + //$object->skype = GETPOST('skype', 'alpha'); + //$object->twitter = GETPOST('twitter', 'alpha'); + //$object->facebook = GETPOST('facebook', 'alpha'); + //$object->linkedin = GETPOST('linkedin', 'alpha'); + $object->socialnetworks = array(); + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml')!='') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } $object->phone = GETPOST('phone', 'alpha'); $object->fax = GETPOST('fax', 'alpha'); $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); @@ -1758,7 +1801,7 @@ else dol_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company'); print '
'; - print '
'; @@ -1290,53 +1310,68 @@ else print '
'.img_picto('', 'object_phoning').' '.$form->editfieldkey('Phone', 'phone', '', $object, 0).''.img_picto('', 'object_phoning_fax').' '.$form->editfieldkey('Fax', 'fax', '', $object, 0).'
'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).'
'.img_picto('', 'object_email').' '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).'
'.$form->editfieldkey('Web', 'url', '', $object, 0).'
'.img_picto('', 'globe').' '.$form->editfieldkey('Web', 'url', '', $object, 0).'
'.$form->editfieldkey('Skype', 'skype', '', $object, 0).''; - print 'skype).'">'; - print '
'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).''; - print 'twitter).'">'; - print '
'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).''; - print 'facebook).'">'; - print '
'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).''; - print 'linkedin).'">'; - print '
'; + print ''; + print '
'.$form->editfieldkey('Phone', 'phone', '', $object, 0).''.$form->editfieldkey('Fax', 'fax', '', $object, 0).'
'.$form->editfieldkey('Skype', 'skype', '', $object, 0).''; + // print 'skype).'">'; + // print '
'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).''; + // print 'twitter).'">'; + // print '
'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).''; + // print 'facebook).'">'; + // print '
'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).''; + // print 'linkedin).'">'; + // print '
'; + print '
'; // Ref/ID if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) @@ -1853,7 +1896,7 @@ else print ''; } else - { + { print $object->code_fournisseur; print ''; } @@ -1913,45 +1956,59 @@ else print ''; } - // EMail / Web - print ''; - print ''; - print ''; - print ''; - - if (! empty($conf->socialnetworks->enabled)) - { - // Skype - if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - { - print ''; - print ''; - } - // Twitter - if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - { - print ''; - print ''; - } - // Facebook - if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - { - print ''; - print ''; - } - // LinkedIn - if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - { - print ''; - print ''; - } - } - // Phone / Fax - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + + // EMail / Web + print ''; + print ''; + print ''; + print ''; + + if (! empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + print ''; + print ''; + print ''; + print ''; + } elseif (!empty($object->socialnetworks[$key])) { + print ''; + } + } + } + // if (! empty($conf->socialnetworks->enabled)) + // { + // // Skype + // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) + // { + // print ''; + // print ''; + // } + // // Twitter + // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) + // { + // print ''; + // print ''; + // } + // // Facebook + // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) + // { + // print ''; + // print ''; + // } + // // LinkedIn + // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) + // { + // print ''; + // print ''; + // } + // } // Prof ids $i=1; $j=0; @@ -2239,7 +2296,7 @@ else $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -2414,7 +2471,6 @@ else print ''; if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2))) { - print ''; print ''; print ''; @@ -2652,33 +2708,43 @@ else if (! empty($object->email) || $at_least_one_email_contact) { $langs->load("mails"); - print ''; + print ''.$langs->trans('SendMail').''; } else { $langs->load("mails"); - print ''; + print ''.$langs->trans('SendMail').''; } if ($user->rights->societe->creer) { - print ''."\n"; + print ''.$langs->trans("Modify").''."\n"; } + if (! empty($conf->adherent->enabled)) + { + $adh = new Adherent($db); + $result=$adh->fetch('', '', $object->id); + if ($result == 0 && ($object->client == 1 || $object->client == 3) && ! empty($conf->global->MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS)) + { + print ''.$langs->trans("NewMember").''; + } + } + if ($user->rights->societe->supprimer) { - print ''; + print ''.$langs->trans('Merge').''; } if ($user->rights->societe->supprimer) { if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) // We can't use preloaded confirm form with jmobile { - print '
'.$langs->trans('Delete').'
'."\n"; + print ''.$langs->trans('Delete').''."\n"; } else { - print ''."\n"; + print ''.$langs->trans('Delete').''."\n"; } } } diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php index b2432afe243..cfddddb7b96 100644 --- a/htdocs/societe/class/api_contacts.class.php +++ b/htdocs/societe/class/api_contacts.class.php @@ -292,7 +292,7 @@ class Contacts extends DolibarrApi { throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); } - + $this->contact->oldcopy = clone $this->contact; return $this->contact->delete($id); } diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 3d2104cc6f2..42fae860666 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2018 Pierre Chéné + * Copyright (C) 2019 Cedric Ancelin * * 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 @@ -73,36 +74,24 @@ class Thirdparties extends DolibarrApi */ public function get($id) { - if(! DolibarrApiAccess::$user->rights->societe->lire) { - throw new RestException(401); - } - if ($id ==0) { - $result = $this->company->initAsSpecimen(); - } else { - $result = $this->company->fetch($id); - } - if( ! $result ) { - throw new RestException(404, 'Thirdparty not found'); - } + return $this->_fetch($id); + } - if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice - $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice - } else { - $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; - $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; - } - - $absolute_discount = $this->company->getAvailableDiscounts('', $filterabsolutediscount); - $absolute_creditnote = $this->company->getAvailableDiscounts('', $filtercreditnote); - $this->company->absolute_discount = price2num($absolute_discount, 'MT'); - $this->company->absolute_creditnote = price2num($absolute_creditnote, 'MT'); - - return $this->_cleanObjectDatas($this->company); + /** + * Get properties of a thirdparty object by email. + * + * Return an array with thirdparty informations + * + * @param string $email Sort field + * @return array|mixed data without useless information + * + * @url GET byEmail/{email} + * + * @throws RestException + */ + public function getByEmail($email) + { + return $this->_fetch('', '', '', '', '', '', '', '', '', '', $email); } /** @@ -117,6 +106,7 @@ class Thirdparties extends DolibarrApi * @param int $mode Set to 1 to show only customers * Set to 2 to show only prospects * Set to 3 to show only those are not customer neither prospect + * Set to 4 to show only suppliers * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.nom:like:'TheCompany%') and (t.date_creation:<:'20160101')" * @return array Array of thirdparty objects */ @@ -143,6 +133,7 @@ class Thirdparties extends DolibarrApi if ($mode == 1) $sql.= " AND t.client IN (1, 3)"; if ($mode == 2) $sql.= " AND t.client IN (2, 3)"; if ($mode == 3) $sql.= " AND t.client IN (0)"; + if ($mode == 4) $sql.= " AND t.fournisseur IN (1)"; $sql.= ' AND t.entity IN ('.getEntity('societe').')'; if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql.= " AND t.rowid = sc.fk_soc"; //if ($email != NULL) $sql.= " AND s.email = \"".$email."\""; @@ -418,7 +409,7 @@ class Thirdparties extends DolibarrApi // External modules should update their ones too if (!$errors) { -$reshook = $hookmanager->executeHooks('replaceThirdparty', array( + $reshook = $hookmanager->executeHooks('replaceThirdparty', array( 'soc_origin' => $soc_origin->id, 'soc_dest' => $object->id ), $soc_dest, $action); @@ -488,6 +479,7 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $this->company->oldcopy = clone $this->company; return $this->company->delete($id); } @@ -858,6 +850,46 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( return $result; } + /** + * Get representatives of thirdparty + * + * @param int $id ID of the thirdparty + * @param string $mode 0=Array with properties, 1=Array of id. + * + * @url GET {id}/representatives + * + * @return array List of representatives of thirdparty + * + * @throws 400 + * @throws 401 + * @throws 404 + */ + public function getSalesRepresentatives($id, $mode = 0) + { + $obj_ret = array(); + + if(! DolibarrApiAccess::$user->rights->societe->lire) { + throw new RestException(401); + } + + if(empty($id)) { + throw new RestException(400, 'Thirdparty ID is mandatory'); + } + + if( ! DolibarrApi::_checkAccessToResource('societe', $id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $result = $this->company->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Thirdparty not found'); + } + + $result = $this->company->getSalesRepresentatives(DolibarrApiAccess::$user, $mode); + + return $result; + } + /** * Get fixed amount discount of a thirdparty (all sources: deposit, credit note, commercial offers...) * @@ -1068,12 +1100,13 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( $returnAccounts = array(); - foreach($accounts as $account){ - $object= array(); - foreach($account as $key => $value) - if(in_array($key, $fields)){ + foreach ($accounts as $account) { + $object = array(); + foreach ($account as $key => $value) { + if (in_array($key, $fields)) { $object[$key] = $value; } + } $returnAccounts[] = $object; } @@ -1272,7 +1305,7 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( } } - /** + /** * Get a specific gateway attached to a thirdparty (by specifying the site key) * * @param int $id ID of thirdparty @@ -1329,12 +1362,13 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( $returnAccounts = array(); - foreach($accounts as $account){ - $object= array(); - foreach($account as $key => $value) - if(in_array($key, $fields)){ + foreach ($accounts as $account) { + $object = array(); + foreach ($account as $key => $value) { + if(in_array($key, $fields)) { $object[$key] = $value; } + } $returnAccounts[] = $object; } @@ -1447,17 +1481,18 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( $account->fk_soc = $id; $account->site = $site; - if ($account->create(DolibarrApiAccess::$user) < 0) + if ($account->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error creating SocieteAccount entity.'); - // We found an existing SocieteAccount entity, we are replacing it + } + // We found an existing SocieteAccount entity, we are replacing it } else { - - if(isset($request_data['site']) && $request_data['site'] !== $site) { + if (isset($request_data['site']) && $request_data['site'] !== $site) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id." AND site = '". $request_data['site']."' "; $result = $db->query($sql); - if($result->num_rows !== 0) + if ($result->num_rows !== 0) { throw new RestException(409, "You are trying to update this thirdparty SocieteAccount (gateway record) from $site to ".$request_data['site'] . " but another SocieteAccount entity already exists with this site key."); + } } $obj = $db->fetch_object($result); @@ -1514,7 +1549,6 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( if($result->num_rows == 0 ){ throw new RestException(404, "This thirdparty does not have $site gateway attached or does not exist."); } else { - // If the user tries to edit the site member, we check first if if(isset($request_data['site']) && $request_data['site'] !== $site) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id." AND site = '". $request_data['site']."' "; @@ -1642,6 +1676,13 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( $object = parent::_cleanObjectDatas($object); unset($object->nom); // ->name already defined and nom deprecated + unset($object->name_bis); // ->name_alias already defined + unset($object->note); // ->note_private and note_public already defined + unset($object->departement); + unset($object->departement_code); + unset($object->pays); + unset($object->particulier); + unset($object->prefix_comm); unset($object->total_ht); unset($object->total_tva); @@ -1652,6 +1693,8 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( unset($object->lines); unset($object->thirdparty); + unset($object->fk_delivery_address); // deprecated feature + return $object; } @@ -1673,4 +1716,56 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( } return $thirdparty; } + + /** + * Fetch properties of a thirdparty object. + * + * Return an array with thirdparty informations + * + * @param int $rowid Id of third party to load + * @param string $ref Reference of third party, name (Warning, this can return several records) + * @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr) + * @param string $ref_int Internal reference of third party (not used by dolibarr) + * @param string $idprof1 Prof id 1 of third party (Warning, this can return several records) + * @param string $idprof2 Prof id 2 of third party (Warning, this can return several records) + * @param string $idprof3 Prof id 3 of third party (Warning, this can return several records) + * @param string $idprof4 Prof id 4 of third party (Warning, this can return several records) + * @param string $idprof5 Prof id 5 of third party (Warning, this can return several records) + * @param string $idprof6 Prof id 6 of third party (Warning, this can return several records) + * @param string $email Email of third party (Warning, this can return several records) + * @param string $ref_alias Name_alias of third party (Warning, this can return several records) + * @return array|mixed data without useless information + * + * @throws RestException + */ + private function _fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '', $idprof1 = '', $idprof2 = '', $idprof3 = '', $idprof4 = '', $idprof5 = '', $idprof6 = '', $email = '', $ref_alias = '') + { + if(! DolibarrApiAccess::$user->rights->societe->lire) { + throw new RestException(401); + } + + $result = $this->company->fetch($rowid, $ref, $ref_ext, $ref_int, $idprof1, $idprof2, $idprof3, $idprof4, $idprof5, $idprof6, $email, $ref_alias); + if( ! $result ) { + throw new RestException(404, 'Thirdparty not found'); + } + + if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + } else { + $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; + $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; + } + + $absolute_discount = $this->company->getAvailableDiscounts('', $filterabsolutediscount); + $absolute_creditnote = $this->company->getAvailableDiscounts('', $filtercreditnote); + $this->company->absolute_discount = price2num($absolute_discount, 'MT'); + $this->company->absolute_creditnote = price2num($absolute_creditnote, 'MT'); + + return $this->_cleanObjectDatas($this->company); + } } diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index 9c6c15e2f66..c345d195935 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -63,7 +63,7 @@ class Client extends Societe $sql = "SELECT count(s.rowid) as nb, s.client"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->societe_id) + if (!$user->rights->societe->client->voir && !$user->socid) { $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE sc.fk_user = " .$user->id; diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 131c1c5d30a..d403499a79e 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -20,9 +20,9 @@ */ /** - * \file htdocs/societe/class/companybankaccount.class.php - * \ingroup societe - * \brief File of class to manage bank accounts description of third parties + * \file htdocs/societe/class/companybankaccount.class.php + * \ingroup societe + * \brief File of class to manage bank accounts description of third parties */ require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; @@ -174,29 +174,27 @@ class CompanyBankAccount extends Account $result = $this->db->query($sql); if ($result) { - - - if (! $notrigger) - { - // Call trigger - $result=$this->call_trigger('COMPANY_RIB_MODIFY', $user); - if ($result < 0) $error++; - // End call triggers - if(! $error ) + if (! $notrigger) { - return 1; + // Call trigger + $result=$this->call_trigger('COMPANY_RIB_MODIFY', $user); + if ($result < 0) $error++; + // End call triggers + if(! $error ) + { + return 1; + } + else + { + return -1; + } } else { - return -1; + return 1; } } else - { - return 1; - } - } - else { dol_print_error($this->db); return -1; @@ -328,7 +326,6 @@ class CompanyBankAccount extends Account $rib = ''; if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib || $this->iban || $this->bic ) { - if ($this->label && $displayriblabel) { $rib = $this->label." : "; } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c4c702bc73b..e73a060af40 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2003 Brian Fraval * Copyright (C) 2006 Andre Cianfarani @@ -15,6 +15,7 @@ * Copyright (C) 2017 Rui Strecht * Copyright (C) 2018 Philippe Grand * Copyright (C) 2019 Josep Lluís Amador + * Copyright (C) 2019 Frédéric France * * 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,6 +70,9 @@ class Societe extends CommonObject */ protected $childtablesoncascade=array("societe_prices", "societe_log", "societe_address", "product_fournisseur_price", "product_customer_price_log", "product_customer_price", "socpeople", "adherent", "societe_account", "societe_rib", "societe_remise", "societe_remise_except", "societe_commerciaux", "categorie", "notify", "notify_def", "actioncomm"); + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'company'; /** @@ -197,24 +201,35 @@ class Societe extends CommonObject * @var string */ public $email; + + /** + * @var array array of socialnetworks + */ + public $socialnetworks; + /** * Skype username * @var string + * @deprecated */ public $skype; + /** * Twitter username * @var string + * @deprecated */ public $twitter; /** * Facebook username * @var string + * @deprecated */ public $facebook; /** * LinkedIn username * @var string + * @deprecated */ public $linkedin; /** @@ -316,11 +331,12 @@ class Societe extends CommonObject * @var string */ public $user_modification; + /** - * Date of creation - * @var string + * @var integer|string date_creation */ public $date_creation; + /** * User that created the thirdparty * @var User @@ -395,9 +411,16 @@ class Societe extends CommonObject */ public $note_public; - //! code statut prospect + /** + * Status prospect id + * @var int + */ public $stcomm_id; - public $statut_commercial; + /** + * Status prospect label + * @var int + */ + public $status_prospect_label; /** * Assigned price level @@ -465,6 +488,9 @@ class Societe extends CommonObject public $logo; public $logo_small; public $logo_mini; + public $logo_squarred; + public $logo_squarred_small; + public $logo_squarred_mini; public $array_options; @@ -759,17 +785,7 @@ class Societe extends CommonObject { if ($this->isACompany()) { - // Check for unicity - if ($vallabel && $this->id_prof_verifiable($i)) - { - if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) - { - $langs->load("errors"); - $error++; $this->errors[] = $langs->transcountry('ProfId'.$i, $this->country_code)." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; - } - } - - // Check for mandatory prof id (but only if country is other than ours) + // Check for mandatory prof id (but only if country is same than ours) if ($mysoc->country_id > 0 && $this->country_id == $mysoc->country_id) { $idprof_mandatory ='SOCIETE_'.$key.'_MANDATORY'; @@ -781,6 +797,17 @@ class Societe extends CommonObject } } } + + // Check for unicity + if (! $error && $vallabel && $this->id_prof_verifiable($i)) + { + if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) + { + $langs->load("errors"); + $error++; + $this->errors[] = $langs->transcountry('ProfId'.$i, $this->country_code)." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; + } + } } else { @@ -788,16 +815,6 @@ class Societe extends CommonObject //var_dump($conf->global->SOCIETE_EMAIL_MANDATORY); if ($key == 'EMAIL') { - // Check for unicity - if ($vallabel && ! empty($conf->global->SOCIETE_EMAIL_UNIQUE)) - { - if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) - { - $langs->load("errors"); - $error++; $this->errors[] = $langs->trans('Email')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; - } - } - // Check for mandatory if (! empty($conf->global->SOCIETE_EMAIL_MANDATORY) && ! isValidEMail($this->email)) { @@ -805,6 +822,16 @@ class Societe extends CommonObject $error++; $this->errors[] = $langs->trans("ErrorBadEMail", $this->email).' ('.$langs->trans("ForbiddenBySetupRules").')'; } + + // Check for unicity + if (! $error && $vallabel && ! empty($conf->global->SOCIETE_EMAIL_UNIQUE)) + { + if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) + { + $langs->load("errors"); + $error++; $this->errors[] = $langs->trans('Email')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; + } + } } } } @@ -818,7 +845,7 @@ class Societe extends CommonObject * Update parameters of third party * * @param int $id Id of company (deprecated, use 0 here and call update on an object loaded by a fetch) - * @param User $user Utilisateur qui demande la mise a jour + * @param User $user User who requests the update * @param int $call_trigger 0=no, 1=yes * @param int $allowmodcodeclient Inclut modif code client et code compta * @param int $allowmodcodefournisseur Inclut modif code fournisseur et code compta fournisseur @@ -859,10 +886,6 @@ class Societe extends CommonObject $this->fax = preg_replace("/\s/", "", $this->fax); $this->fax = preg_replace("/\./", "", $this->fax); $this->email = trim($this->email); - $this->skype = trim($this->skype); - $this->twitter = trim($this->twitter); - $this->facebook = trim($this->facebook); - $this->linkedin = trim($this->linkedin); $this->url = $this->url?clean_url($this->url, 0):''; $this->note_private = trim($this->note_private); $this->note_public = trim($this->note_public); @@ -1002,11 +1025,8 @@ class Societe extends CommonObject $sql .= ",phone = ".(! empty($this->phone)?"'".$this->db->escape($this->phone)."'":"null"); $sql .= ",fax = ".(! empty($this->fax)?"'".$this->db->escape($this->fax)."'":"null"); - $sql .= ",email = ".(! empty($this->email)?"'".$this->db->escape($this->email)."'":"null"); - $sql .= ",skype = ".(! empty($this->skype)?"'".$this->db->escape($this->skype)."'":"null"); - $sql .= ",twitter = ".(! empty($this->twitter)?"'".$this->db->escape($this->twitter)."'":"null"); - $sql .= ",facebook = ".(! empty($this->facebook)?"'".$this->db->escape($this->facebook)."'":"null"); - $sql .= ",linkedin = ".(! empty($this->linkedin)?"'".$this->db->escape($this->linkedin)."'":"null"); + $sql .= ",email = ".(! empty($this->email)?"'".$this->db->escape($this->email)."'":"null"); + $sql .= ", socialnetworks = '".$this->db->escape(json_encode($this->socialnetworks))."'"; $sql .= ",url = ".(! empty($this->url)?"'".$this->db->escape($this->url)."'":"null"); $sql .= ",parent = " . ($this->parent > 0 ? $this->parent : "null"); @@ -1072,6 +1092,7 @@ class Societe extends CommonObject $sql .= ",barcode = ".(! empty($this->barcode)?"'".$this->db->escape($this->barcode)."'":"null"); $sql .= ",default_lang = ".(! empty($this->default_lang)?"'".$this->db->escape($this->default_lang)."'":"null"); $sql .= ",logo = ".(! empty($this->logo)?"'".$this->db->escape($this->logo)."'":"null"); + $sql .= ",logo_squarred = ".(! empty($this->logo_squarred)?"'".$this->db->escape($this->logo_squarred)."'":"null"); $sql .= ",outstanding_limit= ".($this->outstanding_limit!=''?$this->outstanding_limit:'null'); $sql .= ",order_min_amount= ".($this->order_min_amount!=''?$this->order_min_amount:'null'); $sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount!=''?$this->supplier_order_min_amount:'null'); @@ -1147,10 +1168,7 @@ class Societe extends CommonObject $lmember->zip=$this->zip; $lmember->town=$this->town; $lmember->email=$this->email; - $lmember->skype=$this->skype; - $lmember->twitter=$this->twitter; - $lmember->facebook=$this->facebook; - $lmember->linkedin=$this->linkedin; + $lmember->socialnetworks=$this->socialnetworks; $lmember->phone=$this->phone; $lmember->state_id=$this->state_id; $lmember->country_id=$this->country_id; @@ -1222,7 +1240,7 @@ class Societe extends CommonObject } } else - { + { $this->db->rollback(); dol_syslog(get_class($this)."::Update fails verify ".join(',', $this->errors), LOG_WARNING); return -3; @@ -1257,7 +1275,9 @@ class Societe extends CommonObject $sql .= ', s.status'; $sql .= ', s.price_level'; $sql .= ', s.tms as date_modification, s.fk_user_creat, s.fk_user_modif'; - $sql .= ', s.phone, s.fax, s.email, s.skype, s.twitter, s.facebook, s.linkedin, s.url, s.zip, s.town, s.note_private, s.note_public, s.model_pdf, s.client, s.fournisseur'; + $sql .= ', s.phone, s.fax, s.email'; + $sql .= ', s.socialnetworks'; + $sql .= ', s.url, s.zip, s.town, s.note_private, s.note_public, s.model_pdf, s.client, s.fournisseur'; $sql .= ', s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6'; $sql .= ', s.capital, s.tva_intra'; $sql .= ', s.fk_typent as typent_id'; @@ -1266,7 +1286,7 @@ class Societe extends CommonObject $sql .= ', s.webservices_url, s.webservices_key'; $sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode'; $sql .= ', s.fk_departement as state_id, s.fk_pays as country_id, s.fk_stcomm, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj'; - $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo'; + $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.logo_squarred'; $sql .= ', s.fk_shipping_method'; $sql .= ', s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms'; $sql .= ', s.order_min_amount, s.supplier_order_min_amount'; @@ -1309,7 +1329,7 @@ class Societe extends CommonObject $num=$this->db->num_rows($resql); if ($num > 1) { - $this->error='Fetch found several records. Rename one of tirdparties to avoid duplicate.'; + $this->error='Fetch found several records. Rename one of thirdparties to avoid duplicate.'; dol_syslog($this->error, LOG_ERR); $result = -2; } @@ -1346,15 +1366,13 @@ class Societe extends CommonObject $this->state = ($obj->state!='-'?$obj->state:''); $transcode=$langs->trans('StatusProspect'.$obj->fk_stcomm); - $libelle=($transcode!='StatusProspect'.$obj->fk_stcomm?$transcode:$obj->stcomm); - $this->stcomm_id = $obj->fk_stcomm; // id statut commercial - $this->statut_commercial = $libelle; // libelle statut commercial + $label = ($transcode!='StatusProspect'.$obj->fk_stcomm ? $transcode : $obj->stcomm); + $this->stcomm_id = $obj->fk_stcomm; // id status prospect + $this->status_prospect_label = $label; // label status prospect + + $this->email = $obj->email; + $this->socialnetworks = (array) json_decode($obj->socialnetworks, true); - $this->email = $obj->email; - $this->skype = $obj->skype; - $this->twitter = $obj->twitter; - $this->facebook = $obj->facebook; - $this->linkedin = $obj->linkedin; $this->url = $obj->url; $this->phone = $obj->phone; $this->fax = $obj->fax; @@ -1420,6 +1438,7 @@ class Societe extends CommonObject $this->modelpdf = $obj->model_pdf; $this->default_lang = $obj->default_lang; $this->logo = $obj->logo; + $this->logo_squarred = $obj->logo_squarred; $this->webservices_url = $obj->webservices_url; $this->webservices_key = $obj->webservices_key; @@ -1633,13 +1652,13 @@ class Societe extends CommonObject return 0; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Definit la societe comme un client + * Defines the company as a customer * - * @param float $remise Valeur en % de la remise - * @param string $note Note/Motif de modification de la remise - * @param User $user Utilisateur qui definie la remise + * @param float $remise Value in % of the discount + * @param string $note Note/Reason for changing the discount + * @param User $user User who sets the discount * @return int <0 if KO, >0 if OK */ public function set_remise_client($remise, $note, User $user) @@ -1647,7 +1666,7 @@ class Societe extends CommonObject // phpcs:enable global $conf, $langs; - // Nettoyage parametres + // Parameter cleaning $note=trim($note); if (! $note) { @@ -1663,7 +1682,7 @@ class Societe extends CommonObject $now=dol_now(); - // Positionne remise courante + // Position current discount $sql = "UPDATE ".MAIN_DB_PREFIX."societe "; $sql.= " SET remise_client = '".$this->db->escape($remise)."'"; $sql.= " WHERE rowid = " . $this->id; @@ -1675,7 +1694,7 @@ class Societe extends CommonObject return -1; } - // Ecrit trace dans historique des remises + // Writes trace in discount history $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_remise"; $sql.= " (entity, datec, fk_soc, remise_client, note, fk_user_author)"; $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($now)."', ".$this->id.", '".$this->db->escape($remise)."',"; @@ -1696,13 +1715,13 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Definit la societe comme un client + * Defines the company as a customer * - * @param float $remise Valeur en % de la remise - * @param string $note Note/Motif de modification de la remise - * @param User $user Utilisateur qui definie la remise + * @param float $remise Value in % of the discount + * @param string $note Note/Reason for changing the discount + * @param User $user User who sets the discount * @return int <0 if KO, >0 if OK */ public function set_remise_supplier($remise, $note, User $user) @@ -1710,7 +1729,7 @@ class Societe extends CommonObject // phpcs:enable global $conf, $langs; - // Nettoyage parametres + // Parameter cleaning $note=trim($note); if (! $note) { @@ -1726,7 +1745,7 @@ class Societe extends CommonObject $now=dol_now(); - // Positionne remise courante + // Position current discount $sql = "UPDATE ".MAIN_DB_PREFIX."societe "; $sql.= " SET remise_supplier = '".$this->db->escape($remise)."'"; $sql.= " WHERE rowid = " . $this->id; @@ -1738,7 +1757,7 @@ class Societe extends CommonObject return -1; } - // Ecrit trace dans historique des remises + // Writes trace in discount history $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_remise_supplier"; $sql.= " (entity, datec, fk_soc, remise_supplier, note, fk_user_author)"; $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($now)."', ".$this->id.", '".$this->db->escape($remise)."',"; @@ -1822,10 +1841,10 @@ class Societe extends CommonObject } /** - * Renvoie montant TTC des reductions/avoirs en cours disponibles de la societe + * Returns amount of included taxes of the current discounts/credits available from the company * - * @param User $user Filtre sur un user auteur des remises - * @param string $filter Filtre autre + * @param User $user Filter on a user author of discounts + * @param string $filter Other filter * @param integer $maxvalue Filter on max value for discount * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return int <0 if KO, Credit note amount otherwise @@ -1860,7 +1879,7 @@ class Societe extends CommonObject $reparray=array(); - $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo"; + $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut, u.entity, u.photo"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u"; if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { @@ -1889,6 +1908,8 @@ class Societe extends CommonObject $reparray[$i]['lastname']=$obj->lastname; $reparray[$i]['firstname']=$obj->firstname; $reparray[$i]['email']=$obj->email; + $reparray[$i]['phone']=$obj->office_phone; + $reparray[$i]['job']=$obj->job; $reparray[$i]['statut']=$obj->statut; $reparray[$i]['entity']=$obj->entity; $reparray[$i]['login']=$obj->login; @@ -2110,13 +2131,19 @@ class Societe extends CommonObject $label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. $label.= '
'; } + elseif (! empty($this->logo_squarred) && class_exists('Form')) + { + /*$label.= '
'; + $label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. + $label.= '
';*/ + } $label.= '
'; if ($option == 'customer' || $option == 'compta' || $option == 'category' || $option == 'category_supplier') { - $label.= '' . $langs->trans("ShowCustomer") . ''; - $linkstart = ''; + $linkstart = 'trans("InActivity"); + $this->labelStatus[0] = $langs->trans("ActivityCeased"); + $this->labelStatus[1] = $langs->trans("InActivity"); + $this->labelStatusShort[0] = $langs->trans("ActivityCeased"); + $this->labelStatusShort[1] = $langs->trans("InActivity"); } - elseif ($mode == 1) - { - if ($statut==0) return $langs->trans("ActivityCeased"); - elseif ($statut==1) return $langs->trans("InActivity"); - } - elseif ($mode == 2) - { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"), 'statut5', 'class="pictostatus"').' '.$langs->trans("ActivityCeased"); - elseif ($statut==1) return img_picto($langs->trans("InActivity"), 'statut4', 'class="pictostatus"').' '.$langs->trans("InActivity"); - } - elseif ($mode == 3) - { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"), 'statut5', 'class="pictostatus"'); - elseif ($statut==1) return img_picto($langs->trans("InActivity"), 'statut4', 'class="pictostatus"'); - } - elseif ($mode == 4) - { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"), 'statut5', 'class="pictostatus"').' '.$langs->trans("ActivityCeased"); - elseif ($statut==1) return img_picto($langs->trans("InActivity"), 'statut4', 'class="pictostatus"').' '.$langs->trans("InActivity"); - } - elseif ($mode == 5) - { - if ($statut==0) return ''.$langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"), 'statut5', 'class="pictostatus"'); - elseif ($statut==1) return ''.$langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"), 'statut4', 'class="pictostatus"'); - } - elseif ($mode == 6) - { - if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"), 'statut5', 'class="pictostatus"'); - elseif ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"), 'statut4', 'class="pictostatus"'); - } - } + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** @@ -2367,6 +2371,7 @@ class Societe extends CommonObject $sql = "SELECT rowid, email, statut, phone_mobile, lastname, poste, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = ".$this->id; + $sql.= " ORDER BY lastname, firstname"; $resql=$this->db->query($sql); if ($resql) @@ -2418,11 +2423,11 @@ class Societe extends CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie la liste des contacts de cette societe + * Returns the contact list of this company * - * @return array tableau des contacts + * @return array array of contacts */ public function contact_array() { @@ -2452,11 +2457,11 @@ class Societe extends CommonObject return $contacts; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie la liste des contacts de cette societe + * Returns the contact list of this company * - * @return array $contacts tableau des contacts + * @return array $contacts array of contacts */ public function contact_array_objects() { @@ -2597,9 +2602,9 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Attribut un code client a partir du module de controle des codes. + * Assigns a customer code from the code control module. * Return value is stored into this->code_client * * @param Societe $objsoc Object thirdparty @@ -2629,9 +2634,9 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Attribut un code fournisseur a partir du module de controle des codes. + * Assigns a vendor code from the code control module. * Return value is stored into this->code_fournisseur * * @param Societe $objsoc Object thirdparty @@ -2660,10 +2665,10 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Verifie si un code client est modifiable en fonction des parametres - * du module de controle des codes. + * Check if a client code is editable based on the parameters of the + * code control module. * * @return int 0=No, 1=Yes */ @@ -2697,9 +2702,9 @@ class Societe extends CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Verifie si un code fournisseur est modifiable dans configuration du module de controle des codes + * Check if a vendor code is editable in the code control module configuration * * @return int 0=No, 1=Yes */ @@ -2807,11 +2812,11 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie un code compta, suivant le module de code compta. - * Peut etre identique a celui saisit ou genere automatiquement. - * A ce jour seule la generation automatique est implementee + * Returns an accounting code, following the accounting code module. + * May be identical to the one entered or generated automatically. + * To date only the automatic generation is implemented * * @param string $type Type of thirdparty ('customer' or 'supplier') * @return string Code compta si ok, 0 si aucun, <0 si ko @@ -2836,7 +2841,7 @@ class Societe extends CommonObject $classname = $conf->global->SOCIETE_CODECOMPTA_ADDON; $mod = new $classname; - // Defini code compta dans $mod->code + // Set code count in $mod->code $result = $mod->get_code($this->db, $this, $type); if ($type == 'customer') $this->code_compta = $mod->code; @@ -2988,9 +2993,9 @@ class Societe extends CommonObject else return false; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Verifie la validite d'un identifiant professionnel en fonction du pays de la societe (siren, siret, ...) + * Check the validity of a professional identifier according to the country of the company (siren, siret, ...) * * @param int $idprof 1,2,3,4 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm) * @param Societe $soc Objet societe @@ -3006,7 +3011,7 @@ class Societe extends CommonObject if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) return 1; - // Verifie SIREN si pays FR + // Check SIREN if country FR if ($idprof == 1 && $soc->country_code == 'FR') { $chaine=trim($this->idprof1); @@ -3077,8 +3082,8 @@ class Societe extends CommonObject //Check NIF if (preg_match('/(^[0-9]{8}[A-Z]{1}$)/', $string)) if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 0, 8) % 23, 1)) - return 1; - else + return 1; + else return -1; //algorithm checking type code CIF @@ -3090,29 +3095,29 @@ class Societe extends CommonObject //Chek special NIF if (preg_match('/^[KLM]{1}/', $string)) if ($num[8] == chr(64 + $n) || $num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 1, 8) % 23, 1)) - return 1; - else + return 1; + else return -1; //Check CIF if (preg_match('/^[ABCDEFGHJNPQRSUVW]{1}/', $string)) if ($num[8] == chr(64 + $n) || $num[8] == substr($n, strlen($n) - 1, 1)) - return 2; - else + return 2; + else return -2; //Check NIE T if (preg_match('/^[T]{1}/', $string)) if ($num[8] == preg_match('/^[T]{1}[A-Z0-9]{8}$/', $string)) - return 3; - else + return 3; + else return -3; //Check NIE XYZ if (preg_match('/^[XYZ]{1}/', $string)) if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr(str_replace(array('X','Y','Z'), array('0','1','2'), $string), 0, 8) % 23, 1)) - return 3; - else + return 3; + else return -3; //Can not be verified @@ -3196,11 +3201,11 @@ class Societe extends CommonObject return ''; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Indique si la societe a des projets + * Indicates if the company has projects * - * @return bool true si la societe a des projets, false sinon + * @return bool true if the company has projects, false otherwise */ public function has_projects() { @@ -3280,12 +3285,17 @@ class Societe extends CommonObject // Define if third party is treated as company (or not) when nature is unknown $isacompany=empty($conf->global->MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES)?0:1; // 0 by default - if (! empty($this->tva_intra)) $isacompany=1; + if (! empty($this->tva_intra)) { + $isacompany = 1; + } + elseif (! empty($this->idprof1) || ! empty($this->idprof2) || ! empty($this->idprof3) || ! empty($this->idprof4) || ! empty($this->idprof5) || ! empty($this->idprof6)) { + $isacompany = 1; + } elseif (! empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') { // TODO Add a field is_a_company into dictionary - if (preg_match('/^TE_PRIVATE/', $this->typent_code)) $isacompany=0; - else $isacompany=1; + if (preg_match('/^TE_PRIVATE/', $this->typent_code)) $isacompany = 0; + else $isacompany = 1; } return $isacompany; @@ -3302,9 +3312,9 @@ class Societe extends CommonObject return isInEEC($this); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Charge la liste des categories fournisseurs + * Load the list of provider categories * * @return int 0 if success, <> 0 if error */ @@ -3389,10 +3399,7 @@ class Societe extends CommonObject $this->country_id=$member->country_id; $this->phone=$member->phone; // Prof phone $this->email=$member->email; - $this->skype=$member->skype; - $this->twitter=$member->twitter; - $this->facebook=$member->facebook; - $this->linkedin=$member->linkedin; + $this->socialnetworks = $member->socialnetworks; $this->client = 1; // A member is a customer by default $this->code_client = ($customercode?$customercode:-1); @@ -3522,6 +3529,9 @@ class Societe extends CommonObject $this->logo=empty($conf->global->MAIN_INFO_SOCIETE_LOGO)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO; $this->logo_small=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL; $this->logo_mini=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; + $this->logo_squarred=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED; + $this->logo_squarred_small=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL; + $this->logo_squarred_mini=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI; // Define if company use vat or not $this->tva_assuj=$conf->global->FACTURE_TVAOPTION; @@ -3557,10 +3567,12 @@ class Societe extends CommonObject $this->country_id=1; $this->country_code='FR'; $this->email='specimen@specimen.com'; - $this->skype='tom.hanson'; - $this->twitter='tomhanson'; - $this->facebook='tomhanson'; - $this->linkedin='tomhanson'; + $this->socialnetworks = array( + 'skype' => 'tom.hanson', + 'twitter' => 'tomhanson', + 'facebook' => 'tomhanson', + 'linkedin' => 'tomhanson', + ); $this->url='http://www.specimen.com'; $this->phone='0909090901'; @@ -3690,11 +3702,11 @@ class Societe extends CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set prospect level * - * @param User $user Utilisateur qui definie la remise + * @param User $user User who sets the discount * @return int <0 if KO, >0 if OK * @deprecated Use update function instead */ @@ -3720,12 +3732,12 @@ class Societe extends CommonObject /** * Return label of a given status * - * @param int|string $statut Id or code for prospection status + * @param int|string $status Id or code for prospection status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @param string $label Label to use for status for added status * @return string Libelle du statut */ - public function LibProspCommStatut($statut, $mode = 0, $label = '') + public function LibProspCommStatut($status, $mode = 0, $label = '') { // phpcs:enable global $langs; @@ -3733,38 +3745,38 @@ class Societe extends CommonObject if ($mode == 2) { - if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1).' '.$langs->trans("StatusProspect-1"); - elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0).' '.$langs->trans("StatusProspect0"); - elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1).' '.$langs->trans("StatusProspect1"); - elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2).' '.$langs->trans("StatusProspect2"); - elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3).' '.$langs->trans("StatusProspect3"); + if ($status == '-1' || $status == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1).' '.$langs->trans("StatusProspect-1"); + elseif ($status == '0' || $status == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0).' '.$langs->trans("StatusProspect0"); + elseif ($status == '1' || $status == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1).' '.$langs->trans("StatusProspect1"); + elseif ($status == '2' || $status == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2).' '.$langs->trans("StatusProspect2"); + elseif ($status == '3' || $status == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3).' '.$langs->trans("StatusProspect3"); else { - return img_action(($langs->trans("StatusProspect".$statut) != "StatusProspect".$statut) ? $langs->trans("StatusProspect".$statut) : $label, 0).' '.(($langs->trans("StatusProspect".$statut) != "StatusProspect".$statut) ? $langs->trans("StatusProspect".$statut) : $label); + return img_action(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label, 0).' '.(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label); } } if ($mode == 3) { - if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1); - elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0); - elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1); - elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2); - elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3); + if ($status == '-1' || $status == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1); + elseif ($status == '0' || $status == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0); + elseif ($status == '1' || $status == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1); + elseif ($status == '2' || $status == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2); + elseif ($status == '3' || $status == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3); else { - return img_action(($langs->trans("StatusProspect".$statut) != "StatusProspect".$statut) ? $langs->trans("StatusProspect".$statut) : $label, 0); + return img_action(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label, 0); } } if ($mode == 4) { - if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1).' '.$langs->trans("StatusProspect-1"); - elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0).' '.$langs->trans("StatusProspect0"); - elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1).' '.$langs->trans("StatusProspect1"); - elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2).' '.$langs->trans("StatusProspect2"); - elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3).' '.$langs->trans("StatusProspect3"); + if ($status == '-1' || $status == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1).' '.$langs->trans("StatusProspect-1"); + elseif ($status == '0' || $status == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0).' '.$langs->trans("StatusProspect0"); + elseif ($status == '1' || $status == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1).' '.$langs->trans("StatusProspect1"); + elseif ($status == '2' || $status == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2).' '.$langs->trans("StatusProspect2"); + elseif ($status == '3' || $status == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3).' '.$langs->trans("StatusProspect3"); else { - return img_action(($langs->trans("StatusProspect".$statut) != "StatusProspect".$statut) ? $langs->trans("StatusProspect".$statut) : $label, 0).' '.(($langs->trans("StatusProspect".$statut) != "StatusProspect".$statut) ? $langs->trans("StatusProspect".$statut) : $label); + return img_action(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label, 0).' '.(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label); } } @@ -3961,19 +3973,19 @@ class Societe extends CommonObject /** * Return the label of the customer/prospect status * - * @param int $statut Id statut + * @param int $status Id statut * @return string Libelle du statut */ - public function LibCustProspStatut($statut) + public function LibCustProspStatut($status) { // phpcs:enable global $langs; $langs->load('companies'); - if ($statut==0) return $langs->trans("NorProspectNorCustomer"); - elseif ($statut==1) return $langs->trans("Customer"); - elseif ($statut==2) return $langs->trans("Prospect"); - elseif ($statut==3) return $langs->trans("ProspectCustomer"); + if ($status==0) return $langs->trans("NorProspectNorCustomer"); + elseif ($status==1) return $langs->trans("Customer"); + elseif ($status==2) return $langs->trans("Prospect"); + elseif ($status==3) return $langs->trans("ProspectCustomer"); } diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index bf94c522f68..f93dfd0ea68 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -124,7 +124,13 @@ class SocieteAccount extends CommonObject public $date_last_login; public $date_previous_login; public $note_private; + + /** + * @var integer|string date_creation + */ public $date_creation; + + public $tms; /** diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 28b5ffc200c..b55c6a3242e 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $socid, '&societe'); $object = new Societe($db); if ($socid > 0) $object->fetch($socid); @@ -109,7 +109,7 @@ dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"), -1, 'company') $linkback = ''.$langs->trans("BackToList").''; -dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); +dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -364,7 +364,7 @@ if ($sql_select) print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, '', 0, '', '', $limit); print '
'; - print '
'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', (! empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'
'.$form->editfieldkey('Web', 'url', '', $object, 0).'
'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'
'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'
'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'
'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).'
'.$form->editfieldkey('Phone', 'phone', '', $object, 0).''.$form->editfieldkey('Fax', 'fax', '', $object, 0).'
'.img_picto('', 'object_phoning').' '.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).''.img_picto('', 'object_phoning_fax').' '.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'
'.img_picto('', 'object_email').' '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (! empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'
'.img_picto('', 'globe').' '.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).'
'; + print ''; + print '
'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'
'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'
'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'
'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).'
'."\n"; + print '
'."\n"; // Filters print ''; @@ -531,7 +531,6 @@ if ($sql_select) else { if ($objp->fk_product > 0) { - echo $form->textwithtooltip($text, $description, 3, '', '', $i, 0, ''); // Show range @@ -543,7 +542,6 @@ if ($sql_select) print (! empty($objp->description) && $objp->description!=$objp->product_label)?'
'.dol_htmlentitiesbr($objp->description):''; } } else { - if (! empty($objp->label) || ! empty($objp->description)) { if ($type==1) $text = img_object($langs->trans('Service'), 'service'); @@ -614,7 +612,7 @@ elseif (empty($type_element) || $type_element == -1) { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); - print '
'."\n"; + print '
'."\n"; // Titles with sort buttons print ''; print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left '); @@ -631,7 +629,7 @@ elseif (empty($type_element) || $type_element == -1) else { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); - print '
'."\n"; + print '
'."\n"; print ''; diff --git a/htdocs/societe/contact.php b/htdocs/societe/contact.php index 1b119e9c89a..352c9c53c35 100644 --- a/htdocs/societe/contact.php +++ b/htdocs/societe/contact.php @@ -56,7 +56,7 @@ $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $confirm = GETPOST('confirm'); $socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; if (empty($socid) && $action == 'view') $action='create'; $object = new Societe($db); @@ -150,7 +150,7 @@ dol_fiche_head($head, 'contact', $langs->trans("ThirdParty"), 0, 'company'); $linkback = ''.$langs->trans("BackToList").''; -dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom'); +dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom'); dol_fiche_end(); diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 54a2bea1d41..8e0c36aa451 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -40,10 +40,10 @@ $id=(GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->societe_id > 0) +if ($user->socid > 0) { unset($action); - $socid = $user->societe_id; + $socid = $user->socid; } $result = restrictedArea($user, 'societe', $id, '&societe'); @@ -55,6 +55,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="position_name"; @@ -113,7 +117,7 @@ if ($object->id) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 5bd493fdeba..a56762ce447 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -38,10 +38,10 @@ $hookmanager->initHooks(array('thirdpartiesindex')); $langs->load("companies"); $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; // Security check -$result=restrictedArea($user, 'societe', 0, '', '', '', ''); +$result = restrictedArea($user, 'societe', 0, '', '', '', ''); $thirdparty_static = new Societe($db); @@ -51,10 +51,10 @@ $thirdparty_static = new Societe($db); */ $transAreaType = $langs->trans("ThirdPartiesArea"); -$helpurl='EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Terceros'; +$helpurl = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Terceros'; llxHeader("", $langs->trans("ThirdParties"), $helpurl); -$linkback=''; +$linkback = ''; print load_fiche_titre($transAreaType, $linkback, 'companies'); @@ -73,42 +73,42 @@ $third = array( 'supplier' => 0, 'other' =>0 ); -$total=0; +$total = 0; $sql = "SELECT s.rowid, s.client, s.fournisseur"; -$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -$sql.= ' WHERE s.entity IN ('.getEntity('societe').')'; -if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; -if ($socid) $sql.= " AND s.rowid = ".$socid; -if (! $user->rights->fournisseur->lire) $sql.=" AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; +if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +$sql .= ' WHERE s.entity IN ('.getEntity('societe').')'; +if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($socid) $sql .= " AND s.rowid = ".$socid; +if (!$user->rights->fournisseur->lire) $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible //print $sql; $result = $db->query($sql); if ($result) { while ($objp = $db->fetch_object($result)) { - $found=0; - if (! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS) && ($objp->client == 2 || $objp->client == 3)) { $found=1; $third['prospect']++; } - if (! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS) && ($objp->client == 1 || $objp->client == 3)) { $found=1; $third['customer']++; } - if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $objp->fournisseur) { $found=1; $third['supplier']++; } - if (! empty($conf->societe->enabled) && $objp->client == 0 && $objp->fournisseur == 0) { $found=1; $third['other']++; } + $found = 0; + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS) && ($objp->client == 2 || $objp->client == 3)) { $found = 1; $third['prospect']++; } + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS) && ($objp->client == 1 || $objp->client == 3)) { $found = 1; $third['customer']++; } + if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $objp->fournisseur) { $found = 1; $third['supplier']++; } + if (!empty($conf->societe->enabled) && $objp->client == 0 && $objp->fournisseur == 0) { $found = 1; $third['other']++; } if ($found) $total++; } } else dol_print_error($db); print '
'; -print '
'.$langs->trans("FeatureNotYetAvailable").'
'."\n"; +print '
'."\n"; print ''; -if (! empty($conf->use_javascript_ajax) && ((round($third['prospect'])?1:0)+(round($third['customer'])?1:0)+(round($third['supplier'])?1:0)+(round($third['other'])?1:0) >= 2)) +if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + (round($third['customer']) ? 1 : 0) + (round($third['supplier']) ? 1 : 0) + (round($third['other']) ? 1 : 0) >= 2)) { print '"; - $statstring.= ''; - $statstring.= ""; + $statstring .= ''; + $statstring .= ""; } - if (! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { - $statstring.= ""; - $statstring.= ''; - $statstring.= ""; + $statstring .= ""; + $statstring .= ''; + $statstring .= ""; } - if (! empty($conf->fournisseur->enabled) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $user->rights->fournisseur->lire) + if (!empty($conf->fournisseur->enabled) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $user->rights->fournisseur->lire) { $statstring2 = ""; - $statstring2.= ''; - $statstring2.= ""; + $statstring2 .= ''; + $statstring2 .= ""; } print $statstring; print $statstring2; @@ -149,7 +149,7 @@ print ''; print '
'.$langs->trans("Statistics").'
'; - $dataseries=array(); - if (! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) $dataseries[]=array($langs->trans("Prospects"), round($third['prospect'])); - if (! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) $dataseries[]=array($langs->trans("Customers"), round($third['customer'])); - if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) $dataseries[]=array($langs->trans("Suppliers"), round($third['supplier'])); - if (! empty($conf->societe->enabled)) $dataseries[]=array($langs->trans("Others"), round($third['other'])); + $dataseries = array(); + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) $dataseries[] = array($langs->trans("Prospects"), round($third['prospect'])); + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) $dataseries[] = array($langs->trans("Customers"), round($third['customer'])); + if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) $dataseries[] = array($langs->trans("Suppliers"), round($third['supplier'])); + if (!empty($conf->societe->enabled)) $dataseries[] = array($langs->trans("Others"), round($third['other'])); include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $dolgraph = new DolGraph(); $dolgraph->SetData($dataseries); @@ -122,23 +122,23 @@ if (! empty($conf->use_javascript_ajax) && ((round($third['prospect'])?1:0)+(rou } else { - if (! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { $statstring = "
'.$langs->trans("Prospects").''.round($third['prospect']).'
'.$langs->trans("Prospects").''.round($third['prospect']).'
'.$langs->trans("Customers").''.round($third['customer']).'
'.$langs->trans("Customers").''.round($third['customer']).'
'.$langs->trans("Suppliers").''.round($third['supplier']).'
'.$langs->trans("Suppliers").''.round($third['supplier']).'
'; print ''; -if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) +if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $elementtype = 'societe'; @@ -157,45 +157,45 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS print '
'; print '
'; - print ''; + print '
'; print ''; print ''; - $total+=$obj->nb; + $total += $obj->nb; $i++; } } @@ -232,22 +232,22 @@ print '
'; /* - * Last third parties modified + * Latest modified third parties */ -$max=15; +$max = 15; $sql = "SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur"; -$sql.= ", s.code_client"; -$sql.= ", s.code_fournisseur"; -$sql.= ", s.logo"; -$sql.= ", s.canvas, s.tms as datem, s.status as status"; -$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -$sql.= ' WHERE s.entity IN ('.getEntity('societe').')'; -if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; -if ($socid) $sql.= " AND s.rowid = ".$socid; -if (! $user->rights->fournisseur->lire) $sql.=" AND (s.fournisseur != 1 OR s.client != 0)"; -$sql.= $db->order("s.tms", "DESC"); -$sql.= $db->plimit($max, 0); +$sql .= ", s.code_client"; +$sql .= ", s.code_fournisseur"; +$sql .= ", s.logo"; +$sql .= ", s.canvas, s.tms as datem, s.status as status"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; +if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +$sql .= ' WHERE s.entity IN ('.getEntity('societe').')'; +if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($socid) $sql .= " AND s.rowid = ".$socid; +if (!$user->rights->fournisseur->lire) $sql .= " AND (s.fournisseur != 1 OR s.client != 0)"; +$sql .= $db->order("s.tms", "DESC"); +$sql .= $db->plimit($max, 0); //print $sql; $result = $db->query($sql); @@ -263,7 +263,7 @@ if ($result) print "\n\n"; print '
'; - print '
'.$langs->trans("Categories").'
'; $sql = "SELECT c.label, count(*) as nb"; - $sql.= " FROM ".MAIN_DB_PREFIX."categorie_societe as cs"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; - $sql.= " WHERE c.type = 2"; - if (! is_numeric($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) $sql.= " AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)."'"; - $sql.= " AND c.entity IN (".getEntity('category').")"; - $sql.= " GROUP BY c.label"; - $total=0; + $sql .= " FROM ".MAIN_DB_PREFIX."categorie_societe as cs"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; + $sql .= " WHERE c.type = 2"; + if (!is_numeric($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) $sql .= " AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)."'"; + $sql .= " AND c.entity IN (".getEntity('category').")"; + $sql .= " GROUP BY c.label"; + $total = 0; $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); - $i=0; - if (! empty($conf->use_javascript_ajax) ) + $i = 0; + if (!empty($conf->use_javascript_ajax)) { - $dataseries=array(); - $rest=0; - $nbmax=10; + $dataseries = array(); + $rest = 0; + $nbmax = 10; while ($i < $num) { $obj = $db->fetch_object($result); if ($i < $nbmax) { - $dataseries[]=array($obj->label, round($obj->nb)); + $dataseries[] = array($obj->label, round($obj->nb)); } else { - $rest+=$obj->nb; + $rest += $obj->nb; } - $total+=$obj->nb; + $total += $obj->nb; $i++; } if ($i > $nbmax) { - $dataseries[]=array($langs->trans("Other"), round($rest)); + $dataseries[] = array($langs->trans("Other"), round($rest)); } include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $dolgraph = new DolGraph(); @@ -214,7 +214,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS $obj = $db->fetch_object($result); print '
'.$obj->label.''.$obj->nb.'
'; + print '
'; print ''; print ''; @@ -274,16 +274,16 @@ if ($result) { $objp = $db->fetch_object($result); - $thirdparty_static->id=$objp->rowid; - $thirdparty_static->name=$objp->name; - $thirdparty_static->client=$objp->client; - $thirdparty_static->fournisseur=$objp->fournisseur; + $thirdparty_static->id = $objp->rowid; + $thirdparty_static->name = $objp->name; + $thirdparty_static->client = $objp->client; + $thirdparty_static->fournisseur = $objp->fournisseur; $thirdparty_static->logo = $objp->logo; - $thirdparty_static->datem=$db->jdate($objp->datem); - $thirdparty_static->status=$objp->status; + $thirdparty_static->datem = $db->jdate($objp->datem); + $thirdparty_static->status = $objp->status; $thirdparty_static->code_client = $objp->code_client; $thirdparty_static->code_fournisseur = $objp->code_fournisseur; - $thirdparty_static->canvas=$objp->canvas; + $thirdparty_static->canvas = $objp->canvas; $thirdparty_static->email = $objp->email; print ''; @@ -293,21 +293,21 @@ if ($result) print "\n"; // Type print ''; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index e29edb07717..260c165064e 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -55,7 +55,7 @@ if ($contextpage == 'poslist') // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $socid, ''); $search_all=trim(GETPOST('search_all', 'alphanohtml')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); @@ -210,15 +210,16 @@ $arrayfields=array( 's.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100), ); // Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); - } + foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + { + if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } - -$object = new Societe($db); +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); /* @@ -233,7 +234,7 @@ if ($action=="change") // Change customer for TakePOS // @TODO Check if draft invoice already exists, if not create it or return a warning to ask to enter at least one line to have it created automatically $sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; $resql = $db->query($sql); - ?> + ?> - rights->societe->lire; - $permtodelete = $user->rights->societe->supprimer; + $permissiontoread = $user->rights->societe->lire; + $permissiontodelete = $user->rights->societe->supprimer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; @@ -388,7 +389,9 @@ if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; if ($search_categ_sup) $sql .= ", cs.fk_categorie, cs.fk_soc"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -1245,8 +1248,8 @@ while ($i < min($num, $limit)) print '"; if (! $i) $totalarray['nbfield']++; @@ -1276,7 +1279,7 @@ while ($i < min($num, $limit)) // Status if (! empty($arrayfields['s.status']['checked'])) { - print ''; + print ''; if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['s.import_key']['checked'])) diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 4d20f050518..0f2bc4d8002 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -35,7 +35,7 @@ $langs->load("companies"); // Security check $id = GETPOST('id')?GETPOST('id', 'int'):GETPOST('socid', 'int'); -if ($user->societe_id) $id=$user->societe_id; +if ($user->socid) $id=$user->socid; $result = restrictedArea($user, 'societe', $id, '&societe'); $object = new Societe($db); @@ -78,7 +78,7 @@ if ($object->id > 0) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); $cssclass='titlefield'; //if ($action == 'editnote_public') $cssclass='titlefieldcreate'; diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index 54536fa7502..d3f4c30f575 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -39,7 +39,7 @@ $actionid = GETPOST('actionid'); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', '', ''); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -156,7 +156,7 @@ if ($result > 0) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 19b11994114..5636f09b3a4 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -44,7 +44,7 @@ $langs->loadLangs(array("companies","commercial","banks","bills",'paypal','strip // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', '', ''); $id=GETPOST("id", "int"); @@ -489,7 +489,7 @@ if (empty($reshook)) $id = $socid; $upload_dir = $conf->societe->multidir_output[$object->entity]; - $permissioncreate=$user->rights->societe->creer; + $permissiontoadd=$user->rights->societe->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; $id = $savid; @@ -564,13 +564,13 @@ if (empty($reshook)) $db->begin(); - if (empty($newcu)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account WHERE site = 'stripe' AND fk_soc = ".$object->id." AND status = ".$servicestatus." AND entity = ".$conf->entity; - } else { - $sql = 'UPDATE '.MAIN_DB_PREFIX."societe_account"; - $sql.= " SET key_account = '".$db->escape(GETPOST('key_account', 'alpha'))."'"; - $sql.= " WHERE site = 'stripe' AND fk_soc = ".$object->id." AND status = ".$servicestatus." AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! - } + if (empty($newcu)) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account WHERE site = 'stripe' AND fk_soc = ".$object->id." AND status = ".$servicestatus." AND entity = ".$conf->entity; + } else { + $sql = 'UPDATE '.MAIN_DB_PREFIX."societe_account"; + $sql.= " SET key_account = '".$db->escape(GETPOST('key_account', 'alpha'))."'"; + $sql.= " WHERE site = 'stripe' AND fk_soc = ".$object->id." AND status = ".$servicestatus." AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! + } $resql = $db->query($sql); $num = $db->num_rows($resql); @@ -609,37 +609,33 @@ if (empty($reshook)) $db->begin(); - if (empty($newsup)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity; - } else { - try { - $stripesup = \Stripe\Account::retrieve($db->escape(GETPOST('key_account_supplier', 'alpha'))); - $tokenstring['stripe_user_id'] = $stripesup->id; - $tokenstring['type'] = $stripesup->type; - $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " SET tokenstring = '".dol_json_encode($tokenstring)."'"; - $sql.= " WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! - } - catch(Exception $e) - { - $error++; - setEventMessages($e->getMessage(), null, 'errors'); - } + if (empty($newsup)) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity; + } else { + try { + $stripesup = \Stripe\Account::retrieve($db->escape(GETPOST('key_account_supplier', 'alpha'))); + $tokenstring['stripe_user_id'] = $stripesup->id; + $tokenstring['type'] = $stripesup->type; + $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; + $sql.= " SET tokenstring = '".dol_json_encode($tokenstring)."'"; + $sql.= " WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! + } catch(Exception $e) { + $error++; + setEventMessages($e->getMessage(), null, 'errors'); } + } $resql = $db->query($sql); $num = $db->num_rows($resql); if (empty($num) && !empty($newsup)) { - try { - $stripesup = \Stripe\Account::retrieve($db->escape(GETPOST('key_account_supplier', 'alpha'))); - $tokenstring['stripe_user_id'] = $stripesup->id; - $tokenstring['type'] = $stripesup->type; - $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, fk_soc, entity, tokenstring)"; - $sql .= " VALUES ('".$service."', ".$object->id.", ".$conf->entity.", '".dol_json_encode($tokenstring)."')"; - } - catch(Exception $e) - { + try { + $stripesup = \Stripe\Account::retrieve($db->escape(GETPOST('key_account_supplier', 'alpha'))); + $tokenstring['stripe_user_id'] = $stripesup->id; + $tokenstring['type'] = $stripesup->type; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, fk_soc, entity, tokenstring)"; + $sql .= " VALUES ('".$service."', ".$object->id.", ".$conf->entity.", '".dol_json_encode($tokenstring)."')"; + } catch(Exception $e) { $error++; setEventMessages($e->getMessage(), null, 'errors'); } @@ -700,23 +696,25 @@ if (empty($reshook)) { try { if (preg_match('/pm_/', $source)) - { - $payment_method = \Stripe\PaymentMethod::retrieve($source, array("stripe_account" => $stripeacc)); - if ($payment_method) - { - $payment_method->detach(); + { + $payment_method = \Stripe\PaymentMethod::retrieve($source, array("stripe_account" => $stripeacc)); + if ($payment_method) + { + $payment_method->detach(); } } else { - $cu=$stripe->customerStripe($object, $stripeacc, $servicestatus); - $card=$cu->sources->retrieve("$source"); - if ($card) - { - // $card->detach(); Does not work with card_, only with src_ - if (method_exists($card, 'detach')) $card->detach(); - else $card->delete(); - } + $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus); + $card = $cu->sources->retrieve("$source"); + if ($card) { + // $card->detach(); Does not work with card_, only with src_ + if (method_exists($card, 'detach')) { + $card->detach(); + } else { + $card->delete(); + } + } } $url=DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; @@ -806,7 +804,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field @@ -950,7 +948,6 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' try { $customerstripe=$stripe->customerStripe($object, $stripeacc, $servicestatus); if ($customerstripe->id) { - // When using the Charge API architecture if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { @@ -995,7 +992,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''."\n"; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'.$transRecordedType.' 
'; - if ($thirdparty_static->client==1 || $thirdparty_static->client==3) + if ($thirdparty_static->client == 1 || $thirdparty_static->client == 3) { - $thirdparty_static->name=$langs->trans("Customer"); + $thirdparty_static->name = $langs->trans("Customer"); print $thirdparty_static->getNomUrl(0, 'customer', 0, 1); } if ($thirdparty_static->client == 3 && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print " / "; - if (($thirdparty_static->client==2 || $thirdparty_static->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) + if (($thirdparty_static->client == 2 || $thirdparty_static->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { - $thirdparty_static->name=$langs->trans("Prospect"); + $thirdparty_static->name = $langs->trans("Prospect"); print $thirdparty_static->getNomUrl(0, 'prospect', 0, 1); } - if (! empty($conf->fournisseur->enabled) && $thirdparty_static->fournisseur) + if (!empty($conf->fournisseur->enabled) && $thirdparty_static->fournisseur) { if ($thirdparty_static->client) print " / "; - $thirdparty_static->name=$langs->trans("Supplier"); + $thirdparty_static->name = $langs->trans("Supplier"); print $thirdparty_static->getNomUrl(0, 'supplier', 0, 1); } print ''; if ($companystatic->fk_parent > 0) { - $companyparent->fetch($companystatic->fk_parent); - print $companyparent->getNomUrl(1); + $companyparent->fetch($companystatic->fk_parent); + print $companyparent->getNomUrl(1); } print "'.$companystatic->getLibStatut(3).''.$companystatic->getLibStatut(5).'
'."\n"; + print '
'."\n"; print ''; if (! empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { @@ -1297,54 +1294,60 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } print "
"; print "
"; - print '
'; + print '
'; } // List of Stripe payment modes if (! empty($conf->stripe->enabled) && ! empty($conf->stripeconnect->enabled) && $object->fournisseur && ! empty($stripesupplieracc)) { - print load_fiche_titre($langs->trans('StripeBalance').($stripesupplieracc?' (Stripe connection with StripeConnect account '.$stripesupplieracc.')':' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, ''); - $balance = \Stripe\Balance::retrieve(array("stripe_account" => $stripesupplieracc)); - print ''."\n"; + print load_fiche_titre($langs->trans('StripeBalance').($stripesupplieracc?' (Stripe connection with StripeConnect account '.$stripesupplieracc.')':' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, ''); + $balance = \Stripe\Balance::retrieve(array("stripe_account" => $stripesupplieracc)); + print '
'."\n"; print ''; print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; - $currencybalance = array(); + $currencybalance = array(); if (is_array($balance->available) && count($balance->available)) { foreach ($balance->available as $cpt) { - $arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (! in_array($cpt->currency, $arrayzerounitcurrency)) $currencybalance[$cpt->currency]->available=$cpt->amount / 100; - else $currencybalance[$cpt->currency]->available=$cpt->amount; - $currencybalance[$cpt->currency]->currency=$cpt->currency; + $arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); + if (! in_array($cpt->currency, $arrayzerounitcurrency)) { + $currencybalance[$cpt->currency]->available=$cpt->amount / 100; + } else { + $currencybalance[$cpt->currency]->available=$cpt->amount; + } + $currencybalance[$cpt->currency]->currency=$cpt->currency; } } - if (is_array($balance->pending) && count($balance->pending)) + if (is_array($balance->pending) && count($balance->pending)) { foreach ($balance->pending as $cpt) { - $arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (! in_array($cpt->currency, $arrayzerounitcurrency)) $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount / 100; - else $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount; + $arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); + if (! in_array($cpt->currency, $arrayzerounitcurrency)) { + $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount / 100; + } else { + $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount; + } } - } + } if (is_array($currencybalance)) { foreach ($currencybalance as $cpt) { - print ''; + print ''; } } - print '
'.$langs->trans('Currency').''.$langs->trans('Available').''.$langs->trans('Pending').''.$langs->trans('Total').'
'.$langs->trans('Total').'
'.$langs->trans("Currency".strtoupper($cpt->currency)).''.price($cpt->available, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).''.price($cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).''.price($cpt->available+$cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).'
'.$langs->trans("Currency".strtoupper($cpt->currency)).''.price($cpt->available, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).''.price($cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).''.price($cpt->available+$cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).'
'; - print '
'; + print '
'; + print '
'; } // List of bank accounts @@ -1357,7 +1360,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if (is_array($rib_list)) { print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print ''; + print '
'; print ''; print_liste_field_titre("LabelRIB"); @@ -1387,7 +1390,6 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '
'; $string=''; foreach ($rib->getFieldsToShow() as $val) { - if ($val == 'BankCode') { $string .= $rib->code_banque.' '; } elseif ($val == 'BankAccountNumber') { @@ -1396,12 +1398,13 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $string .= $rib->code_guichet.' '; } elseif ($val == 'BankAccountNumberKey') { $string .= $rib->cle_rib.' '; - /* Already output after - }elseif ($val == 'BIC') { - $string .= $rib->bic.' '; - }elseif ($val == 'IBAN') { - $string .= $rib->iban.' ';*/ } + // Already output after + // } elseif ($val == 'BIC') { + // $string .= $rib->bic.' '; + // } elseif ($val == 'IBAN') { + // $string .= $rib->iban.' ';*/ + //} } if (! empty($rib->label) && $rib->number) { if (! checkBanForAccount($rib)) { @@ -1612,7 +1615,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -1627,7 +1630,6 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) // Show fields of bank account foreach ($companybankaccount->getFieldsToShow(1) as $val) { - $require=false; if ($val == 'BankCode') { $name = 'code_banque'; @@ -1682,7 +1684,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) { print '
'; - print ''; + print '
'; if (empty($companybankaccount->rum)) $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); @@ -1719,7 +1721,7 @@ if ($socid && $action == 'editcard' && $user->rights->societe->creer) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -1767,7 +1769,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -1782,7 +1784,6 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) // Show fields of bank account foreach ($companybankaccount->getFieldsToShow(1) as $val) { - $require=false; if ($val == 'BankCode') { $name = 'code_banque'; @@ -1831,7 +1832,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) { print '
'; - print '
'; + print '
'; // RUM print ''; @@ -1868,7 +1869,7 @@ if ($socid && $action == 'createcard' && $user->rights->societe->creer) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 931ccd7ab60..47e85a0bf6b 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -46,8 +46,8 @@ $cancel = GETPOST('cancel', 'alpha'); // Security check $socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int'); -if ($user->societe_id) - $socid = $user->societe_id; +if ($user->socid) + $socid = $user->socid; $result = restrictedArea($user, 'societe', $socid, '&societe'); $object = new Societe($db); @@ -73,7 +73,6 @@ if (empty($reshook)) } if ($action == 'add_customer_price_confirm' && ! $cancel && ($user->rights->produit->creer || $user->rights->service->creer)) { - $update_child_soc = GETPOST('updatechildprice'); // add price by customer @@ -146,7 +145,6 @@ if (empty($reshook)) } if ($action == 'update_customer_price_confirm' && ! $_POST ["cancel"] && ($user->rights->produit->creer || $user->rights->service->creer)) { - $prodcustprice->fetch(GETPOST('lineid', 'int')); $update_child_soc = GETPOST('updatechildprice'); @@ -189,7 +187,7 @@ dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), -1, 'company'); $linkback = ''.$langs->trans("BackToList").''; -dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); +dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -228,7 +226,6 @@ dol_fiche_end(); if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { - $prodcustprice = new Productcustomerprice($db); $sortfield = GETPOST("sortfield", 'alpha'); @@ -254,7 +251,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { } if ($action == 'add_customer_price') { - // Create mode print load_fiche_titre($langs->trans('PriceByCustomer')); @@ -263,7 +259,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; print ''; print ''; - print '
'.$langs->trans("RUM").'
'; + print '
'; print ''; print ''; print ''; // Multicurrency rate - print ''; - print ''; + print ''; } - print ''; } /* Not for supplier proposals @@ -1791,7 +1806,7 @@ if ($action == 'create') $form_close = ''; if (! empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) $form_close .= '

'.$langs->trans('SupplierProposalRefFournNotice').'

'; // TODO Suggest a permanent checkbox instead of option $form_close .= ''; - $form_close .= '
' . $langs->trans('Product') . ''; @@ -327,7 +323,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '
'; } elseif ($action == 'edit_customer_price') { - // Edit mode print load_fiche_titre($langs->trans('PriceByCustomer')); @@ -342,7 +337,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; print ''; print ''; - print ''; + print '
'; print ''; print ''; $staticprod = new Product($db); @@ -407,7 +402,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '
'; } elseif ($action == 'showlog_customer_price') { - print ''."\n"; $filter = array ( @@ -431,11 +425,10 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print_barre_liste($langs->trans('PriceByCustomerLog'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords); if (count($prodcustprice->lines) > 0) { - print ''; print ''; - print '
' . $langs->trans('Product') . '
'; + print '
'; print ''; print ''; @@ -451,7 +444,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; foreach ($prodcustprice->lines as $line) { - print ''; $staticprod = new Product($db); $staticprod->fetch($line->fk_product); @@ -524,7 +516,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; print ''; - print '
' . $langs->trans("Product") . '
'; + print '
'; print ''; print ''; diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index 8f825bfc18c..1ff2c24956e 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -35,7 +35,7 @@ $langs->loadLangs(array("companies", "projects")); // Security check $socid = GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $socid, '&societe'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -82,7 +82,7 @@ if ($socid) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index db18a1bf6af..0894935b962 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -51,7 +51,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Security check -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $id, ''); $object = new Societe($db); @@ -166,7 +166,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom'); print '
'; @@ -301,6 +301,8 @@ if ($id > 0 || ! empty($ref)) // Type $membertypestatic->id=$objp->type_id; $membertypestatic->libelle=$objp->type; + $membertypestatic->label=$objp->type; + print '
'; diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 8bb112fa998..9a17ac1e202 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -42,6 +42,8 @@ if ($nbofsalesrepresentative > 0) $userstatic->statut=$val['statut']; $userstatic->photo=$val['photo']; $userstatic->email=$val['email']; + $userstatic->phone=$val['phone']; + $userstatic->job=$val['job']; $userstatic->entity=$val['entity']; print $userstatic->getNomUrl(-1); print ' '; diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 0e0c5ac2cc8..43387d9d8c2 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -47,7 +47,7 @@ $search_status=GETPOST('search_status'); // Security check $id = GETPOST('id', 'int')?GETPOST('id', 'int'):GETPOST('socid', 'int'); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'societe', $socid, '&societe'); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -156,8 +156,8 @@ if (empty($reshook)) // Mass actions $objectclass='WebsiteAccount'; $objectlabel='WebsiteAccount'; - $permtoread = $user->rights->societe->lire; - $permtodelete = $user->rights->societe->supprimer; + $permissiontoread = $user->rights->societe->lire; + $permissiontodelete = $user->rights->societe->supprimer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -195,7 +195,7 @@ dol_fiche_head($head, 'website', $langs->trans("ThirdParty"), - 1, 'company'); $linkback = '' . $langs->trans("BackToList") . ''; -dol_banner_tab($object, 'socid', $linkback, ($user->societe_id ? 0 : 1), 'rowid', 'nom'); +dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); print '
'; @@ -428,14 +428,6 @@ print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', '', print '
'."\n"; -// Detect if we need a fetch on each output line -$needToFetchEachLine=0; -foreach ($extrafields->attribute_computed as $key => $val) -{ - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object -} - - // Detect if we need a fetch on each output line $needToFetchEachLine=0; if (is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) @@ -509,26 +501,8 @@ while ($i < min($num, $limit)) } // Show total line -if (isset($totalarray['pos'])) -{ - print ''; - $i=0; - while ($i < $totalarray['nbfield']) - { - $i++; - if (! empty($totalarray['pos'][$i])) print ''; - else - { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } - else print ''; - } - } - print ''; -} +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 05d8937f293..72de4e55877 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -167,7 +167,7 @@ print $langs->trans("StripeDesc")."
\n"; print '
'; -print '
' . $langs->trans("Product") . ''; print $membertypestatic->getNomUrl(1, 32); print '
'.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").'
'; +print '
'; print ''; print ''; print ''; @@ -177,12 +177,12 @@ print "\n"; print ''; print ''; if (empty($conf->stripeconnect->enabled)) @@ -203,7 +203,7 @@ if (empty($conf->stripeconnect->enabled)) print ''.$langs->trans("STRIPE_TEST_WEBHOOK_KEY").'
'.$langs->trans("AccountParameter").''.$langs->trans("Value").'
'; print $langs->trans("StripeLiveEnabled").''; - if ($conf->use_javascript_ajax) { +if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_LIVE'); - } else { +} else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("STRIPE_LIVE", $arrval, $conf->global->STRIPE_LIVE); - } +} print '
'; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print ''; - print '   '.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx
'; + print '   '.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx
'; } print ''; print '   '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx'; @@ -239,7 +239,7 @@ if (empty($conf->stripeconnect->enabled)) print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); } - //print $endpoint; + //print $endpoint; } else { @@ -275,8 +275,8 @@ if (empty($conf->stripeconnect->enabled)) print '
'; print ''.$langs->trans("STRIPE_LIVE_WEBHOOK_KEY").''; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - print ''; - print '   '.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx
'; + print ''; + print '   '.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx
'; } print ''; print '   '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx'; @@ -312,7 +312,7 @@ if (empty($conf->stripeconnect->enabled)) print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); } - //print $endpoint; + //print $endpoint; } else { @@ -333,7 +333,7 @@ print '
'; print '
'; -print ''; +print '
'; print ''; print ''; print ''; @@ -366,14 +366,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // What is this for ? // Activate Payment Request API if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code { - print ''; } @@ -382,12 +382,12 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code { print ''; } diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index 1189b94923b..f398a013fb6 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2018 Thibault FOUCART + * Copyright (C) 2019 Frédéric France * * 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 @@ -32,7 +33,7 @@ $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; //$result = restrictedArea($user, 'salaries', '', '', ''); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -121,29 +122,28 @@ if (!$rowid) //print $list; foreach ($list->data as $charge) { - if ($charge->refunded=='1'){ + if ($charge->refunded=='1') { $status = img_picto($langs->trans("refunded"), 'statut6'); - } elseif ($charge->paid=='1'){ - $status = img_picto($langs->trans("".$charge->status.""), 'statut4'); - } else { + } elseif ($charge->paid=='1') { + $status = img_picto($langs->trans("".$charge->status.""), 'statut4'); + } else { $label="Message: ".$charge->failure_message."
"; $label.="Réseau: ".$charge->outcome->network_status."
"; $label.="Statut: ".$langs->trans("".$charge->outcome->seller_message.""); $status = $form->textwithpicto(img_picto($langs->trans("".$charge->status.""), 'statut8'), $label, 1); - } + } - if ($charge->payment_method_details->type=='card') - { + if ($charge->payment_method_details->type=='card') { $type = $langs->trans("card"); - } elseif ($charge->source->type=='card'){ + } elseif ($charge->source->type=='card'){ $type = $langs->trans("card"); - } elseif ($charge->payment_method_details->type=='three_d_secure'){ + } elseif ($charge->payment_method_details->type=='three_d_secure'){ $type = $langs->trans("card3DS"); - } + } - if (! empty($charge->payment_intent)) { - $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); - } + if (! empty($charge->payment_intent)) { + $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); + } // The metadata FULLTAG is defined by the online payment page $FULLTAG=$charge->metadata->FULLTAG; @@ -211,19 +211,25 @@ if (!$rowid) print "\n"; // Origine print "
\n"; // Date payment print '\n"; @@ -241,7 +247,6 @@ if (!$rowid) print "\n"; } } else { - } // End of page diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 1f1610438e8..c30e3169ee5 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -62,6 +62,9 @@ class Stripe extends CommonObject public $code; public $declinecode; + /** + * @var string Message + */ public $message; /** @@ -315,9 +318,10 @@ class Stripe extends CommonObject * @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok) * @param string $payment_method 'pm_....' (if known) * @param string $off_session If we use an already known payment method to pay off line. + * @param string $noidempotency_key Do not use the idempotency_key when creating the PaymentIntent * @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found and failed to create */ - public function getPaymentIntent($amount, $currency_code, $tag, $description = '', $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false, $payment_method = null, $off_session = 0) + public function getPaymentIntent($amount, $currency_code, $tag, $description = '', $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false, $payment_method = null, $off_session = 0, $noidempotency_key = 0) { global $conf; @@ -338,17 +342,21 @@ class Stripe extends CommonObject } elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL; } - if (! in_array($currency_code, $arrayzerounitcurrency)) $stripefee = round($fee * 100); - else $stripefee = round($fee); + if (! in_array($currency_code, $arrayzerounitcurrency)) { + $stripefee = round($fee * 100); + } else { + $stripefee = round($fee); + } $paymentintent = null; if (is_object($object)) { // Warning. If a payment was tried and failed, a payment intent was created. - // But if we change someting on object to pay (amount or other), reusing same payment intent is not allowed. - // Recommanded solution is to recreate a new payment intent each time we need one (old one will be automatically closed after a delay), - // that's why i comment the part of code to retreive a payment intent with object id (never mind if we cumulate payment intent with old that will not be used) + // But if we change someting on object to pay (amount or other that does not change the idempotency key), reusing same payment intent is not allowed. + // Recommanded solution is to recreate a new payment intent each time we need one (old one will be automatically closed after a delay), Stripe will + // automatically return the existing payment intent if idempotency is provided when we try to create the new one. + // That's why we can comment the part of code to retreive a payment intent with object id (never mind if we cumulate payment intent with old ones that will not be used) /* $sql = "SELECT pi.ext_payment_id, pi.entity, pi.fk_facture, pi.sourcetype, pi.ext_payment_site"; $sql.= " FROM " . MAIN_DB_PREFIX . "prelevement_facture_demande as pi"; @@ -439,14 +447,15 @@ class Stripe extends CommonObject global $stripearrayofkeysbyenv; \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$status]['secret_key']); - // Note: If all data for payment intent are same than a previous on, even if we use 'create', Stripe will return ID of the old existing payment intent. - if (empty($key)) { // If the Stripe connect account not set, we use common API usage - $paymentintent = \Stripe\PaymentIntent::create($dataforintent, array("idempotency_key" => "$description")); - //$paymentintent = \Stripe\PaymentIntent::create($dataforintent, array()); - } else { - $paymentintent = \Stripe\PaymentIntent::create($dataforintent, array("idempotency_key" => "$description", "stripe_account" => $key)); - //$paymentintent = \Stripe\PaymentIntent::create($dataforintent, array("stripe_account" => $key)); + $arrayofoptions = array(); + if (empty($noidempotency_key)) { + $arrayofoptions["idempotency_key"] = $description; } + // Note: If all data for payment intent are same than a previous on, even if we use 'create', Stripe will return ID of the old existing payment intent. + if (! empty($key)) { // If the Stripe connect account not set, we use common API usage + $arrayofoptions["stripe_account"] = $key; + } + $paymentintent = \Stripe\PaymentIntent::create($dataforintent, $arrayofoptions); // Store the payment intent if (is_object($object)) @@ -803,7 +812,8 @@ class Stripe extends CommonObject } /** - * Create charge with public/payment/newpayment.php, stripe/card.php, cronjobs or REST API + * Create charge. + * This is called by page htdocs/stripe/payment.php and may be deprecated. * * @param int $amount Amount to pay * @param string $currency EUR, GPB... @@ -854,12 +864,12 @@ class Stripe extends CommonObject $description = ""; $ref = ""; - if ($origin == order) { + if ($origin == 'order') { $order = new Commande($this->db); $order->fetch($item); $ref = $order->ref; $description = "ORD=" . $ref . ".CUS=" . $societe->id.".PM=stripe"; - } elseif ($origin == invoice) { + } elseif ($origin == 'invoice') { $invoice = new Facture($this->db); $invoice->fetch($item); $ref = $invoice->ref; @@ -881,9 +891,42 @@ class Stripe extends CommonObject global $stripearrayofkeysbyenv; \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$status]['secret_key']); - if (empty($conf->stripeconnect->enabled)) + if (empty($conf->stripeconnect->enabled)) // With a common Stripe account { - if (preg_match('/acct_/i', $source)) + if (preg_match('/pm_/i', $source)) + { + $stripecard = $source; + $amountstripe = $stripeamount; + $FULLTAG = 'PFBO'; // Payment From Back Office + $stripe = $return; + $amounttopay = $amount; + $servicestatus = $status; + + dol_syslog("* createPaymentStripe get stripeacc", LOG_DEBUG); + $stripeacc = $stripe->getStripeAccount($service); // Get Stripe OAuth connect account if it exists (no network access here) + + dol_syslog("* createPaymentStripe Create payment on card ".$stripecard->id.", amounttopay=".$amounttopay.", amountstripe=".$amountstripe.", FULLTAG=".$FULLTAG, LOG_DEBUG); + + // Create payment intent and charge payment (confirmnow = true) + $paymentintent = $stripe->getPaymentIntent($amounttopay, $currency, $FULLTAG, $description, $invoice, $customer->id, $stripeacc, $servicestatus, 0, 'automatic', true, $stripecard->id, 1); + + $charge = new stdClass(); + if ($paymentintent->status == 'succeeded') + { + $charge->status = 'ok'; + } + else + { + $charge->status = 'failed'; + $charge->failure_code = $stripe->code; + $charge->failure_message = $stripe->error; + $charge->failure_declinecode = $stripe->declinecode; + $stripefailurecode = $stripe->code; + $stripefailuremessage = $stripe->error; + $stripefailuredeclinecode = $stripe->declinecode; + } + } + elseif (preg_match('/acct_/i', $source)) { $charge = \Stripe\Charge::create(array( "amount" => "$stripeamount", @@ -914,12 +957,14 @@ class Stripe extends CommonObject $charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$description")); } } else { - $fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE; - if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { - $fee = $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL; - } elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { - $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL; - } + // With Stripe Connect + $fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE; + if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { + $fee = $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL; + } elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { + $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL; + } + if (! in_array($currency, $arrayzerounitcurrency)) $stripefee = round($fee * 100); else $stripefee = round($fee); @@ -942,22 +987,64 @@ class Stripe extends CommonObject $paymentarray["receipt_email"] = $societe->email; } - $charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$description", "stripe_account" => "$account")); + if (preg_match('/pm_/i', $source)) + { + $stripecard = $source; + $amountstripe = $stripeamount; + $FULLTAG = 'PFBO'; // Payment From Back Office + $stripe = $return; + $amounttopay = $amount; + $servicestatus = $status; + + dol_syslog("* createPaymentStripe get stripeacc", LOG_DEBUG); + $stripeacc = $stripe->getStripeAccount($service); // Get Stripe OAuth connect account if it exists (no network access here) + + dol_syslog("* createPaymentStripe Create payment on card ".$stripecard->id.", amounttopay=".$amounttopay.", amountstripe=".$amountstripe.", FULLTAG=".$FULLTAG, LOG_DEBUG); + + // Create payment intent and charge payment (confirmnow = true) + $paymentintent = $stripe->getPaymentIntent($amounttopay, $currency, $FULLTAG, $description, $invoice, $customer->id, $stripeacc, $servicestatus, 0, 'automatic', true, $stripecard->id, 1); + + $charge = new stdClass(); + if ($paymentintent->status == 'succeeded') + { + $charge->status = 'ok'; + $charge->id = $paymentintent->id; + } + else + { + $charge->status = 'failed'; + $charge->failure_code = $stripe->code; + $charge->failure_message = $stripe->error; + $charge->failure_declinecode = $stripe->declinecode; + } + } + else + { + $charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$description", "stripe_account" => "$account")); + } } if (isset($charge->id)) {} $return->statut = 'success'; $return->id = $charge->id; - if ($charge->source->type == 'card') { - $return->message = $charge->source->card->brand . " ...." . $charge->source->card->last4; - } elseif ($charge->source->type == 'three_d_secure') { - $stripe = new Stripe($this->db); - $src = \Stripe\Source::retrieve("" . $charge->source->three_d_secure->card . "", array( - "stripe_account" => $stripe->getStripeAccount($service) - )); - $return->message = $src->card->brand . " ...." . $src->card->last4; - } else { - $return->message = $charge->id; + + if (preg_match('/pm_/i', $source)) + { + $return->message = 'Payment retreived by card status = '.$charge->status; + } + else + { + if ($charge->source->type == 'card') { + $return->message = $charge->source->card->brand . " ...." . $charge->source->card->last4; + } elseif ($charge->source->type == 'three_d_secure') { + $stripe = new Stripe($this->db); + $src = \Stripe\Source::retrieve("" . $charge->source->three_d_secure->card . "", array( + "stripe_account" => $stripe->getStripeAccount($service) + )); + $return->message = $src->card->brand . " ...." . $src->card->last4; + } else { + $return->message = $charge->id; + } } } catch (\Stripe\Error\Card $e) { include DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php index 0030bdb5535..0226c724165 100644 --- a/htdocs/stripe/config.php +++ b/htdocs/stripe/config.php @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php'; require_once DOL_DOCUMENT_ROOT.'/includes/stripe/lib/Stripe.php'; -global $stripe; +//global $stripe; global $conf; global $stripearrayofkeysbyenv; @@ -46,13 +46,13 @@ $stripearrayofkeysbyenv = array( $stripearrayofkeys = array(); if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha')) { - $stripearrayofkeys = $stripearrayofkeysbyenv[0]; // Test + $stripearrayofkeys = $stripearrayofkeysbyenv[0]; // Test } else { - $stripearrayofkeys = $stripearrayofkeysbyenv[1]; // Live + $stripearrayofkeys = $stripearrayofkeysbyenv[1]; // Live } \Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']); \Stripe\Stripe::setAppInfo("Dolibarr Stripe", DOL_VERSION, "https://www.dolibarr.org"); // add dolibarr version -\Stripe\Stripe::setApiVersion("2019-05-16"); // force version API +\Stripe\Stripe::setApiVersion(empty($conf->global->STRIPE_FORCE_VERSION) ? "2019-05-16" : $conf->global->STRIPE_FORCE_VERSION); // force version API diff --git a/htdocs/stripe/payment.php b/htdocs/stripe/payment.php index dfcb79e18a0..0fe4c450fad 100644 --- a/htdocs/stripe/payment.php +++ b/htdocs/stripe/payment.php @@ -28,7 +28,7 @@ /** * \file htdocs/stripe/payment.php * \ingroup stripe - * \brief Payment page for customers invoices. TODO Seems deprecated and bugged ! + * \brief Payment page for customers invoices. @TODO Seems deprecated and bugged and not used (no link to this page) ! */ // Load Dolibarr environment @@ -65,9 +65,9 @@ $multicurrency_amountsresttopay=array(); // Security check $socid=0; -if ($user->societe_id > 0) +if ($user->socid > 0) { - $socid = $user->societe_id; + $socid = $user->socid; } $object=new Facture($db); @@ -186,12 +186,12 @@ if (empty($reshook)) } } - // Check parameters -// if (! GETPOST('paiementcode')) -// { -// setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), null, 'errors'); -// $error++; -// } + // Check parameters + /*if (! GETPOST('paiementcode')) + { + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), null, 'errors'); + $error++; + }*/ if (! empty($conf->banque->enabled)) { @@ -209,11 +209,11 @@ if (empty($reshook)) $error++; } -// if (empty($datepaye)) -// { -// setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), null, 'errors'); -// $error++; -// } + /*if (empty($datepaye)) + { + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), null, 'errors'); + $error++; + }*/ // Check if payments in both currency if ($totalpayment > 0 && $multicurrency_totalpayment > 0) @@ -242,7 +242,6 @@ if (empty($reshook)) */ if ($action == 'confirm_paiement' && $confirm == 'yes') { - $error=0; $datepaye = dol_now(); @@ -306,7 +305,6 @@ if (empty($reshook)) } elseif (preg_match('/src_/i', $source)) { - $customer2 = $customerstripe=$stripe->customerStripe($facture->thirdparty, $stripeacc, $servicestatus); $src = $customer2->sources->retrieve("$source"); if ($src->type=='card') @@ -341,7 +339,6 @@ if (empty($reshook)) if (! $error) { - $paiement_id = $paiement->create($user, 0); if ($paiement_id < 0) { @@ -568,7 +565,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie dol_fiche_head(); - print '
'.$langs->trans("UsageParameter").''.$langs->trans("Value").'
'; + print '
'; print $langs->trans("STRIPE_PAYMENT_REQUEST_API").''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STRIPE_PAYMENT_REQUEST_API'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STRIPE_PAYMENT_REQUEST_API", $arrval, $conf->global->STRIPE_PAYMENT_REQUEST_API); - } + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STRIPE_PAYMENT_REQUEST_API'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STRIPE_PAYMENT_REQUEST_API", $arrval, $conf->global->STRIPE_PAYMENT_REQUEST_API); + } print '
'; print $langs->trans("STRIPE_SEPA_DIRECT_DEBIT").''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STRIPE_SEPA_DIRECT_DEBIT'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STRIPE_SEPA_DIRECT_DEBIT", $arrval, $conf->global->STRIPE_SEPA_DIRECT_DEBIT); - } + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STRIPE_SEPA_DIRECT_DEBIT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STRIPE_SEPA_DIRECT_DEBIT", $arrval, $conf->global->STRIPE_SEPA_DIRECT_DEBIT); + } print '
"; - if ($charge->metadata->dol_type=="order"){ + if ($charge->metadata->dol_type=="order") { $object = new Commande($db); $object->fetch($charge->metadata->dol_id); - if ($object->id > 0) { - print "".img_picto('', 'object_order')." ".$object->ref.""; - } else print $FULLTAG; - } elseif ($charge->metadata->dol_type=="invoice"){ + if ($object->id > 0) { + print "".img_picto('', 'object_order')." ".$object->ref.""; + } else { + print $FULLTAG; + } + } elseif ($charge->metadata->dol_type=="invoice") { $object = new Facture($db); $object->fetch($charge->metadata->dol_id); - if ($object->id > 0) { - print "".img_picto('', 'object_invoice')." ".$object->ref.""; - } else print $FULLTAG; - } else print $FULLTAG; + if ($object->id > 0) { + print "".img_picto('', 'object_invoice')." ".$object->ref.""; + } else { + print $FULLTAG; + } + } else { + print $FULLTAG; + } print "'.dol_print_date($charge->created, '%d/%m/%Y %H:%M')."
'; + print '
'; // Invoice /*if ($facture->id > 0) @@ -623,7 +620,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '
'; print_barre_liste($langs->trans('StripeSourceList').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); - print '
'."\n"; + print '
'."\n"; // Titles with sort buttons print ''; print ''; @@ -823,7 +820,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print_barre_liste($langs->trans('StripeInvoiceList').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); - print '
'; + print '
'; print ''; print ''; print ''; @@ -1110,7 +1107,7 @@ if (! GETPOST('action')) $i = 0; print_barre_liste($langs->trans('Payments'), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num); - print '
'.$arraytitle.''.$langs->trans('Date').'
'; + print '
'; print ''; print_liste_field_titre('Invoice', $_SERVER["PHP_SELF"], 'ref', '', '', '', $sortfield, $sortorder); print_liste_field_titre('Date', $_SERVER["PHP_SELF"], 'dp', '', '', '', $sortfield, $sortorder); diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index 5870427757a..89c2f1a237c 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; //$result = restrictedArea($user, 'salaries', '', '', ''); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -78,7 +78,6 @@ $stripeacc = $stripe->getStripeAccount($service); }*/ if (! $rowid) { - print ''; if ($optioncss != '') { print ''; @@ -157,7 +156,7 @@ if (! $rowid) { $societestatic->admin = $obj->admin; $societestatic->login = $obj->login; $societestatic->email = $obj->email; - $societestatic->societe_id = $obj->fk_soc; + $societestatic->socid = $obj->fk_soc; print ''; diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 873adfc1cf7..3bc1050f867 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid", "int"); -if ($user->societe_id) $socid=$user->societe_id; +if ($user->socid) $socid=$user->socid; //$result = restrictedArea($user, 'salaries', '', '', ''); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; @@ -78,7 +78,6 @@ $stripeacc = $stripe->getStripeAccount($service); }*/ if (! $rowid) { - print ''; if ($optioncss != '') print ''; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 736deacd0bb..81999dc86f8 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -74,7 +74,7 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($co $NBLINES = 4; // Security check -if (! empty($user->societe_id)) $socid = $user->societe_id; +if (! empty($user->socid)) $socid = $user->socid; $result = restrictedArea($user, 'supplier_proposal', $id); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -319,78 +319,92 @@ if (empty($reshook)) $id = $object->create($user); if ($id > 0) { - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); + dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); - $classname = ucfirst($subelement); - $srcobject = new $classname($db); + $classname = ucfirst($subelement); + $srcobject = new $classname($db); - dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); - $result = $srcobject->fetch($object->origin_id); + dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); + $result = $srcobject->fetch($object->origin_id); - if ($result > 0) + if ($result > 0) + { + $lines = $srcobject->lines; + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { + $srcobject->fetch_lines(); $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { - $srcobject->fetch_lines(); - $lines = $srcobject->lines; + } + + $fk_parent_line=0; + $num=count($lines); + for ($i=0;$i<$num;$i++) + { + $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); + $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); + + // Positive line + $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); + + // Reset fk_parent_line for no child products and special product + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { + $fk_parent_line = 0; } - $fk_parent_line=0; - $num=count($lines); - for ($i=0;$i<$num;$i++) - { - $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); - $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); - - // Positive line - $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); - - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { - $fk_parent_line = 0; - } - - // Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { - $lines[$i]->fetch_optionals(); - $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, - 'HT', 0, $lines[$i]->info_bits, $product_type, - $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, - $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, - $lines[$i]->ref_supplier, $lines[$i]->fk_unit - ); - - if ($result > 0) { - $lineid = $result; - } else { - $lineid = 0; - $error ++; - break; - } - - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) { - $fk_parent_line = $result; - } + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals(); + $array_options = $lines[$i]->array_options; } - // Hooks - $parameters = array('objFrom' => $srcobject); - $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been - // modified by hook - if ($reshook < 0) + $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, + 'HT', + 0, + $lines[$i]->info_bits, + $product_type, + $lines[$i]->rang, + $lines[$i]->special_code, + $fk_parent_line, + $lines[$i]->fk_fournprice, + $lines[$i]->pa_ht, $label, + $array_options, + $lines[$i]->ref_supplier, + $lines[$i]->fk_unit + ); + + if ($result > 0) { + $lineid = $result; + } else { + $lineid = 0; $error ++; - } else { - setEventMessages($srcobject->error, $srcobject->errors, 'errors'); + break; + } + + // Defined the new fk_parent_line + if ($result > 0 && $lines[$i]->product_type == 9) { + $fk_parent_line = $result; + } + } + + // Hooks + $parameters = array('objFrom' => $srcobject); + $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been + // modified by hook + if ($reshook < 0) { $error ++; } + } else { + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); + $error ++; + } } else { setEventMessages($object->error, $object->errors, 'errors'); $error ++; @@ -484,7 +498,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->supplier_proposal->dir_output; - $permissioncreate = $user->rights->supplier_proposal->creer; + $permissiontoadd = $user->rights->supplier_proposal->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -736,64 +750,64 @@ if (empty($reshook)) if (! $error && $result > 0) { - $db->commit(); + $db->commit(); - $ret=$object->fetch($object->id); // Reload to get new records + $ret=$object->fetch($object->id); // Reload to get new records - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model=$object->modelpdf; - $ret = $object->fetch($id); // Reload to get new records - - $result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); } + $model=$object->modelpdf; + $ret = $object->fetch($id); // Reload to get new records - unset($_POST['prod_entry_mode']); + $result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result < 0) dol_print_error($db, $result); + } - unset($_POST['qty']); - unset($_POST['type']); - unset($_POST['remise_percent']); - unset($_POST['pu']); - unset($_POST['price_ht']); - unset($_POST['multicurrency_price_ht']); - unset($_POST['price_ttc']); - unset($_POST['tva_tx']); - unset($_POST['label']); - unset($_POST['product_ref']); - unset($_POST['product_label']); - unset($_POST['product_desc']); - unset($_POST['fournprice']); - unset($_POST['buying_price']); - unset($localtax1_tx); - unset($localtax2_tx); - unset($_POST['np_marginRate']); - unset($_POST['np_markRate']); - unset($_POST['dp_desc']); - unset($_POST['idprodfournprice']); - unset($_POST['idprod']); + unset($_POST['prod_entry_mode']); - unset($_POST['date_starthour']); - unset($_POST['date_startmin']); - unset($_POST['date_startsec']); - unset($_POST['date_startday']); - unset($_POST['date_startmonth']); - unset($_POST['date_startyear']); - unset($_POST['date_endhour']); - unset($_POST['date_endmin']); - unset($_POST['date_endsec']); - unset($_POST['date_endday']); - unset($_POST['date_endmonth']); - unset($_POST['date_endyear']); + unset($_POST['qty']); + unset($_POST['type']); + unset($_POST['remise_percent']); + unset($_POST['pu']); + unset($_POST['price_ht']); + unset($_POST['multicurrency_price_ht']); + unset($_POST['price_ttc']); + unset($_POST['tva_tx']); + unset($_POST['label']); + unset($_POST['product_ref']); + unset($_POST['product_label']); + unset($_POST['product_desc']); + unset($_POST['fournprice']); + unset($_POST['buying_price']); + unset($localtax1_tx); + unset($localtax2_tx); + unset($_POST['np_marginRate']); + unset($_POST['np_markRate']); + unset($_POST['dp_desc']); + unset($_POST['idprodfournprice']); + unset($_POST['idprod']); + + unset($_POST['date_starthour']); + unset($_POST['date_startmin']); + unset($_POST['date_startsec']); + unset($_POST['date_startday']); + unset($_POST['date_startmonth']); + unset($_POST['date_startyear']); + unset($_POST['date_endhour']); + unset($_POST['date_endmin']); + unset($_POST['date_endsec']); + unset($_POST['date_endday']); + unset($_POST['date_endmonth']); + unset($_POST['date_endyear']); } else { @@ -801,13 +815,11 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } - //} } } // Mise a jour d'une ligne dans la demande de prix elseif ($action == 'updateline' && $user->rights->supplier_proposal->creer && GETPOST('save') == $langs->trans("Save")) { - $vat_rate=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); // Define info_bits @@ -865,7 +877,6 @@ if (empty($reshook)) // Check minimum price $productid = GETPOST('productid', 'int'); if (! empty($productid)) { - $productsupplier = new ProductFournisseur($db); if (! empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) { @@ -1120,7 +1131,7 @@ if ($action == 'create') dol_fiche_head(); - print '
'; + print '
'; // Reference print ''; @@ -1351,7 +1362,7 @@ if ($action == 'create') $title = $langs->trans('ProductsAndServices'); print load_fiche_titre($title); - print '
' . $langs->trans('Ref') . '' . $langs->trans("Draft") . '
'; + print '
'; $objectsrc->printOriginLinesList(); @@ -1454,19 +1465,20 @@ if ($action == 'create') $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->supplier_proposal->creer) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:-1), $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:-1), $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } 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); @@ -1560,7 +1572,7 @@ if ($action == 'create') print '
'; - if ($action != 'editmode' && $object->statut == SupplierProposal::STATUS_VALIDATED) + if ($action != 'editmode' && $object->statut == $object::STATUS_VALIDATED) print ''; print '
'; print $langs->trans('PaymentMode'); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . '
'; print '
'; @@ -1580,7 +1592,7 @@ if ($action == 'create') print ''; - if ($action != 'editmulticurrencycode' && $object->statut == SupplierProposal::STATUS_VALIDATED) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_VALIDATED) print ''; print '
'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; print '
'; @@ -1592,29 +1604,32 @@ if ($action == 'create') print '
'; - print ''; - if ($action != 'editmulticurrencyrate' && $object->statut == SupplierProposal::STATUS_VALIDATED && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) - print ''; - print '
'; - print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; - print '
'; - if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { - if ($action == 'actualizemulticurrencyrate') { - list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); - } - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); - } else { - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); - if ($object->statut == SupplierProposal::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { - print '
        '; - print ''.$langs->trans("ActualizeCurrency").''; - print '
'; + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) + { + print '
'; + print ''; + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_VALIDATED && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) + print ''; + print '
'; + print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { + if ($action == 'actualizemulticurrencyrate') { + list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); + } + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); + if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { + print '
        '; + print ''.$langs->trans("ActualizeCurrency").''; + print '
'; + } } + print '
'; + $form_close .= '
'; $form_close .= '
' . $langs->trans("CloseAs") . ''; $form_close .= ''; $form_close .= ''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index 7c5d533a401..da76e9ea897 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -45,9 +45,9 @@ $ref = GETPOST('ref', 'alpha'); // Security check $socid=''; -if (! empty($user->societe_id)) +if (! empty($user->socid)) { - $socid = $user->societe_id; + $socid = $user->socid; } $result = restrictedArea($user, 'supplier_proposal', $id); @@ -113,20 +113,21 @@ if ($object->id > 0) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->supplier_proposal->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index dd2acd27311..8b2340e2ec9 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -38,10 +38,10 @@ $langs->loadLangs(array('supplier_proposal', 'companies')); // Security check $socid=GETPOST('socid', 'int'); -if (isset($user->societe_id) && $user->societe_id > 0) +if (isset($user->socid) && $user->socid > 0) { $action = ''; - $socid = $user->societe_id; + $socid = $user->socid; } $result = restrictedArea($user, 'supplier_proposal'); @@ -71,12 +71,13 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; - print ''; + print '
'; + print '
'; print ''; print ''; print ''; - print "
'.$langs->trans("Search").'
'; print $langs->trans("SupplierProposal").':

\n"; + print "

\n"; } @@ -90,7 +91,7 @@ $sql.= ", ".MAIN_DB_PREFIX."supplier_proposal as p"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE p.fk_soc = s.rowid"; $sql.= " AND p.entity IN (".getEntity('supplier_proposal').")"; -if ($user->societe_id) $sql.=' AND p.fk_soc = '.$user->societe_id; +if ($user->socid) $sql.=' AND p.fk_soc = '.$user->socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql.= " AND p.fk_statut IN (0,1,2,3,4)"; $sql.= " GROUP BY p.fk_statut"; @@ -121,7 +122,8 @@ if ($resql) } $db->free($resql); - print ''; + print '
'; + print '
'; print ''."\n"; $listofstatus=array(0,1,2,3,4); foreach ($listofstatus as $status) @@ -153,7 +155,7 @@ if ($resql) } print ''; - print "
'.$langs->trans("Statistics").' - '.$langs->trans("CommRequests").'
'.$langs->trans("Total").''.$total.'

"; + print "

"; } else { @@ -179,7 +181,8 @@ if (! empty($conf->supplier_proposal->enabled)) $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; + print '
'; print ''; print ''; $langs->load("supplier_proposal"); @@ -206,7 +209,7 @@ if (! empty($conf->supplier_proposal->enabled)) $i++; } } - print "
'.$langs->trans("DraftRequests").'

"; + print "

"; } } @@ -235,7 +238,8 @@ $sql.= $db->plimit($max, 0); $resql=$db->query($sql); if ($resql) { - print ''; + print '
'; + print '
'; print ''; print ''; @@ -283,7 +287,7 @@ if ($resql) $i++; } } - print "
'.$langs->trans("LastModifiedRequests", $max).'

"; + print "

"; } else dol_print_error($db); @@ -316,7 +320,8 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos $i = 0; if ($num > 0) { - print ''; + print '
'; + print '
'; print ''; $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); @@ -370,7 +375,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos { print '"; } - print "
'.$langs->trans("RequestsOpened").' '.$num.'
'.$langs->trans("Total").''.price($total)." 

"; + print "

"; } } else diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index e34ba2cd06c..7b259b166e4 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -39,7 +39,7 @@ $id=GETPOST('id', 'int'); $socid=GETPOST('socid', 'int'); // Security check -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; $result = restrictedArea($user, 'supplier_proposal', $id); @@ -78,20 +78,21 @@ if (! empty($conf->projet->enabled)) $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->rights->supplier_proposal->creer) { - if ($action != 'classify') + if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $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.='
'; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
'; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } + $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.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } 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); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index f36013b289c..2b8f4038bfc 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -103,7 +103,7 @@ $NBLINES=4; $module='supplier_proposal'; $dbtable=''; $objectid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; +if (! empty($user->socid)) $socid=$user->socid; if (! empty($socid)) { $objectid=$socid; @@ -214,8 +214,8 @@ if (empty($reshook)) { $objectclass='SupplierProposal'; $objectlabel='SupplierProposals'; - $permtoread = $user->rights->supplier_proposal->lire; - $permtodelete = $user->rights->supplier_proposal->supprimer; + $permissiontoread = $user->rights->supplier_proposal->lire; + $permissiontodelete = $user->rights->supplier_proposal->supprimer; $uploaddir = $conf->supplier_proposal->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -250,7 +250,9 @@ $sql.= " p.rowid as project_id, p.ref as project_ref,"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; $sql.= " u.firstname, u.lastname, u.photo, u.login"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +} // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -747,24 +749,24 @@ if ($resql) { print '
'.price($obj->total_ht)."'.price($obj->total_vat)."'.price($obj->total_ttc)."
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totalttc']).'
trans("SupplierProposal"); ?> trans("ShowSupplierProposal"), "supplier_proposal").' '.$objectlink->ref; ?> datec, 'day'); ?> rights->supplier_proposal->lire) { - $total = $total + $objectlink->total_ht; - echo price($objectlink->total_ht); - } ?> getLibStatut(3); ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>
'; +print '
'; print ''; print ''; print "\n"; diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index d891b88f775..132b9db3cf5 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -68,6 +68,7 @@ if (GETPOST('action', 'alpha') == 'set') $res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOSCONNECTOR", GETPOST('TAKEPOSCONNECTOR', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_DOLIBARR_PRINTER", GETPOST('TAKEPOS_DOLIBARR_PRINTER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_BAR_RESTAURANT", GETPOST('TAKEPOS_BAR_RESTAURANT', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_TICKET_VAT_GROUPPED", GETPOST('TAKEPOS_TICKET_VAT_GROUPPED', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER', 'alpha'), 'chaine', 0, '', $conf->entity); @@ -79,7 +80,7 @@ if (GETPOST('action', 'alpha') == 'set') $res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_DIRECT_PAYMENT", GETPOST('TAKEPOS_DIRECT_PAYMENT', 'int'), 'int', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_CUSTOM_RECEIPT", GETPOST('TAKEPOS_CUSTOM_RECEIPT', 'int'), 'int', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity); if ($conf->global->TAKEPOS_ORDER_NOTES==1) { @@ -124,7 +125,7 @@ print ''; print ''; print ''; -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; +print '
'; print ''; print ''; @@ -163,16 +164,25 @@ print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEP print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID'); print "\n"; +if ($conf->receiptprinter->enabled) { + // Use Dolibarr printing + print '\n"; +} + // Use Takepos printing print '\n"; -if ($conf->global->TAKEPOSCONNECTOR){ +if ($conf->global->TAKEPOSCONNECTOR) { print ''; @@ -189,7 +199,7 @@ print "\n"; if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOSCONNECTOR){ print ''; @@ -247,15 +257,15 @@ $formmail = new FormMail($db); $nboftemplates = $formmail->fetchAllEMailTemplate('facture_send', $user, null, -1); // We set lang=null to get in priority record with no lang //$arraydefaultmessage = $formmail->getEMailTemplate($db, $tmp[1], $user, null, 0, 1, ''); $arrayofmessagename=array(); -if (is_array($formmail->lines_model)) -{ - foreach($formmail->lines_model as $modelmail) - { - //var_dump($modelmail); - $moreonlabel=''; - if (! empty($arrayofmessagename[$modelmail->label])) $moreonlabel=' ('.$langs->trans("SeveralLangugeVariatFound").')'; - $arrayofmessagename[$modelmail->label]=$langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; - } +if (is_array($formmail->lines_model)) { + foreach($formmail->lines_model as $modelmail) { + //var_dump($modelmail); + $moreonlabel=''; + if (! empty($arrayofmessagename[$modelmail->label])) { + $moreonlabel=' ('.$langs->trans("SeveralLangugeVariatFound").')'; + } + $arrayofmessagename[$modelmail->label]=$langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; + } } //var_dump($arraydefaultmessage); //var_dump($arrayofmessagename); diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index a6b6dc6472a..4696426aaf8 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -45,14 +45,14 @@ $langs->loadLangs(array("admin", "cashdesk")); global $db; -$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement"; +$sql = "SELECT code, libelle as label FROM ".MAIN_DB_PREFIX."c_paiement"; $sql.= " WHERE entity IN (".getEntity('c_paiement').")"; $sql.= " AND active = 1"; $sql.= " ORDER BY libelle"; $resql = $db->query($sql); $paiements = array(); -if($resql){ - while ($obj = $db->fetch_object($resql)){ +if ($resql) { + while ($obj = $db->fetch_object($resql)) { array_push($paiements, $obj); } } @@ -81,6 +81,9 @@ if (GETPOST('action', 'alpha') == 'set') } $res = dolibarr_set_const($db, "CASHDESK_ID_WAREHOUSE".$terminaltouse, (GETPOST('CASHDESK_ID_WAREHOUSE'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK".$terminaltouse, GETPOST('CASHDESK_NO_DECREASE_STOCK'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_PRINTER_TO_USE".$terminaltouse, GETPOST('TAKEPOS_PRINTER_TO_USE'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS".$terminaltouse, GETPOST('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity); dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); @@ -120,7 +123,7 @@ print ''; print ''; -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; + print $langs->trans("DolibarrReceiptPrinterModule"); + print ''; + print $form->selectyesno("TAKEPOS_DOLIBARR_PRINTER", $conf->global->TAKEPOS_DOLIBARR_PRINTER, 1); + print "
'; -print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("TakeposConnectorNecesary").')'; +print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("TakeposConnectorNecesary").')'; print ''; print $form->selectyesno("TAKEPOSCONNECTOR", $conf->global->TAKEPOSCONNECTOR, 1); print "
'; - print $langs->trans("IPAddress").' ('.$langs->trans("TakeposConnectorNecesary").')'; + print $langs->trans("IPAddress").' ('.$langs->trans("TakeposConnectorNecesary").')'; print ''; print ''; print '
'; - print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; + print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; print ''; print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1); print '
'; +print '
'; print ''; print ''; print "\n"; @@ -152,7 +155,7 @@ if (! empty($conf->banque->enabled)) foreach($paiements as $modep) { if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; // Already managed before $name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse; - print ''; + print ''; print ''; // Force warehouse (this is not a default value) print ''; + if ($conf->receiptprinter->enabled) { + // Select printer to use with terminal + require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; + $printer = new dolReceiptPrinter($db); + $printer->listprinters(); + $printers = array(); + foreach ($printer->listprinters as $key => $value) { + $printers[$value['rowid']] = $value['name']; + } + print ''; + print ''; + $printer->listPrintersTemplates(); + $templates = array(); + foreach ($printer->listprinterstemplates as $key => $value) { + $templates[$value['rowid']] = $value['name']; + } + print ''; + print ''; + print ''; + print ''; + } } print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->libelle).'
'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->label).''; if (! empty($conf->global->$name)) $atleastonefound++; $cour=preg_match('/^LIQ.*/', $modep->code)?2:1; @@ -163,16 +166,15 @@ if (! empty($conf->banque->enabled)) if (! empty($conf->stock->enabled)) { - print '
'.$langs->trans("CashDeskDoNotDecreaseStock").''; if (empty($conf->productbatch->enabled)) { - print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK'.$terminal, $conf->global->{'CASHDESK_NO_DECREASE_STOCK'.$terminal}, 1); + print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK'.$terminal, $conf->global->{'CASHDESK_NO_DECREASE_STOCK'.$terminal}, 1); } else { if (!$conf->global->{'CASHDESK_NO_DECREASE_STOCK'.$terminal}) { - $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK".$terminal, 1, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK".$terminal, 1, 'chaine', 0, '', $conf->entity); } print $langs->trans("Yes").'
'; print ''.$langs->trans('StockDecreaseForPointOfSaleDisabledbyBatch').''; @@ -194,6 +196,33 @@ if (! empty($conf->stock->enabled)) print ''.$langs->trans("StockDecreaseForPointOfSaleDisabled").''; } print '
'.$langs->trans("TakeposTerminalPrinterToUse").''; + print $form->selectarray('TAKEPOS_PRINTER_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal})?'0':$conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal}), 1); + print '
'.$langs->trans("TakeposTerminalTemplateToUseForInvoicesTicket").''; + print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal, $templates, (empty($conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal})?'0':$conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal}), 1); + print '
'.$langs->trans("TakeposTerminalTemplateToUseForOrdersTicket").''; + print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal, $templates, (empty($conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal})?'0':$conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal}), 1); + print '
'; diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index 3574b4d29a2..40cf0f2f0d3 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -22,7 +22,7 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); @@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $category = GETPOST('category', 'alpha'); $action = GETPOST('action', 'alpha'); $term = GETPOST('term', 'alpha'); +$id = GETPOST('id', 'int'); /* @@ -45,18 +46,60 @@ $term = GETPOST('term', 'alpha'); if ($action=="getProducts") { $object = new Categorie($db); $result=$object->fetch($category); - $prods = $object->getObjectsInCateg("product"); - echo json_encode($prods); + if ($result > 0) + { + $prods = $object->getObjectsInCateg("product"); + // Removed properties we don't need + if (is_array($prods) && count($prods) > 0) + { + foreach($prods as $prod) + { + unset($prod->fields); + unset($prod->db); + } + } + echo json_encode($prods); + } + else + { + echo 'Failed to load category with id='.$category; + } } elseif ($action=="search" && $term != '') { - $sql = 'SELECT * FROM '.MAIN_DB_PREFIX.'product'; + $sql = 'SELECT rowid, ref, label, tosell, tobuy FROM '.MAIN_DB_PREFIX.'product'; $sql.= ' WHERE entity IN ('.getEntity('product').')'; $sql.= ' AND tosell = 1'; $sql.= natural_search(array('ref','label','barcode'), $term); $resql = $db->query($sql); - $rows = array(); - while ($row = $db->fetch_array($resql)) { - $rows[] = $row; + if ($resql) + { + $rows = array(); + while ($row = $db->fetch_object($resql)) { + $rows[] = $row; + } + echo json_encode($rows); + } + else { + echo 'Failed to search product : '.$db->lasterror(); + } +} elseif ($action == "opendrawer" && $term != '') { + require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; + $printer = new dolReceiptPrinter($db); + // chek printer for terminal + if ($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term} > 0) { + $printer->initPrinter($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); + // open cashdrawer + $printer->pulse(); + $printer->close(); + } +} elseif ($action == "printinvoiceticket" && $term != '' && $id > 0) { + require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $printer = new dolReceiptPrinter($db); + // check printer for terminal + if ($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term} > 0 && $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term} > 0) { + $object = new Facture($db); + $object->fetch($id); + $ret = $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); } - echo json_encode($rows); } diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css new file mode 100644 index 00000000000..49d833ade17 --- /dev/null +++ b/htdocs/takepos/css/phone.css @@ -0,0 +1,81 @@ +html,body { + box-sizing: border-box; + padding:3px; + margin:0; + height:100%; + width:100%; +} + +.container{ + width: 100%; + height: 100%; + margin: 0 auto; + overflow: visible; + box-sizing: border-box; +} + +.phonerow1{ + margin: 0 auto; + width: 100%; + height: 40%; + min-height: 40%; +} + +.phonerow2{ + margin: 0 auto; + width: 100%; + height: 40%; +} + +.phonebuttonsrow{ + margin: 0 auto; + width: 100%; + height: 5%; +} + +.phonediv1{ + height:100%; + min-height: 100%; + width: 100%; + text-align: center; + box-sizing: border-box; + overflow: auto; + padding-top: 0; + padding-bottom: 10px; + padding-right: 5px; + padding-left: 5px; +} + +.phonediv2{ + height: 100%; + width: 100%; + box-sizing: border-box; + padding-top: 0; + padding-bottom: 10px; + padding-right: 5px; + padding-left: 5px; +} + +.phonediv3{ + height: 100%; + width: 100%; + box-sizing: border-box; + padding-top: 0; + padding-bottom: 10px; + padding-right: 5px; + padding-left: 5px; +} + +button.phonebutton { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ + width:24%; + height:90%; + font-weight: bold; +} diff --git a/htdocs/takepos/css/pos.css b/htdocs/takepos/css/pos.css index 91c29d73ac1..db3ddfdfa34 100644 --- a/htdocs/takepos/css/pos.css +++ b/htdocs/takepos/css/pos.css @@ -132,7 +132,7 @@ table.postablelines tr td { div.paymentbordline { width:50%; - background-color:#666; + background-color:#888; border-radius: 8px; margin-bottom: 4px; } diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index 74e83ffbef3..cd45d0c1792 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -157,8 +157,7 @@ $( document ).ready(function() { $('#'+val.label).draggable().bind('click', function(){ $(this).focus(); }) - + $('body').append('
'+val.label+'
'); }); @@ -168,13 +167,13 @@ $( document ).ready(function() { -admin){?> +admin) {?> diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 9ed6529c222..2d14c11893d 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -141,7 +141,7 @@ if ($action == 'valid' && $user->rights->facture->creer) $invoice = new Facture($db); $invoice->fetch($placeid); - if($invoice->total_ttc<0){ + if ($invoice->total_ttc < 0) { $invoice->type= $invoice::TYPE_CREDIT_NOTE; $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."facture WHERE "; $sql.="fk_soc = '".$invoice->socid."' "; @@ -165,8 +165,12 @@ if ($action == 'valid' && $user->rights->facture->creer) $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]; if ($invoice->statut != Facture::STATUS_DRAFT) { - dol_syslog("Sale already validated"); - dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), null, 1); + //If invoice is validated but it is not fully paid is not error and make the payment + if ($invoice->getRemainToPay()>0) $res=1; + else{ + dol_syslog("Sale already validated"); + dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), null, 1); + } } elseif (count($invoice->lines)==0) { @@ -189,15 +193,17 @@ if ($action == 'valid' && $user->rights->facture->creer) $res = $invoice->validate($user); } + $remaintopay = $invoice->getRemainToPay(); + // Add the payment - if ($res > 0) { + if ($res >= 0 && $remaintopay > 0) { $payment = new Paiement($db); $payment->datepaye = $now; $payment->fk_account = $bankaccount; $payment->amounts[$invoice->id] = $amountofpayment; // If user has not used change control, add total invoice payment - if ($amountofpayment == 0) $payment->amounts[$invoice->id] = $invoice->total_ttc; + if ($amountofpayment == 0) $payment->amounts[$invoice->id] = $remaintopay; $payment->paiementid=$paiementid; $payment->num_payment=$invoice->ref; @@ -205,9 +211,9 @@ if ($action == 'valid' && $user->rights->facture->creer) $payment->create($user); $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', ''); - $remaintopay = $invoice->getRemainToPay(); + $remaintopay = $invoice->getRemainToPay(); // Recalculate remain to pay after the payment is recorded if ($remaintopay == 0) { - dol_syslog("Invoice is paid, so we set it to pay"); + dol_syslog("Invoice is paid, so we set it to status Paid"); $result = $invoice->set_paid($user); if ($result > 0) $invoice->paye = 1; } else { @@ -254,6 +260,9 @@ if ($action == "addline") $prod = new Product($db); $prod->fetch($idproduct); + $customer = new Societe($db); + $customer->fetch($invoice->socid); + $price = $prod->price; $tva_tx = $prod->tva_tx; $price_ttc = $prod->price_ttc; @@ -261,16 +270,13 @@ if ($action == "addline") if (! empty($conf->global->PRODUIT_MULTIPRICES)) { - $customer = new Societe($db); - $customer->fetch($invoice->socid); - $price = $prod->multiprices[$customer->price_level]; $tva_tx = $prod->multiprices_tva_tx[$customer->price_level]; $price_ttc = $prod->multiprices_ttc[$customer->price_level]; $price_base_type = $prod->multiprices_base_type[$customer->price_level]; } - $idoflineadded = $invoice->addline($prod->description, $price, 1, $tva_tx, $prod->localtax1_tx, $prod->localtax2_tx, $idproduct, $prod->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', null, 0); + $idoflineadded = $invoice->addline($prod->description, $price, 1, $tva_tx, $prod->localtax1_tx, $prod->localtax2_tx, $idproduct, $customer->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', null, 0); $invoice->fetch($placeid); } @@ -425,7 +431,6 @@ $sectionwithinvoicelink=''; if ($action=="valid" || $action=="history") { $sectionwithinvoicelink.=''."\n"; - $sectionwithinvoicelink.=''; $sectionwithinvoicelink.=''; $sectionwithinvoicelink.=$invoice->getNomUrl(1, '', 0, 0, '', 0, 0, -1, '_backoffice')." - "; $remaintopay = $invoice->getRemainToPay(); @@ -439,13 +444,16 @@ if ($action=="valid" || $action=="history") else $sectionwithinvoicelink.=$langs->trans('BillShortStatusValidated'); } $sectionwithinvoicelink.=''; - if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink.=''; - if ($conf->global->TAKEPOSCONNECTOR) $sectionwithinvoicelink.=' '; - else $sectionwithinvoicelink.=' '; + if ($conf->global->TAKEPOSCONNECTOR) { + $sectionwithinvoicelink.=' '; + } elseif ($conf->global->TAKEPOS_DOLIBARR_PRINTER) { + $sectionwithinvoicelink.=' '; + } else { + $sectionwithinvoicelink.=' '; + } $sectionwithinvoicelink.=' '; - if ($invoice->paye) $sectionwithinvoicelink.=''; -} else { $sectionwithinvoicelink.=' '; - if ($invoice->paye) $sectionwithinvoicelink.=''; + + if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink.=''; } /* @@ -552,6 +560,13 @@ function TakeposPrinting(id){ }); }); } +function DolibarrTakeposPrinting(id) { + console.log('Printing invoice ticket ' + id) + $.ajax({ + type: "GET", + url: "" + id, + }); +} global->TAKEPOS_BAR_RESTAURANT) $label = $obj->label; $floor = $obj->floor; } - print $langs->trans('Place')." ".$label." - "; - print $langs->trans('Floor')." ".$floor." - "; + // In phone version only show when is invoice page + if ($mobilepage=="invoice" || $mobilepage=="") { + print $langs->trans('Place') . " " . $label . " - "; + print $langs->trans('Floor') . " " . $floor . " - "; + } +} +// In phone version only show when is invoice page +if ($mobilepage=="invoice" || $mobilepage=="") { + print $langs->trans('TotalTTC'); + print ' : ' . price($invoice->total_ttc, 1, '', 1, -1, -1, $conf->currency) . ''; + print '
' . $sectionwithinvoicelink; + print '
' . $langs->trans('ReductionShort') . '
'; $htmlforlines.= $row['label']; $htmlforlines.= '
'; - $htmlforlines.= '
'; - $htmlforlines.= ''.$langs->trans("Floors").''; - $htmlforlines.= '
'; + $htmlforlines.= '
'; print $htmlforlines; } @@ -627,17 +646,13 @@ if ($_SESSION["basiclayout"]==1) $htmlforlines = ''; foreach ($prods as $row) { $htmlforlines.= '
'; $htmlforlines.= $row->label; $htmlforlines.= '
'; - $htmlforlines.= '
'; - $htmlforlines.= ''.$langs->trans("Categories").''; - $htmlforlines.= ''.$langs->trans("Floors").''; - $htmlforlines.= '
'; print $htmlforlines; } @@ -650,24 +665,22 @@ if ($_SESSION["basiclayout"]==1) while($row = $db->fetch_array($resql)){ $rows[] = $row; $htmlforlines.= '
'; $htmlforlines.= $row['label']; $htmlforlines.= '
'; - $htmlforlines.= '
'; - $htmlforlines.= ''.$langs->trans("Categories").''; - $htmlforlines.= ''.$langs->trans("Floors").''; - $htmlforlines.= '
'; print $htmlforlines; } } if ($placeid > 0) { - if ($_SESSION["basiclayout"]==1 && $mobilepage!="invoice") return; + //In Phone basic layout hide some content depends situation + if ($_SESSION["basiclayout"]==1 && $mobilepage!="invoice" && $action!="order") return; + if (is_array($invoice->lines) && count($invoice->lines)) { $tmplines = array_reverse($invoice->lines); @@ -725,20 +738,14 @@ else { // No invoice generated yet print '
'; -if ($_SESSION["basiclayout"]==1 && $mobilepage=="invoice") -{ - print ''; -} - if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}) { - $soc = new Societe($db); + $constforcompanyid='CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]; + $soc = new Societe($db); if ($invoice->socid > 0) $soc->fetch($invoice->socid); - else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}); - print '

'; + else $soc->fetch($conf->global->$constforcompanyid); + print ''; + print '

'; print $langs->trans("Customer").': '.$soc->name; $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]; @@ -749,41 +756,39 @@ if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takep $warehouse->fetch($conf->global->$constantforkey); print '
'.$langs->trans("Warehouse").': '.$warehouse->ref; } - print '

'; - // Module Adherent - if (! empty($conf->adherent->enabled)) + // Module Adherent + if (! empty($conf->adherent->enabled)) + { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + $langs->load("members"); + print '
'.$langs->trans("Member").': '; + $adh=new Adherent($db); + $result=$adh->fetch('', '', $invoice->socid); + if ($result > 0) { - require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - $langs->load("members"); - print '

'; - print $langs->trans("Member").': '; - $adh=new Adherent($db); - $result=$adh->fetch('', '', $invoice->socid); - if ($result > 0) + $adh->ref=$adh->getFullName($langs); + print $adh->getFullName($langs); + print '
'.$langs->trans("Type").': '.$adh->type; + if ($adh->datefin) { - $adh->ref=$adh->getFullName($langs); - print $adh->getFullName($langs); - print '
'.$langs->trans("Type").': '.$adh->type; - if ($adh->datefin) - { - print '
'.$langs->trans("SubscriptionEndDate").': '.dol_print_date($adh->datefin, 'day'); - if ($adh->hasDelay()) { - print " ".img_warning($langs->trans("Late")); + print '
'.$langs->trans("SubscriptionEndDate").': '.dol_print_date($adh->datefin, 'day'); + if ($adh->hasDelay()) { + print " ".img_warning($langs->trans("Late")); + } + } + else + { + print '
'.$langs->trans("SubscriptionNotReceived"); + if ($adh->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated } } else { - print $langs->trans("SubscriptionNotReceived"); - if ($adh->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated - } - } - else - { - print ''.$langs->trans("ThirdpartyNotLinkedToMember").''; - } - print '

'; + print ''.$langs->trans("ThirdpartyNotLinkedToMember").''; } + } + print '

'; } if ($action == "search") diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index 63bf151f40a..aea8d14ebba 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -172,9 +172,8 @@ else print "var received=0;"; } console.log("We click on the payment mode to pay amount = "+amountpayed); parent.$("#poslines").load("invoice.php?place=&action=valid&pay="+payment+"&amount="+amountpayed+"&invoiceid="+invoiceid, function() { - //parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight); - parent.$.colorbox.close(); - //parent.setFocusOnSearchField(); // This does not have effect + if (amountpayed > || amountpayed == || amountpayed==0 ) parent.$.colorbox.close(); + else location.reload(); }); } @@ -224,7 +223,7 @@ $numpad=$conf->global->TAKEPOS_NUMPAD; if ($paycode == 'LIQ') $paycode = 'cash'; if ($paycode == 'CB') $paycode = 'card'; if ($paycode == 'CHQ') $paycode = 'cheque'; -?> + ?> @@ -237,11 +236,11 @@ $numpad=$conf->global->TAKEPOS_NUMPAD; if ($paycode == 'LIQ') $paycode = 'cash'; if ($paycode == 'CB') $paycode = 'card'; if ($paycode == 'CHQ') $paycode = 'cheque'; -?> + ?> + $button = array_pop($action_buttons); + ?> @@ -252,12 +251,11 @@ $button = array_pop($action_buttons); if ($paycode == 'LIQ') $paycode = 'cash'; if ($paycode == 'CB') $paycode = 'card'; if ($paycode == 'CHQ') $paycode = 'cheque'; -?> + ?> - - + @@ -266,17 +264,17 @@ $button = array_pop($action_buttons); + ?> - + ?> -
diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php new file mode 100644 index 00000000000..2bd21626f34 --- /dev/null +++ b/htdocs/takepos/phone.php @@ -0,0 +1,190 @@ + + * + * 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 . + */ + +/** + * \file htdocs/takepos/phone.php + * \ingroup takepos + * \brief TakePOS Phone screen + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); + +require '../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + +$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant +$action = GETPOST('action', 'alpha'); +$setterminal = GETPOST('setterminal', 'int'); + +if ($setterminal>0) +{ + $_SESSION["takeposterminal"]=$setterminal; +} + +$langs->loadLangs(array("bills","orders","commercial","cashdesk","receiptprinter")); + +/* + * View + */ + +// Title +$title='TakePOS - Dolibarr '.DOL_VERSION; +if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title='TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; +$head=' + + +'; +top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); + +?> + + + + +global->TAKEPOS_NUM_TERMINALS!="1" && $_SESSION["takeposterminal"]=="") print '
'.$langs->trans('TerminalSelect').'
'; +?> +
+
+ + + + +
+
+
+
+
+
+
+
+ +close(); diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 38ad9103ab9..bdf38c2bafe 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -100,7 +100,8 @@ if ($conf->global->TAKEPOS_CUSTOM_RECEIPT) trans('Date')." ".dol_print_date($object->date, 'day').'
'; if ($conf->global->TAKEPOS_CUSTOM_RECEIPT) print $conf->global->TAKEPOS_RECEIPT_NAME." "; -print $object->ref; +if ($object->statut == Facture::STATUS_DRAFT) print str_replace(")", "", str_replace("-", " ".$langs->trans('Place')." ", str_replace("(PROV-POS", $langs->trans("Terminal")." ", $object->ref))); +else print $object->ref; if ($conf->global->TAKEPOS_CUSTOM_RECEIPT && $conf->global->TAKEPOS_SHOW_CUSTOMER) { $soc = new Societe($db); @@ -130,16 +131,17 @@ if ($conf->global->TAKEPOS_CUSTOM_RECEIPT && $conf->global->TAKEPOS_SHOW_CUSTOME lines as $line) { - ?> + ?>
product_label)) echo $line->product_label; - else echo $line->description;?> + + product_label)) echo $line->product_label; + else echo $line->description;?> qty;?> total_ttc/$line->qty;?> total_ttc);?>
trans("TotalHT");?> total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>
trans("VAT").' '.vatrate($key, 1);?> currency)."\n";?>
trans("TotalVAT").''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>
trans("TotalTTC").''.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>