frappe / lending

Open Source Lending software
GNU General Public License v3.0
81 stars 74 forks source link

error while submit Salary slip, in produce loan #126

Open thirurepo opened 10 months ago

thirurepo commented 10 months ago

Information about bug

while process the salary slip it throws follwoing error - (1054, "Unknown column 'charges_receivable_account' in 'field list'")

I can't see any field in tabLoan Product table, should be the bug ,pls check

Module

Loan Management

Version

Frappe- 15 Leanding

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

sql = b"SELECT `interest_receivable_account`,`suspense_interest_receivable`,`suspense_interest_income`,`interest_income_account`,`charges_receivable_account` FROM `tabLoan Product` WHERE `name`='SEL' ORDER BY `modified` DESC LIMIT 1"
      unbuffered = False
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 822, in _read_query_result
    result.read()
      self = <pymysql.connections.Connection object at 0x7f553296cd60>
      unbuffered = False
      result = <pymysql.connections.MySQLResult object at 0x7f5533ce1e70>
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1200, in read
    first_packet = self.connection._read_packet()
      self = <pymysql.connections.MySQLResult object at 0x7f5533ce1e70>
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 772, in _read_packet
    packet.raise_for_error()
      self = <pymysql.connections.Connection object at 0x7f553296cd60>
      packet_type = <class 'pymysql.protocol.MysqlPacket'>
      buff = bytearray(b"\xff\x1e\x04#42S22Unknown column \'charges_receivable_account\' in \'field list\'")
      packet_header = b'D\x00\x00\x01'
      btrl = 68
      btrh = 0
      packet_number = 1
      bytes_to_read = 68
      recv_data = b"\xff\x1e\x04#42S22Unknown column 'charges_receivable_account' in 'field list'"
      packet = <pymysql.protocol.MysqlPacket object at 0x7f5530fd4190>
  File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
      self = <pymysql.protocol.MysqlPacket object at 0x7f5530fd4190>
      errno = 1054
  File "env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
      data = b"\xff\x1e\x04#42S22Unknown column 'charges_receivable_account' in 'field list'"
      errno = 1054
      errval = "Unknown column 'charges_receivable_account' in 'field list'"
      errorclass = <class 'pymysql.err.OperationalError'>
pymysql.err.OperationalError: (1054, "Unknown column 'charges_receivable_account' in 'field list'")

Code of Conduct

shahns commented 10 months ago

I am also facing same issue while submitting loan repayment document.

thirurepo commented 10 months ago

i fixed it by adding the field 'charges_receivable_account' in the table 'tabLoan'

shahns commented 10 months ago

i fixed it by adding the field 'charges_receivable_account' in the table 'tabLoan'

Yes. That would solve the problem, but I'm not quite sure if that's the best approach.

HoFaks commented 10 months ago

I am also facing same issue while submitting salery slip and made this as temporary solution

ALTER TABLE tabLoan Product ADD charges_receivable_account varchar(140) DEFAULT NULL NULL;