akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@@ -1,33 +0,0 @@
<?php
namespace App\Imports\Purchases;
use App\Abstracts\Import;
use App\Http\Requests\Banking\Transaction as Request;
use App\Models\Banking\Transaction as Model;
class Payments extends Import
{
public function model(array $row)
{
return new Model($row);
}
public function map($row): array
{
$row = parent::map($row);
$row['type'] = 'expense';
$row['account_id'] = $this->getAccountId($row);
$row['category_id'] = $this->getCategoryId($row, 'expense');
$row['contact_id'] = $this->getContactId($row, 'vendor');
$row['document_id'] = $this->getDocumentId($row);
return $row;
}
public function rules(): array
{
return (new Request())->rules();
}
}

View File

@@ -26,6 +26,7 @@ class BillTransactions extends Import
$row['category_id'] = $this->getCategoryId($row, 'expense');
$row['contact_id'] = $this->getContactId($row, 'vendor');
$row['document_id'] = $this->getDocumentId($row);
$row['number'] = $row['transaction_number'];
return $row;
}