2
0
forked from Wavyzz/dolibarr

Compare commits

...

38 Commits

Author SHA1 Message Date
Laurent Destailleur
5622c1947b Prepare 10.0.7 2020-04-02 12:23:53 +02:00
Laurent Destailleur
d0c179e1e9 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-30 19:54:32 +02:00
Laurent Destailleur
878c4fb106 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-03-30 19:53:40 +02:00
Laurent Destailleur
fbce8fcfe3 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:53:31 +02:00
Laurent Destailleur
125e964352 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:50:47 +02:00
Laurent Destailleur
b081cf5cba Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:48:41 +02:00
Laurent Destailleur
3ea9c297ea Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-03-30 19:46:23 +02:00
Laurent Destailleur
474260e526 Merge pull request #13447 from c3do/patch-1
Fix can set desiredstock to (int) 0 from API Rest
2020-03-30 19:46:02 +02:00
Laurent Destailleur
7466eaade3 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-30 19:37:01 +02:00
Laurent Destailleur
9fcbec9f02 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-30 19:36:07 +02:00
Laurent Destailleur
06ad21f2e8 Merge pull request #13442 from fappels/9.0_newToken
Improve modulebuilder compatiblity with maintained versions.
2020-03-30 19:35:45 +02:00
Laurent Destailleur
ff44e2d2ac Merge pull request #13448 from atm-quentin/FIX_missing_array_option_supplier_proposal_to_supplier_order
FIX missing array option
2020-03-30 19:35:20 +02:00
atm-quentin
64207ef58d FIX missing array option 2020-03-30 14:18:59 +02:00
Cédric
eead9a93d3 Fix can set desiredstock to (int) 0 from API Rest
When you set desiredstock to 0 as an integer from the API, it registers to null in the database. Using is_numeric() fixes this.
2020-03-30 13:03:13 +02:00
Francis Appels
3eda785ca5 Add newline end of file 2020-03-30 10:36:49 +02:00
Francis Appels
076caa11ab Add token functions to improve modulebuilder compatiblity with maintained versions. 2020-03-30 10:28:20 +02:00
Laurent Destailleur
30379b4cba Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	.travis.yml
2020-03-26 03:57:02 +01:00
Laurent Destailleur
81ae6c45ea composer is a big mess 2020-03-26 03:47:58 +01:00
Laurent Destailleur
39f7742387 Update travis config 2020-03-26 03:46:39 +01:00
Laurent Destailleur
386d478b65 Add os in travis 2020-03-26 03:44:58 +01:00
Laurent Destailleur
ddf233f2ed Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	.travis.yml
2020-03-26 03:39:46 +01:00
Laurent Destailleur
5fdf23bba8 Fix exclude fucking composer dependencies 2020-03-26 03:36:16 +01:00
Laurent Destailleur
84fc394e6f Fix exclude fucking composer dependencies 2020-03-26 03:29:29 +01:00
Laurent Destailleur
b48c21dbcb If we need more var here, we must fix to have var starting with search_ 2020-03-25 18:47:42 +01:00
Laurent Destailleur
e160ea2bee Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-25 18:45:55 +01:00
Laurent Destailleur
a7ba23d845 Merge pull request #13419 from atm-gauthier/9.0_search_status_on_bookmarks
FIX : when we filter a list on a view status, we want this filter to …
2020-03-25 18:44:40 +01:00
Laurent Destailleur
925554d15e More accurate result 2020-03-25 18:27:53 +01:00
Laurent Destailleur
74667c2943 Merge pull request #13422 from OPEN-DSI/v10-fix-invoice-remain-to-pay
FIX get remain to pay with rounding decimals
2020-03-25 18:26:33 +01:00
VESSILLER
c516a54f78 FIX get remain to pay with rounding decimals 2020-03-25 11:53:47 +01:00
gauthier
81af385259 FIX : when we filter a list on a view status, we want this filter to be on bookmark that we create 2020-03-25 10:27:59 +01:00
Laurent Destailleur
04a875f43b Merge pull request #13404 from hregis/10.0_mc2
FIX remove unused var, $usercancreate can be change by Multicompany
2020-03-23 15:13:19 +01:00
Regis Houssin
45579b0986 FIX remove unused var, $usercancreate can be change by Multicompany 2020-03-23 07:01:23 +01:00
Laurent Destailleur
ef86311639 Merge pull request #13224 from mapiolca/patch-38
# Fix Compatibility with NOTMODIFYOTHERENTITYFOURNPRICE const.
2020-03-22 20:32:15 +01:00
Pierre Ardoin
26f6f04486 forgot ";" 2020-03-17 10:08:18 +01:00
Pierre Ardoin
564f412957 correction due to comments @hregis and @eldy 2020-03-17 10:04:43 +01:00
Laurent Destailleur
5dc403cb66 FIX #13304 2020-03-12 12:19:24 +01:00
Pierre Ardoin
8476477137 add const NOTMODIFYOTHERENTITYFOURNPRICE
if const NOTMODIFYOTHERENTITYFOURNPRICE, can't modify other shared fourn prices.
2020-02-27 09:19:39 +01:00
Pierre Ardoin
74ac69fc5a Add Entity in list_product_fournisseur_price()
Select too the entity value to add const NOTMODIFYOTHERENTITYFOURNPRICE
2020-02-27 09:16:15 +01:00
9 changed files with 124 additions and 25 deletions

