Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2015-04-08 11:50:59 +02:00
commit 15ba6716f5
20 changed files with 94 additions and 48 deletions

View File

@ -243,6 +243,12 @@ Dolibarr better:
- Fix: Bad SEPA xml file creation
- Fix: [ bug #1892 ] PHP Fatal error when using USER_UPDATE_SESSION trigger and adding a supplier invoice payment
- Fix: Showing system error if not enough stock of product into orders creation with lines
- Fix: [ bug #2543 ] Untranslated "Contract" origin string when creating an invoice from a contract
- Fix: [ bug #2534 ] SQL error when editing a supplier invoice line
- Fix: [ bug #2535 ] Untranslated string in "Linked objects" page of a project
- Fix: [ bug #2545 ] Missing object_margin.png in Amarok theme
- Fix: [ bug #2542 ] Contracts store localtax preferences
- Fix: Bad permission assignments for stock movements actions
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.

View File

@ -329,8 +329,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
// Solde actuel
$var=!$var;
print '<tr class="liste_total">';
print '<td align="left" colspan="5">'.$langs->trans("FutureBalance").'</td>';
print '<td align="right" nowrap>'.price($solde).'</td>';
print '<td align="left" colspan="5">'.$langs->trans("FutureBalance").' ('.$acct->currency_code.')</td>';
print '<td align="right" nowrap>'.price($solde, 0, $langs, 0, 0, -1, $acct->currency_code).'</td>';
print '</tr>';
print "</table>";

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@ -1076,8 +1076,12 @@ if (empty($reshook))
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$array_options = $lines[$i]->array_options;
}
// View third's localtaxes for now
$localtax1_tx = get_localtax($lines[$i]->tva_tx, 1, $object->client);
$localtax2_tx = get_localtax($lines[$i]->tva_tx, 2, $object->client);
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, $lines[$i]->situation_percent, $lines[$i]->fk_prev_id);
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->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, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, $lines[$i]->situation_percent, $lines[$i]->fk_prev_id);
if ($result > 0) {
$lineid = $result;

View File

@ -22,7 +22,14 @@
* This is the File Manager Connector for PHP.
*/
function GetFolders( $resourceType, $currentFolder )
/**
* GetFolders
*
* @param string $resourceType Resource type
* @param string $currentFolder Current folder
* @return void
*/
function GetFolders($resourceType, $currentFolder)
{
// Map the virtual path to the local server path.
$sServerDir = ServerMapFolder($resourceType, $currentFolder, 'GetFolders');
@ -178,6 +185,15 @@ function CreateFolder( $resourceType, $currentFolder )
// DOL_CHANGE
//function FileUpload( $resourceType, $currentFolder, $sCommand )
/**
* FileUpload
*
* @param string $resourceType Resource type
* @param string $currentFolder Current folder
* @param string $sCommand Command
* @param string $CKEcallback Callback
* @return null
*/
function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
{
if (!isset($_FILES)) {

View File

@ -104,8 +104,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/card.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/list.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php', 'StockTransfer', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php', 'StockTransfer', 1, 'stocks', '$user->rights->stock->mouvement->creer', '', 2, 5, __ENTITY__);
-- Product - Categories
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3200__+MAX_llx_menu__, 'products', 'cat', 3__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&amp;type=0', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__);

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
*
@ -1094,8 +1094,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer);
$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
$newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire);
if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire);
if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire);
$newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->creer);
}
// Expeditions

View File

