chore: update document approval workflow and bug fixes
This commit is contained in:
11
test_po.php
Normal file
11
test_po.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
$c = \Modules\ApprovalWorkflow\Models\ApprovalChain::where('approvable_type', \Modules\MaterialLogistics\Models\PurchaseOrder::class)->first();
|
||||
if ($c) {
|
||||
if (method_exists($c->approvable, 'items')) {
|
||||
$c->approvable->load('items');
|
||||
$c->approvable->append('total_cost');
|
||||
}
|
||||
echo json_encode($c->approvable->toArray(), JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
echo "No PO found.";
|
||||
}
|
||||
Reference in New Issue
Block a user