View File

@@ -3,6 +3,7 @@
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/ # For syntax, see http://about.travis-ci.org/docs/user/languages/php/
# We use dist: trusty to have php 5.4+ available # We use dist: trusty to have php 5.4+ available
os: linux
dist: trusty dist: trusty
sudo: required sudo: required
@@ -294,7 +295,7 @@ script:
# Ensure we catch errors # Ensure we catch errors
set -e set -e
#parallel-lint --exclude htdocs/includes --blame . #parallel-lint --exclude htdocs/includes --blame .
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame . parallel-lint --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
set +e set +e
echo echo

View File

@@ -2,6 +2,77 @@
English Dolibarr ChangeLog English Dolibarr ChangeLog
-------------------------------------------------------------- --------------------------------------------------------------
***** ChangeLog for 10.0.7 compared to 10.0.6 *****
FIX: 10.0 - missing translations for "orders" homepage "orders" box
FIX: 10.0 - status missing from last customer invoices box when using MAIN_STATUS_USES_CSS
FIX: 10.0 - translations for "orders" not loaded in the homepage box
FIX: #10309
FIX: #12875
FIX: #12932
FIX: #12966
FIX: #12973
FIX: #13304
FIX: advanced target emailing sql and ergonomy
FIX: an external user can not approved
FIX: Bad translation for productlot EatBy and SellBy
FIX: better check
FIX: better method to check user rights AND usergroup rights !
FIX: CA by prod list filter
FIX: can be a string or integer
FIX: Check on unicity on prof id was not triggered sometimes
FIX: clone of purchase order
FIX: compatibility with multicompany (avoid duplicate data)
FIX: complex export model loading
FIX: date filter not used if no operator
FIX: date order was -1D and desc with label repetition
FIX: default lang selection when filter
FIX: dom and missing param
FIX: drafts are now implemented for stats
FIX: Error in log for email sending with smtps was not complete
FIX: Extrafield position in export field list must respect "pos" field
FIX: FEC export format
FIX: FEC export have specific name
FIX: fetching account on current entity
FIX: Filenames must not contains non ascii char or we will get non ascii
FIX: fk_type subscription list via api REST
FIX: Force FEC export to txt format
FIX: get remain to pay with rounding decimals
FIX: Invert isSellerInEEC and isBuyerInEEC
FIX: keep assigned users in session when loading projects and tasks
FIX: length, width and height units coherence in product table
FIX: links in products/services index
FIX: Mail smtps truncated if content has a line with single .
FIX: missing array option
FIX: missing global $conf
FIX: missing hook parameter
FIX: Missing Linked objects Fichinter Ref. in PDF formats
FIX: missing "statut" for getNomUrl() function
FIX: multicompany for discount
FIX: must be == and not =
FIX: Problem with column label in subscription list
FIX: regex for include or exclude categories in full arbo
FIX: Remove unexisting link
FIX: remove unused var, $usercancreate can be change by Multicompany
FIX: require category class in extrafield
FIX: round MT in accountancy books
FIX: search with '0'
FIX: send expense report mail in HTML format
FIX: SQL request and phpunit
FIX: substitute lines dates values on doc generator (ODT, ...)
FIX: test on 0 better than isset
FIX: The "automatic bind" was linked EEC to export accountancy code
FIX: thirdparty alias name desappeared if we change country with THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION conf
FIX: timezone must be tzserver and not tzuser as well as on contract card
FIX: typo on ckeck method
FIX: use "usergroup" instead "user"
FIX: Visualization rights correction on last modified contacts box
FIX: Warning on admin/export_files
FIX: We want to be able to import data for extrafields of entity 0 too
FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create
FIX: wrong test
FIX: XSS vulnerability in description of list of audit events.
FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD
***** ChangeLog for 10.0.6 compared to 10.0.5 ***** ***** ChangeLog for 10.0.6 compared to 10.0.5 *****
FIX Regression of 10.0.5 to create/edit proposals and orders. FIX Regression of 10.0.5 to create/edit proposals and orders.
FIX: #12760 #12763 #12755 #12765 #12751 FIX: #12760 #12763 #12755 #12765 #12751

