Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
7cafff7a09
@ -78,7 +78,7 @@ if ($tmp) {
|
|||||||
*/
|
*/
|
||||||
if (!empty($conf->propal->enabled)) {
|
if (!empty($conf->propal->enabled)) {
|
||||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc";
|
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc";
|
||||||
$sql .= ", s.rowid as socid, s.nom as name, s.client, s.canvas, s.code_client, s.email, s.entity, s.code_compta";
|
$sql .= ", s.rowid as socid, s.nom as name, s.client, s.canvas, s.code_client, s.code_fournisseur, s.email, s.entity, s.code_compta";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (empty($user->rights->societe->client->voir) && !$socid) {
|
if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||||
|
|||||||
@ -2069,6 +2069,7 @@ class ExpenseReport extends CommonObject
|
|||||||
if ($this->status == self::STATUS_DRAFT || $this->status == self::STATUS_REFUSED) {
|
if ($this->status == self::STATUS_DRAFT || $this->status == self::STATUS_REFUSED) {
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
$error = 0;
|
||||||
$type = 0; // TODO What if type is service ?
|
$type = 0; // TODO What if type is service ?
|
||||||
|
|
||||||
// We don't know seller and buyer for expense reports
|
// We don't know seller and buyer for expense reports
|
||||||
@ -2152,10 +2153,13 @@ class ExpenseReport extends CommonObject
|
|||||||
|
|
||||||
$this->applyOffset();
|
$this->applyOffset();
|
||||||
$this->checkRules();
|
$this->checkRules();
|
||||||
$error = 0;
|
|
||||||
$result = $this->line->update($user);
|
|
||||||
|
|
||||||
if ($result > 0 && !$notrigger) {
|
$result = $this->line->update($user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error && !$notrigger) {
|
||||||
// Call triggers
|
// Call triggers
|
||||||
$result = $this->call_trigger('EXPENSE_REPORT_DET_MODIFY', $user);
|
$result = $this->call_trigger('EXPENSE_REPORT_DET_MODIFY', $user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -2164,7 +2168,7 @@ class ExpenseReport extends CommonObject
|
|||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result > 0 && $error == 0) {
|
if (!$error) {
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user