Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shotengai
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
shotengai
Commits
326c0cb3
Commit
326c0cb3
authored
Oct 09, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix callback
parent
98793756
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
order.rb
lib/shotengai/order.rb
+5
-6
No files found.
lib/shotengai/order.rb
View file @
326c0cb3
...
...
@@ -94,20 +94,19 @@ module Shotengai
end
def
set_pay_time
self
.
pay_time
=
Time
.
now
self
.
update!
(
pay_time:
Time
.
now
)
end
def
set_delivery_time
self
.
delivery_time
=
Time
.
now
update!
(
delivery_time:
Time
.
now
)
end
def
set_receipt_time
self
.
receipt_time
=
Time
.
now
update!
(
receipt_time:
Time
.
now
)
end
def
set_seq
# self.update_without_callbacks!(seq: create_seq)
self
.
seq
=
create_seq
self
.
update!
(
seq:
create_seq
)
end
def
create_seq
...
...
@@ -118,7 +117,7 @@ module Shotengai
end
def
set_amount
self
.
amount
=
(
product_amount
+
delivery_cost
).
round
(
2
)
self
.
update!
(
amount:
(
product_amount
+
delivery_cost
).
round
(
2
)
)
end
def
amount
...
...
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