2
0
forked from Wavyzz/dolibarr

Compare commits

...

27 Commits
3.6.1 ... 3.5.6

Author SHA1 Message Date
Laurent Destailleur
9e1b0d1abc Prepare 3.5.6 2014-12-04 15:09:47 +01:00
Laurent Destailleur
bd8391163a Merge pull request #2067 from frederic34/patch-2
Fix bug 1692 Can't update phone_pro with the contact webservice
2014-11-23 16:48:33 +01:00
Laurent Destailleur
989cd87446 Merge pull request #2066 from altatof/fix_margin_recap
FIX: bad margin and buy_price calculation when total_ht = 0 (discount 100%) on a line
2014-11-23 16:48:21 +01:00
Frédéric FRANCE
891f8d9442 Fix bug 1692 Can't update phone_pro with the contact webservice 2014-11-22 19:02:15 +01:00
Laurent Destailleur
2f4de2ef75 Merge pull request #2016 from altatof/3.5
FIX: copy extrafields when creating order from propale and creating
2014-11-22 16:02:13 +01:00
Christophe Battarel
7d8cf99d58 FIX: bad margin and buy_price calculation when total_ht = 0 (discount
100%) on a line
2014-11-19 18:19:27 +01:00
Christophe Battarel
d0dc792b3c check extrafields before inserting in DB 2014-11-17 11:17:45 +01:00
Laurent Destailleur
2aeb0f4f5b Merge pull request #1941 from jfefe/patch-3
Avoid missing class error for fetch_thirdparty method
2014-11-15 12:36:41 +01:00
Christophe Battarel
7ed496d7d9 FIX: copy extrafields when creating order from propale and creating
invoice from order
2014-11-12 17:51:26 +01:00
Laurent Destailleur
606a3f9917 Merge remote-tracking branch 'origin/3.4' into 3.5 2014-11-04 17:54:09 +01:00
Laurent Destailleur
45d57b0492 Merge pull request #1995 from atm-maxime/3.4
Fix : actioncomme report was not filtering by entity...
2014-11-04 17:41:40 +01:00
Maxime Kohlhaas
ccddf0d1be Fix : actioncomme report was not filtering by entity... 2014-10-31 16:56:14 +01:00
Laurent Destailleur
e3041f45ee Update changelog 2014-10-30 18:08:42 +01:00
Laurent Destailleur
aac24c887f Merge pull request #1973 from jfefe/patch-6
Avoid missing class error for fetch_thirdparty method
2014-10-30 18:07:49 +01:00
jfefe
29db45c763 Avoid missing class error for fetch_thirdparty method 2014-10-23 01:15:05 +02:00
Laurent Destailleur
a94f7dc3ad Revert "Add function dolEscapeXML"
This reverts commit 756b1d31ad.
2014-10-16 01:21:33 +02:00
Laurent Destailleur
efa171819a Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5 2014-10-16 01:19:33 +02:00
Laurent Destailleur
756b1d31ad Add function dolEscapeXML 2014-10-16 01:01:30 +02:00
Regis Houssin
104592b349 Fix: wrong function name 2014-10-12 19:08:34 +02:00
Laurent Destailleur
797ab8a150 Merge pull request #1940 from aternatik/fix-cron
Missing reprogramming task into GUI for cron module.
2014-10-12 02:10:09 +02:00
jfefe
6a4468d94e Not need to test if class exists with require_once 2014-10-06 14:18:28 +02:00
jfefe
87fc27c7e6 Avoid missing class error for fetch_thirdparty method 2014-10-06 13:31:01 +02:00
jfefe
fdbf2fb45d Missing reprogramming task into GUI for cron module.
Without this, a new task is never executed (because without datenextrun defined)
2014-10-06 13:28:07 +02:00
Laurent Destailleur
c73f4a14ee Fix: Bad days returned by function 2014-10-05 16:17:09 +02:00
Laurent Destailleur
742d0e37ee Fix: Bad month return by function 2014-10-05 12:54:51 +02:00
Laurent Destailleur
0b2a81f4b8 Merge pull request #1821 from astebert/patch-1
Update bills.lang
2014-08-14 00:09:55 +02:00
astebert
9c7647a7ae Update bills.lang
Ligne 252 : Changement grammatical
- de "Paiements issue de l'acompte"
- en "Paiement issu de l'acompte"
2014-08-12 11:45:11 +02:00
23 changed files with 129 additions and 57 deletions

View File

@@ -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.

View File

@@ -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) ]

View File

@@ -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

View File

@@ -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).

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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";

View File

@@ -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))

View File

@@ -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))

View File

@@ -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] != '')
{ {

View File

@@ -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;

View File

@@ -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);
} }
/** /**

View File

@@ -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);

View File

@@ -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='';
}
} }
} }

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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);

View File

@@ -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";

View File

@@ -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";

View File

@@ -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'];