This commit is contained in:
Luca 2022-06-15 18:33:44 +02:00
commit 7913d2e071
2 changed files with 10 additions and 7 deletions

View File

@ -590,12 +590,14 @@ echo '
// let event = info.event; // let event = info.event;
if (event.allDay !== true) { if (event.allDay !== true) {
let start = event.start;
let end = (event.end!=null ? event.end : event.start);
$.post(globals.dashboard.load_url, { $.post(globals.dashboard.load_url, {
op: "modifica_intervento", op: "modifica_intervento",
id: event.id, id: event.id,
idintervento: event.idintervento, idintervento: event.idintervento,
timeStart: moment(event.start).format("YYYY-MM-DD HH:mm"), timeStart: moment(start).format("YYYY-MM-DD HH:mm"),
timeEnd: moment(event.end).format("YYYY-MM-DD HH:mm") timeEnd: moment(end).format("YYYY-MM-DD HH:mm")
}, function (data, responseType) { }, function (data, responseType) {
data = $.trim(data); data = $.trim(data);
@ -616,13 +618,14 @@ echo '
}, },
eventResize: function (event, delta, revertFunc) { // info eventResize: function (event, delta, revertFunc) { // info
// let event = info.event; // let event = info.event;
let start = event.start;
let end = (event.end!=null ? event.end : event.start);
$.post(globals.dashboard.load_url, { $.post(globals.dashboard.load_url, {
op: "modifica_intervento", op: "modifica_intervento",
id: event.id, id: event.id,
idintervento: event.idintervento, idintervento: event.idintervento,
timeStart: moment(event.start).format("YYYY-MM-DD HH:mm"), timeStart: moment(start).format("YYYY-MM-DD HH:mm"),
timeEnd: moment(event.end).format("YYYY-MM-DD HH:mm") timeEnd: moment(end).format("YYYY-MM-DD HH:mm")
}, function (data, responseType) { }, function (data, responseType) {
data = $.trim(data); data = $.trim(data);

View File

@ -299,7 +299,7 @@ abstract class Document extends Model implements ReferenceInterface, DocumentInt
public function getScontoFinale() public function getScontoFinale()
{ {
if (!empty($this->sconto_finale_percentuale)) { 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) { if ($this->split_payment) {
$netto = $netto - $this->iva; $netto = $netto - $this->iva;
} }
@ -319,7 +319,7 @@ abstract class Document extends Model implements ReferenceInterface, DocumentInt
*/ */
public function getNettoAttribute() 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) { if ($this->split_payment) {
$netto = $netto - $this->iva; $netto = $netto - $this->iva;
} }