mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
fix: setPaymentReferenceType patch for payments for versions >0.18 <0.20
This commit is contained in:
parent
27d67a33e5
commit
dcbfa9f1c5
@ -2,7 +2,10 @@ import { DatabaseManager } from '../database/manager';
|
||||
|
||||
async function execute(dm: DatabaseManager) {
|
||||
await dm.db!.knex!('Payment')
|
||||
.where({ referenceType: null })
|
||||
.where({ referenceType: null, paymentType: 'Pay' })
|
||||
.update({ referenceType: 'PurchaseInvoice' });
|
||||
await dm.db!.knex!('Payment')
|
||||
.where({ referenceType: null, paymentType: 'Receive' })
|
||||
.update({ referenceType: 'SalesInvoice' });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user