diff --git a/ChangeLog b/ChangeLog index 3a882e1bb30..9449d16df93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -494,6 +494,8 @@ Dolibarr better: - Fix: Bad permission assignments for stock movements actions - Fix: [ bug #2891 ] Category hooks do not work - Fix: [ bug #2696 ] Adding complementary attribute fails if code is numerics +- Fix: [ bug #3074 ] Accruals accounting use payment date instead of commitment date in turnover reports for salaries +- Fix: Not showing product supplier reference when page break ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice. @@ -677,6 +679,7 @@ Fix: [ bug #2715 ] Statistics page has broken layout with long thirdparty names Fix: [ bug #2570 ] [Contacts] Page should not process if ID is invalid Fix: [ bug #3268 ] SQL error when accessing thirdparty log page without a socid parameter Fix: [ bug #3180 ] formObjectOptions hook when editing thirdparty card does not print result +Fix: [ bug #1791 ] Margin menu not available if any Finance module is not enabled ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/dev/ansible/README.md b/dev/ansible/README.md deleted file mode 100644 index e498ebc3340..00000000000 --- a/dev/ansible/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# This directory contains script example to use ansible to deploy or maitains dolibarr instances - -This is a quick tutorial: - -* Install ansible: -> apt-get install ansible - -* Add ip of server to manage into -/etc/ansible/hosts - -* Deploy public key to managed servers -- authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" - - diff --git a/dev/ansible/deployplaybook/deploydev.yml b/dev/ansible/deployplaybook/deploydev.yml deleted file mode 100644 index 5802fb10a1e..00000000000 --- a/dev/ansible/deployplaybook/deploydev.yml +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env ansible-playbook - -# Run script with ansible-playbook deploydev.yml -# or ./deploydev.yml - -- name: Configure webserver with apache - hosts: webservers - sudo: True - tasks: - - name: install apache - apt: name=apache update_cache=yes - - name: copy apache config file - copy: src=files/apachealias.conf dest=/etc/apache/conf.d/dolibarr_dev - #- name: enable configuration - # file: > - # dest=/etc/apache/sites-enabled/default - # src=/etc/apache/sites-available/default - # state=link - - name: copy info.html - template: src=templates/info.html.j2 dest=/var/www/dolibarr_dev/info.html - mode=0644 - - name: restart apache - service: name=apache state=restarted - diff --git a/dev/ansible/deployplaybook/files/apachealias.conf b/dev/ansible/deployplaybook/files/apachealias.conf deleted file mode 100644 index d801094af5a..00000000000 --- a/dev/ansible/deployplaybook/files/apachealias.conf +++ /dev/null @@ -1,2 +0,0 @@ - -Alias /dolibarr_dev /var/www/dolibarr diff --git a/dev/ansible/deployplaybook/hosts b/dev/ansible/deployplaybook/hosts deleted file mode 100644 index 99627faba2b..00000000000 --- a/dev/ansible/deployplaybook/hosts +++ /dev/null @@ -1,2 +0,0 @@ -[webservers] -testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=22 diff --git a/dev/ansible/deployplaybook/templates/info.html.j2 b/dev/ansible/deployplaybook/templates/info.html.j2 deleted file mode 100644 index 66fac1c4deb..00000000000 --- a/dev/ansible/deployplaybook/templates/info.html.j2 +++ /dev/null @@ -1,10 +0,0 @@ - - - Page info ansible - - -

Apache, configured by Ansible

-

If you can see this, Ansible successfully installed apache.

-

{{ ansible_managed }}

- - \ No newline at end of file diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index b80b96654c1..9920a231841 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3138,11 +3138,12 @@ class PropaleLigne extends CommonObjectLine if (empty($this->total_localtax2)) $this->total_localtax2=0; if (empty($this->rang)) $this->rang=0; if (empty($this->remise)) $this->remise=0; - if (empty($this->remise_percent)) $this->remise_percent=0; + if (empty($this->remise_percent) || ! is_numeric($this->remise_percent)) $this->remise_percent=0; if (empty($this->info_bits)) $this->info_bits=0; if (empty($this->special_code)) $this->special_code=0; if (empty($this->fk_parent_line)) $this->fk_parent_line=0; if (empty($this->fk_fournprice)) $this->fk_fournprice=0; + if (! is_numeric($this->qty)) $this->qty = 0; if (empty($this->pa_ht)) $this->pa_ht=0; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 61e3dc111df..c6c34d87129 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -579,7 +579,7 @@ else // State print ''.$langs->trans('State').''; - if ($account->fk_departement > 0) print getState($account->fk_departement); + if ($account->state_id > 0) print getState($account->state_id); print ''; // Conciliate diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index d9ad2825c88..999c3ff2fa1 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -554,13 +554,20 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti if ($conf->salaries->enabled) { - print ''.$langs->trans("Salaries").''; - $sql = "SELECT u.rowid, u.firstname, u.lastname, p.fk_user, p.label as label, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; + if ($modecompta == 'CREANCES-DETTES') { + $column = 'p.datev'; + } else { + $column = 'p.datep'; + } + + print ''.$langs->trans("Salaries").''; + $sql = "SELECT u.rowid, u.firstname, u.lastname, p.fk_user, p.label as label, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; $sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user"; $sql.= " WHERE p.entity = ".$conf->entity; if (! empty($date_start) && ! empty($date_end)) - $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + $sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'"; + $sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm"; $sql.= " ORDER BY u.firstname"; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 94cac967a40..6c768821cc7 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -477,9 +477,16 @@ $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$acti /* * Salaries */ + +if ($modecompta == 'CREANCES-DETTES') { + $column = 'p.datev'; +} else { + $column = 'p.datep'; +} + $subtotal_ht = 0; $subtotal_ttc = 0; -$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; +$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; $sql.= " WHERE p.entity = ".$conf->entity; $sql.= " GROUP BY p.label, dm"; 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 fb0d1df03a9..9445d71ce8a 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -342,7 +342,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pageposafter=$pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,1); $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 5793660fe98..8e126dcd18d 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -353,7 +353,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pageposafter=$pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc); + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,1); $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 2c48b4587a0..eb963e81e3c 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2015 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 @@ -68,7 +69,7 @@ if ($sall) $sql.= natural_search(array('e.label','e.description','e.lieu','e.add $sql.= " GROUP BY e.rowid, e.label, e.statut, e.lieu, e.address, e.zip, e.town, e.fk_pays"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1, $offset); -print $sql; + $result = $db->query($sql); if ($result) { diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index e2c0d58559a..b938885adc9 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -823,7 +823,8 @@ class Task extends CommonObject { $tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time"); $ret = $tasktime_id; - + $this->timespent_id = $ret; + if (! $notrigger) { // Call trigger