2017-04-30 14:55:15 +00:00
|
|
|
import {Input } from '@angular/core';
|
2017-04-03 20:33:18 +00:00
|
|
|
import 'rxjs/add/operator/map';
|
2017-04-30 14:55:15 +00:00
|
|
|
import { Product } from "./Product";
|
|
|
|
import { Unit } from "./Unit";
|
2017-04-03 20:33:18 +00:00
|
|
|
|
|
|
|
export class Item {
|
|
|
|
|
2017-04-20 16:37:49 +00:00
|
|
|
@Input() private _pProduct: Product;
|
|
|
|
@Input() private _uUnit: Unit;
|
|
|
|
@Input() private _nAmount: number;
|
|
|
|
@Input() private _nPrice: number;
|
2017-04-03 20:33:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-04-20 16:37:49 +00:00
|
|
|
public get pProduct(): Product {
|
|
|
|
return this._pProduct;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
2017-04-20 16:37:49 +00:00
|
|
|
public set pProduct(product: Product) {
|
|
|
|
this._pProduct = product;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-04-20 16:37:49 +00:00
|
|
|
public get uUnit(): Unit {
|
|
|
|
return this._uUnit;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
2017-04-20 16:37:49 +00:00
|
|
|
public set uUnit(unit: Unit) {
|
|
|
|
this._uUnit = unit;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
|
|
|
|
2017-04-20 16:37:49 +00:00
|
|
|
public get nAmount(): number {
|
|
|
|
return this._nAmount;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
2017-04-20 16:37:49 +00:00
|
|
|
public set nAmount(amount: number) {
|
|
|
|
this._nAmount = amount;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-04-20 16:37:49 +00:00
|
|
|
public get nPrice(): number {
|
|
|
|
return this._nPrice;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
2017-04-20 16:37:49 +00:00
|
|
|
public set nPrice(price: number) {
|
|
|
|
this._nPrice = price;
|
2017-04-03 20:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|