<commit_before>'use strict'
var BaseModel = require('capital-models').BaseModel;
var Supplier = require('../core/supplier');
var Buyer = require('../core/buyer');
var PurchaseOrderItem = require('../po/purchase-order-item');

module.exports = class PurchaseOrder extends BaseModel {
    constructor(source, type) {
        type = type || 'purchase-order';

        super(type, '1.0.0');

        //Define properties
        this.iso = '';
        this.RONo = '';
        this.PRNo = '';
        this.PONo = '';
        this.RefPONo = '';
        this.linkedPONo = '';
        this.article = '';
        this.buyerId = {};
        this.buyer = new Buyer();
        this.supplierId = {};
        this.supplier = null;
        this.paymentDue = 0;
        this.currency = '';
        this.PODLNo = '';
        this.items = [];
        this.copy(source);

        var _items = [];
        for (var item of this.items) {
            _items.push(new PurchaseOrderItem(item));
        }
        this.items = _items;
    }
}<commit_msg>add shipmentDate in po model<commit_after>'use strict'
var BaseModel = require('capital-models').BaseModel;
var Supplier = require('../core/supplier');
var Buyer = require('../core/buyer');
var PurchaseOrderItem = require('../po/purchase-order-item');

module.exports = class PurchaseOrder extends BaseModel {
    constructor(source, type) {
        type = type || 'purchase-order';

        super(type, '1.0.0');

        //Define properties
        this.iso = '';
        this.RONo = '';
        this.PRNo = '';
        this.PONo = '';
        this.RefPONo = '';
        this.linkedPONo = '';
        this.article = '';
        this.buyerId = {};
        this.buyer = new Buyer();
        this.supplierId = {};
        this.supplier = null;
        this.paymentDue = 0;
        this.currency = '';
        this.shipmentDate = new Date();
        this.PODLNo = '';
        this.items = [];
        this.copy(source);

        var _items = [];
        for (var item of this.items) {
            _items.push(new PurchaseOrderItem(item));
        }
        this.items = _items;
    }
}
{'fraction_non_alphanumeric': 0.15774514448128849, 'fraction_numerical': 0.0037896731406916154, 'mean_word_length': 1.9415041782729805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4005338', 'n_tokens_mistral': 664, 'n_tokens_neox': 633, 'n_words': 125}