|
|
@@ -123,7 +123,7 @@ class RecordOUT extends Component
|
|
|
$this->payment_method_id = null;
|
|
|
$this->date = date("Y-m-d");
|
|
|
$this->data_pagamento = date("Y-m-d");
|
|
|
-
|
|
|
+ //$this->attachment = null;
|
|
|
//$this->month = date("n");
|
|
|
//$this->year = date("Y");
|
|
|
$this->type = 'OUT';
|
|
|
@@ -377,6 +377,12 @@ class RecordOUT extends Component
|
|
|
public function store()
|
|
|
{
|
|
|
$this->emit('refresh');
|
|
|
+/*
|
|
|
+ if ($this->attachment) {
|
|
|
+ Log::info("Attachment: " . json_encode($this->attachment));
|
|
|
+ $name = md5($this->attachment . microtime()) . '.' . $this->attachment->extension();
|
|
|
+ $this->attachment->storeAs('public', $name);
|
|
|
+ } */
|
|
|
|
|
|
$this->validate();
|
|
|
try {
|
|
|
@@ -390,6 +396,7 @@ class RecordOUT extends Component
|
|
|
//'month' => $this->month,
|
|
|
//'year' => $this->year,
|
|
|
//'note' => $this->note,
|
|
|
+ //'attachment' => $this->attachment,
|
|
|
'type' => $this->type,
|
|
|
'amount' => $this->currencyToDouble($this->amount),
|
|
|
'commercial' => $this->commercial,
|
|
|
@@ -452,6 +459,7 @@ class RecordOUT extends Component
|
|
|
//$this->year = $record->year;
|
|
|
//$this->note = $record->note;
|
|
|
$this->type = $record->type;
|
|
|
+ //$attachment = $record->attachment;
|
|
|
//$this->amount = formatPrice($record->amount);
|
|
|
$this->commercial = $record->commercial;
|
|
|
$this->dataId = $record->id;
|
|
|
@@ -493,7 +501,6 @@ class RecordOUT extends Component
|
|
|
{
|
|
|
$this->emit('refresh');
|
|
|
$this->validate();
|
|
|
- Log::info("Rows: pipo");
|
|
|
|
|
|
try {
|
|
|
\App\Models\Record::whereId($this->dataId)->update([
|
|
|
@@ -504,6 +511,7 @@ class RecordOUT extends Component
|
|
|
'data_pagamento' => $this->data_pagamento,
|
|
|
'type' => $this->type,
|
|
|
'commercial' => $this->commercial,
|
|
|
+ //'attachment' => $this->attachment,
|
|
|
]);
|
|
|
|
|
|
$tot = 0;
|