Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0
This commit is contained in:
commit
8deb2eaa0c
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@ dolibarr_install.log
|
|||||||
upgrade.log
|
upgrade.log
|
||||||
doxygen_warnings.log
|
doxygen_warnings.log
|
||||||
/.project
|
/.project
|
||||||
|
/.vscode
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
*.iml
|
*.iml
|
||||||
|
|||||||
@ -63,6 +63,14 @@ matrix:
|
|||||||
- php: nightly
|
- php: nightly
|
||||||
# We exclude some combinations not usefull to save Travis CPU
|
# We exclude some combinations not usefull to save Travis CPU
|
||||||
exclude:
|
exclude:
|
||||||
|
- php: '5.4'
|
||||||
|
env: DB=mariadb
|
||||||
|
- php: '5.5'
|
||||||
|
env: DB=mariadb
|
||||||
|
- php: '5.6'
|
||||||
|
env: DB=mariadb
|
||||||
|
- php: '7.0'
|
||||||
|
env: DB=mariadb
|
||||||
- php: '5.4'
|
- php: '5.4'
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: '5.5'
|
- php: '5.5'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# DOLIBARR ERP & CRM
|
# DOLIBARR ERP & CRM
|
||||||
|
|
||||||
 
|
 
|
||||||
|
|
||||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).
|
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).
|
||||||
|
|
||||||
|
|||||||
@ -17,11 +17,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file build/generate_filecheck_xml.php
|
* \file build/generate_filelist_xml.php
|
||||||
* \ingroup dev
|
* \ingroup dev
|
||||||
* \brief This script create a xml checksum file
|
* \brief This script create a xml checksum file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db
|
||||||
|
|
||||||
$sapi_type = php_sapi_name();
|
$sapi_type = php_sapi_name();
|
||||||
$script_file = basename(__FILE__);
|
$script_file = basename(__FILE__);
|
||||||
$path=dirname(__FILE__).'/';
|
$path=dirname(__FILE__).'/';
|
||||||
@ -45,7 +47,7 @@ $includeconstants=array();
|
|||||||
|
|
||||||
if (empty($argv[1]))
|
if (empty($argv[1]))
|
||||||
{
|
{
|
||||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
}
|
}
|
||||||
@ -68,11 +70,20 @@ while ($i < $argc)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If release is auto, we take current version
|
||||||
|
$tmpver=explode('-', $release, 2);
|
||||||
|
if ($tmpver[0] == 'auto')
|
||||||
|
{
|
||||||
|
$release=DOL_VERSION;
|
||||||
|
if ($tmpver[1]) $release.='-'.$tmpver[1];
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($includecustom))
|
if (empty($includecustom))
|
||||||
{
|
{
|
||||||
if (DOL_VERSION != $release)
|
$tmpver=explode('-', $release, 2);
|
||||||
|
if (DOL_VERSION != $tmpver[0])
|
||||||
{
|
{
|
||||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n";
|
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n";
|
||||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -198,7 +198,7 @@ $sql.=$hookmanager->resPrint;
|
|||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
|
$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 . "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";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON (p.accountancy_code_sell = aa.account_number AND aa.entity = ".$conf->entity.")";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
||||||
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
||||||
$sql .= " AND product_type <= 2";
|
$sql .= " AND product_type <= 2";
|
||||||
|
|||||||
@ -179,6 +179,9 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
|||||||
// TODO We add/delete permission here until permission can have a condition on a global var
|
// TODO We add/delete permission here until permission can have a condition on a global var
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
||||||
$newmodule=new modFournisseur($db);
|
$newmodule=new modFournisseur($db);
|
||||||
|
|
||||||
|
if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
|
||||||
|
{
|
||||||
// clear default rights array
|
// clear default rights array
|
||||||
$newmodule->rights=array();
|
$newmodule->rights=array();
|
||||||
// add new right
|
// add new right
|
||||||
@ -190,13 +193,16 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
|||||||
$newmodule->rights[$r][4] = 'commande';
|
$newmodule->rights[$r][4] = 'commande';
|
||||||
$newmodule->rights[$r][5] = 'approve2';
|
$newmodule->rights[$r][5] = 'approve2';
|
||||||
|
|
||||||
if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
|
// Insert
|
||||||
{
|
|
||||||
$newmodule->insert_permissions(1);
|
$newmodule->insert_permissions(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Remove all rights with Permission1190
|
||||||
$newmodule->delete_permissions();
|
$newmodule->delete_permissions();
|
||||||
|
|
||||||
|
// Add all right without Permission1190
|
||||||
|
$newmodule->insert_permissions(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -534,8 +534,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
|||||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filtert > 0 || $usergroup > 0)
|
if ($filtert > 0 || $usergroup > 0)
|
||||||
{
|
{
|
||||||
@ -1243,7 +1243,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();
|
$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();
|
||||||
$ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day);
|
$ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day);
|
||||||
|
|
||||||
$nextindextouse=count($colorindexused); // At first run this is 0, so fist user has 0, next 1, ...
|
$nextindextouse=is_array($colorindexused)?count($colorindexused):0; // At first run this is 0, so fist user has 0, next 1, ...
|
||||||
//print $nextindextouse;
|
//print $nextindextouse;
|
||||||
|
|
||||||
foreach ($eventarray as $daykey => $notused)
|
foreach ($eventarray as $daykey => $notused)
|
||||||
|
|||||||
@ -253,8 +253,8 @@ if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
|||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == '100') { $sql.= " AND a.percent = 100"; }
|
if ($status == '100') { $sql.= " AND a.percent = 100"; }
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
if ($search_title) $sql.=natural_search("a.label", $search_title);
|
if ($search_title) $sql.=natural_search("a.label", $search_title);
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filtert > 0 || $usergroup > 0)
|
if ($filtert > 0 || $usergroup > 0)
|
||||||
|
|||||||
@ -427,8 +427,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
|||||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filtert > 0 || $usergroup > 0)
|
if ($filtert > 0 || $usergroup > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -446,8 +446,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
|||||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filtert > 0 || $usergroup > 0)
|
if ($filtert > 0 || $usergroup > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -79,6 +79,7 @@ $originid = GETPOST('originid', 'int');
|
|||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$lineid = GETPOST('lineid', 'int');
|
$lineid = GETPOST('lineid', 'int');
|
||||||
$contactid = GETPOST('contactid','int');
|
$contactid = GETPOST('contactid','int');
|
||||||
|
$projectid = GETPOST('projectid','int');
|
||||||
|
|
||||||
// PDF
|
// PDF
|
||||||
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
||||||
@ -1320,7 +1321,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
$objectsrc->fetch_thirdparty();
|
$objectsrc->fetch_thirdparty();
|
||||||
|
|
||||||
$projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : '');
|
$projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : 0);
|
||||||
$ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
|
$ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
|
||||||
$ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
|
$ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
|
||||||
|
|
||||||
@ -1450,7 +1451,7 @@ if ($action == 'create')
|
|||||||
// Bank Account
|
// Bank Account
|
||||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && ! empty($conf->banque->enabled)) {
|
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && ! empty($conf->banque->enabled)) {
|
||||||
print '<tr><td>' . $langs->trans('BankAccount') . '</td><td>';
|
print '<tr><td>' . $langs->trans('BankAccount') . '</td><td>';
|
||||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
$form->select_comptes($soc->fk_account, 'fk_account', 0, '', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1488,9 +1489,6 @@ if ($action == 'create')
|
|||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled) && $socid > 0)
|
if (! empty($conf->projet->enabled) && $socid > 0)
|
||||||
{
|
{
|
||||||
$projectid = GETPOST('projectid')?GETPOST('projectid'):0;
|
|
||||||
if ($origin == 'project') $projectid = ($originid ? $originid : 0);
|
|
||||||
|
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("Project") . '</td><td>';
|
print '<td>' . $langs->trans("Project") . '</td><td>';
|
||||||
|
|||||||
@ -417,6 +417,7 @@ class Propal extends CommonObject
|
|||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
|
$pu_ht_devise=price2num($pu_ht_devise);
|
||||||
$pu_ttc=price2num($pu_ttc);
|
$pu_ttc=price2num($pu_ttc);
|
||||||
$txtva=price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
$txtva=price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||||
$txlocaltax1=price2num($txlocaltax1);
|
$txlocaltax1=price2num($txlocaltax1);
|
||||||
@ -638,6 +639,7 @@ class Propal extends CommonObject
|
|||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
|
$pu_ht_devise=price2num($pu_ht_devise);
|
||||||
$txtva = price2num($txtva);
|
$txtva = price2num($txtva);
|
||||||
$txlocaltax1=price2num($txlocaltax1);
|
$txlocaltax1=price2num($txlocaltax1);
|
||||||
$txlocaltax2=price2num($txlocaltax2);
|
$txlocaltax2=price2num($txlocaltax2);
|
||||||
|
|||||||
@ -83,12 +83,14 @@ $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
|||||||
$search_day=GETPOST("search_day","int");
|
$search_day=GETPOST("search_day","int");
|
||||||
$search_month=GETPOST("search_month","int");
|
$search_month=GETPOST("search_month","int");
|
||||||
$search_year=GETPOST("search_year","int");
|
$search_year=GETPOST("search_year","int");
|
||||||
|
$search_btn=GETPOST('button_search','alpha');
|
||||||
|
$search_remove_btn=GETPOST('button_removefilter','alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
@ -384,6 +386,7 @@ if ($resql)
|
|||||||
if ($search_zip) $param.='&search_zip='.urlencode($search_zip);
|
if ($search_zip) $param.='&search_zip='.urlencode($search_zip);
|
||||||
if ($socid > 0) $param.='&socid='.urlencode($socid);
|
if ($socid > 0) $param.='&socid='.urlencode($socid);
|
||||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||||
|
if ($search_product_category != '') $param.='&search_product_category='.$search_product_category;
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
|
|||||||
@ -1269,6 +1269,7 @@ class Commande extends CommonOrder
|
|||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
|
$pu_ht_devise=price2num($pu_ht_devise);
|
||||||
$pu_ttc=price2num($pu_ttc);
|
$pu_ttc=price2num($pu_ttc);
|
||||||
$pa_ht=price2num($pa_ht);
|
$pa_ht=price2num($pa_ht);
|
||||||
$txtva = price2num($txtva);
|
$txtva = price2num($txtva);
|
||||||
@ -2815,6 +2816,7 @@ class Commande extends CommonOrder
|
|||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
$pa_ht=price2num($pa_ht);
|
$pa_ht=price2num($pa_ht);
|
||||||
|
$pu_ht_devise=price2num($pu_ht_devise);
|
||||||
$txtva=price2num($txtva);
|
$txtva=price2num($txtva);
|
||||||
$txlocaltax1=price2num($txlocaltax1);
|
$txlocaltax1=price2num($txlocaltax1);
|
||||||
$txlocaltax2=price2num($txlocaltax2);
|
$txlocaltax2=price2num($txlocaltax2);
|
||||||
|
|||||||
@ -74,6 +74,8 @@ $search_total_ht=GETPOST('search_total_ht','alpha');
|
|||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
$billed = GETPOST('billed','int');
|
$billed = GETPOST('billed','int');
|
||||||
$viewstatut=GETPOST('viewstatut');
|
$viewstatut=GETPOST('viewstatut');
|
||||||
|
$search_btn=GETPOST('button_search','alpha');
|
||||||
|
$search_remove_btn=GETPOST('button_removefilter','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = (GETPOST('orderid')?GETPOST('orderid','int'):GETPOST('id','int'));
|
$id = (GETPOST('orderid')?GETPOST('orderid','int'):GETPOST('id','int'));
|
||||||
@ -86,7 +88,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
|||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
@ -627,6 +629,13 @@ if ($resql)
|
|||||||
if ($show_files) $param.='&show_files=' .$show_files;
|
if ($show_files) $param.='&show_files=' .$show_files;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
if ($billed != '') $param.='&billed='.$billed;
|
if ($billed != '') $param.='&billed='.$billed;
|
||||||
|
if ($search_town != '')$param .= '&search_town='.$search_town;
|
||||||
|
if ($search_zip != '')$param .= '&search_zip='.$search_zip;
|
||||||
|
if ($search_state != '')$param .= '&search_state='.$search_state;
|
||||||
|
if ($search_country != '')$param .= '&search_country='.$search_country;
|
||||||
|
if ($search_type_thirdparty != '')$param .= '&search_type_thirdparty='.$search_type_thirdparty;
|
||||||
|
if ($search_product_category != '')$param .= '&search_product_category='.$search_product_category;
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -186,6 +186,8 @@ if (empty($reshook))
|
|||||||
$qualified_for_stock_change = $object->hasProductsOrServices(1);
|
$qualified_for_stock_change = $object->hasProductsOrServices(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($object->is_erasable()) {
|
||||||
|
|
||||||
$result = $object->delete($user, 0, $idwarehouse);
|
$result = $object->delete($user, 0, $idwarehouse);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php');
|
header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php');
|
||||||
@ -194,6 +196,8 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete line
|
// Delete line
|
||||||
@ -402,7 +406,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
//var_dump($object->getRemainToPay(0));
|
//var_dump($object->getRemainToPay(0));
|
||||||
//var_dump($discount->amount_ttc);exit;
|
//var_dump($discount->amount_ttc);exit;
|
||||||
if ($discount->amount_ttc > $object->getRemainToPay(0))
|
if (price2num($discount->amount_ttc) > price2num($object->getRemainToPay(0)))
|
||||||
{
|
{
|
||||||
// TODO Split the discount in 2 automatically
|
// TODO Split the discount in 2 automatically
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -2512,6 +2512,7 @@ class Facture extends CommonInvoice
|
|||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
|
$pu_ht_devise=price2num($pu_ht_devise);
|
||||||
$pu_ttc=price2num($pu_ttc);
|
$pu_ttc=price2num($pu_ttc);
|
||||||
$pa_ht=price2num($pa_ht);
|
$pa_ht=price2num($pa_ht);
|
||||||
$txtva=price2num($txtva);
|
$txtva=price2num($txtva);
|
||||||
@ -2735,6 +2736,7 @@ class Facture extends CommonInvoice
|
|||||||
$remise_percent = price2num($remise_percent);
|
$remise_percent = price2num($remise_percent);
|
||||||
$qty = price2num($qty);
|
$qty = price2num($qty);
|
||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
|
$pu_ht_devise = price2num($pu_ht_devise);
|
||||||
$pa_ht = price2num($pa_ht);
|
$pa_ht = price2num($pa_ht);
|
||||||
$txtva = price2num($txtva);
|
$txtva = price2num($txtva);
|
||||||
$txlocaltax1 = price2num($txlocaltax1);
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
@ -4832,7 +4834,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql && $resql->num_rows > 0) {
|
if ($resql && $resql->num_rows > 0) {
|
||||||
$res = $this->db->fetch_array($resql);
|
$res = $this->db->fetch_array($resql);
|
||||||
return $res['situation_percent'];
|
return floatval($res['situation_percent']);
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->error();
|
$this->error = $this->db->error();
|
||||||
dol_syslog(get_class($this) . "::select Error " . $this->error, LOG_ERR);
|
dol_syslog(get_class($this) . "::select Error " . $this->error, LOG_ERR);
|
||||||
|
|||||||
@ -93,6 +93,8 @@ $year = GETPOST('year','int');
|
|||||||
$day_lim = GETPOST('day_lim','int');
|
$day_lim = GETPOST('day_lim','int');
|
||||||
$month_lim = GETPOST('month_lim','int');
|
$month_lim = GETPOST('month_lim','int');
|
||||||
$year_lim = GETPOST('year_lim','int');
|
$year_lim = GETPOST('year_lim','int');
|
||||||
|
$search_btn=GETPOST('button_search','alpha');
|
||||||
|
$search_remove_btn=GETPOST('button_removefilter','alpha');
|
||||||
|
|
||||||
$option = GETPOST('option');
|
$option = GETPOST('option');
|
||||||
if ($option == 'late') {
|
if ($option == 'late') {
|
||||||
@ -104,7 +106,7 @@ $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
|||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
if (! $sortorder && ! empty($conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER) && $search_status == 1) $sortorder=$conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER;
|
if (! $sortorder && ! empty($conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER) && $search_status == 1) $sortorder=$conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER;
|
||||||
if (! $sortorder) $sortorder='DESC';
|
if (! $sortorder) $sortorder='DESC';
|
||||||
@ -563,6 +565,9 @@ if ($resql)
|
|||||||
if ($show_files) $param.='&show_files=' .$show_files;
|
if ($show_files) $param.='&show_files=' .$show_files;
|
||||||
if ($option) $param.="&option=".$option;
|
if ($option) $param.="&option=".$option;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
if ($search_town)$param .= '&search_town='.urlencode($search_town);
|
||||||
|
if ($search_zip)$param .= '&search_zip='.urlencode($search_zip);
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
@ -1009,6 +1014,9 @@ if ($resql)
|
|||||||
$facturestatic->ref=$obj->ref;
|
$facturestatic->ref=$obj->ref;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
$facturestatic->statut=$obj->fk_statut;
|
$facturestatic->statut=$obj->fk_statut;
|
||||||
|
$facturestatic->total_ttc=$obj->total_ttc;
|
||||||
|
$facturestatic->paye=$obj->paye;
|
||||||
|
$facturestatic->fk_soc=$obj->fk_soc;
|
||||||
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
|
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
|
||||||
$facturestatic->note_public=$obj->note_public;
|
$facturestatic->note_public=$obj->note_public;
|
||||||
$facturestatic->note_private=$obj->note_private;
|
$facturestatic->note_private=$obj->note_private;
|
||||||
@ -1017,7 +1025,13 @@ if ($resql)
|
|||||||
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
|
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
|
||||||
$totaldeposits = $facturestatic->getSumDepositsUsed();
|
$totaldeposits = $facturestatic->getSumDepositsUsed();
|
||||||
$totalpay = $paiement + $totalcreditnotes + $totaldeposits;
|
$totalpay = $paiement + $totalcreditnotes + $totaldeposits;
|
||||||
$remaintopay = $obj->total_ttc - $totalpay;
|
$remaintopay = $facturestatic->total_ttc - $totalpay;
|
||||||
|
if($facturestatic->type == Facture::TYPE_CREDIT_NOTE && $obj->paye == 1) {
|
||||||
|
$discount = new DiscountAbsolute($db);
|
||||||
|
$remaincreditnote = $discount->getAvailableDiscounts($obj->fk_soc, '', 'rc.fk_facture_source='.$facturestatic->id);
|
||||||
|
$remaintopay = -$remaincreditnote;
|
||||||
|
$totalpay = $facturestatic->total_ttc - $remaintopay;
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
if (! empty($arrayfields['f.facnumber']['checked']))
|
if (! empty($arrayfields['f.facnumber']['checked']))
|
||||||
|
|||||||
@ -57,6 +57,9 @@ $arrayfields=array(
|
|||||||
//...
|
//...
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('supplierbalencelist','globalcard'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -93,7 +96,7 @@ if ($id > 0)
|
|||||||
// Invoice list
|
// Invoice list
|
||||||
print load_fiche_titre($langs->trans("CustomerPreview"));
|
print load_fiche_titre($langs->trans("CustomerPreview"));
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder tagtable liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
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);
|
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 '<td>'.$langs->trans("Element").'</td>';
|
print '<td>'.$langs->trans("Element").'</td>';
|
||||||
|
|||||||
@ -407,18 +407,44 @@ class CMailFile
|
|||||||
// TODO if (! empty($moreinheader)) ...
|
// TODO if (! empty($moreinheader)) ...
|
||||||
|
|
||||||
// Give the message a subject
|
// Give the message a subject
|
||||||
$this->message->setSubject($this->encodetorfc2822($subject));
|
try {
|
||||||
|
$this->message->setSubject($subject);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->error = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
// Set the From address with an associative array
|
// Set the From address with an associative array
|
||||||
//$this->message->setFrom(array('john@doe.com' => 'John Doe'));
|
//$this->message->setFrom(array('john@doe.com' => 'John Doe'));
|
||||||
if (! empty($from)) $this->message->setFrom($this->getArrayAddress($from));
|
if (! empty($from)) {
|
||||||
|
try {
|
||||||
|
$result = $this->message->setFrom($this->getArrayAddress($from));
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->error = $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set the To addresses with an associative array
|
// Set the To addresses with an associative array
|
||||||
if (! empty($to)) $this->message->setTo($this->getArrayAddress($to));
|
if (! empty($to)) {
|
||||||
|
try {
|
||||||
|
$result = $this->message->setTo($this->getArrayAddress($to));
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->error = $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($from)) $this->message->SetReplyTo($this->getArrayAddress($from));
|
if (! empty($from)) {
|
||||||
|
try {
|
||||||
|
$result = $this->message->SetReplyTo($this->getArrayAddress($from));
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->error = $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->message->setCharSet($conf->file->character_set_client);
|
try {
|
||||||
|
$result = $this->message->setCharSet($conf->file->character_set_client);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->error = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($this->html))
|
if (! empty($this->html))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4524,7 +4524,7 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
if (is_array($params) && count($params)>0) {
|
if (is_array($params) && count($params)>0) {
|
||||||
if (array_key_exists('colspan',$params)) {
|
if (array_key_exists('colspan',$params)) {
|
||||||
$colspan=$params['colspan'];
|
$colspan=$params['colspan'] - 1;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
$colspan='3';
|
$colspan='3';
|
||||||
@ -4581,6 +4581,12 @@ abstract class CommonObject
|
|||||||
if($extrafields->attribute_required[$key])
|
if($extrafields->attribute_required[$key])
|
||||||
$label = '<span'.($mode != 'view' ? ' class="fieldrequired"':'').'>'.$label.'</span>';
|
$label = '<span'.($mode != 'view' ? ' class="fieldrequired"':'').'>'.$label.'</span>';
|
||||||
|
|
||||||
|
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
||||||
|
{
|
||||||
|
$out .= '<td> </td>';
|
||||||
|
$colspan--;
|
||||||
|
}
|
||||||
|
|
||||||
$out .= '<td>'.$langs->trans($label).'</td>';
|
$out .= '<td>'.$langs->trans($label).'</td>';
|
||||||
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
||||||
$out .='<td id="'.$html_id.'" class="'.$this->element.'_extras_'.$key.'" '.($colspan?' colspan="'.$colspan.'"':'').'>';
|
$out .='<td id="'.$html_id.'" class="'.$this->element.'_extras_'.$key.'" '.($colspan?' colspan="'.$colspan.'"':'').'>';
|
||||||
|
|||||||
@ -282,7 +282,7 @@ class Form
|
|||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if ($inputType == 'textarea') $value = dol_nl2br($value);
|
if (preg_match('/^text/',$inputType)) $value = dol_nl2br($value);
|
||||||
else if (preg_match('/^numeric/',$inputType)) $value = price($value);
|
else if (preg_match('/^numeric/',$inputType)) $value = price($value);
|
||||||
else if ($inputType == 'day' || $inputType == 'datepicker') $value = dol_print_date($value, 'day');
|
else if ($inputType == 'day' || $inputType == 'datepicker') $value = dol_print_date($value, 'day');
|
||||||
|
|
||||||
@ -2581,7 +2581,7 @@ class Form
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
||||||
$sql.= " WHERE p.entity IN (".getEntity('productprice').")";
|
$sql.= " WHERE pfp.entity IN (".getEntity('productprice').")";
|
||||||
$sql.= " AND p.tobuy = 1";
|
$sql.= " AND p.tobuy = 1";
|
||||||
$sql.= " AND s.fournisseur = 1";
|
$sql.= " AND s.fournisseur = 1";
|
||||||
$sql.= " AND p.rowid = ".$productid;
|
$sql.= " AND p.rowid = ".$productid;
|
||||||
@ -3231,21 +3231,21 @@ class Form
|
|||||||
if ($resql && $this->db->num_rows($resql) > 0) {
|
if ($resql && $this->db->num_rows($resql) > 0) {
|
||||||
// Last seen cycle
|
// Last seen cycle
|
||||||
$ref = 0;
|
$ref = 0;
|
||||||
while ($res = $this->db->fetch_array($resql, MYSQL_NUM)) {
|
while ($obj = $this->db->fetch_object($resql)){
|
||||||
//Same company ?
|
//Same company ?
|
||||||
if ($socid == $res[5]) {
|
if ($socid == $obj->fk_soc) {
|
||||||
//Same cycle ?
|
//Same cycle ?
|
||||||
if ($res[2] != $ref) {
|
if ($obj->situation_cycle_ref != $ref) {
|
||||||
// Just seen this cycle
|
// Just seen this cycle
|
||||||
$ref = $res[2];
|
$ref = $obj->situation_cycle_ref;
|
||||||
//not final ?
|
//not final ?
|
||||||
if ($res[4] != 1) {
|
if ($obj->situation_final != 1) {
|
||||||
//Not prov?
|
//Not prov?
|
||||||
if (substr($res[1], 1, 4) != 'PROV') {
|
if (substr($obj->facnumber, 1, 4) != 'PROV') {
|
||||||
if ($selected == $res[0]) {
|
if ($selected == $obj->situation_final) {
|
||||||
$opt .= '<option value="' . $res[0] . '" selected>' . $res[1] . '</option>';
|
$opt .= '<option value="' . $obj->rowid . '" selected>' . $obj->facnumber . '</option>';
|
||||||
} else {
|
} else {
|
||||||
$opt .= '<option value="' . $res[0] . '">' . $res[1] . '</option>';
|
$opt .= '<option value="' . $obj->rowid . '">' . $obj->facnumber . '</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -742,7 +742,7 @@ function xml2php($xml)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Let see if the new child is not in the array
|
//Let see if the new child is not in the array
|
||||||
if($tab==false && in_array($key,array_keys($array)))
|
if($tab === false && in_array($key,array_keys($array)))
|
||||||
{
|
{
|
||||||
//If this element is already in the array we will create an indexed array
|
//If this element is already in the array we will create an indexed array
|
||||||
$tmp = $array[$key];
|
$tmp = $array[$key];
|
||||||
@ -751,7 +751,7 @@ function xml2php($xml)
|
|||||||
$array[$key][] = $child;
|
$array[$key][] = $child;
|
||||||
$tab = true;
|
$tab = true;
|
||||||
}
|
}
|
||||||
elseif($tab == true)
|
elseif($tab === true)
|
||||||
{
|
{
|
||||||
//Add an element in an existing array
|
//Add an element in an existing array
|
||||||
$array[$key][] = $child;
|
$array[$key][] = $child;
|
||||||
|
|||||||
@ -1031,7 +1031,7 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
|
|||||||
if (preg_match('/\.\./',$file) || preg_match('/[<>|]/',$file))
|
if (preg_match('/\.\./',$file) || preg_match('/[<>|]/',$file))
|
||||||
{
|
{
|
||||||
dol_syslog("Refused to delete file ".$file, LOG_WARNING);
|
dol_syslog("Refused to delete file ".$file, LOG_WARNING);
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($nohook))
|
if (empty($nohook))
|
||||||
@ -1080,6 +1080,8 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
|
|||||||
{
|
{
|
||||||
$rel_filetodelete = preg_replace('/^[\\/]/', '', $rel_filetodelete);
|
$rel_filetodelete = preg_replace('/^[\\/]/', '', $rel_filetodelete);
|
||||||
|
|
||||||
|
if (is_object($db)) // $db may not be defined when lib is in a context with define('NOREQUIREDB',1)
|
||||||
|
{
|
||||||
dol_syslog("Try to remove also entries in database for full relative path = ".$rel_filetodelete, LOG_DEBUG);
|
dol_syslog("Try to remove also entries in database for full relative path = ".$rel_filetodelete, LOG_DEBUG);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
|
||||||
$ecmfile=new EcmFiles($db);
|
$ecmfile=new EcmFiles($db);
|
||||||
@ -1093,6 +1095,7 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
|
|||||||
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else dol_syslog("Failed to remove file ".$filename, LOG_WARNING);
|
else dol_syslog("Failed to remove file ".$filename, LOG_WARNING);
|
||||||
// TODO Failure to remove can be because file was already removed or because of permission
|
// TODO Failure to remove can be because file was already removed or because of permission
|
||||||
@ -1130,7 +1133,7 @@ function dol_delete_dir($dir,$nophperrors=0)
|
|||||||
if (preg_match('/\.\./',$dir) || preg_match('/[<>|]/',$dir))
|
if (preg_match('/\.\./',$dir) || preg_match('/[<>|]/',$dir))
|
||||||
{
|
{
|
||||||
dol_syslog("Refused to delete dir ".$dir, LOG_WARNING);
|
dol_syslog("Refused to delete dir ".$dir, LOG_WARNING);
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dir_osencoded=dol_osencode($dir);
|
$dir_osencoded=dol_osencode($dir);
|
||||||
@ -1711,7 +1714,7 @@ function dol_uncompress($inputfile,$outputdir)
|
|||||||
dol_syslog("Class ZipArchive is set so we unzip using ZipArchive to unzip into ".$outputdir);
|
dol_syslog("Class ZipArchive is set so we unzip using ZipArchive to unzip into ".$outputdir);
|
||||||
$zip = new ZipArchive;
|
$zip = new ZipArchive;
|
||||||
$res = $zip->open($inputfile);
|
$res = $zip->open($inputfile);
|
||||||
if ($res === TRUE)
|
if ($res === true)
|
||||||
{
|
{
|
||||||
$zip->extractTo($outputdir.'/');
|
$zip->extractTo($outputdir.'/');
|
||||||
$zip->close();
|
$zip->close();
|
||||||
|
|||||||
@ -449,7 +449,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL,
|
|||||||
if (! is_array($out) || empty($out)) $out=array();
|
if (! is_array($out) || empty($out)) $out=array();
|
||||||
break;
|
break;
|
||||||
case 'nohtml':
|
case 'nohtml':
|
||||||
$out=dol_string_nohtmltag($out);
|
$out=dol_string_nohtmltag($out, 0);
|
||||||
break;
|
break;
|
||||||
case 'alphanohtml': // Recommended for search params
|
case 'alphanohtml': // Recommended for search params
|
||||||
$out=trim($out);
|
$out=trim($out);
|
||||||
@ -5068,6 +5068,7 @@ function dol_textishtml($msg,$option=0)
|
|||||||
if (preg_match('/<html/i',$msg)) return true;
|
if (preg_match('/<html/i',$msg)) return true;
|
||||||
elseif (preg_match('/<body/i',$msg)) return true;
|
elseif (preg_match('/<body/i',$msg)) return true;
|
||||||
elseif (preg_match('/<(b|em|i|u)>/i',$msg)) return true;
|
elseif (preg_match('/<(b|em|i|u)>/i',$msg)) return true;
|
||||||
|
elseif (preg_match('/<br\/>/i',$msg)) return true;
|
||||||
elseif (preg_match('/<(br|div|font|li|p|span|strong|table)>/i',$msg)) return true;
|
elseif (preg_match('/<(br|div|font|li|p|span|strong|table)>/i',$msg)) return true;
|
||||||
elseif (preg_match('/<(br|div|font|li|p|span|strong|table)\s+[^<>\/]*>/i',$msg)) return true;
|
elseif (preg_match('/<(br|div|font|li|p|span|strong|table)\s+[^<>\/]*>/i',$msg)) return true;
|
||||||
elseif (preg_match('/<(br|div|font|li|p|span|strong|table)\s+[^<>\/]*\/>/i',$msg)) return true;
|
elseif (preg_match('/<(br|div|font|li|p|span|strong|table)\s+[^<>\/]*\/>/i',$msg)) return true;
|
||||||
@ -5158,9 +5159,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
|||||||
{
|
{
|
||||||
$tmp=dol_getdate(dol_now(), true);
|
$tmp=dol_getdate(dol_now(), true);
|
||||||
$tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']);
|
$tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']);
|
||||||
$tmp3=dol_get_prev_month($tmp['mday'], $tmp['mon'], $tmp['year']);
|
$tmp3=dol_get_prev_month($tmp['mon'], $tmp['year']);
|
||||||
$tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']);
|
$tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']);
|
||||||
$tmp5=dol_get_next_month($tmp['mday'], $tmp['mon'], $tmp['year']);
|
$tmp5=dol_get_next_month($tmp['mon'], $tmp['year']);
|
||||||
}
|
}
|
||||||
$substitutionarray=array_merge($substitutionarray, array(
|
$substitutionarray=array_merge($substitutionarray, array(
|
||||||
'__DAY__' => $tmp['mday'],
|
'__DAY__' => $tmp['mday'],
|
||||||
|
|||||||
@ -433,7 +433,16 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
|||||||
if (!empty($targetcontact->address)) {
|
if (!empty($targetcontact->address)) {
|
||||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcontact))."\n";
|
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcontact))."\n";
|
||||||
} else {
|
} else {
|
||||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcompany))."\n";
|
$companytouseforaddress = $targetcompany;
|
||||||
|
|
||||||
|
// Contact on a thirdparty that is a different thirdparty than the thirdparty of object
|
||||||
|
if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id)
|
||||||
|
{
|
||||||
|
$targetcontact->fetch_thirparty();
|
||||||
|
$companytouseforaddress = $targetcontact->thirdparty;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress))."\n";
|
||||||
}
|
}
|
||||||
// Country
|
// Country
|
||||||
if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) {
|
if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) {
|
||||||
@ -1899,7 +1908,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0)
|
|||||||
{
|
{
|
||||||
$prev_progress = 0;
|
$prev_progress = 0;
|
||||||
$progress = 1;
|
$progress = 1;
|
||||||
if (method_exists($object, 'get_prev_progress'))
|
if (method_exists($object->lines[$i], 'get_prev_progress'))
|
||||||
{
|
{
|
||||||
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
||||||
$progress = ($object->lines[$i]->situation_percent - $prev_progress) / 100;
|
$progress = ($object->lines[$i]->situation_percent - $prev_progress) / 100;
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -856,7 +857,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
@ -1421,4 +1422,3 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -1054,7 +1055,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
@ -1788,4 +1789,3 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -130,12 +130,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
$array_key.'_statut'=>$object->getLibStatut()
|
$array_key.'_statut'=>$object->getLibStatut()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retrieve extrafields
|
|
||||||
$extrafieldkey=$object->element;
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
$extrafields = new ExtraFields($this->db);
|
$extrafields = new ExtraFields($this->db);
|
||||||
$extralabels = $extrafields->fetch_name_optionals_label($extrafieldkey,true);
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element,true);
|
||||||
$object->fetch_optionals($object->id,$extralabels);
|
$object->fetch_optionals($object->id,$extralabels);
|
||||||
|
|
||||||
$resarray = $this->fill_substitutionarray_with_extrafields($object,$resarray,$extrafields,$array_key,$outputlangs);
|
$resarray = $this->fill_substitutionarray_with_extrafields($object,$resarray,$extrafields,$array_key,$outputlangs);
|
||||||
@ -154,7 +151,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
return array(
|
$resarray = array(
|
||||||
'task_ref'=>$task->ref,
|
'task_ref'=>$task->ref,
|
||||||
'task_fk_project'=>$task->fk_project,
|
'task_fk_project'=>$task->fk_project,
|
||||||
'task_projectref'=>$task->projectref,
|
'task_projectref'=>$task->projectref,
|
||||||
@ -163,6 +160,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
'task_description'=>$task->description,
|
'task_description'=>$task->description,
|
||||||
'task_fk_parent'=>$task->fk_parent,
|
'task_fk_parent'=>$task->fk_parent,
|
||||||
'task_duration'=>$task->duration,
|
'task_duration'=>$task->duration,
|
||||||
|
'task_duration_hour'=>convertSecondToTime($task->duration,'all'),
|
||||||
'task_progress'=>$task->progress,
|
'task_progress'=>$task->progress,
|
||||||
'task_public'=>$task->public,
|
'task_public'=>$task->public,
|
||||||
'task_date_start'=>dol_print_date($task->date_start,'day'),
|
'task_date_start'=>dol_print_date($task->date_start,'day'),
|
||||||
@ -170,6 +168,16 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
'task_note_private'=>$task->note_private,
|
'task_note_private'=>$task->note_private,
|
||||||
'task_note_public'=>$task->note_public
|
'task_note_public'=>$task->note_public
|
||||||
);
|
);
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
$extrafields = new ExtraFields($this->db);
|
||||||
|
$extralabels = $extrafields->fetch_name_optionals_label($task->table_element,true);
|
||||||
|
$task->fetch_optionals($task->id,$extralabels);
|
||||||
|
|
||||||
|
$resarray = $this->fill_substitutionarray_with_extrafields($task,$resarray,$extrafields,'task',$outputlangs);
|
||||||
|
|
||||||
|
return $resarray;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -310,7 +318,10 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
'tasktime_fk_user'=>$tasktime['fk_user'],
|
'tasktime_fk_user'=>$tasktime['fk_user'],
|
||||||
'tasktime_user_name'=>$tasktime['name'],
|
'tasktime_user_name'=>$tasktime['name'],
|
||||||
'tasktime_user_first'=>$tasktime['firstname'],
|
'tasktime_user_first'=>$tasktime['firstname'],
|
||||||
'tasktime_fullcivname'=>$tasktime['fullcivname']
|
'tasktime_fullcivname'=>$tasktime['fullcivname'],
|
||||||
|
'tasktime_amountht'=>$tasktime['amountht'],
|
||||||
|
'tasktime_amountttc'=>$tasktime['amountttc'],
|
||||||
|
'tasktime_thm'=>$tasktime['thm'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -691,7 +702,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
|
|
||||||
//Time ressources
|
//Time ressources
|
||||||
$sql = "SELECT t.rowid, t.task_date, t.task_duration, t.fk_user, t.note";
|
$sql = "SELECT t.rowid, t.task_date, t.task_duration, t.fk_user, t.note";
|
||||||
$sql.= ", u.lastname, u.firstname";
|
$sql.= ", u.lastname, u.firstname, t.thm";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql .= " WHERE t.fk_task =".$task->id;
|
$sql .= " WHERE t.fk_task =".$task->id;
|
||||||
@ -705,6 +716,35 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$tasks = array();
|
$tasks = array();
|
||||||
$listlinestasktime = $listlines->__get('taskstimes');
|
$listlinestasktime = $listlines->__get('taskstimes');
|
||||||
|
if (empty($num)) {
|
||||||
|
$row['rowid']='';
|
||||||
|
$row['task_date']='';
|
||||||
|
$row['task_duration']='';
|
||||||
|
$row['$tasktime']='';
|
||||||
|
$row['note']='';
|
||||||
|
$row['fk_user']='';
|
||||||
|
$row['name']='';
|
||||||
|
$row['firstname']='';
|
||||||
|
$row['fullcivname']='';
|
||||||
|
$row['amountht']='';
|
||||||
|
$row['amountttc']='';
|
||||||
|
$row['thm']='';
|
||||||
|
$tmparray=$this->get_substitutionarray_taskstime($row,$outputlangs);
|
||||||
|
foreach($tmparray as $key => $val)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$listlinestasktime->setVars($key, $val, true, 'UTF-8');
|
||||||
|
}
|
||||||
|
catch(OdfException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
catch(SegmentException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$listlinestasktime->merge();
|
||||||
|
}
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $this->db->fetch_array($resql);
|
$row = $this->db->fetch_array($resql);
|
||||||
@ -716,6 +756,16 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
$row['fullcivname']='';
|
$row['fullcivname']='';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($row['thm'])) {
|
||||||
|
$row['amountht']=($row['task_duration'] / 3600) * $row['thm'];
|
||||||
|
$defaultvat = get_default_tva($mysoc, $mysoc);
|
||||||
|
$row['amountttc']=price2num($row['amountht'] * (1 + ($defaultvat / 100)),'MT');;
|
||||||
|
} else {
|
||||||
|
$row['amountht']=0;
|
||||||
|
$row['amountttc']=0;
|
||||||
|
$row['thm']=0;
|
||||||
|
}
|
||||||
|
|
||||||
$tmparray=$this->get_substitutionarray_taskstime($row,$outputlangs);
|
$tmparray=$this->get_substitutionarray_taskstime($row,$outputlangs);
|
||||||
|
|
||||||
foreach($tmparray as $key => $val)
|
foreach($tmparray as $key => $val)
|
||||||
@ -882,55 +932,109 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
'title' => "ListProposalsAssociatedProject",
|
'title' => "ListProposalsAssociatedProject",
|
||||||
'class' => 'Propal',
|
'class' => 'Propal',
|
||||||
'table' => 'propal',
|
'table' => 'propal',
|
||||||
'test'=>$conf->propal->enabled && $user->rights->propale->lire),
|
'test' => $conf->propal->enabled && $user->rights->propale->lire
|
||||||
|
),
|
||||||
'order' => array(
|
'order' => array(
|
||||||
'title' => "ListOrdersAssociatedProject",
|
'title' => "ListOrdersAssociatedProject",
|
||||||
'class' => 'Commande',
|
'class' => 'Commande',
|
||||||
'table' => 'commande',
|
'table' => 'commande',
|
||||||
'test'=>$conf->commande->enabled && $user->rights->commande->lire),
|
'test' => $conf->commande->enabled && $user->rights->commande->lire
|
||||||
|
),
|
||||||
'invoice' => array(
|
'invoice' => array(
|
||||||
'title' => "ListInvoicesAssociatedProject",
|
'title' => "ListInvoicesAssociatedProject",
|
||||||
'class' => 'Facture',
|
'class' => 'Facture',
|
||||||
'table' => 'facture',
|
'table' => 'facture',
|
||||||
'test'=>$conf->facture->enabled && $user->rights->facture->lire),
|
'test' => $conf->facture->enabled && $user->rights->facture->lire
|
||||||
|
),
|
||||||
'invoice_predefined' => array(
|
'invoice_predefined' => array(
|
||||||
'title' => "ListPredefinedInvoicesAssociatedProject",
|
'title' => "ListPredefinedInvoicesAssociatedProject",
|
||||||
'class' => 'FactureRec',
|
'class' => 'FactureRec',
|
||||||
'table' => 'facture_rec',
|
'table' => 'facture_rec',
|
||||||
'test'=>$conf->facture->enabled && $user->rights->facture->lire),
|
'test' => $conf->facture->enabled && $user->rights->facture->lire
|
||||||
|
),
|
||||||
|
'proposal_supplier' => array(
|
||||||
|
'title' => "ListSupplierProposalsAssociatedProject",
|
||||||
|
'class' => 'SupplierProposal',
|
||||||
|
'table' => 'supplier_proposal',
|
||||||
|
'test' => $conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire
|
||||||
|
),
|
||||||
'order_supplier' => array(
|
'order_supplier' => array(
|
||||||
'title' => "ListSupplierOrdersAssociatedProject",
|
'title' => "ListSupplierOrdersAssociatedProject",
|
||||||
'table' => 'commande_fournisseur',
|
'table' => 'commande_fournisseur',
|
||||||
'class' => 'CommandeFournisseur',
|
'class' => 'CommandeFournisseur',
|
||||||
'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire),
|
'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire
|
||||||
|
),
|
||||||
'invoice_supplier' => array(
|
'invoice_supplier' => array(
|
||||||
'title' => "ListSupplierInvoicesAssociatedProject",
|
'title' => "ListSupplierInvoicesAssociatedProject",
|
||||||
'table' => 'facture_fourn',
|
'table' => 'facture_fourn',
|
||||||
'class' => 'FactureFournisseur',
|
'class' => 'FactureFournisseur',
|
||||||
'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire),
|
'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire
|
||||||
|
),
|
||||||
'contract' => array(
|
'contract' => array(
|
||||||
'title' => "ListContractAssociatedProject",
|
'title' => "ListContractAssociatedProject",
|
||||||
'class' => 'Contrat',
|
'class' => 'Contrat',
|
||||||
'table' => 'contrat',
|
'table' => 'contrat',
|
||||||
'test'=>$conf->contrat->enabled && $user->rights->contrat->lire),
|
'test' => $conf->contrat->enabled && $user->rights->contrat->lire
|
||||||
|
),
|
||||||
'intervention' => array(
|
'intervention' => array(
|
||||||
'title' => "ListFichinterAssociatedProject",
|
'title' => "ListFichinterAssociatedProject",
|
||||||
'class' => 'Fichinter',
|
'class' => 'Fichinter',
|
||||||
'table' => 'fichinter',
|
'table' => 'fichinter',
|
||||||
'disableamount' => 1,
|
'disableamount' => 1,
|
||||||
'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire),
|
'test' => $conf->ficheinter->enabled && $user->rights->ficheinter->lire
|
||||||
|
),
|
||||||
|
'shipping' => array(
|
||||||
|
'title' => "ListShippingAssociatedProject",
|
||||||
|
'class' => 'Expedition',
|
||||||
|
'table' => 'expedition',
|
||||||
|
'disableamount' => 1,
|
||||||
|
'test' => $conf->expedition->enabled && $user->rights->expedition->lire
|
||||||
|
),
|
||||||
'trip' => array(
|
'trip' => array(
|
||||||
'title' => "ListTripAssociatedProject",
|
'title' => "ListTripAssociatedProject",
|
||||||
'class' => 'Deplacement',
|
'class' => 'Deplacement',
|
||||||
'table' => 'deplacement',
|
'table' => 'deplacement',
|
||||||
'disableamount' => 1,
|
'disableamount' => 1,
|
||||||
'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire),
|
'test' => $conf->deplacement->enabled && $user->rights->deplacement->lire
|
||||||
|
),
|
||||||
|
'expensereport' => array(
|
||||||
|
'title' => "ListExpenseReportsAssociatedProject",
|
||||||
|
'class' => 'ExpenseReportLine',
|
||||||
|
'table' => 'expensereport_det',
|
||||||
|
'test' => $conf->expensereport->enabled && $user->rights->expensereport->lire
|
||||||
|
),
|
||||||
|
'donation' => array(
|
||||||
|
'title' => "ListDonationsAssociatedProject",
|
||||||
|
'class' => 'Don',
|
||||||
|
'table' => 'don',
|
||||||
|
'test' => $conf->don->enabled && $user->rights->don->lire
|
||||||
|
),
|
||||||
|
'loan' => array(
|
||||||
|
'title' => "ListLoanAssociatedProject",
|
||||||
|
'class' => 'Loan',
|
||||||
|
'table' => 'loan',
|
||||||
|
'test' => $conf->loan->enabled && $user->rights->loan->read
|
||||||
|
),
|
||||||
|
'chargesociales' => array(
|
||||||
|
'title' => "ListSocialContributionAssociatedProject",
|
||||||
|
'class' => 'ChargeSociales',
|
||||||
|
'table' => 'chargesociales',
|
||||||
|
'urlnew' => DOL_URL_ROOT . '/compta/sociales/card.php?action=create&projectid=' . $id,
|
||||||
|
'test' => $conf->tax->enabled && $user->rights->tax->charges->lire
|
||||||
|
),
|
||||||
|
'stock_mouvement' => array(
|
||||||
|
'title' => "ListMouvementStockProject",
|
||||||
|
'class' => 'MouvementStock',
|
||||||
|
'table' => 'stock_mouvement',
|
||||||
|
'test' => ($conf->stock->enabled && $user->rights->stock->mouvement->lire && ! empty($conf->global->STOCK_MOVEMENT_INTO_PROJECT_OVERVIEW))
|
||||||
|
),
|
||||||
'agenda' => array(
|
'agenda' => array(
|
||||||
'title' => "ListActionsAssociatedProject",
|
'title' => "ListActionsAssociatedProject",
|
||||||
'class' => 'ActionComm',
|
'class' => 'ActionComm',
|
||||||
'table' => 'actioncomm',
|
'table' => 'actioncomm',
|
||||||
'disableamount' => 1,
|
'disableamount' => 1,
|
||||||
'test'=>$conf->agenda->enabled && $user->rights->agenda->allactions->lire)
|
'test' => $conf->agenda->enabled && $user->rights->agenda->allactions->lire
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
//Insert reference
|
//Insert reference
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -1004,7 +1005,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
|
||||||
|
|
||||||
@ -1636,4 +1637,3 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
return ($tab_hl*7);
|
return ($tab_hl*7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -598,7 +599,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$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($total_ht + $object->remise), 0, 'R', 1);
|
||||||
|
|
||||||
@ -1192,4 +1193,3 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -430,7 +431,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
if ($object->lines[$i]->remise_percent)
|
if ($object->lines[$i]->remise_percent)
|
||||||
{
|
{
|
||||||
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails);
|
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails);
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent."%", 0, 'R');
|
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT line
|
// Total HT line
|
||||||
@ -695,7 +696,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1);
|
||||||
|
|
||||||
@ -1242,4 +1243,3 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ elseif ($module == 'shipping') { $permission=$user->rights->expedition->cr
|
|||||||
elseif ($module == 'product') { $permission=$user->rights->produit->creer;}
|
elseif ($module == 'product') { $permission=$user->rights->produit->creer;}
|
||||||
//else dol_print_error('','Bad value '.$module.' for param module');
|
//else dol_print_error('','Bad value '.$module.' for param module');
|
||||||
|
|
||||||
if (! empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $typeofdata='ckeditor:dolibarr_notes:100%:200::1:12:95%'; // Rem: This var is for all notes, not only thirdparties note.
|
if (! empty($conf->fckeditor->enabled) && ! empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $typeofdata='ckeditor:dolibarr_notes:100%:200::1:12:95%'; // Rem: This var is for all notes, not only thirdparties note.
|
||||||
else $typeofdata='textarea:12:95%';
|
else $typeofdata='textarea:12:95%';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -481,13 +481,13 @@ class Expedition extends CommonObject
|
|||||||
// Check parameters
|
// Check parameters
|
||||||
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
|
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
|
||||||
|
|
||||||
$sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut";
|
$sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet";
|
||||||
$sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height";
|
$sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height";
|
||||||
$sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery";
|
$sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery";
|
||||||
$sql.= ", e.fk_shipping_method, e.tracking_number";
|
$sql.= ", e.fk_shipping_method, e.tracking_number";
|
||||||
$sql.= ", el.fk_source as origin_id, el.sourcetype as origin";
|
$sql.= ", el.fk_source as origin_id, el.sourcetype as origin";
|
||||||
$sql.= ", e.note_private, e.note_public";
|
$sql.= ", e.note_private, e.note_public";
|
||||||
$sql.= ', e.fk_incoterms, e.location_incoterms';
|
$sql.= ', e.fk_incoterms, e.location_incoterms, e.fk_projet';
|
||||||
$sql.= ', i.libelle as libelle_incoterms';
|
$sql.= ', i.libelle as libelle_incoterms';
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'";
|
||||||
@ -513,6 +513,7 @@ class Expedition extends CommonObject
|
|||||||
$this->ref_ext = $obj->ref_ext;
|
$this->ref_ext = $obj->ref_ext;
|
||||||
$this->ref_int = $obj->ref_int;
|
$this->ref_int = $obj->ref_int;
|
||||||
$this->statut = $obj->fk_statut;
|
$this->statut = $obj->fk_statut;
|
||||||
|
$this->fk_project = $obj->fk_projet;
|
||||||
$this->user_author_id = $obj->fk_user_author;
|
$this->user_author_id = $obj->fk_user_author;
|
||||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||||
$this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated
|
$this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated
|
||||||
@ -526,6 +527,7 @@ class Expedition extends CommonObject
|
|||||||
$this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility
|
$this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility
|
||||||
$this->origin_id = $obj->origin_id;
|
$this->origin_id = $obj->origin_id;
|
||||||
$this->billed = ($obj->fk_statut==2?1:0);
|
$this->billed = ($obj->fk_statut==2?1:0);
|
||||||
|
$this->fk_project = $obj->fk_projet;
|
||||||
|
|
||||||
$this->trueWeight = $obj->weight;
|
$this->trueWeight = $obj->weight;
|
||||||
$this->weight_units = $obj->weight_units;
|
$this->weight_units = $obj->weight_units;
|
||||||
@ -1052,6 +1054,7 @@ class Expedition extends CommonObject
|
|||||||
$sql.= " fk_shipping_method=".((isset($this->shipping_method_id) && $this->shipping_method_id > 0)?$this->shipping_method_id:"null").",";
|
$sql.= " fk_shipping_method=".((isset($this->shipping_method_id) && $this->shipping_method_id > 0)?$this->shipping_method_id:"null").",";
|
||||||
$sql.= " tracking_number=".(isset($this->tracking_number)?"'".$this->db->escape($this->tracking_number)."'":"null").",";
|
$sql.= " tracking_number=".(isset($this->tracking_number)?"'".$this->db->escape($this->tracking_number)."'":"null").",";
|
||||||
$sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";
|
$sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";
|
||||||
|
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
|
||||||
$sql.= " height=".(($this->trueHeight != '')?$this->trueHeight:"null").",";
|
$sql.= " height=".(($this->trueHeight != '')?$this->trueHeight:"null").",";
|
||||||
$sql.= " width=".(($this->trueWidth != '')?$this->trueWidth:"null").",";
|
$sql.= " width=".(($this->trueWidth != '')?$this->trueWidth:"null").",";
|
||||||
$sql.= " size_units=".(isset($this->size_units)?$this->size_units:"null").",";
|
$sql.= " size_units=".(isset($this->size_units)?$this->size_units:"null").",";
|
||||||
|
|||||||
@ -51,6 +51,7 @@ $search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
|||||||
$search_billed=GETPOST("search_billed",'int');
|
$search_billed=GETPOST("search_billed",'int');
|
||||||
$sall = GETPOST('sall', 'alphanohtml');
|
$sall = GETPOST('sall', 'alphanohtml');
|
||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
$search_ref_customer=GETPOST("search_ref_customer");
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
@ -141,6 +142,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
|||||||
$search_billed='';
|
$search_billed='';
|
||||||
$viewstatut='';
|
$viewstatut='';
|
||||||
$search_array_options=array();
|
$search_array_options=array();
|
||||||
|
$search_ref_customer='';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
@ -267,6 +269,10 @@ if ($resql)
|
|||||||
if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv;
|
if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv;
|
||||||
if ($search_company) $param.= "&search_company=".$search_company;
|
if ($search_company) $param.= "&search_company=".$search_company;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
if ($search_town)$param .= '&search_town='.urlencode($search_town);
|
||||||
|
if ($search_zip)$param .= '&search_zip='.urlencode($search_zip);
|
||||||
|
if ($search_ref_customer)$param .= '&search_ref_customer='.$search_ref_customer;
|
||||||
|
if ($viewstatut != '')$param .= '&viewstatut='.$viewstatut;
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1374,7 +1374,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $fourn_ref, $remise_percent, $price_base_type, $pu_ttc, $type, $fk_unit");
|
dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $fourn_ref, $remise_percent, $price_base_type, $pu_ttc, $type, $fk_unit, $pu_ht_devise, $origin, $origin_id");
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
@ -1388,6 +1388,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
|
$pu_ht_devise=price2num($pu_ht_devise);
|
||||||
$pu_ttc=price2num($pu_ttc);
|
$pu_ttc=price2num($pu_ttc);
|
||||||
$txtva = price2num($txtva);
|
$txtva = price2num($txtva);
|
||||||
$txlocaltax1 = price2num($txlocaltax1);
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
@ -1430,15 +1431,14 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
// We use 'none' instead of $fourn_ref, because fourn_ref may not exists anymore. So we will take the first supplier price ok.
|
// We use 'none' instead of $fourn_ref, because fourn_ref may not exists anymore. So we will take the first supplier price ok.
|
||||||
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
|
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
|
||||||
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc?$this->fk_soc:$this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc
|
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc?$this->fk_soc:$this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc
|
||||||
if ($result > 0)
|
// If supplier order created from customer order, we take best supplier price
|
||||||
|
// If $pu (defined previously from pu_ht or pu_ttc) is not defined at all, we also take the best supplier price
|
||||||
|
if ($result > 0 && ($origin == 'commande' || $pu === ''))
|
||||||
{
|
{
|
||||||
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
||||||
$ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice
|
$ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice
|
||||||
// is remise percent not keyed but present for the product we add it
|
// is remise percent not keyed but present for the product we add it
|
||||||
if ($remise_percent == 0 && $prod->remise_percent !=0)
|
if ($remise_percent == 0 && $prod->remise_percent !=0) $remise_percent = $prod->remise_percent;
|
||||||
$remise_percent =$prod->remise_percent;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($result == 0) // If result == 0, we failed to found the supplier reference price
|
if ($result == 0) // If result == 0, we failed to found the supplier reference price
|
||||||
{
|
{
|
||||||
@ -2337,6 +2337,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
if (! $qty) $qty=1;
|
if (! $qty) $qty=1;
|
||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
|
$pu_ht_devise=price2num($pu_ht_devise);
|
||||||
$txtva=price2num($txtva);
|
$txtva=price2num($txtva);
|
||||||
$txlocaltax1=price2num($txlocaltax1);
|
$txlocaltax1=price2num($txlocaltax1);
|
||||||
$txlocaltax2=price2num($txlocaltax2);
|
$txlocaltax2=price2num($txlocaltax2);
|
||||||
|
|||||||
@ -401,7 +401,7 @@ if (empty($reshook))
|
|||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$idprod,
|
$idprod,
|
||||||
$productsupplier->product_fourn_price_id,
|
$productsupplier->product_fourn_price_id,
|
||||||
$productsupplier->fourn_ref,
|
$productsupplier->ref_supplier,
|
||||||
$remise_percent,
|
$remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
$pu_ttc,
|
$pu_ttc,
|
||||||
@ -1342,6 +1342,8 @@ if ($action=='create')
|
|||||||
|
|
||||||
dol_htmloutput_events();
|
dol_htmloutput_events();
|
||||||
|
|
||||||
|
$currency_code = $conf->currency;
|
||||||
|
|
||||||
$societe='';
|
$societe='';
|
||||||
if ($socid>0)
|
if ($socid>0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -85,6 +85,8 @@ $search_total_ttc=GETPOST('search_total_ttc','alpha');
|
|||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
$billed = GETPOST('billed','int');
|
$billed = GETPOST('billed','int');
|
||||||
$search_project_ref=GETPOST('search_project_ref','alpha');
|
$search_project_ref=GETPOST('search_project_ref','alpha');
|
||||||
|
$search_btn=GETPOST('button_search','alpha');
|
||||||
|
$search_remove_btn=GETPOST('button_removefilter','alpha');
|
||||||
|
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
@ -105,7 +107,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
|||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|||||||
@ -99,6 +99,8 @@ $day_lim = GETPOST('day_lim','int');
|
|||||||
$month_lim = GETPOST('month_lim','int');
|
$month_lim = GETPOST('month_lim','int');
|
||||||
$year_lim = GETPOST('year_lim','int');
|
$year_lim = GETPOST('year_lim','int');
|
||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
|
$search_btn=GETPOST('button_search','alpha');
|
||||||
|
$search_remove_btn=GETPOST('button_removefilter','alpha');
|
||||||
|
|
||||||
$option = GETPOST('option');
|
$option = GETPOST('option');
|
||||||
if ($option == 'late') {
|
if ($option == 'late') {
|
||||||
@ -110,7 +112,7 @@ $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
|||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page=GETPOST("page",'int');
|
$page=GETPOST("page",'int');
|
||||||
if ($page == -1 || $page == null) { $page = 0 ; }
|
if ($page == -1 || $page == null || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0 ; }
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $page ;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|||||||
@ -38,6 +38,8 @@ if ($user->societe_id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('supplierbalencelist','globalcard'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -67,7 +69,7 @@ if ($socid > 0)
|
|||||||
// Invoice list
|
// Invoice list
|
||||||
print load_fiche_titre($langs->trans("SupplierPreview"));
|
print load_fiche_titre($langs->trans("SupplierPreview"));
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder tagtable liste" width="100%">';
|
||||||
|
|
||||||
$sql = "SELECT s.nom, s.rowid as socid, f.ref_supplier, f.amount, f.datef as df,";
|
$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.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,";
|
||||||
|
|||||||
Binary file not shown.
@ -47,16 +47,16 @@ $main_data_dir = GETPOST('main_data_dir') ? GETPOST('main_data_dir') : $main_dir
|
|||||||
// Dolibarr root URL
|
// Dolibarr root URL
|
||||||
$main_url = GETPOST('main_url');
|
$main_url = GETPOST('main_url');
|
||||||
// Database login informations
|
// Database login informations
|
||||||
$userroot=GETPOST('db_user_root');
|
$userroot=GETPOST('db_user_root','alpha');
|
||||||
$passroot=GETPOST('db_pass_root');
|
$passroot=GETPOST('db_pass_root','none');
|
||||||
// Database server
|
// Database server
|
||||||
$db_type=GETPOST('db_type','alpha');
|
$db_type=GETPOST('db_type','aZ09');
|
||||||
$db_host=GETPOST('db_host','alpha');
|
$db_host=GETPOST('db_host','alpha');
|
||||||
$db_name=GETPOST('db_name','alpha');
|
$db_name=GETPOST('db_name','aZ09');
|
||||||
$db_user=GETPOST('db_user','alpha');
|
$db_user=GETPOST('db_user','alpha');
|
||||||
$db_pass=GETPOST('db_pass');
|
$db_pass=GETPOST('db_pass','none');
|
||||||
$db_port=GETPOST('db_port','int');
|
$db_port=GETPOST('db_port','int');
|
||||||
$db_prefix=GETPOST('db_prefix','alpha');
|
$db_prefix=GETPOST('db_prefix','aZ09');
|
||||||
$db_create_database = GETPOST('db_create_database','none');
|
$db_create_database = GETPOST('db_create_database','none');
|
||||||
$db_create_user = GETPOST('db_create_user','none');
|
$db_create_user = GETPOST('db_create_user','none');
|
||||||
// Force https
|
// Force https
|
||||||
|
|||||||
@ -1705,6 +1705,7 @@ BaseCurrency=Reference currency of the company (go into setup of company to chan
|
|||||||
WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with french laws (Loi Finance 2016).
|
WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with french laws (Loi Finance 2016).
|
||||||
WarningNoteModulePOSForFrenchLaw=This module %s is compliant with french laws (Loi Finance 2016) because module Non Reversible Logs is automatically activated.
|
WarningNoteModulePOSForFrenchLaw=This module %s is compliant with french laws (Loi Finance 2016) because module Non Reversible Logs is automatically activated.
|
||||||
WarningInstallationMayBecomeNotCompliantWithLaw=You try to install the module %s that is an external module. Activating an external module means you trust the publisher of the module and you are sure that this module does not alterate negatively the behavior of your application and is compliant with laws of your country (%s). If the module bring a non legal feature, you become responsible for the use of a non legal software.
|
WarningInstallationMayBecomeNotCompliantWithLaw=You try to install the module %s that is an external module. Activating an external module means you trust the publisher of the module and you are sure that this module does not alterate negatively the behavior of your application and is compliant with laws of your country (%s). If the module bring a non legal feature, you become responsible for the use of a non legal software.
|
||||||
|
NothingToSetup=There is no specific setup to do for this module.
|
||||||
##### Resource ####
|
##### Resource ####
|
||||||
ResourceSetup=Configuration du module Resource
|
ResourceSetup=Configuration du module Resource
|
||||||
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
||||||
|
|||||||
@ -108,7 +108,7 @@ MyAvailability=Ma disponibilité
|
|||||||
ActionType=Type événement
|
ActionType=Type événement
|
||||||
DateActionBegin=Date début événément
|
DateActionBegin=Date début événément
|
||||||
CloneAction=Cloner l'événement
|
CloneAction=Cloner l'événement
|
||||||
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner cette facture <b>%s</b> ?
|
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner l'événement <b>%s</b> ?
|
||||||
RepeatEvent=Répétez événement
|
RepeatEvent=Répétez événement
|
||||||
EveryWeek=Chaque semaine
|
EveryWeek=Chaque semaine
|
||||||
EveryMonth=Chaque mois
|
EveryMonth=Chaque mois
|
||||||
|
|||||||
@ -4456,8 +4456,6 @@ class Product extends CommonObject
|
|||||||
|
|
||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
|
|
||||||
$this->db->begin();
|
|
||||||
|
|
||||||
$label_type = 'label';
|
$label_type = 'label';
|
||||||
|
|
||||||
if ($type == 'short')
|
if ($type == 'short')
|
||||||
|
|||||||
1
htdocs/product/dynamic_price/class/index.html
Normal file
1
htdocs/product/dynamic_price/class/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
1
htdocs/product/dynamic_price/index.html
Normal file
1
htdocs/product/dynamic_price/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -134,7 +134,7 @@ if (dol_strlen($type))
|
|||||||
$sql.= " AND p.fk_product_type <> '1'";
|
$sql.= " AND p.fk_product_type <> '1'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($sref) $sql.= natural_search('p.ref', $ref);
|
if ($sref) $sql.= natural_search('p.ref', $sref);
|
||||||
if ($sbarcode) $sql.= natural_search('p.barcode', $sbarcode);
|
if ($sbarcode) $sql.= natural_search('p.barcode', $sbarcode);
|
||||||
if ($snom) $sql.= natural_search('p.label', $snom);
|
if ($snom) $sql.= natural_search('p.label', $snom);
|
||||||
if (! empty($tosell)) $sql.= " AND p.tosell = ".$tosell;
|
if (! empty($tosell)) $sql.= " AND p.tosell = ".$tosell;
|
||||||
|
|||||||
@ -633,9 +633,8 @@ class Project extends CommonObject
|
|||||||
$this->getLinesArray($user);
|
$this->getLinesArray($user);
|
||||||
|
|
||||||
// Delete tasks
|
// Delete tasks
|
||||||
foreach($this->lines as &$task) {
|
$ret = $this->deleteTasks($user);
|
||||||
$task->delete($user);
|
if ($ret < 0) $error++;
|
||||||
}
|
|
||||||
|
|
||||||
// Delete project
|
// Delete project
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -712,6 +711,40 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete tasks with no children first, then task with children recursively
|
||||||
|
*
|
||||||
|
* @param User $user User
|
||||||
|
* @return int <0 if KO, 1 if OK
|
||||||
|
*/
|
||||||
|
function deleteTasks($user)
|
||||||
|
{
|
||||||
|
$countTasks = count($this->lines);
|
||||||
|
$deleted = false;
|
||||||
|
if ($countTasks)
|
||||||
|
{
|
||||||
|
foreach($this->lines as $task)
|
||||||
|
{
|
||||||
|
if ($task->hasChildren() <= 0) { // If there is no children (or error to detect them)
|
||||||
|
$deleted = true;
|
||||||
|
$ret = $task->delete($user);
|
||||||
|
if ($ret <= 0)
|
||||||
|
{
|
||||||
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->getLinesArray($user);
|
||||||
|
if ($deleted && count($this->lines) < $countTasks)
|
||||||
|
{
|
||||||
|
if (count($this->lines)) $this->deleteTasks($this->lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate a project
|
* Validate a project
|
||||||
*
|
*
|
||||||
@ -1674,7 +1707,7 @@ class Project extends CommonObject
|
|||||||
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
||||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
//if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||||
$sql.= " WHERE p.fk_statut = 1";
|
$sql.= " WHERE p.fk_statut = 1";
|
||||||
$sql.= " AND p.entity IN (".getEntity('project', 0).')';
|
$sql.= " AND p.entity IN (".getEntity('project').')';
|
||||||
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||||
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||||
@ -1750,7 +1783,7 @@ class Project extends CommonObject
|
|||||||
$sql = "SELECT count(p.rowid) as nb";
|
$sql = "SELECT count(p.rowid) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||||
$sql.= " WHERE";
|
$sql.= " WHERE";
|
||||||
$sql.= " p.entity IN (".getEntity('projet').")";
|
$sql.= " p.entity IN (".getEntity('project').")";
|
||||||
if (! $user->rights->projet->all->lire)
|
if (! $user->rights->projet->all->lire)
|
||||||
{
|
{
|
||||||
$projectsListId = $this->getProjectsAuthorizedForUser($user,0,1);
|
$projectsListId = $this->getProjectsAuthorizedForUser($user,0,1);
|
||||||
|
|||||||
@ -638,8 +638,11 @@ if (empty($reshook))
|
|||||||
$result = $object->update($socid, $user, 1, $object->oldcopy->codeclient_modifiable(), $object->oldcopy->codefournisseur_modifiable(), 'update', 0);
|
$result = $object->update($socid, $user, 1, $object->oldcopy->codeclient_modifiable(), $object->oldcopy->codefournisseur_modifiable(), 'update', 0);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
$error = $object->error; $errors = $object->errors;
|
$error++;
|
||||||
|
$errors = $object->errors;
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent thirdparty's emptying if a user hasn't rights $user->rights->categorie->lire (in such a case, post of 'custcats' is not defined)
|
// Prevent thirdparty's emptying if a user hasn't rights $user->rights->categorie->lire (in such a case, post of 'custcats' is not defined)
|
||||||
if(!empty($user->rights->categorie->lire)){
|
if(!empty($user->rights->categorie->lire)){
|
||||||
// Customer categories association
|
// Customer categories association
|
||||||
@ -718,6 +721,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$object->error .= $object->db->lasterror();
|
$object->error .= $object->db->lasterror();
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,8 @@ $search_type=GETPOST('search_type','alpha');
|
|||||||
$search_level_from = GETPOST("search_level_from","alpha");
|
$search_level_from = GETPOST("search_level_from","alpha");
|
||||||
$search_level_to = GETPOST("search_level_to","alpha");
|
$search_level_to = GETPOST("search_level_to","alpha");
|
||||||
$search_stcomm=GETPOST('search_stcomm','int');
|
$search_stcomm=GETPOST('search_stcomm','int');
|
||||||
|
$search_btn=GETPOST('button_search','alpha');
|
||||||
|
$search_remove_btn=GETPOST('button_removefilter','alpha');
|
||||||
|
|
||||||
$type=GETPOST('type');
|
$type=GETPOST('type');
|
||||||
$optioncss=GETPOST('optioncss','alpha');
|
$optioncss=GETPOST('optioncss','alpha');
|
||||||
@ -95,7 +97,7 @@ $sortorder=GETPOST("sortorder",'alpha');
|
|||||||
$page=GETPOST("page",'int');
|
$page=GETPOST("page",'int');
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="s.nom";
|
if (! $sortfield) $sortfield="s.nom";
|
||||||
if (empty($page) || $page == -1) { $page = 0; }
|
if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; }
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|||||||
@ -73,6 +73,8 @@ $search_montant_vat=GETPOST('search_montant_vat','alpha');
|
|||||||
$search_montant_ttc=GETPOST('search_montant_ttc','alpha');
|
$search_montant_ttc=GETPOST('search_montant_ttc','alpha');
|
||||||
$search_status=GETPOST('viewstatut','alpha')?GETPOST('viewstatut','alpha'):GETPOST('search_status','int');
|
$search_status=GETPOST('viewstatut','alpha')?GETPOST('viewstatut','alpha'):GETPOST('search_status','int');
|
||||||
$object_statut=$db->escape(GETPOST('supplier_proposal_statut'));
|
$object_statut=$db->escape(GETPOST('supplier_proposal_statut'));
|
||||||
|
$search_btn=GETPOST('button_search','alpha');
|
||||||
|
$search_remove_btn=GETPOST('button_removefilter','alpha');
|
||||||
|
|
||||||
$sall=GETPOST('sall', 'alphanohtml');
|
$sall=GETPOST('sall', 'alphanohtml');
|
||||||
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
||||||
@ -85,7 +87,7 @@ $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
|||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|||||||
@ -136,7 +136,7 @@ if (preg_match('/\.\./',$fullpath_original_file) || preg_match('/[<>|]/',$fullpa
|
|||||||
if ($modulepart == 'barcode')
|
if ($modulepart == 'barcode')
|
||||||
{
|
{
|
||||||
$generator=GETPOST("generator","alpha");
|
$generator=GETPOST("generator","alpha");
|
||||||
$code=GETPOST("code",'alpha');
|
$code=GETPOST("code",'none');
|
||||||
$encoding=GETPOST("encoding","alpha");
|
$encoding=GETPOST("encoding","alpha");
|
||||||
$readable=GETPOST("readable",'alpha')?GETPOST("readable","alpha"):"Y";
|
$readable=GETPOST("readable",'alpha')?GETPOST("readable","alpha"):"Y";
|
||||||
|
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class AdminLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class BankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -62,6 +62,8 @@ class BonPrelevementTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -89,6 +89,8 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class CMailFileTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class CategorieTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -72,6 +72,8 @@ class CodingPhpTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -72,6 +72,8 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class CompanyLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -68,6 +68,8 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -62,6 +62,8 @@ class CoreTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class DateLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class DateLibTzFranceTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class DiscountTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class EntrepotTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class ExpenseReportTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -64,6 +64,8 @@ class ExportTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class FactureRecTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class FactureTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class FichinterTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class FilesLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class FormAdminTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -63,6 +63,8 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -63,6 +63,8 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -62,6 +62,8 @@ class HolidayTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class ImagesLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -62,6 +62,8 @@ class ImportTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -62,6 +62,8 @@ class JsonLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -72,6 +72,8 @@ class LangTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class MarginsLibTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class ModulesTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -62,6 +62,8 @@ class MouvementStockTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -61,6 +61,8 @@ class PaypalTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -63,6 +63,8 @@ class PdfDocTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -62,6 +62,8 @@ class PgsqlTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -67,6 +67,8 @@ class PricesTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class ProductTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
//$this->sharedFixture
|
//$this->sharedFixture
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$this->savconf=$conf;
|
$this->savconf=$conf;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user