old balance in receipt

This commit is contained in:
Myat Zin Wai Maw
2020-02-03 17:23:24 +06:30
parent 8f2e50594f
commit b980fd7fc4
2 changed files with 6 additions and 3 deletions

View File

@@ -351,7 +351,7 @@ DEPENDENCIES
material_icons material_icons
mini_magick mini_magick
momentjs-rails momentjs-rails
mysql2 mysql2 (~> 0.5.2)
nested_form nested_form
pdfjs_viewer-rails pdfjs_viewer-rails
pg pg
@@ -380,5 +380,8 @@ DEPENDENCIES
web-console (>= 3.3.0) web-console (>= 3.3.0)
whenever whenever
RUBY VERSION
ruby 2.6.5p114
BUNDLED WITH BUNDLED WITH
2.0.2 2.0.2

View File

@@ -142,8 +142,8 @@ class SaleAudit < ApplicationRecord
if paymal[0] if paymal[0]
remark = paymal[0].remark.split("}") remark = paymal[0].remark.split("}")
response = "["+remark[0]+'}]' response = "["+remark[0]+'}]'
# response = JSON.parse(response) response = JSON.parse(response)
puts response # puts response
if response[0]["status"] == true if response[0]["status"] == true
if response[0]["current_rebate_amount"].present? if response[0]["current_rebate_amount"].present?
amount = response[0]["current_rebate_amount"] amount = response[0]["current_rebate_amount"]