Merge Invoice and Bill into Document

This commit is contained in:
Burak Çakırel
2020-12-24 01:28:38 +03:00
parent 830cc05957
commit 0c1424db47
436 changed files with 31655 additions and 37350 deletions

View File

@@ -1,34 +0,0 @@
<?php
namespace App\Imports\Purchases\Sheets;
use App\Abstracts\Import;
use App\Models\Purchase\Bill as Model;
use App\Http\Requests\Purchase\Bill as Request;
class Bills extends Import
{
public function model(array $row)
{
return new Model($row);
}
public function map($row): array
{
if ($this->isEmpty($row, 'bill_number')) {
return [];
}
$row = parent::map($row);
$row['category_id'] = $this->getCategoryId($row, 'expense');
$row['contact_id'] = $this->getContactId($row, 'vendor');
return $row;
}
public function rules(): array
{
return (new Request())->rules();
}
}