From b980fd7fc4a91cb752ba6aba3b191ecc2188f2b9 Mon Sep 17 00:00:00 2001 From: Myat Zin Wai Maw Date: Mon, 3 Feb 2020 17:23:24 +0630 Subject: [PATCH] old balance in receipt --- Gemfile.lock | 5 ++++- app/models/sale_audit.rb | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 50647fba..f56a2d36 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -351,7 +351,7 @@ DEPENDENCIES material_icons mini_magick momentjs-rails - mysql2 + mysql2 (~> 0.5.2) nested_form pdfjs_viewer-rails pg @@ -380,5 +380,8 @@ DEPENDENCIES web-console (>= 3.3.0) whenever +RUBY VERSION + ruby 2.6.5p114 + BUNDLED WITH 2.0.2 diff --git a/app/models/sale_audit.rb b/app/models/sale_audit.rb index 5aa42545..e566182a 100755 --- a/app/models/sale_audit.rb +++ b/app/models/sale_audit.rb @@ -142,8 +142,8 @@ class SaleAudit < ApplicationRecord if paymal[0] remark = paymal[0].remark.split("}") response = "["+remark[0]+'}]' - # response = JSON.parse(response) - puts response + response = JSON.parse(response) + # puts response if response[0]["status"] == true if response[0]["current_rebate_amount"].present? amount = response[0]["current_rebate_amount"]