diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php index b2125c848..b25c51e7b 100755 --- a/modules/dashboard/edit.php +++ b/modules/dashboard/edit.php @@ -590,12 +590,14 @@ echo ' // let event = info.event; if (event.allDay !== true) { + let start = event.start; + let end = (event.end!=null ? event.end : event.start); $.post(globals.dashboard.load_url, { op: "modifica_intervento", id: event.id, idintervento: event.idintervento, - timeStart: moment(event.start).format("YYYY-MM-DD HH:mm"), - timeEnd: moment(event.end).format("YYYY-MM-DD HH:mm") + timeStart: moment(start).format("YYYY-MM-DD HH:mm"), + timeEnd: moment(end).format("YYYY-MM-DD HH:mm") }, function (data, responseType) { data = $.trim(data); @@ -616,13 +618,14 @@ echo ' }, eventResize: function (event, delta, revertFunc) { // info // let event = info.event; - + let start = event.start; + let end = (event.end!=null ? event.end : event.start); $.post(globals.dashboard.load_url, { op: "modifica_intervento", id: event.id, idintervento: event.idintervento, - timeStart: moment(event.start).format("YYYY-MM-DD HH:mm"), - timeEnd: moment(event.end).format("YYYY-MM-DD HH:mm") + timeStart: moment(start).format("YYYY-MM-DD HH:mm"), + timeEnd: moment(end).format("YYYY-MM-DD HH:mm") }, function (data, responseType) { data = $.trim(data); diff --git a/src/Common/Document.php b/src/Common/Document.php index 2e7ae39da..321176405 100755 --- a/src/Common/Document.php +++ b/src/Common/Document.php @@ -299,7 +299,7 @@ abstract class Document extends Model implements ReferenceInterface, DocumentInt public function getScontoFinale() { if (!empty($this->sconto_finale_percentuale)) { - $netto = $this->totale - $this->ritenuta_acconto - $this->ritenuta_contributi; + $netto = $this->totale - $this->ritenuta_acconto - $this->totale_ritenuta_contributi; if ($this->split_payment) { $netto = $netto - $this->iva; } @@ -319,7 +319,7 @@ abstract class Document extends Model implements ReferenceInterface, DocumentInt */ public function getNettoAttribute() { - $netto = $this->totale - $this->ritenuta_acconto - $this->ritenuta_contributi; + $netto = $this->totale - $this->ritenuta_acconto - $this->totale_ritenuta_contributi; if ($this->split_payment) { $netto = $netto - $this->iva; }