mirror of
https://github.com/frappe/books.git
synced 2024-11-08 23:00:56 +00:00
Conditional fixes
This commit is contained in:
parent
b4c6faae17
commit
93540b35fd
@ -48,7 +48,7 @@ class BaseGSTR {
|
||||
row.rate = 0;
|
||||
row.inState = true;
|
||||
row.reverseCharge = !party.gstin ? 'Y' : 'N';
|
||||
ledgerEntry.taxes.forEach(tax => {
|
||||
ledgerEntry.taxes && ledgerEntry.taxes.forEach(tax => {
|
||||
row.rate += tax.rate;
|
||||
const taxAmt = (tax.rate * ledgerEntry.netTotal) / 100;
|
||||
if (tax.account === 'IGST') row.igstAmt = taxAmt;
|
||||
|
@ -14,10 +14,10 @@ class GSTR1 extends BaseGSTR {
|
||||
const data = await this.getCompleteReport('GSTR-1', filters);
|
||||
|
||||
const conditions = {
|
||||
B2B: row => row.gstin,
|
||||
'B2B': row => row.gstin,
|
||||
'B2C-Large': row => !row.gstin && !row.inState && row.invAmt >= 250000,
|
||||
'B2C-Small': row =>
|
||||
!row.gstin && (row.inState || (row.inState && row.invAmt < 250000))
|
||||
'B2C-Small': row => !row.gstin && (row.inState || (row.inState && row.invAmt < 250000)),
|
||||
'Nil Rated, Exempted and Non GST supplies': row => row
|
||||
};
|
||||
|
||||
if (!params.transferType) return data;
|
||||
|
Loading…
Reference in New Issue
Block a user