forked from Wavyzz/dolibarr
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e1b0d1abc | ||
|
|
bd8391163a | ||
|
|
989cd87446 | ||
|
|
891f8d9442 | ||
|
|
2f4de2ef75 | ||
|
|
7d8cf99d58 | ||
|
|
d0dc792b3c | ||
|
|
2aeb0f4f5b | ||
|
|
7ed496d7d9 | ||
|
|
606a3f9917 | ||
|
|
45d57b0492 | ||
|
|
ccddf0d1be | ||
|
|
e3041f45ee | ||
|
|
aac24c887f | ||
|
|
29db45c763 | ||
|
|
a94f7dc3ad | ||
|
|
efa171819a | ||
|
|
756b1d31ad | ||
|
|
104592b349 | ||
|
|
797ab8a150 | ||
|
|
6a4468d94e | ||
|
|
87fc27c7e6 | ||
|
|
fdbf2fb45d | ||
|
|
c73f4a14ee | ||
|
|
742d0e37ee | ||
|
|
0b2a81f4b8 | ||
|
|
9c7647a7ae |
12
ChangeLog
12
ChangeLog
@@ -2,6 +2,18 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||||
|
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||||
|
Fix: Can't update phone_pro from web service
|
||||||
|
Fix: Some security holes.
|
||||||
|
Fix: copy extrafields when creating order from proposal.
|
||||||
|
Fix: report on action was not filtering by environment.
|
||||||
|
Fix: Avoid missing class error.
|
||||||
|
Fix: Add function dolEscapeXML.
|
||||||
|
Fix: Bad days and month reported by function.
|
||||||
|
Fix: Bad margin calculation.
|
||||||
|
|
||||||
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
||||||
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
|
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
|
||||||
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
dolibarr (3.5.6-3) unstable; urgency=low
|
||||||
|
|
||||||
|
[ Laurent Destailleur (eldy) ]
|
||||||
|
* New upstream release.
|
||||||
|
|
||||||
|
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 2 Dec 2014 12:00:00 +0100
|
||||||
|
|
||||||
dolibarr (3.5.5-3) unstable; urgency=low
|
dolibarr (3.5.5-3) unstable; urgency=low
|
||||||
|
|
||||||
[ Laurent Destailleur (eldy) ]
|
[ Laurent Destailleur (eldy) ]
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
; ----- Change this -----
|
; ----- Change this -----
|
||||||
AppName=DoliWamp
|
AppName=DoliWamp
|
||||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
AppVerName=DoliWamp-3.5.5
|
AppVerName=DoliWamp-3.5.6
|
||||||
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
OutputBaseFilename=DoliWamp-3.5.5
|
OutputBaseFilename=DoliWamp-3.5.6
|
||||||
; ----- End of change
|
; ----- End of change
|
||||||
;OutputManifestFile=build\doliwampbuild.log
|
;OutputManifestFile=build\doliwampbuild.log
|
||||||
; Define full path from which all relative path are defined
|
; Define full path from which all relative path are defined
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ beta version of Dolibarr, step by step.
|
|||||||
- Update version number with x.y.z-w in build/debian/changelog
|
- Update version number with x.y.z-w in build/debian/changelog
|
||||||
- Update version number with x.y.z-w in build/exe/doliwamp/doliwamp.iss
|
- Update version number with x.y.z-w in build/exe/doliwamp/doliwamp.iss
|
||||||
- Update version number with x.y.z-w in build/rpm/*.spec
|
- Update version number with x.y.z-w in build/rpm/*.spec
|
||||||
- Update version number with x.y in build/doxygen/dolibarr-doxygen.doxyfile
|
|
||||||
- Commit all changes.
|
- Commit all changes.
|
||||||
- Add a Tag (x.y.betaz_YYYYMMDD) and push it: git push --tags
|
- Add a Tag (x.y.betaz_YYYYMMDD) and push it: git push --tags
|
||||||
- Create a branch (x.y).
|
- Create a branch (x.y).
|
||||||
|
|||||||
@@ -331,6 +331,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 2 2014 Laurent Destailleur 3.5.6-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
@@ -567,6 +567,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 2 2014 Laurent Destailleur 3.5.6-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
@@ -336,6 +336,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 2 2014 Laurent Destailleur 3.5.6-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
@@ -347,6 +347,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 2 2014 Laurent Destailleur 3.5.6-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
@@ -184,18 +184,19 @@ if ($action=='show_week')
|
|||||||
$prev_month = $prev['prev_month'];
|
$prev_month = $prev['prev_month'];
|
||||||
$prev_day = $prev['prev_day'];
|
$prev_day = $prev['prev_day'];
|
||||||
$first_day = $prev['first_day'];
|
$first_day = $prev['first_day'];
|
||||||
|
$first_month= $prev['first_month'];
|
||||||
|
$first_year = $prev['first_year'];
|
||||||
$week = $prev['week'];
|
$week = $prev['week'];
|
||||||
|
|
||||||
$day = (int) $day;
|
$day = (int) $day;
|
||||||
$next = dol_get_next_week($day, $week, $month, $year);
|
$next = dol_get_next_week($first_day, $week, $first_month, $first_year);
|
||||||
$next_year = $next['year'];
|
$next_year = $next['year'];
|
||||||
$next_month = $next['month'];
|
$next_month = $next['month'];
|
||||||
$next_day = $next['day'];
|
$next_day = $next['day'];
|
||||||
|
|
||||||
// Define firstdaytoshow and lastdaytoshow
|
// Define firstdaytoshow and lastdaytoshow
|
||||||
$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$first_day,$prev_year);
|
$firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year);
|
||||||
$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year);
|
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 7, 'd');
|
||||||
|
|
||||||
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
||||||
|
|
||||||
@@ -870,39 +871,27 @@ elseif ($action == 'show_week') // View by week
|
|||||||
}
|
}
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
|
||||||
//var_dump($eventarray);
|
|
||||||
//print $tmpday;
|
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
|
|
||||||
for($iter_day = 0; $iter_day < 7; $iter_day++)
|
for($iter_day = 0; $iter_day < 7; $iter_day++)
|
||||||
{
|
{
|
||||||
if(($tmpday <= $max_day_in_month))
|
// Show days of the current week
|
||||||
{
|
$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd');
|
||||||
// Show days of the current week
|
$tmparray = dol_getdate($curtime,'fast');
|
||||||
$curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year);
|
$tmpday = $tmparray['mday'];
|
||||||
|
$tmpmonth = $tmparray['mon'];
|
||||||
|
$tmpyear = $tmparray['year'];
|
||||||
|
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
if ($iter_day == 6) $style.=' cal_other_month_right';
|
||||||
$today=0;
|
$today=0;
|
||||||
$todayarray=dol_getdate($now,'fast');
|
$todayarray=dol_getdate($now,'fast');
|
||||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1;
|
||||||
if ($today) $style='cal_today';
|
if ($today) $style='cal_today';
|
||||||
|
|
||||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
echo ' <td class="'.$style.'" width="14%" valign="top">';
|
||||||
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$style='cal_current_month';
|
|
||||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
|
||||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
|
||||||
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
|
||||||
echo "</td>\n";
|
|
||||||
}
|
|
||||||
$tmpday++;
|
|
||||||
}
|
}
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -972,7 +972,12 @@ class Commande extends CommonOrder
|
|||||||
$line->marge_tx = $marginInfos[1];
|
$line->marge_tx = $marginInfos[1];
|
||||||
$line->marque_tx = $marginInfos[2];
|
$line->marque_tx = $marginInfos[2];
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
// get extrafields from original line
|
||||||
|
$object->lines[$i]->fetch_optionals($object->lines[$i]->rowid);
|
||||||
|
foreach($object->lines[$i]->array_options as $options_key => $value)
|
||||||
|
$line->array_options[$options_key] = $value;
|
||||||
|
|
||||||
|
$this->lines[$i] = $line;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->socid = $object->socid;
|
$this->socid = $object->socid;
|
||||||
@@ -991,6 +996,11 @@ class Commande extends CommonOrder
|
|||||||
$this->origin = $object->element;
|
$this->origin = $object->element;
|
||||||
$this->origin_id = $object->id;
|
$this->origin_id = $object->id;
|
||||||
|
|
||||||
|
// get extrafields from original line
|
||||||
|
$object->fetch_optionals($object->id);
|
||||||
|
foreach($object->array_options as $options_key => $value)
|
||||||
|
$this->array_options[$options_key] = $value;
|
||||||
|
|
||||||
// Possibility to add external linked objects with hooks
|
// Possibility to add external linked objects with hooks
|
||||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||||
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
||||||
|
|||||||
@@ -701,6 +701,11 @@ class Facture extends CommonInvoice
|
|||||||
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
|
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
|
||||||
$line->pa_ht = $marginInfos[0];
|
$line->pa_ht = $marginInfos[0];
|
||||||
|
|
||||||
|
// get extrafields from original line
|
||||||
|
$object->lines[$i]->fetch_optionals($object->lines[$i]->rowid);
|
||||||
|
foreach($object->lines[$i]->array_options as $options_key => $value)
|
||||||
|
$line->array_options[$options_key] = $value;
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[$i] = $line;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -720,6 +725,11 @@ class Facture extends CommonInvoice
|
|||||||
$this->origin = $object->element;
|
$this->origin = $object->element;
|
||||||
$this->origin_id = $object->id;
|
$this->origin_id = $object->id;
|
||||||
|
|
||||||
|
// get extrafields from original line
|
||||||
|
$object->fetch_optionals($object->id);
|
||||||
|
foreach($object->array_options as $options_key => $value)
|
||||||
|
$this->array_options[$options_key] = $value;
|
||||||
|
|
||||||
// Possibility to add external linked objects with hooks
|
// Possibility to add external linked objects with hooks
|
||||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||||
if (! empty($object->other_linked_objects) && is_array($object->other_linked_objects))
|
if (! empty($object->other_linked_objects) && is_array($object->other_linked_objects))
|
||||||
|
|||||||
@@ -575,6 +575,11 @@ abstract class CommonObject
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (empty($this->socid)) return 0;
|
if (empty($this->socid)) return 0;
|
||||||
|
|
||||||
|
if (!class_exists('Societe'))
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
|
||||||
$thirdparty = new Societe($this->db);
|
$thirdparty = new Societe($this->db);
|
||||||
$result=$thirdparty->fetch($this->socid);
|
$result=$thirdparty->fetch($this->socid);
|
||||||
@@ -2192,7 +2197,7 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||||
// Add field of attribut
|
// Add field of attribut
|
||||||
if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
|
if (isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
|
||||||
$sql.=",".$attributeKey;
|
$sql.=",".$attributeKey;
|
||||||
}
|
}
|
||||||
$sql .= ") VALUES (".$this->id;
|
$sql .= ") VALUES (".$this->id;
|
||||||
@@ -2200,7 +2205,7 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||||
// Add field o fattribut
|
// Add field o fattribut
|
||||||
if($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate)
|
if(isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate)
|
||||||
{
|
{
|
||||||
if ($this->array_options[$key] != '')
|
if ($this->array_options[$key] != '')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -703,7 +703,7 @@ class Translate
|
|||||||
*/
|
*/
|
||||||
function getCurrencyAmount($currency_code, $amount)
|
function getCurrencyAmount($currency_code, $amount)
|
||||||
{
|
{
|
||||||
$symbol=$this->getCurrencSymbol($currency_code);
|
$symbol=$this->getCurrencySymbol($currency_code);
|
||||||
|
|
||||||
if (in_array($currency_code, array('USD'))) return $symbol.$amount;
|
if (in_array($currency_code, array('USD'))) return $symbol.$amount;
|
||||||
else return $amount.$symbol;
|
else return $amount.$symbol;
|
||||||
|
|||||||
@@ -518,8 +518,8 @@ function dol_get_last_day($year,$month=12,$gm=false)
|
|||||||
* @param int $day Day
|
* @param int $day Day
|
||||||
* @param int $month Month
|
* @param int $month Month
|
||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
* @param int $gm False = Return date to compare with server TZ, True to compare with GM date.
|
* @param int $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date.
|
||||||
* @return array year,month, week,first_day,prev_year,prev_month,prev_day
|
* @return array year,month,week,first_day,prev_year,prev_month,prev_day
|
||||||
*/
|
*/
|
||||||
function dol_get_first_day_week($day,$month,$year,$gm=false)
|
function dol_get_first_day_week($day,$month,$year,$gm=false)
|
||||||
{
|
{
|
||||||
@@ -542,7 +542,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
|
|||||||
$tmpday = date($tmparray[0])-$seconds;
|
$tmpday = date($tmparray[0])-$seconds;
|
||||||
$tmpday = date("d",$tmpday);
|
$tmpday = date("d",$tmpday);
|
||||||
|
|
||||||
//Check first day of week is form this month or not
|
//Check first day of week is in same month than current day or not
|
||||||
if ($tmpday>$day)
|
if ($tmpday>$day)
|
||||||
{
|
{
|
||||||
$prev_month = $month-1;
|
$prev_month = $month-1;
|
||||||
@@ -559,15 +559,17 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
|
|||||||
$prev_month = $month;
|
$prev_month = $month;
|
||||||
$prev_year = $year;
|
$prev_year = $year;
|
||||||
}
|
}
|
||||||
|
$tmpmonth = $prev_month;
|
||||||
|
$tmpyear = $prev_year;
|
||||||
|
|
||||||
//Get first day of next week
|
//Get first day of next week
|
||||||
$tmptime=dol_mktime(12,0,0,$month,$tmpday,$year,1,0);
|
$tmptime=dol_mktime(12,0,0,$month,$tmpday,$year,1,0);
|
||||||
$tmptime-=24*60*60*7;
|
$tmptime-=24*60*60*7;
|
||||||
$tmparray=dol_getdate($tmptime,true);
|
$tmparray=dol_getdate($tmptime,true);
|
||||||
$prev_day = $tmparray['mday'];
|
$prev_day = $tmparray['mday'];
|
||||||
|
|
||||||
//Check first day of week is form this month or not
|
//Check prev day of week is in same month than first day or not
|
||||||
if ($prev_day>$tmpday)
|
if ($prev_day > $tmpday)
|
||||||
{
|
{
|
||||||
$prev_month = $month-1;
|
$prev_month = $month-1;
|
||||||
$prev_year = $year;
|
$prev_year = $year;
|
||||||
@@ -579,9 +581,9 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$week = date("W",dol_mktime(0,0,0,$month,$tmpday,$year,$gm));
|
$week = date("W",dol_mktime(0,0,0,$tmpmonth,$tmpday,$tmpyear,$gm));
|
||||||
|
|
||||||
return array('year' => $year, 'month' => $month, 'week' => $week, 'first_day' => $tmpday, 'prev_year' => $prev_year, 'prev_month' => $prev_month, 'prev_day' => $prev_day);
|
return array('year' => $year, 'month' => $month, 'week' => $week, 'first_day' => $tmpday, 'first_month' => $tmpmonth, 'first_year' => $tmpyear, 'prev_year' => $prev_year, 'prev_month' => $prev_month, 'prev_day' => $prev_day);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ class CommActionRapport
|
|||||||
$sql.= " WHERE c.id=a.fk_action AND a.fk_user_author = u.rowid";
|
$sql.= " WHERE c.id=a.fk_action AND a.fk_user_author = u.rowid";
|
||||||
$sql.= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($this->year,$this->month,false))."'";
|
$sql.= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($this->year,$this->month,false))."'";
|
||||||
$sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'";
|
$sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'";
|
||||||
|
$sql.= " AND a.entity = ".$conf->entity;
|
||||||
$sql.= " ORDER BY a.datep DESC";
|
$sql.= " ORDER BY a.datep DESC";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::_page sql=".$sql);
|
dol_syslog(get_class($this)."::_page sql=".$sql);
|
||||||
|
|||||||
@@ -95,9 +95,18 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
$res = $object->reprogram_jobs($user->login);
|
||||||
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
if ($res > 0)
|
||||||
$action='';
|
{
|
||||||
|
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||||
|
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||||
|
$action='';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessage($object->error,'errors');
|
||||||
|
$action='';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,6 +100,21 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
|||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($object->error,'errors');
|
setEventMessage($object->error,'errors');
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$res = $object->reprogram_jobs($user->login);
|
||||||
|
if ($res > 0)
|
||||||
|
{
|
||||||
|
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||||
|
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||||
|
$action='';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessage($object->error,'errors');
|
||||||
|
$action='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-1'); // Make a call to avoid to run twice job when using back
|
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-1'); // Make a call to avoid to run twice job when using back
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
* \brief File that include conf.php file and commons lib like functions.lib.php
|
* \brief File that include conf.php file and commons lib like functions.lib.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.5.5');
|
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.5.6');
|
||||||
if (! defined('EURO')) define('EURO',chr(128));
|
if (! defined('EURO')) define('EURO',chr(128));
|
||||||
|
|
||||||
// Define syslog constants
|
// Define syslog constants
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ CreditNotes=Avoirs
|
|||||||
Deposit=Acompte
|
Deposit=Acompte
|
||||||
Deposits=Acomptes
|
Deposits=Acomptes
|
||||||
DiscountFromCreditNote=Remise issue de l'avoir %s
|
DiscountFromCreditNote=Remise issue de l'avoir %s
|
||||||
DiscountFromDeposit=Paiements issue de l'acompte %s
|
DiscountFromDeposit=Paiement issu de l'acompte %s
|
||||||
AbsoluteDiscountUse=Ce type de crédit ne peut s'utiliser que sur une facture non validée
|
AbsoluteDiscountUse=Ce type de crédit ne peut s'utiliser que sur une facture non validée
|
||||||
CreditNoteDepositUse=La facture doit être validée pour pouvoir utiliser ce type de crédit
|
CreditNoteDepositUse=La facture doit être validée pour pouvoir utiliser ce type de crédit
|
||||||
NewGlobalDiscount=Nouvelle ligne de déduction
|
NewGlobalDiscount=Nouvelle ligne de déduction
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ $sql = "SELECT";
|
|||||||
if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||||
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
|
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
|
||||||
$sql.= " sum(d.total_ht) as selling_price,";
|
$sql.= " sum(d.total_ht) as selling_price,";
|
||||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ;
|
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ;
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE)?-1:$conf->global->AGENT_CONTACT_TYPE);
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE)?-1:$conf->global->AGENT_CONTACT_TYPE);
|
||||||
|
|||||||
@@ -164,8 +164,8 @@ $sql = "SELECT";
|
|||||||
$sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
$sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||||
if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||||
$sql.= " sum(d.total_ht) as selling_price,";
|
$sql.= " sum(d.total_ht) as selling_price,";
|
||||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
||||||
|
|||||||
@@ -167,8 +167,8 @@ $sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,";
|
|||||||
if ($id > 0) $sql.= " d.fk_product,";
|
if ($id > 0) $sql.= " d.fk_product,";
|
||||||
if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||||
$sql.= " sum(d.total_ht) as selling_price,";
|
$sql.= " sum(d.total_ht) as selling_price,";
|
||||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."product as p";
|
$sql.= ", ".MAIN_DB_PREFIX."product as p";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||||
|
|||||||
@@ -655,6 +655,7 @@ function updateContact($authentication,$contact)
|
|||||||
$object->province_id=$contact['province_id'];
|
$object->province_id=$contact['province_id'];
|
||||||
|
|
||||||
|
|
||||||
|
$object->phone_pro=$contact['phone_pro'];
|
||||||
$object->phone_perso=$contact['phone_perso'];
|
$object->phone_perso=$contact['phone_perso'];
|
||||||
$object->phone_mobile=$contact['phone_mobile'];
|
$object->phone_mobile=$contact['phone_mobile'];
|
||||||
$object->fax=$contact['fax'];
|
$object->fax=$contact['fax'];
|
||||||
|
|||||||
Reference in New Issue
Block a user