@ -452,7 +452,7 @@ class pdf_strato extends ModelePDFContract
* Show top header of page.
*
* @param PDF $pdf Object PDF
* @param Object $object Object to show
* @param CommonObject $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
@ -631,10 +631,10 @@ class pdf_strato extends ModelePDFContract
* Show footer of page. Need this->emetteur object
*
* @param PDF $pdf PDF
* @param Object $object Object to show
* @param CommonObject $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return void
* @return integer
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{

View File

@ -63,7 +63,7 @@ class ModeleImports
* Charge en memoire et renvoie la liste des modeles actifs
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
function liste_modeles($db,$maxfilenamelength=0)

View File

@ -60,7 +60,7 @@ class mailing_contacts1 extends MailingTargets
* array of SQL request that returns two field:
* One called "label", One called "nb".
*
* @return array Array with SQL requests
* @return string[] Array with SQL requests
*/
function getSqlArrayForStats()
{

View File

@ -63,7 +63,7 @@ class mailing_fraise extends MailingTargets
* array of SQL request that returns two field:
* One called "label", One called "nb".
*
* @return array Array with SQL requests
* @return string[] Array with SQL requests
*/
function getSqlArrayForStats()
{

View File

@ -105,7 +105,7 @@ abstract class ModeleProductCode
* Renvoi la liste des modeles de numérotation
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
static function liste_modeles($db,$maxfilenamelength=0)

View File

@ -105,7 +105,7 @@ class doc_generic_project_odt extends ModelePDFProjects
/**
* Define array with couple substitution key => substitution value
*
* @param Object $object Main object to use as data source
* @param Project $object Main object to use as data source
* @param Translate $outputlangs Lang object to use for output
* @return array Array of substitution
*/

View File

@ -43,7 +43,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
* Return list of active generation modules
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db,$maxfilenamelength=0)
@ -149,7 +149,7 @@ abstract class ModeleNumRefPropales
* Create a document onto disk according to template module.
*
* @param DoliDB $db Database handler
* @param object $object Object proposal
* @param Propal $object Object proposal
* @param string $modele Force model to use ('' to not force)
* @param Translate $outputlangs Object langs to use for output
* @param int $hidedetails Hide details of lines

View File

@ -39,7 +39,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
* Return list of active generation modules
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db,$maxfilenamelength=0)
@ -142,7 +142,7 @@ abstract class ModeleThirdPartyCode
* Renvoi la liste des modeles de numéroation
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
static function liste_modeles($db,$maxfilenamelength=0)

View File

@ -41,7 +41,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator
* Return list of active generation models
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
static function liste_modeles($db,$maxfilenamelength=0)

View File

@ -415,26 +415,45 @@ function print_paypal_redirect($paymentAmount,$currencyCodeType,$paymentType,$re
}
/*
'-------------------------------------------------------------------------------------------------------------------------------------------
' Purpose: Prepares the parameters for the SetExpressCheckout API Call.
' Inputs:
' paymentAmount: Total value of the shopping cart
' currencyCodeType: Currency code value the PayPal API
' paymentType: paymentType has to be one of the following values: Sale or Order or Authorization
' returnURL: the page where buyers return to after they are done with the payment review on PayPal
' cancelURL: the page where buyers return to when they cancel the payment review on PayPal
' shipToName: the Ship to name entered on the merchant's site
' shipToStreet: the Ship to Street entered on the merchant's site
' shipToCity: the Ship to City entered on the merchant's site
' shipToState: the Ship to State entered on the merchant's site
' shipToCountryCode: the Code for Ship to Country entered on the merchant's site
' shipToZip: the Ship to ZipCode entered on the merchant's site
' shipToStreet2: the Ship to Street2 entered on the merchant's site
' phoneNum: the phoneNum entered on the merchant's site
' email: the buyer email
' desc: Product description
'--------------------------------------------------------------------------------------------------------------------------------------------
/**
*-------------------------------------------------------------------------------------------------------------------------------------------
* Purpose: Prepares the parameters for the SetExpressCheckout API Call.
* Inputs:
* paymentAmount: Total value of the shopping cart
* currencyCodeType: Currency code value the PayPal API
* paymentType: paymentType has to be one of the following values: Sale or Order or Authorization
* returnURL: the page where buyers return to after they are done with the payment review on PayPal
* cancelURL: the page where buyers return to when they cancel the payment review on PayPal
* shipToName: the Ship to name entered on the merchant's site
* shipToStreet: the Ship to Street entered on the merchant's site
* shipToCity: the Ship to City entered on the merchant's site
* shipToState: the Ship to State entered on the merchant's site
* shipToCountryCode: the Code for Ship to Country entered on the merchant's site
* shipToZip: the Ship to ZipCode entered on the merchant's site
* shipToStreet2: the Ship to Street2 entered on the merchant's site
* phoneNum: the phoneNum entered on the merchant's site
* email: the buyer email
* desc: Product description
*
* @param double $paymentAmount Payment amount
* @param string $currencyCodeType Currency
* @param string $paymentType Payment type
* @param string $returnURL Return Url
* @param string $cancelURL Cancel Url
* @param string $tag Tag
* @param string $solutionType Type
* @param string $landingPage Landing page
* @param string $shipToName Ship to name
* @param string $shipToStreet Ship to street
* @param string $shipToCity Ship to city
* @param string $shipToState Ship to state
* @param string $shipToCountryCode Ship to country code
* @param string $shipToZip Ship to zip
* @param string $shipToStreet2 Ship to street2
* @param string $phoneNum Phone
* @param string $email Email
* @param string $desc Description
* @return array Array
*/
function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum, $email='', $desc='')
{

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -400,7 +401,7 @@ if ($resql)
{
print "<div class=\"tabsAction\">\n";
if ($user->rights->stock->creer)
if ($user->rights->stock->mouvement->creer)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=correction">'.$langs->trans("StockCorrection").'</a>';
}

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Cédric Salvador <csalvador.gpcsolutions.fr>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014-2015 Cédric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
*
@ -803,7 +803,7 @@ if (empty($action) && $product->id)
{
print "<div class=\"tabsAction\">\n";
if ($user->rights->stock->creer)
if ($user->rights->stock->mouvement->creer)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'&amp;action=correction">'.$langs->trans("StockCorrection").'</a>';
}

View File

@ -1331,7 +1331,7 @@ class Task extends CommonObject
/**
* Return status label of object
*
* @param string $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* @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
*/
function getLibStatut($mode=0)
@ -1343,7 +1343,7 @@ class Task extends CommonObject
* Return status label for an object
*
* @param int $statut Id statut
* @param string $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* @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
*/
function LibStatut($statut,$mode=0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B