mirror of
https://github.com/frappe/books.git
synced 2026-08-24 10:04:45 -05:00
fix: setPaymentReferenceType patch for payments for versions >0.18 <0.20
This commit is contained in:
@@ -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' });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user