mirror of
https://github.com/Karaka-Management/oms-WarehouseManagement.git
synced 2026-01-11 15:18:41 +00:00
fix tests
This commit is contained in:
parent
36ff0332b2
commit
cb566e554f
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
|
|
@ -1,6 +1,16 @@
|
|||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
schedule:
|
||||
- cron: '0 0 1,15 * *'
|
||||
|
||||
jobs:
|
||||
general_module_workflow:
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ final class ApiController extends Controller
|
|||
}
|
||||
|
||||
// @todo: check if old element existex -> removed/changed item
|
||||
// @todo: we cannot have transaction->to and transaction->from be the id of client/supplier because the IDs can overlap
|
||||
|
||||
$transaction = new StockMovement();
|
||||
|
||||
|
|
@ -152,9 +153,9 @@ final class ApiController extends Controller
|
|||
|
||||
// Handle to
|
||||
if (($bill->client?->id ?? 0) !== 0) {
|
||||
$transaction->to = $bill->client->number;
|
||||
$transaction->to = $bill->client->id;
|
||||
} elseif (($bill->supplier?->id ?? 0) !== 0) {
|
||||
$transaction->to = $bill->supplier->number;
|
||||
$transaction->to = $bill->supplier->id;
|
||||
}
|
||||
|
||||
if ($bill->type->transferType === BillTransferType::SALES) {
|
||||
|
|
@ -165,9 +166,9 @@ final class ApiController extends Controller
|
|||
} else {
|
||||
// Handle from
|
||||
if (($bill->client?->id ?? 0) !== 0) {
|
||||
$transaction->from = $bill->client->number;
|
||||
$transaction->from = $bill->client->id;
|
||||
} elseif (($bill->supplier?->id ?? 0) !== 0) {
|
||||
$transaction->from = $bill->supplier->number;
|
||||
$transaction->from = $bill->supplier->id;
|
||||
}
|
||||
|
||||
// Handle to
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user