u
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import sql from 'mssql';
|
||||
import { ENSURE_TYPE } from '../../sql/numbers.js';
|
||||
import request from '../request.js';
|
||||
|
||||
@@ -12,9 +11,9 @@ export default function nextSku(pool) {
|
||||
.query(ENSURE_TYPE);
|
||||
|
||||
const req = request(pool, tx);
|
||||
req.input('company_id', sql.Int, companyId);
|
||||
req.input('type', sql.NVarChar(100), type);
|
||||
req.output('value', sql.NVarChar(100));
|
||||
req.input('company_id', companyId);
|
||||
req.input('type', type);
|
||||
req.output('value');
|
||||
|
||||
const result = await req.execute('getnextnumberwithprefixandpadding');
|
||||
return result.output.value;
|
||||
|
||||
Reference in New Issue
Block a user