mirror of
https://github.com/Karaka-Management/oms-WarehouseManagement.git
synced 2026-01-11 15:18:41 +00:00
bug fixes
This commit is contained in:
parent
82e4ca1024
commit
12e282057e
|
|
@ -103,8 +103,8 @@ final class Installer extends InstallerAbstract
|
|||
/** @var \Modules\WarehouseManagement\Controller\ApiStockTypeController $module */
|
||||
$module = $app->moduleManager->getModuleInstance('WarehouseManagement', 'ApiStockType');
|
||||
|
||||
// @todo: allow multiple alternative stock templates
|
||||
// @todo: implement ordering of templates
|
||||
// @todo allow multiple alternative stock templates
|
||||
// @todo implement ordering of templates
|
||||
|
||||
foreach ($types as $type) {
|
||||
$response = new HttpResponse();
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ final class ApiController extends Controller
|
|||
return;
|
||||
}
|
||||
|
||||
// @todo: check if old element existed -> removed/changed item
|
||||
// @todo: we cannot have transaction->to and transaction->from be the id of client/supplier because the IDs can overlap
|
||||
// @todo check if old element existed -> 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();
|
||||
|
||||
|
|
@ -137,27 +137,27 @@ final class ApiController extends Controller
|
|||
$transaction->billElement = $new->id;
|
||||
$transaction->state = StockMovementState::DRAFT;
|
||||
|
||||
// @todo: load default stock movement for bill type/organization settings (default stock location, default lot order e.g. FIFO/LIFO)
|
||||
// @todo: find stock candidates
|
||||
// @todo load default stock movement for bill type/organization settings (default stock location, default lot order e.g. FIFO/LIFO)
|
||||
// @todo find stock candidates
|
||||
|
||||
$transaction->type = StockMovementType::TRANSFER; // @todo: depends on bill type
|
||||
$transaction->type = StockMovementType::TRANSFER; // @todo depends on bill type
|
||||
$transaction->quantity = $new->getQuantity(); // @todo may require split quantity if not sufficient available from one lost
|
||||
|
||||
// @todo: allow consignment bills
|
||||
// @todo: allow to pass stocklocation for entire bill to avoid re-defining it
|
||||
// @todo allow consignment bills
|
||||
// @todo allow to pass stocklocation for entire bill to avoid re-defining it
|
||||
|
||||
// @todo: allow custom stock location
|
||||
// @todo allow custom stock location
|
||||
if ($bill->type->sign > 0) {
|
||||
// Handle from
|
||||
// @todo: find possible candidate based on defined default stock for bill type/org/location
|
||||
// @todo find possible candidate based on defined default stock for bill type/org/location
|
||||
|
||||
// Handle to
|
||||
if (($bill->client?->id ?? 0) !== 0) {
|
||||
// @todo: remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
// @todo remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
/** @phpstan-ignore-next-line */
|
||||
$transaction->to = $bill->client->id;
|
||||
} elseif (($bill->supplier?->id ?? 0) !== 0) {
|
||||
// @todo: remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
// @todo remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
/** @phpstan-ignore-next-line */
|
||||
$transaction->to = $bill->supplier->id;
|
||||
}
|
||||
|
|
@ -170,17 +170,17 @@ final class ApiController extends Controller
|
|||
} else {
|
||||
// Handle from
|
||||
if (($bill->client?->id ?? 0) !== 0) {
|
||||
// @todo: remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
// @todo remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
/** @phpstan-ignore-next-line */
|
||||
$transaction->from = $bill->client->id;
|
||||
} elseif (($bill->supplier?->id ?? 0) !== 0) {
|
||||
// @todo: remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
// @todo remove phpstan this is just a bug fix until phpstan fixes this bug
|
||||
/** @phpstan-ignore-next-line */
|
||||
$transaction->from = $bill->supplier->id;
|
||||
}
|
||||
|
||||
// Handle to
|
||||
// @todo: find possible candidate based on defined default stock for bill type/org/location
|
||||
// @todo find possible candidate based on defined default stock for bill type/org/location
|
||||
|
||||
if ($bill->type->transferType === BillTransferType::SALES
|
||||
|| $bill->type->transferType === BillTransferType::PURCHASE
|
||||
|
|
@ -247,7 +247,7 @@ final class ApiController extends Controller
|
|||
->execute();
|
||||
|
||||
StockMovementMapper::delete()->execute($transactions);
|
||||
// @todo: consider not to delete but mark as deleted?
|
||||
// @todo consider not to delete but mark as deleted?
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -278,7 +278,7 @@ final class ApiController extends Controller
|
|||
->execute();
|
||||
|
||||
foreach ($transactions as $transaction) {
|
||||
$transaction->state = StockMovementState::TRANSIT; // @todo: change to more specific
|
||||
$transaction->state = StockMovementState::TRANSIT; // @todo change to more specific
|
||||
|
||||
StockMovementMapper::update()->execute($transaction);
|
||||
}
|
||||
|
|
|
|||
2
ICAL.txt
2
ICAL.txt
|
|
@ -1,6 +1,6 @@
|
|||
# Individual Contributor License Agreement ("CLA") 1.0
|
||||
|
||||
Thank you for your interest in Karaka-Management (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must provide a Contributor License Agreement ("CLA") on file that has been made available to each Contributor. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
|
||||
Thank you for your interest in Jingga e. K. (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must provide a Contributor License Agreement ("CLA") on file that has been made available to each Contributor. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
|
||||
|
||||
By contributing to the Company You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\WarehouseManagement\Models;
|
||||
|
||||
use Modules\Admin\Models\Address;
|
||||
use phpOMS\Stdlib\Base\Address;
|
||||
|
||||
/**
|
||||
* Warehouse class.
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ abstract class StockMovementType extends Enum
|
|||
|
||||
public const TRANSFER = 16;
|
||||
|
||||
// @todo: subtypes, maybe creates as database subtypes during install.
|
||||
// @todo subtypes, maybe creates as database subtypes during install.
|
||||
public const DESTROY = 101;
|
||||
|
||||
public const RETURN = 102;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user