mirror of
https://github.com/frappe/books.git
synced 2025-01-25 16:18:33 +00:00
2c0540bfd5
- add basic inventory schemas - add basic inventory models - patch stockmovement number series
23 lines
549 B
TypeScript
23 lines
549 B
TypeScript
import { getDefaultMetaFieldValueMap } from '../../backend/helpers';
|
|
import { DatabaseManager } from '../database/manager';
|
|
|
|
async function execute(dm: DatabaseManager) {
|
|
const schemaName = 'NumberSeries';
|
|
const name = 'SMOV-';
|
|
const exists = await dm.db?.exists(schemaName, name);
|
|
if (exists) {
|
|
return;
|
|
}
|
|
|
|
await dm.db?.insert(schemaName, {
|
|
name,
|
|
start: 1001,
|
|
padZeros: 4,
|
|
current: 0,
|
|
referenceType: 'StockMovement',
|
|
...getDefaultMetaFieldValueMap(),
|
|
});
|
|
}
|
|
|
|
export default { execute, beforeMigrate: true };
|