mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-17 00:38:40 +00:00
fix bugs
This commit is contained in:
parent
548a4aab7b
commit
f5950c180d
|
|
@ -57,12 +57,13 @@ class WarehouseManagement
|
||||||
throw new \Exception('Couldn\'t parse mapper');
|
throw new \Exception('Couldn\'t parse mapper');
|
||||||
}
|
}
|
||||||
|
|
||||||
$mapper = \str_replace([
|
// @todo removed until modular mapper extension is implemented
|
||||||
'// @Module WarehouseManagement ',
|
// $mapper = \str_replace([
|
||||||
'/* @Module WarehouseManagement ',
|
// '// @Module WarehouseManagement ',
|
||||||
' @Module WarehouseManagement */',
|
// '/* @Module WarehouseManagement ',
|
||||||
], '', $mapper);
|
// ' @Module WarehouseManagement */',
|
||||||
\file_put_contents(__DIR__ . '/../../Models/BillMapper.php', $mapper);
|
// ], '', $mapper);
|
||||||
|
// \file_put_contents(__DIR__ . '/../../Models/BillMapper.php', $mapper);
|
||||||
|
|
||||||
Autoloader::invalidate(__DIR__ . '/../../Models/BillMapper.php');
|
Autoloader::invalidate(__DIR__ . '/../../Models/BillMapper.php');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ use Modules\Billing\Models\BillMapper;
|
||||||
use Modules\Billing\Models\BillTypeMapper;
|
use Modules\Billing\Models\BillTypeMapper;
|
||||||
use Modules\Billing\Models\InvoiceRecognition;
|
use Modules\Billing\Models\InvoiceRecognition;
|
||||||
use Modules\Billing\Models\NullBillType;
|
use Modules\Billing\Models\NullBillType;
|
||||||
|
use Modules\Billing\Models\Price\PriceMapper;
|
||||||
|
use Modules\ItemManagement\Models\Item;
|
||||||
use Modules\ItemManagement\Models\NullItem;
|
use Modules\ItemManagement\Models\NullItem;
|
||||||
use Modules\Payment\Models\PaymentType;
|
use Modules\Payment\Models\PaymentType;
|
||||||
use Modules\SupplierManagement\Models\NullSupplier;
|
use Modules\SupplierManagement\Models\NullSupplier;
|
||||||
|
|
@ -126,7 +128,7 @@ final class CliController extends Controller
|
||||||
->where('attributes/type/name', ['bill_match_pattern', 'bill_date_format'], 'IN')
|
->where('attributes/type/name', ['bill_match_pattern', 'bill_date_format'], 'IN')
|
||||||
->executeGetArray();
|
->executeGetArray();
|
||||||
|
|
||||||
$bill->supplier = this->matchSupplier($content, $suppliers);
|
$bill->supplier = $this->matchSupplier($content, $suppliers);
|
||||||
|
|
||||||
if ($bill->supplier->id !== 0) {
|
if ($bill->supplier->id !== 0) {
|
||||||
$bill->billTo = $bill->supplier->account->name1;
|
$bill->billTo = $bill->supplier->account->name1;
|
||||||
|
|
@ -251,8 +253,9 @@ final class CliController extends Controller
|
||||||
->with('item')
|
->with('item')
|
||||||
->with('item/l11n')
|
->with('item/l11n')
|
||||||
->where('supplier', $bill->supplier->id)
|
->where('supplier', $bill->supplier->id)
|
||||||
|
->executeGetArray();
|
||||||
|
|
||||||
$item = $this->matchItem($content, $items);
|
$item = $this->matchItem($content, $possibleItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item->id !== 0) {
|
if ($item->id !== 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user