Added cost import via web

This commit is contained in:
Deon George
2022-08-19 15:12:56 +10:00
parent 798608cebd
commit 73d92f25c1
9 changed files with 111 additions and 17 deletions

View File

@@ -31,6 +31,9 @@ class ImportCosts extends Command
*/
public function handle()
{
if (! str_starts_with($this->argument('file'),'storage/app/'))
throw new \Exception('Filename must start with storage/app/');
Job::dispatchSync(
Site::findOrFail($this->argument('siteid')),
Supplier::where('name',$this->argument('supplier'))->singleOrFail(),