bills import/export
This commit is contained in:
@ -18,12 +18,20 @@ class BillTransactions extends Import
|
||||
$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();
|
||||
$rules = (new Request())->rules();
|
||||
|
||||
$rules['bill_number'] = 'required|string';
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user