create paymal payment for cashier app

This commit is contained in:
Thein Lin Kyaw
2022-05-11 11:52:37 +06:30
parent 0231c7e60f
commit 7598a96e60
4 changed files with 87 additions and 20 deletions

View File

@@ -165,7 +165,7 @@ class SalePayment < ApplicationRecord
remark = "Payment failed - Grand Total [#{invoice.grand_total}] | Due [#{amount_due}] | Paid [#{invoice.amount_received}]"
sale_audit = SaleAudit.record_payment(invoice.id, remark,action_by.name)
# return false, "Payment failed"
return false, self.save,membership_data
return false, self.save, membership_data
end
else
sale_update_payment_status(0)

View File

@@ -35,6 +35,10 @@ class SaleTax < ApplicationRecord
.group("sale_taxes.tax_name")
end
def display_name
"#{self.tax_name} (#{'Incl. ' if self.tax_type == 'inclusive'}#{self.tax_rate}%"
end
private
def generate_custom_id
if self.sale_tax_id.nil?