mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
fix: reference_no of bills transactions.
This commit is contained in:
@@ -89,6 +89,7 @@ export default class BillsController extends BaseController {
|
|||||||
get billValidationSchema() {
|
get billValidationSchema() {
|
||||||
return [
|
return [
|
||||||
check('bill_number').exists().trim().escape(),
|
check('bill_number').exists().trim().escape(),
|
||||||
|
check('reference_no').optional().trim().escape(),
|
||||||
check('bill_date').exists().isISO8601(),
|
check('bill_date').exists().isISO8601(),
|
||||||
check('due_date').optional().isISO8601(),
|
check('due_date').optional().isISO8601(),
|
||||||
check('vendor_id').exists().isNumeric().toInt(),
|
check('vendor_id').exists().isNumeric().toInt(),
|
||||||
@@ -111,6 +112,7 @@ export default class BillsController extends BaseController {
|
|||||||
get billEditValidationSchema() {
|
get billEditValidationSchema() {
|
||||||
return [
|
return [
|
||||||
check('bill_number').exists().trim().escape(),
|
check('bill_number').exists().trim().escape(),
|
||||||
|
check('reference_no').optional().trim().escape(),
|
||||||
check('bill_date').exists().isISO8601(),
|
check('bill_date').exists().isISO8601(),
|
||||||
check('due_date').optional().isISO8601(),
|
check('due_date').optional().isISO8601(),
|
||||||
check('vendor_id').exists().isNumeric().toInt(),
|
check('vendor_id').exists().isNumeric().toInt(),
|
||||||
|
|||||||
@@ -6,13 +6,11 @@ exports.up = function(knex) {
|
|||||||
table.string('bill_number');
|
table.string('bill_number');
|
||||||
table.date('bill_date').index();
|
table.date('bill_date').index();
|
||||||
table.date('due_date').index();
|
table.date('due_date').index();
|
||||||
table.string('reference_no');
|
table.string('reference_no').index();
|
||||||
table.string('status').index();
|
table.string('status').index();
|
||||||
table.text('note');
|
table.text('note');
|
||||||
|
|
||||||
table.decimal('amount', 13, 3).defaultTo(0);
|
table.decimal('amount', 13, 3).defaultTo(0);
|
||||||
table.decimal('payment_amount', 13, 3).defaultTo(0);
|
table.decimal('payment_amount', 13, 3).defaultTo(0);
|
||||||
|
|
||||||
table.string('inv_lot_number').index();
|
table.string('inv_lot_number').index();
|
||||||
table.integer('user_id').unsigned();
|
table.integer('user_id').unsigned();
|
||||||
table.timestamps();
|
table.timestamps();
|
||||||
|
|||||||
Reference in New Issue
Block a user