Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
3255e05b
Commit
3255e05b
authored
Apr 11, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 玖姿问题
parent
1f6dd5e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
roke_product_income_expense/controller/main.py
+3
-3
roke_product_income_expense/models/product_income_expense.py
+2
-2
No files found.
roke_product_income_expense/controller/main.py
View file @
3255e05b
...
@@ -73,10 +73,10 @@ class ProductIncomeExpenseIframe(http.Controller):
...
@@ -73,10 +73,10 @@ class ProductIncomeExpenseIframe(http.Controller):
"business_date"
:
v
.
business_date
and
v
.
business_date
.
strftime
(
'
%
Y-
%
m-
%
d'
),
"business_date"
:
v
.
business_date
and
v
.
business_date
.
strftime
(
'
%
Y-
%
m-
%
d'
),
"abstract"
:
v
.
abstract
or
""
,
"abstract"
:
v
.
abstract
or
""
,
"customer"
:
v
.
customer
or
""
,
"customer"
:
v
.
customer
or
""
,
"income"
:
v
.
income
or
0
,
"income"
:
round
(
v
.
income
,
2
)
or
0
,
"machinery_type"
:
v
.
machinery_type
or
"其他"
,
"machinery_type"
:
v
.
machinery_type
or
"其他"
,
"expenditure"
:
v
.
expenditure
or
0
,
"expenditure"
:
round
(
v
.
expenditure
)
or
0
,
"balance"
:
v
.
balance
or
0
,
"balance"
:
round
(
v
.
balance
,
2
)
or
0
,
"user_name"
:
v
.
create_uid
.
name
or
""
,
"user_name"
:
v
.
create_uid
.
name
or
""
,
"create_date"
:
(
v
.
create_date
+
datetime
.
timedelta
(
hours
=
8
))
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M'
),
"create_date"
:
(
v
.
create_date
+
datetime
.
timedelta
(
hours
=
8
))
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M'
),
})
})
...
...
roke_product_income_expense/models/product_income_expense.py
View file @
3255e05b
...
@@ -31,6 +31,6 @@ class ProductIncomeExpense(models.Model):
...
@@ -31,6 +31,6 @@ class ProductIncomeExpense(models.Model):
(
"id"
,
"!="
,
v
.
id
)
(
"id"
,
"!="
,
v
.
id
)
],
limit
=
1
,
order
=
"business_date desc, create_date desc"
)
],
limit
=
1
,
order
=
"business_date desc, create_date desc"
)
if
not
last_data
:
if
not
last_data
:
v
.
balance
=
0
+
v
.
income
-
v
.
expenditure
v
.
balance
=
round
(
0
+
v
.
income
-
v
.
expenditure
,
2
)
else
:
else
:
v
.
balance
=
last_data
.
balance
+
v
.
income
-
v
.
expenditure
v
.
balance
=
round
(
last_data
.
balance
+
v
.
income
-
v
.
expenditure
,
2
)
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