Merge branch '3.9' of https://github.com/Dolibarr/dolibarr into 3.9
This commit is contained in:
commit
e4ded18477
62
ChangeLog
62
ChangeLog
@ -11,7 +11,6 @@ during migration.
|
|||||||
Upgrading to any other version or any other database system is abolutely required BEFORE trying
|
Upgrading to any other version or any other database system is abolutely required BEFORE trying
|
||||||
make a Dolibarr upgrade.
|
make a Dolibarr upgrade.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
|
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
|
||||||
FIX: #4383 $userid not defined
|
FIX: #4383 $userid not defined
|
||||||
FIX: #4448 $filebonprev is not used, $this->filename now
|
FIX: #4448 $filebonprev is not used, $this->filename now
|
||||||
@ -312,6 +311,67 @@ This is list of hooks modified:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.8.5 compared to 3.8.4 *****
|
||||||
|
FIX: #3815 Call to undefined function local_by_date().
|
||||||
|
FIX: #4424 Missing email of user popup in supplier orders area
|
||||||
|
FIX: #4442 Missing translation in Banks menu
|
||||||
|
FIX: #4448 $filebonprev is not used, $this->filename now
|
||||||
|
FIX: #4455
|
||||||
|
FIX: #4737 Bank transacion type selector translation is cropped
|
||||||
|
FIX: #4742 Able to delete a supplier invoice with a registered payment
|
||||||
|
FIX: #4743 UI glitch in project summary page
|
||||||
|
FIX: #4747 Missing UI background when registering a supplier invoice payment
|
||||||
|
FIX: #4748 Supplier invoice payment confirmation amount is not translated
|
||||||
|
FIX: #4749
|
||||||
|
FIX: #4756
|
||||||
|
FIX: #4766 VAT not shown in supplier invoice popup
|
||||||
|
FIX: #4809 - Duplicate functions with different content
|
||||||
|
FIX: #4851 Project selector in supplier invoices shows the project label twice
|
||||||
|
FIX: #4870
|
||||||
|
FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists
|
||||||
|
FIX: #5048 Product supplier list display only one produc
|
||||||
|
FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
|
||||||
|
FIX: #5203
|
||||||
|
FIX: #5207
|
||||||
|
FIX: #5338 use of not initialized var $aphour, $apmin, etc
|
||||||
|
FIX: #5380
|
||||||
|
FIX: #5383 bad object id on don delete
|
||||||
|
FIX: #5474 Country_id of "Don" object is still empty
|
||||||
|
FIX: Accountancy - 3.8 - Chart of accounts are limited on only one country
|
||||||
|
FIX: Bad include and param for project numbering module call
|
||||||
|
FIX: Box disabled because bugged
|
||||||
|
FIX: bug on email template
|
||||||
|
FIX: Can correct stock of lot using eatby or sell by date
|
||||||
|
FIX: Can make a movement on "out of sell" products
|
||||||
|
FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries
|
||||||
|
FIX: can't fetch by siret or siren because of first "if"
|
||||||
|
FIX: Check stock of product by warehouse if $entrepot_id defined on shippings
|
||||||
|
FIX: correct display of minimum buying price
|
||||||
|
FIX: Creation of thumb image for size "small" was not done.
|
||||||
|
FIX: Direction of movement lost if an error occurs
|
||||||
|
FIX: dont retrieve new buying price on margin display
|
||||||
|
FIX: Duplicate records into export
|
||||||
|
FIX: Email templates not compatible with Multicompany
|
||||||
|
FIX: end of select when no fournprice
|
||||||
|
FIX: finished parameters not used
|
||||||
|
FIX: hook on group card called but not initialized
|
||||||
|
FIX: It doesn't check if there is enough stock to update the lines of orders/invoices
|
||||||
|
FIX: large expense note
|
||||||
|
FIX: missing column when module was installed before standard integration
|
||||||
|
FIX: Missing database escaping on supplier price insert/update
|
||||||
|
FIX: Not filtering correctly when come from dashboard
|
||||||
|
FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH
|
||||||
|
FIX: real min buying price
|
||||||
|
FIX: receiving link never works
|
||||||
|
FIX: same page added several times on mergepropal option
|
||||||
|
FIX: search on date into supplier invoice list dont work because of status -1
|
||||||
|
FIX: Search supplier ref on contract
|
||||||
|
FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty
|
||||||
|
FIX: systematic rounding causes prices to be updated without reason
|
||||||
|
FIX: task ODT company object not correctly retrieved
|
||||||
|
FIX: Template email must take care of positino column
|
||||||
|
FIX: VAT rate can be negative. Example spain selling to morroco.
|
||||||
|
|
||||||
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
|
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
|
||||||
FIX: #3694
|
FIX: #3694
|
||||||
FIX: #3798 #2519 Cron jobs would never be executed
|
FIX: #3798 #2519 Cron jobs would never be executed
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
@ -624,7 +624,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$i=0;
|
$i=0;
|
||||||
foreach ($listfieldinsert as $f => $value)
|
foreach ($listfieldinsert as $f => $value)
|
||||||
{
|
{
|
||||||
if ($value == 'price' || preg_match('/^amount/i',$value) || preg_match('/^localtax/i',$value) || $value == 'taux') {
|
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
|
||||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||||
}
|
}
|
||||||
else if ($value == 'entity') {
|
else if ($value == 'entity') {
|
||||||
@ -672,7 +672,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($listfieldmodify as $field)
|
foreach ($listfieldmodify as $field)
|
||||||
{
|
{
|
||||||
if ($field == 'price' || preg_match('/^amount/i',$field) || preg_match('/^localtax/i',$field) || $field == 'taux') {
|
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
|
||||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||||
}
|
}
|
||||||
else if ($field == 'entity') {
|
else if ($field == 'entity') {
|
||||||
@ -1290,23 +1290,12 @@ if ($id)
|
|||||||
$valuetoshow = '';
|
$valuetoshow = '';
|
||||||
$align="center";
|
$align="center";
|
||||||
}
|
}
|
||||||
else if ($fieldlist[$field]=='localtax1') {
|
else if ($fieldlist[$field]=='taux') {
|
||||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
if ($obj->localtax1 == 0)
|
if ($obj->localtax1 == 0)
|
||||||
$valuetoshow = '';
|
$valuetoshow = '';
|
||||||
$align="right";
|
$align="right";
|
||||||
}
|
}
|
||||||
else if ($fieldlist[$field]=='localtax2') {
|
|
||||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
|
||||||
if ($obj->localtax2 == 0)
|
|
||||||
$valuetoshow = '';
|
|
||||||
$align="right";
|
|
||||||
}
|
|
||||||
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
|
|
||||||
{
|
|
||||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
|
||||||
$align="right";
|
|
||||||
}
|
|
||||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||||
{
|
{
|
||||||
$align="center";
|
$align="center";
|
||||||
|
|||||||
@ -167,7 +167,7 @@ if ($action == 'edit') // Edit
|
|||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Multilangual GUI
|
// Multilingual GUI
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
||||||
print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
|
print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
|
||||||
@ -181,7 +181,7 @@ if ($action == 'edit') // Edit
|
|||||||
show_theme(null,1);
|
show_theme(null,1);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Liste des zone de recherche permanantes supportees
|
// List of permanent supported search box
|
||||||
if (! empty($searchform))
|
if (! empty($searchform))
|
||||||
{
|
{
|
||||||
print '<table summary="search" class="noborder" width="100%">';
|
print '<table summary="search" class="noborder" width="100%">';
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
@ -602,17 +602,19 @@ class Categorie extends CommonObject
|
|||||||
{
|
{
|
||||||
if ($this->db->num_rows($resql) > 0)
|
if ($this->db->num_rows($resql) > 0)
|
||||||
{
|
{
|
||||||
$objparent = $this->db->fetch_object($resql);
|
$objparent = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
if (!empty($objparent->fk_parent))
|
if (!empty($objparent->fk_parent))
|
||||||
{
|
{
|
||||||
$cat = new Categorie($this->db);
|
$cat = new Categorie($this->db);
|
||||||
$cat->id=$objparent->fk_parent;
|
$cat->id = $objparent->fk_parent;
|
||||||
$result=$cat->add_type($obj, $type);
|
if (!$cat->containsObject($type, $obj->id)) {
|
||||||
if ($result < 0)
|
$result = $cat->add_type($obj, $type);
|
||||||
{
|
if ($result < 0)
|
||||||
$this->error=$cat->error;
|
{
|
||||||
$error++;
|
$this->error = $cat->error;
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,7 +69,7 @@ if (! empty($conf->propal->enabled)) $propalstatic=new Propal($db);
|
|||||||
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
|
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
|
||||||
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
|
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader("",$langs->trans("CommercialArea"));
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');
|
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');
|
||||||
|
|
||||||
|
|||||||
@ -2734,20 +2734,33 @@ class Propal extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='', $get_params='')
|
function getNomUrl($withpicto=0,$option='', $get_params='')
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
$label = '<u>' . $langs->trans("ShowPropal") . '</u>';
|
$label = '';
|
||||||
if (! empty($this->ref))
|
|
||||||
$label.= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
if ($user->rights->propal->lire) {
|
||||||
if (! empty($this->ref_client))
|
$label .= '<u>'.$langs->trans("ShowPropal").'</u>';
|
||||||
$label.= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
if (!empty($this->ref)) {
|
||||||
if (! empty($this->total_ht))
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
|
}
|
||||||
if (! empty($this->total_tva))
|
if (!empty($this->ref_client)) {
|
||||||
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
||||||
if (! empty($this->total_ttc))
|
}
|
||||||
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
if (!empty($this->total_ht)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_tva)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_ttc)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
if ($option == '') {
|
if ($option == '') {
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
|
$link = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -255,6 +256,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
||||||
|
if ($sall) $param.='&sall='.$sall;
|
||||||
if ($month) $param.='&month='.$month;
|
if ($month) $param.='&month='.$month;
|
||||||
if ($year) $param.='&year='.$year;
|
if ($year) $param.='&year='.$year;
|
||||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
||||||
|
|||||||
@ -3071,7 +3071,7 @@ class Commande extends CommonOrder
|
|||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
|
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
@ -3081,17 +3081,29 @@ class Commande extends CommonOrder
|
|||||||
if ($short) return $url;
|
if ($short) return $url;
|
||||||
|
|
||||||
$picto = 'order';
|
$picto = 'order';
|
||||||
$label = '<u>' . $langs->trans("ShowOrder") . '</u>';
|
$label = '';
|
||||||
if (! empty($this->ref))
|
|
||||||
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
if ($user->rights->commande->lire) {
|
||||||
if (! empty($this->ref_client))
|
$label = '<u>'.$langs->trans("ShowOrder").'</u>';
|
||||||
$label.= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client;
|
if (!empty($this->ref)) {
|
||||||
if (! empty($this->total_ht))
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
|
}
|
||||||
if (! empty($this->total_tva))
|
if (!empty($this->ref_client)) {
|
||||||
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
||||||
if (! empty($this->total_ttc))
|
}
|
||||||
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
if (!empty($this->total_ht)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_tva)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_ttc)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|||||||
@ -259,6 +259,7 @@ if ($resql)
|
|||||||
$title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
$title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
|
if ($sall) $param.='&sall='.$sall;
|
||||||
if ($socid > 0) $param.='&socid='.$socid;
|
if ($socid > 0) $param.='&socid='.$socid;
|
||||||
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
|
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
|
||||||
if ($orderday) $param.='&orderday='.$orderday;
|
if ($orderday) $param.='&orderday='.$orderday;
|
||||||
@ -587,10 +588,13 @@ if ($resql)
|
|||||||
print dol_print_date($db->jdate($objp->date_commande), 'day');
|
print dol_print_date($db->jdate($objp->date_commande), 'day');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Delivery date
|
if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE))
|
||||||
print '<td align="center">';
|
{
|
||||||
print dol_print_date($db->jdate($objp->date_delivery), 'day');
|
// Delivery date
|
||||||
print '</td>';
|
print '<td align="center">';
|
||||||
|
print dol_print_date($db->jdate($objp->date_delivery), 'day');
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
// Amount HT
|
// Amount HT
|
||||||
print '<td align="right" class="nowrap">'.price($objp->total_ht).'</td>';
|
print '<td align="right" class="nowrap">'.price($objp->total_ht).'</td>';
|
||||||
|
|||||||
@ -66,7 +66,6 @@ if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
|
|||||||
if (! empty($conf->margin->enabled))
|
if (! empty($conf->margin->enabled))
|
||||||
$langs->load('margins');
|
$langs->load('margins');
|
||||||
|
|
||||||
$sall = trim(GETPOST('sall'));
|
|
||||||
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
||||||
|
|
||||||
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
||||||
|
|||||||
@ -530,7 +530,7 @@ if ($search_user > 0)
|
|||||||
}
|
}
|
||||||
if (! $sall)
|
if (! $sall)
|
||||||
{
|
{
|
||||||
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.total, f.tva, f.total_ttc,';
|
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total, f.tva, f.total_ttc,';
|
||||||
$sql.= ' f.datef, f.date_lim_reglement,';
|
$sql.= ' f.datef, f.date_lim_reglement,';
|
||||||
$sql.= ' f.paye, f.fk_statut,';
|
$sql.= ' f.paye, f.fk_statut,';
|
||||||
$sql.= ' s.nom, s.rowid, s.code_client, s.client';
|
$sql.= ' s.nom, s.rowid, s.code_client, s.client';
|
||||||
@ -568,6 +568,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$param='&socid='.$socid;
|
$param='&socid='.$socid;
|
||||||
|
if ($sall) $param.='&sall='.$sall;
|
||||||
if ($day) $param.='&day='.$day;
|
if ($day) $param.='&day='.$day;
|
||||||
if ($month) $param.='&month='.$month;
|
if ($month) $param.='&month='.$month;
|
||||||
if ($year) $param.='&year=' .$year;
|
if ($year) $param.='&year=' .$year;
|
||||||
|
|||||||
@ -273,7 +273,8 @@ $sql.= " WHERE f.entity = ".$conf->entity;
|
|||||||
$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'";
|
$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'";
|
||||||
$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'";
|
$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'";
|
||||||
$sql.= " AND localtaxtype=".$localTaxType;
|
$sql.= " AND localtaxtype=".$localTaxType;
|
||||||
$sql.= " GROUP BY dm ASC";
|
$sql.= " GROUP BY dm";
|
||||||
|
$sql.= " ORDER BY dm ASC";
|
||||||
|
|
||||||
pt($db, $sql,$langs->trans("Year")." $y");
|
pt($db, $sql,$langs->trans("Year")." $y");
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2015 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) 2014 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -919,7 +919,7 @@ class BonPrelevement extends CommonObject
|
|||||||
$dir=$conf->prelevement->dir_output.'/receipts';
|
$dir=$conf->prelevement->dir_output.'/receipts';
|
||||||
if (! is_dir($dir)) dol_mkdir($dir);
|
if (! is_dir($dir)) dol_mkdir($dir);
|
||||||
|
|
||||||
$this->filename = $dir.'/receipts/'.$ref.'.xml';
|
$this->filename = $dir.'/'.$ref.'.xml';
|
||||||
|
|
||||||
// Create withdraw receipt in database
|
// Create withdraw receipt in database
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
||||||
@ -1558,7 +1558,7 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_DEBITOR ='';
|
$XML_DEBITOR ='';
|
||||||
$XML_DEBITOR .=' <DrctDbtTxInf>'.$CrLf;
|
$XML_DEBITOR .=' <DrctDbtTxInf>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <PmtId>'.$CrLf;
|
$XML_DEBITOR .=' <PmtId>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.$row_facnumber.'-'.$Rowing).'</EndToEndId>'.$CrLf;
|
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.dol_trunc($row_facnumber,20).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
|
||||||
$XML_DEBITOR .=' </PmtId>'.$CrLf;
|
$XML_DEBITOR .=' </PmtId>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
|
$XML_DEBITOR .=' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <DrctDbtTx>'.$CrLf;
|
$XML_DEBITOR .=' <DrctDbtTx>'.$CrLf;
|
||||||
@ -1673,8 +1673,9 @@ class BonPrelevement extends CommonObject
|
|||||||
* @return string String with SEPA Sender
|
* @return string String with SEPA Sender
|
||||||
*/
|
*/
|
||||||
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n')
|
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n')
|
||||||
{ // SEPA INITIALISATION
|
{
|
||||||
global $confs;
|
// SEPA INITIALISATION
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$dateTime_YMD = dol_print_date($ladate, '%Y%m%d');
|
$dateTime_YMD = dol_print_date($ladate, '%Y%m%d');
|
||||||
$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');
|
$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');
|
||||||
|
|||||||
@ -141,7 +141,7 @@ if ($prev_id)
|
|||||||
print price($row[0]);
|
print price($row[0]);
|
||||||
|
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print round($row[0]/$bon->amount*100,2)." %";
|
if ($bon->amount) print round($row[0]/$bon->amount*100,2)." %";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -364,6 +364,7 @@ if ($result)
|
|||||||
$param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
$param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
||||||
$param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
|
$param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
|
||||||
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
|
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
|
||||||
|
if ($sall != '') $param.='&sall='.urlencode($sall);
|
||||||
if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname);
|
if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname);
|
||||||
if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname);
|
if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname);
|
||||||
if ($search_zip != '') $param.='&search_zip='.urlencode($search_zip);
|
if ($search_zip != '') $param.='&search_zip='.urlencode($search_zip);
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -222,6 +223,7 @@ if ($resql)
|
|||||||
$param.='&search_name='.$search_name;
|
$param.='&search_name='.$search_name;
|
||||||
$param.='&search_ref_supplier='.$search_ref_supplier;
|
$param.='&search_ref_supplier='.$search_ref_supplier;
|
||||||
$param.='&search_sale=' .$search_sale;
|
$param.='&search_sale=' .$search_sale;
|
||||||
|
if ($sall != '') $param.='&sall='.$sall;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder);
|
||||||
|
|||||||
@ -313,7 +313,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
$interface=new Interfaces($db);
|
$interface=new Interfaces($db);
|
||||||
$result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf);
|
$result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++; $this->errors=$interface->errors;
|
$error++; $errors=$interface->errors;
|
||||||
}
|
}
|
||||||
// End call of triggers
|
// End call of triggers
|
||||||
|
|
||||||
@ -327,8 +327,8 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
// This avoid sending mail twice if going out and then back to page
|
// This avoid sending mail twice if going out and then back to page
|
||||||
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
|
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
|
||||||
setEventMessages($mesg, null, 'mesgs');
|
setEventMessages($mesg, null, 'mesgs');
|
||||||
if($conf->dolimail->enabled) header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id.'&'.($paramname2?$paramname2:'mid').'='.$parm2val);
|
if ($conf->dolimail->enabled) header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id.'&'.($paramname2?$paramname2:'mid').'='.$parm2val);
|
||||||
else header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id);
|
else header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2012-2014 Charles-François BENKE <charles.fr@benke.fr>
|
/* Copyright (C) 2012-2014 Charles-François BENKE <charles.fr@benke.fr>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
|
* Copyright (C) 2016 Juan José Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -79,8 +80,10 @@ class box_project extends ModeleBoxes
|
|||||||
|
|
||||||
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut ";
|
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut ";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||||
|
if($user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=p.fk_soc";
|
||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
|
if($user->socid) $sql.= " AND s.rowid = ".$user->socid;
|
||||||
|
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
|
||||||
$sql.= " ORDER BY p.datec DESC";
|
$sql.= " ORDER BY p.datec DESC";
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -59,6 +59,8 @@ abstract class CommonDocGenerator
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
$logotouse=$conf->user->dir_output.'/'.get_exdir($user->id, 2, 0, 1, $user, 'user').'/'.$user->photo;
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'myuser_lastname'=>$user->lastname,
|
'myuser_lastname'=>$user->lastname,
|
||||||
'myuser_firstname'=>$user->firstname,
|
'myuser_firstname'=>$user->firstname,
|
||||||
@ -75,7 +77,7 @@ abstract class CommonDocGenerator
|
|||||||
'myuser_fax'=>$user->office_fax,
|
'myuser_fax'=>$user->office_fax,
|
||||||
'myuser_mobile'=>$user->user_mobile,
|
'myuser_mobile'=>$user->user_mobile,
|
||||||
'myuser_email'=>$user->email,
|
'myuser_email'=>$user->email,
|
||||||
'myuser_logo'=>$user->photo,
|
'myuser_logo'=>$logotouse,
|
||||||
'myuser_job'=>$user->job,
|
'myuser_job'=>$user->job,
|
||||||
'myuser_web'=>'' // url not exist in $user object
|
'myuser_web'=>'' // url not exist in $user object
|
||||||
);
|
);
|
||||||
@ -430,7 +432,7 @@ abstract class CommonDocGenerator
|
|||||||
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
|
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
|
||||||
'line_product_ref'=>$line->product_ref,
|
'line_product_ref'=>$line->product_ref,
|
||||||
'line_product_label'=>$line->product_label,
|
'line_product_label'=>$line->product_label,
|
||||||
'line_product_type'=>$line->product_type,
|
'line_product_type'=>$line->product_type,
|
||||||
'line_desc'=>$line->desc,
|
'line_desc'=>$line->desc,
|
||||||
'line_vatrate'=>vatrate($line->tva_tx,true,$line->info_bits),
|
'line_vatrate'=>vatrate($line->tva_tx,true,$line->info_bits),
|
||||||
'line_up'=>price2num($line->subprice),
|
'line_up'=>price2num($line->subprice),
|
||||||
@ -444,9 +446,9 @@ abstract class CommonDocGenerator
|
|||||||
'line_price_ttc_locale'=>price($line->total_ttc, 0, $outputlangs),
|
'line_price_ttc_locale'=>price($line->total_ttc, 0, $outputlangs),
|
||||||
'line_price_vat_locale'=>price($line->total_tva, 0, $outputlangs),
|
'line_price_vat_locale'=>price($line->total_tva, 0, $outputlangs),
|
||||||
'line_date_start'=>$line->date_start,
|
'line_date_start'=>$line->date_start,
|
||||||
'line_date_start_rfc'=>dol_print_date($line->date_start,'rfc'),
|
'line_date_start_rfc'=>dol_print_date($line->date_start,'dayrfc'),
|
||||||
'line_date_end'=>$line->date_end,
|
'line_date_end'=>$line->date_end,
|
||||||
'line_date_end_rfc'=>dol_print_date($line->date_end,'rfc')
|
'line_date_end_rfc'=>dol_print_date($line->date_end,'dayrfc')
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retrieve extrafields
|
// Retrieve extrafields
|
||||||
|
|||||||
@ -595,50 +595,56 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$datecreate = dol_now();
|
|
||||||
|
|
||||||
$this->db->begin();
|
|
||||||
|
|
||||||
// Insertion dans la base
|
if(! empty($id_type_contact)) {
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
|
|
||||||
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
|
||||||
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
|
||||||
$sql.= "'".$this->db->idate($datecreate)."'";
|
|
||||||
$sql.= ", 4, '". $id_type_contact . "' ";
|
|
||||||
$sql.= ")";
|
|
||||||
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
|
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$datecreate = dol_now();
|
||||||
if ($resql)
|
|
||||||
{
|
$this->db->begin();
|
||||||
if (! $notrigger)
|
|
||||||
{
|
// Insertion dans la base
|
||||||
$result=$this->call_trigger(strtoupper($this->element).'_ADD_CONTACT', $user);
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
|
||||||
if ($result < 0)
|
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
||||||
|
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
||||||
|
$sql.= "'".$this->db->idate($datecreate)."'";
|
||||||
|
$sql.= ", 4, ". $id_type_contact . " ";
|
||||||
|
$sql.= ")";
|
||||||
|
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
|
||||||
|
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
|
$result=$this->call_trigger(strtoupper($this->element).'_ADD_CONTACT', $user);
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->commit();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||||
|
{
|
||||||
|
$this->error=$this->db->errno();
|
||||||
|
$this->db->rollback();
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->error=$this->db->error();
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
|
||||||
{
|
|
||||||
$this->error=$this->db->errno();
|
|
||||||
$this->db->rollback();
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->error=$this->db->error();
|
|
||||||
$this->db->rollback();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -108,7 +108,7 @@ class DolEditor
|
|||||||
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
||||||
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
||||||
$modulepart='fckeditor';
|
$modulepart='fckeditor';
|
||||||
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&file=';
|
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file=';
|
||||||
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
|
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
|
||||||
|
|
||||||
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
|
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
|
||||||
|
|||||||
@ -1232,7 +1232,14 @@ class ExtraFields
|
|||||||
{
|
{
|
||||||
$sql.= ' as main';
|
$sql.= ' as main';
|
||||||
}
|
}
|
||||||
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
|
if ($selectkey=='rowid' && empty($value)) {
|
||||||
|
$sql.= " WHERE ".$selectkey."=0";
|
||||||
|
} elseif ($selectkey=='rowid') {
|
||||||
|
$sql.= " WHERE ".$selectkey."=".$this->db->escape($value);
|
||||||
|
}else {
|
||||||
|
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
|
||||||
|
}
|
||||||
|
|
||||||
//$sql.= ' AND entity = '.$conf->entity;
|
//$sql.= ' AND entity = '.$conf->entity;
|
||||||
|
|
||||||
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
|
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
|
||||||
|
|||||||
@ -1093,7 +1093,7 @@ class DoliDBPgsql extends DoliDB
|
|||||||
*/
|
*/
|
||||||
function DDLDropField($table,$field_name)
|
function DDLDropField($table,$field_name)
|
||||||
{
|
{
|
||||||
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
|
$sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name;
|
||||||
dol_syslog($sql,LOG_DEBUG);
|
dol_syslog($sql,LOG_DEBUG);
|
||||||
if (! $this->query($sql))
|
if (! $this->query($sql))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -44,7 +44,8 @@ $Config['Enabled'] = true ;
|
|||||||
|
|
||||||
|
|
||||||
// Path to user files relative to the document root.
|
// Path to user files relative to the document root.
|
||||||
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ;
|
$extEntity=(empty($entity) ? 1 : $entity); // For multicompany with external access
|
||||||
|
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&entity='.$extEntity.'&file=' ;
|
||||||
|
|
||||||
// Fill the following value it you prefer to specify the absolute path for the
|
// Fill the following value it you prefer to specify the absolute path for the
|
||||||
// user files directory. Useful if you are using a virtual directory, symbolic
|
// user files directory. Useful if you are using a virtual directory, symbolic
|
||||||
|
|||||||
@ -1012,6 +1012,9 @@ function getParameterByName(name, valueifnotfound)
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// Another solution, easier, to build a javascript rounding function
|
||||||
|
function dolroundjs(number, decimals) { return +(Math.round(number + "e+" + decimals) + "e-" + decimals); }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function similar to PHP price2num()
|
* Function similar to PHP price2num()
|
||||||
@ -1024,7 +1027,7 @@ function price2numjs(amount) {
|
|||||||
if (amount == '') return '';
|
if (amount == '') return '';
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$dec = ',';
|
$dec = ',';
|
||||||
$thousand = ' ';
|
$thousand = ' ';
|
||||||
if ($langs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") {
|
if ($langs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") {
|
||||||
$dec = $langs->transnoentitiesnoconv("SeparatorDecimal");
|
$dec = $langs->transnoentitiesnoconv("SeparatorDecimal");
|
||||||
@ -1032,6 +1035,7 @@ function price2numjs(amount) {
|
|||||||
if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") {
|
if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") {
|
||||||
$thousand = $langs->transnoentitiesnoconv("SeparatorThousand");
|
$thousand = $langs->transnoentitiesnoconv("SeparatorThousand");
|
||||||
}
|
}
|
||||||
|
if ($thousand == 'Space') $thousand=' ';
|
||||||
print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript
|
print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -1050,11 +1054,15 @@ function price2numjs(amount) {
|
|||||||
if (nbdec > rounding) rounding = nbdec;
|
if (nbdec > rounding) rounding = nbdec;
|
||||||
// If rounding higher than max shown
|
// If rounding higher than max shown
|
||||||
if (rounding > main_max_dec_shown) rounding = main_max_dec_shown;
|
if (rounding > main_max_dec_shown) rounding = main_max_dec_shown;
|
||||||
|
|
||||||
if (thousand != ',' && thousand != '.') amount = amount.replace(',', '.');
|
if (thousand != ',' && thousand != '.') amount = amount.replace(',', '.');
|
||||||
amount = amount.replace(' ', ''); // To avoid spaces
|
amount = amount.replace(' ', ''); // To avoid spaces
|
||||||
amount = amount.replace(thousand, ''); // Replace of thousand before replace of dec to avoid pb if thousand is .
|
amount = amount.replace(thousand, ''); // Replace of thousand before replace of dec to avoid pb if thousand is .
|
||||||
amount = amount.replace(dec, '.');
|
amount = amount.replace(dec, '.');
|
||||||
|
//console.log("amount before="+amount+" rouding="+rounding)
|
||||||
return Math.round10(amount, rounding);
|
var res = Math.round10(amount, - rounding);
|
||||||
|
// Other solution is
|
||||||
|
// var res = dolroundjs(amount, rounding)
|
||||||
|
console.log("res="+res)
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||||
@ -3336,7 +3336,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
|||||||
$vatratecleaned = $vatrate;
|
$vatratecleaned = $vatrate;
|
||||||
if (preg_match('/^(.*)\s*\((.*)\)$/', $vatrate, $reg)) // If vat is "xx (yy)"
|
if (preg_match('/^(.*)\s*\((.*)\)$/', $vatrate, $reg)) // If vat is "xx (yy)"
|
||||||
{
|
{
|
||||||
$vatratecleaned = $reg[1];
|
$vatratecleaned = trim($reg[1]);
|
||||||
$vatratecode = $reg[2];
|
$vatratecode = $reg[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3350,7 +3350,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
|||||||
{
|
{
|
||||||
if ($local == 1)
|
if ($local == 1)
|
||||||
{
|
{
|
||||||
if (! $mysoc->localtax1_assuj) return 0;
|
if (! $mysoc->localtax1_assuj || (string) $vatratecleaned == "0") return 0;
|
||||||
if ($thirdparty_seller->id == $mysoc->id)
|
if ($thirdparty_seller->id == $mysoc->id)
|
||||||
{
|
{
|
||||||
if (! $thirdparty_buyer->localtax1_assuj) return 0;
|
if (! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||||
@ -3363,7 +3363,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
|||||||
|
|
||||||
if ($local == 2)
|
if ($local == 2)
|
||||||
{
|
{
|
||||||
if (! $mysoc->localtax2_assuj) return 0;
|
if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
|
||||||
if ($thirdparty_seller->id == $mysoc->id)
|
if ($thirdparty_seller->id == $mysoc->id)
|
||||||
{
|
{
|
||||||
if (! $thirdparty_buyer->localtax2_assuj) return 0;
|
if (! $thirdparty_buyer->localtax2_assuj) return 0;
|
||||||
@ -5195,7 +5195,7 @@ function printCommonFooter($zone='private')
|
|||||||
print 'window.console && console.log("';
|
print 'window.console && console.log("';
|
||||||
if (! empty($conf->global->MEMCACHED_SERVER)) print 'MEMCACHED_SERVER='.$conf->global->MEMCACHED_SERVER.' - ';
|
if (! empty($conf->global->MEMCACHED_SERVER)) print 'MEMCACHED_SERVER='.$conf->global->MEMCACHED_SERVER.' - ';
|
||||||
print 'MAIN_OPTIMIZE_SPEED='.(isset($conf->global->MAIN_OPTIMIZE_SPEED)?$conf->global->MAIN_OPTIMIZE_SPEED:'off');
|
print 'MAIN_OPTIMIZE_SPEED='.(isset($conf->global->MAIN_OPTIMIZE_SPEED)?$conf->global->MAIN_OPTIMIZE_SPEED:'off');
|
||||||
if ($micro_start_time)
|
if (! empty($micro_start_time)) // Works only if MAIN_SHOW_TUNING_INFO is defined at $_SERVER level. Not in global variable.
|
||||||
{
|
{
|
||||||
$micro_end_time = microtime(true);
|
$micro_end_time = microtime(true);
|
||||||
print ' - Build time: '.ceil(1000*($micro_end_time-$micro_start_time)).' ms';
|
print ' - Build time: '.ceil(1000*($micro_end_time-$micro_start_time)).' ms';
|
||||||
|
|||||||
@ -1493,6 +1493,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function evaluates a string that should be a valid IPv4
|
* This function evaluates a string that should be a valid IPv4
|
||||||
|
* Note: For ip 169.254.0.0, it returns 0 with some PHP (5.6.24) and 2 with some minor patchs of PHP (5.6.25). See https://github.com/php/php-src/pull/1954.
|
||||||
*
|
*
|
||||||
* @param string $ip IP Address
|
* @param string $ip IP Address
|
||||||
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
|
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
|
||||||
|
|||||||
@ -87,11 +87,11 @@ abstract class ModeleNumRefBarCode
|
|||||||
/**
|
/**
|
||||||
* Return next value available
|
* Return next value available
|
||||||
*
|
*
|
||||||
* @param Societe $objsoc Object thirdparty
|
* @param Societe $objproduct Object Product
|
||||||
* @param int $type Type
|
* @param int $type Type
|
||||||
* @return string Value
|
* @return string Value
|
||||||
*/
|
*/
|
||||||
function getNextValue($objsoc=0,$type=-1)
|
function getNextValue($objproduct,$type='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||||
|
|||||||
@ -100,6 +100,7 @@ class pdf_merou extends ModelePdfExpedition
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("deliveries");
|
$outputlangs->load("deliveries");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
$outputlangs->load("productbatch");
|
||||||
|
|
||||||
if ($conf->expedition->dir_output)
|
if ($conf->expedition->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -110,6 +110,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("deliveries");
|
$outputlangs->load("deliveries");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
$outputlangs->load("productbatch");
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
|
|||||||
@ -337,6 +337,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$height_incoterms = 0;
|
$height_incoterms = 0;
|
||||||
if ($conf->incoterm->enabled)
|
if ($conf->incoterm->enabled)
|
||||||
{
|
{
|
||||||
|
if (is_object($object->thirdparty))
|
||||||
|
{
|
||||||
|
$object->fk_incoterms=$object->thirdparty->fk_incoterms;
|
||||||
|
$object->location_incoterms=$object->thirdparty->location_incoterms;
|
||||||
|
}
|
||||||
$desc_incoterms = $object->getIncotermsForPDF();
|
$desc_incoterms = $object->getIncotermsForPDF();
|
||||||
if ($desc_incoterms)
|
if ($desc_incoterms)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -504,6 +504,10 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
||||||
}
|
}
|
||||||
|
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='numeric')
|
||||||
|
{
|
||||||
|
$newval = price2num($newval);
|
||||||
|
}
|
||||||
|
|
||||||
//print 'Val to use as insert is '.$newval.'<br>';
|
//print 'Val to use as insert is '.$newval.'<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||||
* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -302,6 +302,7 @@ class modCategorie extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'categorie as u, '.MAIN_DB_PREFIX . 'categorie_contact as cp, '.MAIN_DB_PREFIX . 'socpeople as p';
|
$this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'categorie as u, '.MAIN_DB_PREFIX . 'categorie_contact as cp, '.MAIN_DB_PREFIX . 'socpeople as p';
|
||||||
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'c_country as country ON p.fk_pays = country.rowid';
|
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'c_country as country ON p.fk_pays = country.rowid';
|
||||||
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe as s ON s.rowid = p.fk_soc';
|
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe as s ON s.rowid = p.fk_soc';
|
||||||
|
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'socpeople_extrafields as extra ON extra.fk_object = p.rowid';
|
||||||
$this->export_sql_end[$r] .= ' WHERE u.rowid = cp.fk_categorie AND cp.fk_socpeople = p.rowid AND u.entity IN ('.getEntity('category',1).')';
|
$this->export_sql_end[$r] .= ' WHERE u.rowid = cp.fk_categorie AND cp.fk_socpeople = p.rowid AND u.entity IN ('.getEntity('category',1).')';
|
||||||
$this->export_sql_end[$r] .= ' AND u.type = 4'; // contact categories
|
$this->export_sql_end[$r] .= ' AND u.type = 4'; // contact categories
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class modProductBatch extends DolibarrModules
|
|||||||
$this->config_page_url = array();
|
$this->config_page_url = array();
|
||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
$this->depends = array("modProduct","modStock","modExpedition","modSupplier"); // List of modules id that must be enabled if this module is enabled. modExpedition is required to manage batch exit (by manual stock decrease on shipment), modSupplier to manage batch entry (after supplier order).
|
$this->depends = array("modProduct","modStock","modExpedition","modFournisseur"); // List of modules id that must be enabled if this module is enabled. modExpedition is required to manage batch exit (by manual stock decrease on shipment), modSupplier to manage batch entry (after supplier order).
|
||||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||||
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
||||||
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
||||||
|
|||||||
@ -405,7 +405,8 @@ class modSociete extends DolibarrModules
|
|||||||
's.code_client'=>array('rule'=>'getcustomercodeifauto'),
|
's.code_client'=>array('rule'=>'getcustomercodeifauto'),
|
||||||
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'),
|
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'),
|
||||||
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'),
|
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'),
|
||||||
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto')
|
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto'),
|
||||||
|
's.capital'=>array('rule'=>'numeric')
|
||||||
);
|
);
|
||||||
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||||
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');
|
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');
|
||||||
|
|||||||
@ -211,7 +211,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$hookmanager->initHooks(array('pdfgeneration'));
|
$hookmanager->initHooks(array('pdfgeneration'));
|
||||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
global $action;
|
global $action;
|
||||||
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td
|
|||||||
$doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%');
|
$doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
} else {
|
} else {
|
||||||
print '<textarea id="desc" class="flat" name="desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
|
print '<textarea id="product_desc" class="flat" name="product_desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -1023,21 +1023,21 @@ class Cronjob extends CommonObject
|
|||||||
}
|
}
|
||||||
if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK));
|
if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG);
|
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG);
|
||||||
|
|
||||||
|
// Update with result
|
||||||
// Update with result
|
$this->lastoutput='';
|
||||||
$this->lastoutput='';
|
if (is_array($output_arr) && count($output_arr)>0)
|
||||||
if (is_array($output_arr) && count($output_arr)>0)
|
|
||||||
{
|
|
||||||
foreach($output_arr as $val)
|
|
||||||
{
|
{
|
||||||
$this->lastoutput.=$val."\n";
|
foreach($output_arr as $val)
|
||||||
|
{
|
||||||
|
$this->lastoutput.=$val."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$this->lastresult=$retval;
|
||||||
}
|
}
|
||||||
$this->lastresult=$retval;
|
|
||||||
$this->datelastresult=dol_now();
|
$this->datelastresult=dol_now();
|
||||||
$result = $this->update($user);
|
$result = $this->update($user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
|
|||||||
@ -712,7 +712,7 @@ if (! empty($id) && $action != 'edit')
|
|||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=valid_promesse">'.$langs->trans("ValidPromess").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=valid_promesse">'.$langs->trans("ValidPromess").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paye == 0)
|
if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paid == 0)
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=set_cancel">'.$langs->trans("ClassifyCanceled")."</a></div>";
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=set_cancel">'.$langs->trans("ClassifyCanceled")."</a></div>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -124,6 +125,7 @@ if ($resql)
|
|||||||
$expedition = new Expedition($db);
|
$expedition = new Expedition($db);
|
||||||
|
|
||||||
$param="";
|
$param="";
|
||||||
|
if ($sall) $param.= "&sall=".$sall;
|
||||||
if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp;
|
if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp;
|
||||||
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;
|
||||||
|
|||||||
@ -193,6 +193,7 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param="";
|
$param="";
|
||||||
|
if ($sall) $param.="&sall=".$sall;
|
||||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||||
if ($search_user) $param.="&search_user=".$search_user;
|
if ($search_user) $param.="&search_user=".$search_user;
|
||||||
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
|
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
|
||||||
|
|||||||
@ -139,6 +139,7 @@ if ($result)
|
|||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$urlparam='';
|
$urlparam='';
|
||||||
|
if ($sall) $urlparam.="&sall=".$sall;
|
||||||
if ($socid) $urlparam.="&socid=".$socid;
|
if ($socid) $urlparam.="&socid=".$socid;
|
||||||
if ($search_ref) $urlparam.="&search_ref=".urlencode($search_ref);
|
if ($search_ref) $urlparam.="&search_ref=".urlencode($search_ref);
|
||||||
if ($search_company) $urlparam.="&search_company=".urlencode($search_company);
|
if ($search_company) $urlparam.="&search_company=".urlencode($search_company);
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
||||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.3');
|
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.4');
|
||||||
|
|
||||||
if (! defined('EURO')) define('EURO',chr(128));
|
if (! defined('EURO')) define('EURO',chr(128));
|
||||||
|
|
||||||
|
|||||||
@ -383,7 +383,6 @@ if ($object->id > 0)
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
|
||||||
$sql.= " WHERE p.fk_soc =".$object->id;
|
$sql.= " WHERE p.fk_soc =".$object->id;
|
||||||
$sql.= " AND p.entity =".$conf->entity;
|
$sql.= " AND p.entity =".$conf->entity;
|
||||||
$sql.= " ORDER BY p.date_commande DESC";
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -254,6 +254,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
$this->fetchObjectLinked();
|
$this->fetchObjectLinked();
|
||||||
|
|
||||||
|
$this->lines=array();
|
||||||
|
|
||||||
$sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description,";
|
$sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description,";
|
||||||
$sql.= " l.qty,";
|
$sql.= " l.qty,";
|
||||||
$sql.= " l.tva_tx, l.remise_percent, l.subprice,";
|
$sql.= " l.tva_tx, l.remise_percent, l.subprice,";
|
||||||
@ -991,6 +993,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->date_commande = $this->db->idate($date);
|
$this->date_commande = $this->db->idate($date);
|
||||||
$result = 1;
|
$result = 1;
|
||||||
$this->log($user, 3, $date, $comment);
|
$this->log($user, 3, $date, $comment);
|
||||||
|
$this->date_commande = $date;
|
||||||
|
$this->methode_commande = $methode;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -208,6 +209,7 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param="";
|
$param="";
|
||||||
|
if ($sall) $param.="&search_all=".$sall;
|
||||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||||
if ($search_company) $param.="&search_company=".$search_company;
|
if ($search_company) $param.="&search_company=".$search_company;
|
||||||
if ($search_user) $param.="&search_user=".$search_user;
|
if ($search_user) $param.="&search_user=".$search_user;
|
||||||
|
|||||||
@ -296,6 +296,7 @@ if ($resql)
|
|||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.ref,fac.rowid","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.ref,fac.rowid","",$param,"",$sortfield,$sortorder);
|
||||||
if (empty($conf->global->SUPPLIER_INVOICE_HIDE_REF_SUPPLIER)) print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"ref_supplier","",$param,"",$sortfield,$sortorder);
|
if (empty($conf->global->SUPPLIER_INVOICE_HIDE_REF_SUPPLIER)) print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"ref_supplier","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fac.datef,fac.rowid","",$param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fac.datef,fac.rowid","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
||||||
|
|
||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_ENABLE_LOG_TO_HTML','0','chaine','If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL',1,0);
|
insert into llx_const (name, value, type, note, visible, entity) values (__ENCRYPT('MAIN_ENABLE_LOG_TO_HTML')__,__ENCRYPT('0')__,'chaine','If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL',1,0);
|
||||||
|
|
||||||
|
|
||||||
-- Was done into a 3.8 fix, so we must do it also in 3.9
|
-- Was done into a 3.8 fix, so we must do it also in 3.9
|
||||||
@ -61,7 +61,7 @@ update llx_opensurvey_sondage set format = 'D' where format = 'D+';
|
|||||||
update llx_opensurvey_sondage set format = 'A' where format = 'A+';
|
update llx_opensurvey_sondage set format = 'A' where format = 'A+';
|
||||||
|
|
||||||
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_DELAY_EXPENSEREPORTS_TO_PAY')__,__ENCRYPT('31')__,'chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0);
|
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_DELAY_EXPENSEREPORTS_TO_PAY')__,__ENCRYPT('31')__,'chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0);
|
||||||
INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_SIZE_SHORTLISTE_LIMIT','4','chaine','Longueur maximum des listes courtes (fiche client)',0);
|
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_SIZE_SHORTLISTE_LIMIT')__,__ENCRYPT('4')__,'chaine','Longueur maximum des listes courtes (fiche client)',0);
|
||||||
|
|
||||||
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32);
|
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32);
|
||||||
ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32);
|
ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32);
|
||||||
|
|||||||
@ -92,7 +92,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_cronjob FOR EACH ROW
|
|||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_deplacement FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_deplacement FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_u();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_m();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_element_resources FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_element_resources FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_entrepot FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_entrepot FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_events FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_events FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
|
|||||||
@ -585,6 +585,7 @@ TextUsedInTheMessageBody=Email body
|
|||||||
SendAcknowledgementByMail=Send Ack. by email
|
SendAcknowledgementByMail=Send Ack. by email
|
||||||
EMail=E-mail
|
EMail=E-mail
|
||||||
NoEMail=No email
|
NoEMail=No email
|
||||||
|
Email=Email
|
||||||
NoMobilePhone=No mobile phone
|
NoMobilePhone=No mobile phone
|
||||||
Owner=Owner
|
Owner=Owner
|
||||||
DetectedVersion=Detected version
|
DetectedVersion=Detected version
|
||||||
|
|||||||
@ -184,6 +184,12 @@ ProfId3FR=Id. prof. 3 (NAF-APE)
|
|||||||
ProfId4FR=Id. prof. 4 (RCS/RM)
|
ProfId4FR=Id. prof. 4 (RCS/RM)
|
||||||
ProfId5FR=-
|
ProfId5FR=-
|
||||||
ProfId6FR=-
|
ProfId6FR=-
|
||||||
|
ProfId1GA=Id. prof. 1 (NIF)
|
||||||
|
ProfId2GA=Id. prof. 2 (RCCM)
|
||||||
|
ProfId3GA=Id. prof. 3 (CAE)
|
||||||
|
ProfId4GA=Id. prof. 4
|
||||||
|
ProfId5GA=-
|
||||||
|
ProfId6GA=-
|
||||||
ProfId1GB=Numéro d'enregistrement
|
ProfId1GB=Numéro d'enregistrement
|
||||||
ProfId2GB=-
|
ProfId2GB=-
|
||||||
ProfId3GB=SIC
|
ProfId3GB=SIC
|
||||||
|
|||||||
@ -157,7 +157,7 @@ if ($socid > 0)
|
|||||||
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
||||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||||
$sql.= " AND f.fk_statut > 0";
|
$sql.= " AND f.fk_statut > 0";
|
||||||
$sql.= " AND s.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
$sql.= " AND d.fk_facture = f.rowid";
|
$sql.= " AND d.fk_facture = f.rowid";
|
||||||
$sql.= " AND f.fk_soc = $socid";
|
$sql.= " AND f.fk_soc = $socid";
|
||||||
$sql.= " AND d.buy_price_ht IS NOT NULL";
|
$sql.= " AND d.buy_price_ht IS NOT NULL";
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -109,7 +110,7 @@ if ($action == 'setModuleOptions')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') > 0)
|
if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') >= 0)
|
||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, "PRODUIT_LIMIT_SIZE", GETPOST('value_PRODUIT_LIMIT_SIZE'),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRODUIT_LIMIT_SIZE", GETPOST('value_PRODUIT_LIMIT_SIZE'),'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3690,11 +3690,11 @@ class Product extends CommonObject
|
|||||||
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight)
|
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight)
|
||||||
{
|
{
|
||||||
$return.= '<!-- Show thumb -->';
|
$return.= '<!-- Show thumb -->';
|
||||||
$return.= '<img class="photo photowithmargin" border="0" '.($conf->dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">';
|
$return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$return.= '<!-- Show original file -->';
|
$return.= '<!-- Show original file -->';
|
||||||
$return.= '<img class="photo photowithmargin" border="0" '.($conf->dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">';
|
$return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($nolink)) $return.= '</a>';
|
if (empty($nolink)) $return.= '</a>';
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
|
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -96,8 +97,6 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$tva_tx_txt = GETPOST('tva_tx', 'alpha'); // tva_tx can be '8.5' or '8.5*' or '8.5
|
$tva_tx_txt = GETPOST('tva_tx', 'alpha'); // tva_tx can be '8.5' or '8.5*' or '8.5
|
||||||
|
|
||||||
$tva_tx_txt;
|
|
||||||
|
|
||||||
// We must define tva_tx, npr and local taxes
|
// We must define tva_tx, npr and local taxes
|
||||||
$tva_tx = preg_replace('/[^0-9\.].*$/', '', $tva_tx_txt); // keep remove all after the numbers and dot
|
$tva_tx = preg_replace('/[^0-9\.].*$/', '', $tva_tx_txt); // keep remove all after the numbers and dot
|
||||||
$npr = preg_match('/\*/', $tva_tx_txt) ? 1 : 0;
|
$npr = preg_match('/\*/', $tva_tx_txt) ? 1 : 0;
|
||||||
@ -203,6 +202,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tva_tx_txt = $newvattx[$i];
|
$tva_tx_txt = $newvattx[$i];
|
||||||
|
$tva_tx = preg_replace('/[^0-9\.].*$/', '', $tva_tx_txt); // keep remove all after the numbers and dot
|
||||||
$npr = $newvatnpr[$i];
|
$npr = $newvatnpr[$i];
|
||||||
$localtax1 = $newlocaltax1_tx[$i];
|
$localtax1 = $newlocaltax1_tx[$i];
|
||||||
$localtax1_type = $newlocaltax1_type[$i];
|
$localtax1_type = $newlocaltax1_type[$i];
|
||||||
|
|||||||
@ -239,24 +239,29 @@ if ($resql)
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$param='';
|
||||||
$param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref";
|
if ($tosell) $param.="&tosell=".$tosell;
|
||||||
|
if ($tobuy) $param.="&tobuy=".$tobuy;
|
||||||
|
if ($type) $param.="&type=".$type;
|
||||||
|
if ($fourn_id) $param.="&fourn_id=".$fourn_id;
|
||||||
|
if ($snom) $param.="&snom=".$snom;
|
||||||
|
if ($sref) $param.="&sref=".$sref;
|
||||||
|
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||||
|
|
||||||
// Lignes des titres
|
// Lignes des titres
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label","",$param,"",$sortfield,$sortorder);
|
||||||
if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
|
if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("StockLimit"), $_SERVER["PHP_SELF"], "p.seuil_stock_alerte",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("StockLimit"), $_SERVER["PHP_SELF"], "p.seuil_stock_alerte","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
// TODO Add info of running suppliers/customers orders
|
// TODO Add info of running suppliers/customers orders
|
||||||
//print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder);
|
//print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -249,26 +250,35 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref&batch=$batch&eatby=$eatby&sellby=$sellby";
|
$param='';
|
||||||
|
if ($tosell) $param.="&tosell=".$tosell;
|
||||||
|
if ($tobuy) $param.="&tobuy=".$tobuy;
|
||||||
|
if ($type) $param.="&type=".$type;
|
||||||
|
if ($fourn_id) $param.="&fourn_id=".$fourn_id;
|
||||||
|
if ($snom) $param.="&snom=".$snom;
|
||||||
|
if ($sref) $param.="&sref=".$sref;
|
||||||
|
if ($search_batch) $param.="&search_batch=".$search_batch;
|
||||||
|
/*if ($eatby) $param.="&eatby=".$eatby;
|
||||||
|
if ($sellby) $param.="&sellby=".$sellby;*/
|
||||||
|
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||||
|
|
||||||
// Lignes des titres
|
// Lignes des titres
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label","",$param,"",$sortfield,$sortorder);
|
||||||
if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
|
if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Warehouse"), $_SERVER["PHP_SELF"], "",$param,"",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Warehouse"), $_SERVER["PHP_SELF"], "","",$param,'',$sortfield,$sortorder);
|
||||||
//print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder);
|
//print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Batch"), $_SERVER["PHP_SELF"], "pb.batch",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Batch"), $_SERVER["PHP_SELF"], "pb.batch","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("l_eatby"), $_SERVER["PHP_SELF"], "pb.eatby",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("l_eatby"), $_SERVER["PHP_SELF"], "pb.eatby","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("l_sellby"), $_SERVER["PHP_SELF"], "pb.sellby",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("l_sellby"), $_SERVER["PHP_SELF"], "pb.sellby","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
// TODO Add info of running suppliers/customers orders
|
// TODO Add info of running suppliers/customers orders
|
||||||
//print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder);
|
//print_liste_field_titre($langs->trans("TheoreticalStock"),$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Sell").')',$_SERVER["PHP_SELF"], "p.tosell","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status").' ('.$langs->trans("Buy").')',$_SERVER["PHP_SELF"], "p.tobuy","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
|
|||||||
@ -137,17 +137,26 @@ class MouvementStock extends CommonObject
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
if ($this->db->jdate($obj->eatby) != $eatby)
|
// only check date values
|
||||||
|
$tmparray=dol_getdate($eatby, true);
|
||||||
|
$eatby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']);
|
||||||
|
$tmparray=dol_getdate($sellby, true);
|
||||||
|
$sellby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']);
|
||||||
|
$tmparray=dol_getdate($this->db->jdate($obj->eatby), true);
|
||||||
|
$dbEatby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']);
|
||||||
|
$tmparray=dol_getdate($this->db->jdate($obj->sellby), true);
|
||||||
|
$dbSellby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']);
|
||||||
|
if ($dbEatby != $eatby)
|
||||||
{
|
{
|
||||||
$this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->eatby)), dol_print_date($eatby));
|
$this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbEatby), dol_print_date($eatby));
|
||||||
dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->eatby)), dol_print_date($eatby)), LOG_ERR);
|
dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbEatby), dol_print_date($eatby)), LOG_ERR);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
if ($this->db->jdate($obj->sellby) != $sellby)
|
if ($dbSellby != $sellby)
|
||||||
{
|
{
|
||||||
$this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->sellby)), dol_print_date($sellby));
|
$this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbSellby), dol_print_date($sellby));
|
||||||
dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->sellby)), dol_print_date($sellby)), LOG_ERR);
|
dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbSellby), dol_print_date($sellby)), LOG_ERR);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,13 @@ if ($result)
|
|||||||
$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
|
$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
|
||||||
llxHeader("",$langs->trans("ListOfWarehouses"),$help_url);
|
llxHeader("",$langs->trans("ListOfWarehouses"),$help_url);
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $totalnboflines);
|
$param = '';
|
||||||
|
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||||
|
if ($search_label) $param.="&search_label=".$search_label;
|
||||||
|
if ($search_status) $param.="&search_status=".$search_status;
|
||||||
|
if ($sall) $param.="&sall=".$sall;
|
||||||
|
|
||||||
|
print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines);
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -126,13 +132,13 @@ if ($result)
|
|||||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||||
|
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","","","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("LocationSummary"),$_SERVER["PHP_SELF"], "e.lieu","","","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("LocationSummary"),$_SERVER["PHP_SELF"], "e.lieu","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stockqty",'','','align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stockqty",'',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("EstimatedStockValue"), $_SERVER["PHP_SELF"], "e.valo_pmp",'','','align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("EstimatedStockValue"), $_SERVER["PHP_SELF"], "e.valo_pmp",'',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("EstimatedStockValueSell"), $_SERVER["PHP_SELF"], "",'','','align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("EstimatedStockValueSell"), $_SERVER["PHP_SELF"], "",'',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"], "e.statut",'','','align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"], "e.statut",'',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
|
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder,'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $cancel=GETPOST('cancel');
|
|||||||
|
|
||||||
$id=GETPOST('id', 'int');
|
$id=GETPOST('id', 'int');
|
||||||
$ref=GETPOST('ref', 'alpha');
|
$ref=GETPOST('ref', 'alpha');
|
||||||
$stocklimit = GETPOST('stocklimit');
|
$stocklimit = GETPOST('seuil_stock_alerte');
|
||||||
$desiredstock = GETPOST('desiredstock');
|
$desiredstock = GETPOST('desiredstock');
|
||||||
$cancel = GETPOST('cancel');
|
$cancel = GETPOST('cancel');
|
||||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||||
@ -70,7 +70,7 @@ $result=restrictedArea($user,'produit&stock',$id,'product&product','','',$fieldi
|
|||||||
if ($cancel) $action='';
|
if ($cancel) $action='';
|
||||||
|
|
||||||
// Set stock limit
|
// Set stock limit
|
||||||
if ($action == 'setstocklimit')
|
if ($action == 'setseuil_stock_alerte')
|
||||||
{
|
{
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
|
|||||||
@ -339,7 +339,7 @@ class Resource extends CommonObject
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources";
|
||||||
$sql.= " WHERE element_type='resource' AND resource_id ='".$this->db->escape($rowid)."'";
|
$sql.= " WHERE element_type='resource' AND resource_id =".$this->db->escape($rowid);
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
@ -393,7 +393,6 @@ class Resource extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY t.rowid";
|
|
||||||
$sql.= $this->db->order($sortfield,$sortorder);
|
$sql.= $this->db->order($sortfield,$sortorder);
|
||||||
$this->num_all = 0;
|
$this->num_all = 0;
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
@ -410,10 +409,10 @@ class Resource extends CommonObject
|
|||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$this->lines=array();
|
||||||
while ($i < $num)
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
|
||||||
$line = new Resource($this->db);
|
$line = new Resource($this->db);
|
||||||
$line->id = $obj->rowid;
|
$line->id = $obj->rowid;
|
||||||
$line->ref = $obj->ref;
|
$line->ref = $obj->ref;
|
||||||
@ -421,8 +420,7 @@ class Resource extends CommonObject
|
|||||||
$line->fk_code_type_resource = $obj->fk_code_type_resource;
|
$line->fk_code_type_resource = $obj->fk_code_type_resource;
|
||||||
$line->type_label = $obj->type_label;
|
$line->type_label = $obj->type_label;
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[] = $line;
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
@ -473,7 +471,6 @@ class Resource extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY t.rowid";
|
|
||||||
$sql.= $this->db->order($sortfield,$sortorder);
|
$sql.= $this->db->order($sortfield,$sortorder);
|
||||||
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
||||||
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
||||||
@ -484,10 +481,9 @@ class Resource extends CommonObject
|
|||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$this->lines=array();
|
||||||
while ($i < $num)
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
|
||||||
$line = new Resource($this->db);
|
$line = new Resource($this->db);
|
||||||
$line->id = $obj->rowid;
|
$line->id = $obj->rowid;
|
||||||
$line->resource_id = $obj->resource_id;
|
$line->resource_id = $obj->resource_id;
|
||||||
@ -502,9 +498,8 @@ class Resource extends CommonObject
|
|||||||
$line->objresource = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
$line->objresource = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||||
if($obj->element_id && $obj->element_type)
|
if($obj->element_id && $obj->element_type)
|
||||||
$line->objelement = fetchObjectByElement($obj->element_id,$obj->element_type);
|
$line->objelement = fetchObjectByElement($obj->element_id,$obj->element_type);
|
||||||
$this->lines[$i] = $line;
|
$this->lines[] = $line;
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
@ -559,7 +554,6 @@ class Resource extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY t.resource_id";
|
|
||||||
$sql.= $this->db->order($sortfield,$sortorder);
|
$sql.= $this->db->order($sortfield,$sortorder);
|
||||||
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
||||||
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
||||||
@ -570,10 +564,9 @@ class Resource extends CommonObject
|
|||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$this->lines=array();
|
||||||
while ($i < $num)
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
|
||||||
$line = new Resource($this->db);
|
$line = new Resource($this->db);
|
||||||
$line->id = $obj->rowid;
|
$line->id = $obj->rowid;
|
||||||
$line->resource_id = $obj->resource_id;
|
$line->resource_id = $obj->resource_id;
|
||||||
@ -584,9 +577,7 @@ class Resource extends CommonObject
|
|||||||
$line->mandatory = $obj->mandatory;
|
$line->mandatory = $obj->mandatory;
|
||||||
$line->fk_user_create = $obj->fk_user_create;
|
$line->fk_user_create = $obj->fk_user_create;
|
||||||
|
|
||||||
$this->lines[$i] = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
$this->lines[] = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
@ -757,10 +748,13 @@ class Resource extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Return an array with resources linked to the element
|
* Return an array with resources linked to the element
|
||||||
*
|
*
|
||||||
*
|
* @param string $element Element
|
||||||
|
* @param int $element_id Id
|
||||||
|
* @param string $resource_type Type
|
||||||
|
* @return array Aray of resources
|
||||||
*/
|
*/
|
||||||
function getElementResources($element,$element_id,$resource_type='')
|
function getElementResources($element,$element_id,$resource_type='')
|
||||||
{
|
{
|
||||||
@ -768,7 +762,7 @@ class Resource extends CommonObject
|
|||||||
// Links beetween objects are stored in this table
|
// Links beetween objects are stored in this table
|
||||||
$sql = 'SELECT rowid, resource_id, resource_type, busy, mandatory';
|
$sql = 'SELECT rowid, resource_id, resource_type, busy, mandatory';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'element_resources';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'element_resources';
|
||||||
$sql.= " WHERE element_id='".$element_id."' AND element_type='".$element."'";
|
$sql.= " WHERE element_id=".$element_id." AND element_type='".$this->db->escape($element)."'";
|
||||||
if($resource_type)
|
if($resource_type)
|
||||||
$sql.=" AND resource_type LIKE '%".$resource_type."%'";
|
$sql.=" AND resource_type LIKE '%".$resource_type."%'";
|
||||||
$sql .= ' ORDER BY resource_type';
|
$sql .= ' ORDER BY resource_type';
|
||||||
|
|||||||
@ -1936,11 +1936,10 @@ class Societe extends CommonObject
|
|||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$contact_emails = $this->contact_property_array('email');
|
$contact_emails = $this->contact_property_array('email',1);
|
||||||
if ($this->email && $addthirdparty)
|
if ($this->email && $addthirdparty)
|
||||||
{
|
{
|
||||||
if (empty($this->name)) $this->name=$this->nom;
|
if (empty($this->name)) $this->name=$this->nom;
|
||||||
// TODO: Tester si email non deja present dans tableau contact
|
|
||||||
$contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">";
|
$contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">";
|
||||||
}
|
}
|
||||||
return $contact_emails;
|
return $contact_emails;
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -341,6 +342,7 @@ $sql.= " st.libelle as stcomm, s.fk_stcomm as stcomm_id, s.fk_prospectlevel, s.p
|
|||||||
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4, s.fk_pays,";
|
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4, s.fk_pays,";
|
||||||
$sql.= " s.tms as date_update, s.datec as date_creation,";
|
$sql.= " s.tms as date_update, s.datec as date_creation,";
|
||||||
$sql.= " typent.code as typent_code";
|
$sql.= " typent.code as typent_code";
|
||||||
|
$sql.= " ,s.code_compta,s.code_compta_fournisseur";
|
||||||
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
// We'll need these fields in order to filter by categ
|
// We'll need these fields in order to filter by categ
|
||||||
@ -429,7 +431,7 @@ if ($resql)
|
|||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($sall != '') $param = "&sall=".urlencode($sall);
|
if ($search_all != '') $param = "&sall=".urlencode($search_all);
|
||||||
if ($search_categ != '') $param.='&search_categ='.urlencode($search_categ);
|
if ($search_categ != '') $param.='&search_categ='.urlencode($search_categ);
|
||||||
if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale);
|
if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale);
|
||||||
if ($search_nom != '') $param.= "&search_nom=".urlencode($search_nom);
|
if ($search_nom != '') $param.= "&search_nom=".urlencode($search_nom);
|
||||||
|
|||||||
@ -285,7 +285,7 @@ if (empty($reshook))
|
|||||||
$object->name_alias = GETPOST('name_alias');
|
$object->name_alias = GETPOST('name_alias');
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->address = GETPOST('address', 'alpha');
|
$object->address = GETPOST('address');
|
||||||
$object->zip = GETPOST('zipcode', 'alpha');
|
$object->zip = GETPOST('zipcode', 'alpha');
|
||||||
$object->town = GETPOST('town', 'alpha');
|
$object->town = GETPOST('town', 'alpha');
|
||||||
$object->country_id = GETPOST('country_id', 'int');
|
$object->country_id = GETPOST('country_id', 'int');
|
||||||
|
|||||||
@ -9,7 +9,8 @@
|
|||||||
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
*
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
*
|
||||||
* 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
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
@ -238,6 +239,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
||||||
|
if ($sall) $param.='&sall='.$sall;
|
||||||
if ($month) $param.='&month='.$month;
|
if ($month) $param.='&month='.$month;
|
||||||
if ($year) $param.='&year='.$year;
|
if ($year) $param.='&year='.$year;
|
||||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
||||||
|
|||||||
@ -718,11 +718,11 @@ img.photoref {
|
|||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$minwidthtmenu=66; /* minimul widht for one top menu entry */
|
$minwidthtmenu=66; /* minimum width for one top menu entry */
|
||||||
$heightmenu=46; /* height of top menu, part with image */
|
$heightmenu=46; /* height of top menu, part with image */
|
||||||
$heightmenu2=48; /* height of top menu, part with login */
|
$heightmenu2=48; /* height of top menu, part with login */
|
||||||
$disableimages = 0;
|
$disableimages = 0;
|
||||||
$maxwidthloginblock = 110;
|
$maxwidthloginblock = 130;
|
||||||
if (! empty($conf->global->THEME_ELDY_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = 180; }
|
if (! empty($conf->global->THEME_ELDY_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = 180; }
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -1133,6 +1133,7 @@ div.login a:hover {
|
|||||||
}
|
}
|
||||||
div.login_block_user {
|
div.login_block_user {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
div.login_block_other {
|
div.login_block_other {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -1142,7 +1143,7 @@ div.login_block_other { padding-top: 3px; text-align: right; }
|
|||||||
.login_block_elem {
|
.login_block_elem {
|
||||||
float: right;
|
float: right;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 0px 0px 0px 4px !important;
|
padding: 0px 3px 0px 4px !important;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
.atoplogin, .atoplogin:hover {
|
.atoplogin, .atoplogin:hover {
|
||||||
@ -4026,7 +4027,7 @@ img.demothumb {
|
|||||||
|
|
||||||
/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo $fontsize ?> */
|
/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo $fontsize ?> */
|
||||||
/* rule to reduce top menu - 1st reduction */
|
/* rule to reduce top menu - 1st reduction */
|
||||||
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 6.7, 0) + 8; ?>px)
|
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 6.9, 0) + 8; ?>px)
|
||||||
{
|
{
|
||||||
div.tmenucenter {
|
div.tmenucenter {
|
||||||
max-width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */
|
max-width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */
|
||||||
@ -4084,10 +4085,16 @@ img.demothumb {
|
|||||||
padding-<?php echo $right; ?>: 78px;
|
padding-<?php echo $right; ?>: 78px;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
}
|
}
|
||||||
|
div.login_block_user {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
div.login_block {
|
div.login_block {
|
||||||
top: 4px;
|
top: 4px;
|
||||||
max-width: 82px;
|
max-width: 82px;
|
||||||
}
|
}
|
||||||
|
.login_block_elem {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
li.tmenu, li.tmenusel {
|
li.tmenu, li.tmenusel {
|
||||||
min-width: 30px;
|
min-width: 30px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,6 +36,12 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
|||||||
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
||||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
||||||
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
||||||
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'fckeditor') && ! defined("NOLOGIN")) {
|
||||||
|
define("NOLOGIN",'1');
|
||||||
|
// For multicompany
|
||||||
|
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||||
|
if (is_numeric($entity)) define("DOLENTITY", $entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header empty
|
* Header empty
|
||||||
|
|||||||
@ -660,7 +660,7 @@ function updateContact($authentication,$contact)
|
|||||||
$object->civility_id=$contact['civility_id'];
|
$object->civility_id=$contact['civility_id'];
|
||||||
$object->poste=$contact['poste'];
|
$object->poste=$contact['poste'];
|
||||||
|
|
||||||
$object->statut=$contact['statut'];
|
$object->statut=$contact['status'];
|
||||||
|
|
||||||
|
|
||||||
//Retreive all extrafield for contact
|
//Retreive all extrafield for contact
|
||||||
|
|||||||
@ -935,7 +935,7 @@ function updateOrder($authentication,$order)
|
|||||||
if (isset($order['billed']))
|
if (isset($order['billed']))
|
||||||
{
|
{
|
||||||
if ($order['billed']) $result=$object->classifyBilled($fuser);
|
if ($order['billed']) $result=$object->classifyBilled($fuser);
|
||||||
if (! $order['billed']) $result=$object->classifyBilled($fuser);
|
if (! $order['billed']) $result=$object->classifyUnBilled($fuser);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Retreive all extrafield for object
|
//Retreive all extrafield for object
|
||||||
|
|||||||
@ -223,7 +223,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
|||||||
$ip='169.254.0.0';
|
$ip='169.254.0.0';
|
||||||
$result=is_ip($ip);
|
$result=is_ip($ip);
|
||||||
print __METHOD__." for ".$ip." result=".$result."\n";
|
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||||
$this->assertEquals(0,$result,$ip);
|
//$this->assertEquals(2,$result,$ip); // Assertion disabled because returned value differs between PHP patch version
|
||||||
|
|
||||||
$ip='1.2.3.4';
|
$ip='1.2.3.4';
|
||||||
$result=is_ip($ip);
|
$result=is_ip($ip);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user