View File

@@ -103,7 +103,7 @@ abstract class CommonInvoice extends CommonObject
$alreadypaid+=$this->getSommePaiement($multicurrency); $alreadypaid+=$this->getSommePaiement($multicurrency);
$alreadypaid+=$this->getSumDepositsUsed($multicurrency); $alreadypaid+=$this->getSumDepositsUsed($multicurrency);
$alreadypaid+=$this->getSumCreditNotesUsed($multicurrency); $alreadypaid+=$this->getSumCreditNotesUsed($multicurrency);
return $this->total_ttc - $alreadypaid; return price2num($this->total_ttc - $alreadypaid, 'MT');
} }
/** /**

View File

@@ -8325,3 +8325,24 @@ function isAFileWithExecutableContent($filename)
} }
return false; return false;
} }
/**
* Return the value of token currently saved into session with name 'newtoken'.
* This token must be send by any POST as it will be used by next page for comparison with value in session.
*
* @return string
*/
function newToken()
{
return $_SESSION['newtoken'];
}
/**
* Return the value of token currently saved into session with name 'token'.
*
* @return string
*/
function currentToken()
{
return $_SESSION['token'];
}

View File

@@ -277,7 +277,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.= " 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"; $sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.email, u.statut, u.photo";
// Add fields from extrafields // Add fields from extrafields
foreach ($extrafields->attributes['expensereport']['type'] as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); if (is_array($extrafields->attributes['expensereport']['type'])) {
foreach ($extrafields->attributes['expensereport']['type'] as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
}
// Add fields from hooks // Add fields from hooks
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook

View File

@@ -7,6 +7,7 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com> * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -590,7 +591,7 @@ class ProductFournisseur extends Product
global $conf; global $conf;
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,"; $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,";
$sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,"; $sql.= " pfp.rowid as product_fourn_pri_id, pfp.entity, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,";
$sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,"; $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,";
$sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,"; $sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,";
$sql.= " pfp.barcode, pfp.fk_barcode_type"; $sql.= " pfp.barcode, pfp.fk_barcode_type";
@@ -616,6 +617,7 @@ class ProductFournisseur extends Product
$prodfourn->product_fourn_price_id = $record["product_fourn_pri_id"]; $prodfourn->product_fourn_price_id = $record["product_fourn_pri_id"];
$prodfourn->product_fourn_id = $record["product_fourn_id"]; $prodfourn->product_fourn_id = $record["product_fourn_id"];
$prodfourn->product_fourn_entity = $record["entity"];
$prodfourn->fourn_ref = $record["ref_fourn"]; $prodfourn->fourn_ref = $record["ref_fourn"];
$prodfourn->ref_supplier = $record["ref_fourn"]; $prodfourn->ref_supplier = $record["ref_fourn"];
$prodfourn->desc_supplier = $record["desc_fourn"]; $prodfourn->desc_supplier = $record["desc_fourn"];

View File

@@ -1213,7 +1213,7 @@ $result = $object->updateline(
'', '',
null, null,
null, null,
array(), $array_option,
$lines[$i]->fk_unit, $lines[$i]->fk_unit,
0, 0,
$element, $element,

View File

@@ -980,7 +980,7 @@ class Product extends CommonObject
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'"; $sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
$sql.= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra)."'"; $sql.= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra)."'";
$sql.= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export)."'"; $sql.= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export)."'";
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? (int) $this->desiredstock : "null"); $sql.= ", desiredstock = " . ((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (int) $this->desiredstock : "null");
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null'); $sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
$sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : (int) $this->fk_unit); $sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : (int) $this->fk_unit);
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1); $sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);

View File

@@ -9,6 +9,7 @@
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -933,6 +934,7 @@ SCRIPT;
// Modify-Remove // Modify-Remove
print '<td class="center nowraponall">'; print '<td class="center nowraponall">';
if ($usercancreate) if ($usercancreate)
{ {
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$productfourn->fourn_id.'&amp;action=add_price&amp;rowid='.$productfourn->product_fourn_price_id.'">'.img_edit()."</a>"; print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$productfourn->fourn_id.'&amp;action=add_price&amp;rowid='.$productfourn->product_fourn_price_id.'">'.img_edit()."</a>";