Commit c89b293b authored by Krishnakant Mane's avatar Krishnakant Mane Committed by Prajkta_Patkar
Browse files

final changes to voucher number auto generation code.

parent 6b605eb6
......@@ -72,6 +72,7 @@ class api_transaction(object):
Generates a new vouchernumber based on vouchertype and max count for that type.
initialType = ""
if voucherType == "Journal":
initialType = "jr"
if voucherType == "Contra":
......@@ -100,12 +101,14 @@ class api_transaction(object):
vchCodeResult = self.con.execute("select max(vouchercode) as vcode from vouchers")
vchCode = vchCodeResult.fetchone()
initialType = initialType + str(vchCode)
initialType = initialType + str(vchCode["vcode"])
return initialType
def addVoucher(self):
adds a new voucher for given organisation and returns success as gkstatus if adding is successful.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment