mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
13 lines
433 B
TypeScript
13 lines
433 B
TypeScript
import { DatabaseManager } from '../database/manager';
|
|
|
|
async function execute(dm: DatabaseManager) {
|
|
await dm.db!.knex!('Payment')
|
|
.where({ referenceType: null, paymentType: 'Pay' })
|
|
.update({ referenceType: 'PurchaseInvoice' });
|
|
await dm.db!.knex!('Payment')
|
|
.where({ referenceType: null, paymentType: 'Receive' })
|
|
.update({ referenceType: 'SalesInvoice' });
|
|
}
|
|
|
|
export default { execute, beforeMigrate: true };
|