Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
17c857d1
authored
Nov 24, 2022
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
订单修改
parent
64aaa7e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
app/Admin/Service/OrderService.php
app/Admin/Service/OrderService.php
View file @
17c857d1
...
...
@@ -103,6 +103,9 @@ class OrderService extends BaseService
//修改订单明细数量价格
public
static
function
editOrderItems
(
$order_id
,
$orderItems
,
$order_remark
){
if
(
!
is_array
(
$orderItems
)){
$orderItems
=
json_decode
(
$orderItems
,
true
);
}
(
new
self
)
->
startTransaction
();
try
{
// $orderItemids = Arr::pluck($orderItems,"order_items_id");
...
...
@@ -125,8 +128,10 @@ class OrderService extends BaseService
"rec_id"
=>
$orderItem
[
"order_items_id"
],
"return_num"
=>
$orderItem
[
"return_goods_number"
],
"return_price"
=>
$orderItem
[
"return_goods_price"
],
"return_amount"
=>
decimal_number_format
(
$orderItem
[
"return_goods_number"
]
*
$orderItem
[
"return_goods_price"
]),
"return_amount"
=>
$orderItem
[
"return_amount"
],
// "return_amount"=> decimal_number_format($orderItem["return_goods_number"] * $orderItem["return_goods_price"]),
];
$createOrEdit
=
false
;
if
(
!
empty
(
$returnItems
)){
...
...
@@ -150,6 +155,9 @@ class OrderService extends BaseService
}
}
if
(
$createOrEdit
){
$insertReturnItemData
[
"return_amount"
]
=
decimal_number_format
(
$orderItem
[
"return_goods_number"
]
*
$orderItem
[
"return_goods_price"
]);
}
$createOrEdit
&&
OrderReturnItems
::
create
(
array_merge
(
$insertReturnItemData
,[
"create_time"
=>
time
()]));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment