mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 13:00:16 -04:00
changed alot of things
This commit is contained in:
parent
c5081f6e38
commit
3ba902bfe4
6
AstuteClient2/package-lock.json
generated
6
AstuteClient2/package-lock.json
generated
|
@ -8510,9 +8510,9 @@
|
|||
}
|
||||
},
|
||||
"semver-intersect": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.3.1.tgz",
|
||||
"integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz",
|
||||
"integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"semver": "^5.0.0"
|
||||
|
|
|
@ -32,10 +32,9 @@
|
|||
"zone.js": "^0.8.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "^6.0.2",
|
||||
"@angular-devkit/build-angular": "~0.6.3",
|
||||
"typescript": "~2.7.2",
|
||||
"@angular/cli": "~6.0.3",
|
||||
"@angular/cli": "^6.0.8",
|
||||
"@angular/compiler-cli": "^6.0.2",
|
||||
"@angular/language-service": "^6.0.2",
|
||||
"@types/jasmine": "~2.8.6",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
|
@ -50,6 +49,7 @@
|
|||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.3.0",
|
||||
"ts-node": "~5.0.1",
|
||||
"tslint": "~5.9.1"
|
||||
"tslint": "~5.9.1",
|
||||
"typescript": "~2.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,7 +157,6 @@ export class CustomerComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
editCustomer(id, name, billTo, add1, add2, city, state, zip, zip4, email, phone, phExt, fax, ref) {
|
||||
if (fax.length > 0 && fax.length < 14) {
|
||||
alert('Invalid fax.');
|
||||
|
@ -194,7 +193,6 @@ export class CustomerComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
deleteCustomer(customerId) {
|
||||
if (customerId) {
|
||||
if (confirm('Are you sure you want to delete customer, ' + customerId)) {
|
||||
|
@ -236,7 +234,6 @@ export class CustomerComponent implements OnInit {
|
|||
alert('Create customer failed: ' + reason);
|
||||
});
|
||||
}
|
||||
|
||||
deleteContact() {
|
||||
const selectedNodes = this.contactGridApi.getSelectedNodes();
|
||||
if (selectedNodes.length > 0) {
|
||||
|
@ -262,25 +259,25 @@ export class CustomerComponent implements OnInit {
|
|||
const eventData = event.data;
|
||||
console.log(eventData);
|
||||
if (eventData.fax.length > 0 && eventData.fax.length < 14) {
|
||||
this.refreshData();
|
||||
alert('Invalid fax.');
|
||||
} else if (eventData.phone.length > 0 && eventData.phone.length < 14) {
|
||||
this.refreshData();
|
||||
alert('Invalid phone.');
|
||||
} else if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(eventData.email) === false) {
|
||||
this.refreshData();
|
||||
alert('You have entered an invalid email address!');
|
||||
} else {
|
||||
this.astuteClientService.updateCustomer(eventData.customerId, eventData).then((data) => {
|
||||
if (data) {
|
||||
if (!data) {
|
||||
this.refreshData();
|
||||
} else {
|
||||
alert('Customer Updating Failed, Check Input Fields');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Update customer failed: ' + reason);
|
||||
});
|
||||
}
|
||||
this.refreshData();
|
||||
}
|
||||
|
||||
updateContactRow(event) {
|
||||
console.log(event);
|
||||
|
||||
|
@ -293,19 +290,18 @@ export class CustomerComponent implements OnInit {
|
|||
// alert('Invalid work phone.');
|
||||
// } else
|
||||
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(eventData.email) === false) {
|
||||
this.contactsData = this.astuteClientService.getCustomerContacts(eventData.customerId);
|
||||
alert('You have entered an invalid email address!');
|
||||
} else {
|
||||
this.astuteClientService.updateCustomerContact(eventData.customerId, eventData).then((data) => {
|
||||
if (!data) {
|
||||
alert('Customer Updating Failed, Check Input Fields');
|
||||
} else {
|
||||
this.contactsData = this.astuteClientService.getCustomerContacts(eventData.customerId);
|
||||
alert('Customer Updating Failed, Check Input Fields');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Update customer failed: ' + reason);
|
||||
});
|
||||
}
|
||||
this.contactsData = this.astuteClientService.getCustomerContacts(eventData.customerId);
|
||||
}
|
||||
|
||||
// opening and closing modal-form components
|
||||
|
@ -316,7 +312,6 @@ export class CustomerComponent implements OnInit {
|
|||
}
|
||||
ref.open();
|
||||
}
|
||||
|
||||
close(ref) {
|
||||
ref.close();
|
||||
}
|
||||
|
@ -329,23 +324,19 @@ export class CustomerComponent implements OnInit {
|
|||
this.customers = data;
|
||||
});
|
||||
}
|
||||
|
||||
refreshContactData(customerId) {
|
||||
this.contactsData = this.astuteClientService.getCustomerContacts(customerId);
|
||||
}
|
||||
|
||||
|
||||
// on each grid ready: sets api's and enable auto-resizing
|
||||
onGridReady(evt) {
|
||||
this.gridApi = evt.api;
|
||||
this.gridColumnApi = evt.columnApi;
|
||||
}
|
||||
|
||||
onContactGridReady(evt) {
|
||||
this.contactGridApi = evt.api;
|
||||
this.contactColumnApi = evt.columnApi;
|
||||
}
|
||||
|
||||
resizeColumns(evt) {
|
||||
evt.columnApi.autoSizeAllColumns();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ag-grid-angular
|
||||
#agGrid
|
||||
style="height: 500px;"
|
||||
class="ag-theme-balham"
|
||||
[gridOptions]="gridOptions"
|
||||
|
@ -13,8 +12,11 @@
|
|||
[enableFilter]="true"
|
||||
[rowData]="source"
|
||||
[columnDefs]="columnDefs"
|
||||
(cellEditingStopped)="updateRow($event)"
|
||||
(gridReady)="onGridReady($event)"
|
||||
(rowDataChanged)="resizeColumns($event)"
|
||||
(rowClicked)="setSelectedRow($event)"
|
||||
rowSelection="single"
|
||||
rowDeselection="true"
|
||||
></ag-grid-angular>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,15 +24,20 @@
|
|||
<!--Buttons-->
|
||||
<div class="row justify-content-center mt-2">
|
||||
<div class="col-2">
|
||||
<button class="btn btn-success" style="width: 100%" (click)="open(new,null,null)">
|
||||
<button class="btn btn-success" style="width: 100%" (click)="open(new)">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-info" style="width: 100%" (click)="open(edit,null,null)" [disabled]="!chosenInv">
|
||||
<button class="btn btn-info" style="width: 100%" (click)="open(edit)" [disabled]="!chosenInv">
|
||||
Edit
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-info" style="width: 100%" (click)="open(details)" [disabled]="!chosenInv">
|
||||
Details
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-primary" style="width: 100%" (click)="submitInvoice(chosenInv.invoiceNumber)" [disabled]="!(chosenInv && chosenInv.invoiceStatus === 1)">
|
||||
Submit
|
||||
|
@ -165,194 +172,194 @@
|
|||
</div>
|
||||
|
||||
<!--Detials-->
|
||||
<div class="modal-body" *ngIf="chosenInv">
|
||||
<p class="h4 text-right">Detail</p>
|
||||
<!--<div class="modal-body" *ngIf="chosenInv">-->
|
||||
<!--<p class="h4 text-right">Detail</p>-->
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width: 50px">#</th>
|
||||
<th scope="col">Description</th>
|
||||
<th scope="col" style="width: 150px">Rate Type</th>
|
||||
<th scope="col" style="width: 100px">Rate</th>
|
||||
<th scope="col" style="width: 100px">Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!--<tbody>-->
|
||||
<tbody *ngFor="let inDet of selectedInDetails; let i = index">
|
||||
<tr class="p-0 m-0">
|
||||
<!--INV Detail Items: invoiceNum, lineItemNum, poLineItemNum, serviceTypeId, desc, qty, fee-->
|
||||
<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.lineItemNum" disabled>
|
||||
</td>
|
||||
<td class="p-0 m-0"><textarea style="height: 36px" class="form-control text cell" [value]="inDet.desc"
|
||||
(change)="onSelectedCellChange(i, 'desc', desc.value)" #desc [disabled]="chosenInv.invoiceStatus !== 1"></textarea>
|
||||
<!--<input type="text" class="form-control cell" [value]="inDet.desc"-->
|
||||
<!--(change)="onSelectedCellChange(i, 'desc', desc.value)" #desc>-->
|
||||
</td>
|
||||
<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="feeTypes[inDet.feeTypeId - 1]"
|
||||
disabled></td>
|
||||
<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.fee | currency" #fee [disabled]="chosenInv.invoiceStatus !== 1"
|
||||
(change)="onSelectedCellChange(i, 'fee', fee.value.substr(1)); updateSelectedBillAmt()">
|
||||
</td>
|
||||
<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.qty"
|
||||
[step]="inDet.remainingQty / 100"
|
||||
(change)="onSelectedCellChange(i, 'qty', qty.value); updateSelectedBillAmt()" #qty [disabled]="chosenInv.invoiceStatus !== 1">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum != -1">
|
||||
<th class="align-content-center">
|
||||
<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>
|
||||
</th>
|
||||
<td colspan="4">
|
||||
<div class="progress" style="height: 25px;">
|
||||
<div class="progress-bar bg-success" role="progressbar"
|
||||
[ngStyle]="{'width': getPerc(qty.value, inDet.remainingQty) + '%'}">
|
||||
{{qty.value}}
|
||||
</div>
|
||||
<div class="progress-bar bg-danger" role="progressbar"
|
||||
[ngStyle]="{'width': (100 - getPerc(qty.value, inDet.remainingQty)) + '%'}">
|
||||
{{inDet.remainingQty - (qty.value)}}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!--<tr class="p-0 m-0">-->
|
||||
<!--<!–INV Detail Items: invoiceNum, lineItemNum, poLineItemNum, serviceTypeId, desc, qty, fee–>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.lineItemNum" disabled>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.desc"-->
|
||||
<!--(change)="onNewCellChange(i, 'desc', desc.value)" #desc></td>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="feeTypes[inDet.feeTypeId - 1]"-->
|
||||
<!--disabled></td>-->
|
||||
<!--<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.fee"-->
|
||||
<!--(change)="onNewCellChange(i, 'fee', fee.value); updateNewBillAmt();" #fee>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.qty"-->
|
||||
<!--(change)="onNewCellChange(i, 'qty', qty.value); updateNewBillAmt();" #qty>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr class="p-0 m-0">-->
|
||||
<!--<th class="align-content-center">-->
|
||||
<!--<p>{{getPerc(fee.value * qty.value, inDet.remainingQty)}}%</p>-->
|
||||
<!--</th>-->
|
||||
<!--<td colspan="4">-->
|
||||
<!--<div class="progress" style="height: 25px;">-->
|
||||
<!--<div class="progress-bar bg-success" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': getPerc(fee.value * qty.value, inDet.remainingQty) + '%'}">-->
|
||||
<!--${{fee.value * qty.value}}-->
|
||||
<!--</div>-->
|
||||
<!--<div class="progress-bar bg-danger" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': (100 - getPerc(fee.value * qty.value, inDet.remainingQty)) + '%'}">-->
|
||||
<!--${{inDet.remainingQty - (fee.value * qty.value)}}-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum !== -1">-->
|
||||
<!--<th class="align-content-center">-->
|
||||
<!--<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>-->
|
||||
<!--</th>-->
|
||||
<!--<td colspan="5">-->
|
||||
<!--<div class="progress" style="height: 25px;">-->
|
||||
<!--<div class="progress-bar bg-success" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': getPerc(qty.value, inDet.remainingQty) + '%'}">-->
|
||||
<!--Qty - {{(qty.value)}} / Amount - {{(qty.value * inDet.fee) | currency}}-->
|
||||
<!--</div>-->
|
||||
<!--<div class="progress-bar bg-danger" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': (100 - getPerc(qty.value, inDet.remainingQty)) + '%'}">-->
|
||||
<!--Qty - {{(inDet.remainingQty - qty.value)}} / Amount - {{(inDet.remainingQty - qty.value) * inDet.fee | currency}}-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
</tbody>
|
||||
<tbody>
|
||||
<!--<tr >-->
|
||||
<!--<td colspan="5" >-->
|
||||
<!--<p *ngIf="chosenInv.invoiceStatus == 1">-->
|
||||
<!--<select class="custom-select"-->
|
||||
<!--(change)="pushOntoSelectedDetail(inNumIn.value, newInDetails.length + 1, selectedPODetails[poDetSelec.value].lineItemNo,-->
|
||||
<!--selectedPODetails[poDetSelec.value].feeTypeId,-->
|
||||
<!--selectedPODetails[poDetSelec.value].serviceDesc, 0, selectedPODetails[poDetSelec.value].fee)"-->
|
||||
<!--[disabled]="!selectedPODetails.length && chosenInv.invoiceStatus !== 1"-->
|
||||
<!--#poDetSelec>-->
|
||||
<!--<option>Add new line item...</option>-->
|
||||
<!--<option *ngFor="let po of selectedPODetails; let i = index;" [value]="i">{{po.serviceDesc}}-->
|
||||
<!--</option>-->
|
||||
<!--<option [value]="-1">Out of Pocket Expenses</option>-->
|
||||
<!--</select>-->
|
||||
<!--</p>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 40%" class="text-right"><b>Original Contract Amount</b></td>
|
||||
<td style="width: 10%" class="text-right">
|
||||
<div *ngIf="selectedPO">{{selectedPO.contractAmt | currency}}</div>
|
||||
</td>
|
||||
<td style="width: 30%" class="text-right"> </td>
|
||||
<td style="width: 20%" class="text-right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Net Changes by Change Orders</b></td>
|
||||
<td class="text-right">
|
||||
<div *ngIf="selectedPO">{{0 | currency}}</div>
|
||||
</td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Total Contract Amount</b></td>
|
||||
<td class="text-right"><div *ngIf="selectedPO">{{selectedPO.contractAmt | currency}}</div></td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Previously Billed</b></td>
|
||||
<td class="text-right"><div *ngIf="selectedPO">{{selectedPO.previouslyBilledAmount | currency}}</div></td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right"> </td>
|
||||
</tr>
|
||||
<!--<table class="table">-->
|
||||
<!--<thead>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Amount This Invoice</b></td>-->
|
||||
<!--<td>{{newBillAmt}}</td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td> </td>-->
|
||||
<!--<th scope="col" style="width: 50px">#</th>-->
|
||||
<!--<th scope="col">Description</th>-->
|
||||
<!--<th scope="col" style="width: 150px">Rate Type</th>-->
|
||||
<!--<th scope="col" style="width: 100px">Rate</th>-->
|
||||
<!--<th scope="col" style="width: 100px">Quantity</th>-->
|
||||
<!--</tr>-->
|
||||
<tr>
|
||||
<td class="text-right"><b>Balance to be Billed</b></td>
|
||||
<td class="text-right"><div *ngIf="selectedPO">{{(selectedPO.contractAmt - selectedPO.previouslyBilledAmount - selectedBillAmt) | currency}}</div></td>
|
||||
<!--<td>-->
|
||||
<!--<div class="input-group mb-3">-->
|
||||
<!--<div class="input-group-prepend">-->
|
||||
<!--<span class="input-group-text"><b>Total</b></span>-->
|
||||
<!--<span class="input-group-text">$</span>-->
|
||||
<!--</div>-->
|
||||
<!--<input type="number" class="form-control" [value]="newBillAmt" #billAmtIn disabled>-->
|
||||
<!--<div class="input-group-append">-->
|
||||
<!--<span class="input-group-text">.00</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</thead>-->
|
||||
<!--<!–<tbody>–>-->
|
||||
<!--<tbody *ngFor="let inDet of selectedInDetails; let i = index">-->
|
||||
<!--<tr class="p-0 m-0">-->
|
||||
<!--<!–INV Detail Items: invoiceNum, lineItemNum, poLineItemNum, serviceTypeId, desc, qty, fee–>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.lineItemNum" disabled>-->
|
||||
<!--</td>-->
|
||||
<td class="text-right"><b>Total due this invoice</b></td>
|
||||
<td>{{selectedBillAmt | currency}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--<div class="input-group mb-3">-->
|
||||
<!--<div class="input-group-prepend">-->
|
||||
<!--<span class="input-group-text">Bill Amount*</span>-->
|
||||
<!--<span class="input-group-text">$</span>-->
|
||||
<!--</div>-->
|
||||
<!--<input type="number" class="form-control" [value]="selectedBillAmt" #billAmtIn>-->
|
||||
<!--<div class="input-group-append">-->
|
||||
<!--<span class="input-group-text">.00</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<!--<td class="p-0 m-0"><textarea style="height: 36px" class="form-control text cell" [value]="inDet.desc"-->
|
||||
<!--(change)="onSelectedCellChange(i, 'desc', desc.value)" #desc [disabled]="chosenInv.invoiceStatus !== 1"></textarea>-->
|
||||
<!--<!–<input type="text" class="form-control cell" [value]="inDet.desc"–>-->
|
||||
<!--<!–(change)="onSelectedCellChange(i, 'desc', desc.value)" #desc>–>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="feeTypes[inDet.feeTypeId - 1]"-->
|
||||
<!--disabled></td>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.fee | currency" #fee [disabled]="chosenInv.invoiceStatus !== 1"-->
|
||||
<!--(change)="onSelectedCellChange(i, 'fee', fee.value.substr(1)); updateSelectedBillAmt()">-->
|
||||
<!--</td>-->
|
||||
<!--<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.qty"-->
|
||||
<!--[step]="inDet.remainingQty / 100"-->
|
||||
<!--(change)="onSelectedCellChange(i, 'qty', qty.value); updateSelectedBillAmt()" #qty [disabled]="chosenInv.invoiceStatus !== 1">-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum != -1">-->
|
||||
<!--<th class="align-content-center">-->
|
||||
<!--<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>-->
|
||||
<!--</th>-->
|
||||
<!--<td colspan="4">-->
|
||||
<!--<div class="progress" style="height: 25px;">-->
|
||||
<!--<div class="progress-bar bg-success" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': getPerc(qty.value, inDet.remainingQty) + '%'}">-->
|
||||
<!--{{qty.value}}-->
|
||||
<!--</div>-->
|
||||
<!--<div class="progress-bar bg-danger" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': (100 - getPerc(qty.value, inDet.remainingQty)) + '%'}">-->
|
||||
<!--{{inDet.remainingQty - (qty.value)}}-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<!–<tr class="p-0 m-0">–>-->
|
||||
<!--<!–<!–INV Detail Items: invoiceNum, lineItemNum, poLineItemNum, serviceTypeId, desc, qty, fee–>–>-->
|
||||
<!--<!–<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.lineItemNum" disabled>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<!–<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.desc"–>-->
|
||||
<!--<!–(change)="onNewCellChange(i, 'desc', desc.value)" #desc></td>–>-->
|
||||
<!--<!–<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="feeTypes[inDet.feeTypeId - 1]"–>-->
|
||||
<!--<!–disabled></td>–>-->
|
||||
<!--<!–<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.fee"–>-->
|
||||
<!--<!–(change)="onNewCellChange(i, 'fee', fee.value); updateNewBillAmt();" #fee>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<!–<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.qty"–>-->
|
||||
<!--<!–(change)="onNewCellChange(i, 'qty', qty.value); updateNewBillAmt();" #qty>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
<!--<!–<tr class="p-0 m-0">–>-->
|
||||
<!--<!–<th class="align-content-center">–>-->
|
||||
<!--<!–<p>{{getPerc(fee.value * qty.value, inDet.remainingQty)}}%</p>–>-->
|
||||
<!--<!–</th>–>-->
|
||||
<!--<!–<td colspan="4">–>-->
|
||||
<!--<!–<div class="progress" style="height: 25px;">–>-->
|
||||
<!--<!–<div class="progress-bar bg-success" role="progressbar"–>-->
|
||||
<!--<!–[ngStyle]="{'width': getPerc(fee.value * qty.value, inDet.remainingQty) + '%'}">–>-->
|
||||
<!--<!–${{fee.value * qty.value}}–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–<div class="progress-bar bg-danger" role="progressbar"–>-->
|
||||
<!--<!–[ngStyle]="{'width': (100 - getPerc(fee.value * qty.value, inDet.remainingQty)) + '%'}">–>-->
|
||||
<!--<!–${{inDet.remainingQty - (fee.value * qty.value)}}–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
<!--<!–<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum !== -1">–>-->
|
||||
<!--<!–<th class="align-content-center">–>-->
|
||||
<!--<!–<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>–>-->
|
||||
<!--<!–</th>–>-->
|
||||
<!--<!–<td colspan="5">–>-->
|
||||
<!--<!–<div class="progress" style="height: 25px;">–>-->
|
||||
<!--<!–<div class="progress-bar bg-success" role="progressbar"–>-->
|
||||
<!--<!–[ngStyle]="{'width': getPerc(qty.value, inDet.remainingQty) + '%'}">–>-->
|
||||
<!--<!–Qty - {{(qty.value)}} / Amount - {{(qty.value * inDet.fee) | currency}}–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–<div class="progress-bar bg-danger" role="progressbar"–>-->
|
||||
<!--<!–[ngStyle]="{'width': (100 - getPerc(qty.value, inDet.remainingQty)) + '%'}">–>-->
|
||||
<!--<!–Qty - {{(inDet.remainingQty - qty.value)}} / Amount - {{(inDet.remainingQty - qty.value) * inDet.fee | currency}}–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
<!--</tbody>-->
|
||||
<!--<tbody>-->
|
||||
<!--<!–<tr >–>-->
|
||||
<!--<!–<td colspan="5" >–>-->
|
||||
<!--<!–<p *ngIf="chosenInv.invoiceStatus == 1">–>-->
|
||||
<!--<!–<select class="custom-select"–>-->
|
||||
<!--<!–(change)="pushOntoSelectedDetail(inNumIn.value, newInDetails.length + 1, selectedPODetails[poDetSelec.value].lineItemNo,–>-->
|
||||
<!--<!–selectedPODetails[poDetSelec.value].feeTypeId,–>-->
|
||||
<!--<!–selectedPODetails[poDetSelec.value].serviceDesc, 0, selectedPODetails[poDetSelec.value].fee)"–>-->
|
||||
<!--<!–[disabled]="!selectedPODetails.length && chosenInv.invoiceStatus !== 1"–>-->
|
||||
<!--<!–#poDetSelec>–>-->
|
||||
<!--<!–<option>Add new line item...</option>–>-->
|
||||
<!--<!–<option *ngFor="let po of selectedPODetails; let i = index;" [value]="i">{{po.serviceDesc}}–>-->
|
||||
<!--<!–</option>–>-->
|
||||
<!--<!–<option [value]="-1">Out of Pocket Expenses</option>–>-->
|
||||
<!--<!–</select>–>-->
|
||||
<!--<!–</p>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
<!--</tbody>-->
|
||||
<!--</table>-->
|
||||
<!--<table class="table table-borderless table-sm">-->
|
||||
<!--<tbody>-->
|
||||
<!--<tr>-->
|
||||
<!--<td style="width: 40%" class="text-right"><b>Original Contract Amount</b></td>-->
|
||||
<!--<td style="width: 10%" class="text-right">-->
|
||||
<!--<div *ngIf="selectedPO">{{selectedPO.contractAmt | currency}}</div>-->
|
||||
<!--</td>-->
|
||||
<!--<td style="width: 30%" class="text-right"> </td>-->
|
||||
<!--<td style="width: 20%" class="text-right"> </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Net Changes by Change Orders</b></td>-->
|
||||
<!--<td class="text-right">-->
|
||||
<!--<div *ngIf="selectedPO">{{0 | currency}}</div>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Total Contract Amount</b></td>-->
|
||||
<!--<td class="text-right"><div *ngIf="selectedPO">{{selectedPO.contractAmt | currency}}</div></td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Previously Billed</b></td>-->
|
||||
<!--<td class="text-right"><div *ngIf="selectedPO">{{selectedPO.previouslyBilledAmount | currency}}</div></td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<!–<tr>–>-->
|
||||
<!--<!–<td class="text-right"><b>Amount This Invoice</b></td>–>-->
|
||||
<!--<!–<td>{{newBillAmt}}</td>–>-->
|
||||
<!--<!–<td class="text-right"> </td>–>-->
|
||||
<!--<!–<td> </td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Balance to be Billed</b></td>-->
|
||||
<!--<td class="text-right"><div *ngIf="selectedPO">{{(selectedPO.contractAmt - selectedPO.previouslyBilledAmount - selectedBillAmt) | currency}}</div></td>-->
|
||||
<!--<!–<td>–>-->
|
||||
<!--<!–<div class="input-group mb-3">–>-->
|
||||
<!--<!–<div class="input-group-prepend">–>-->
|
||||
<!--<!–<span class="input-group-text"><b>Total</b></span>–>-->
|
||||
<!--<!–<span class="input-group-text">$</span>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–<input type="number" class="form-control" [value]="newBillAmt" #billAmtIn disabled>–>-->
|
||||
<!--<!–<div class="input-group-append">–>-->
|
||||
<!--<!–<span class="input-group-text">.00</span>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<td class="text-right"><b>Total due this invoice</b></td>-->
|
||||
<!--<td>{{selectedBillAmt | currency}}</td>-->
|
||||
<!--</tr>-->
|
||||
<!--</tbody>-->
|
||||
<!--</table>-->
|
||||
<!--<!–<div class="input-group mb-3">–>-->
|
||||
<!--<!–<div class="input-group-prepend">–>-->
|
||||
<!--<!–<span class="input-group-text">Bill Amount*</span>–>-->
|
||||
<!--<!–<span class="input-group-text">$</span>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–<input type="number" class="form-control" [value]="selectedBillAmt" #billAmtIn>–>-->
|
||||
<!--<!–<div class="input-group-append">–>-->
|
||||
<!--<!–<span class="input-group-text">.00</span>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--</div>-->
|
||||
|
||||
<!--Invoice Footer-->
|
||||
<div class="modal-body" *ngIf="chosenInv">
|
||||
|
@ -403,7 +410,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 1%">
|
||||
<span class="input-group-text">Customer </span>
|
||||
<span class="input-group-text">Customer</span>
|
||||
</td>
|
||||
<td>
|
||||
<select class="custom-select" (change)="customerDropdownChange(customerSelec.value)" #customerSelec>
|
||||
|
@ -477,156 +484,156 @@
|
|||
</div>
|
||||
|
||||
<!--Detail-->
|
||||
<div class="modal-body">
|
||||
<p class="h4 text-right">Detail</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width: 30px"></th>
|
||||
<th scope="col" style="width: 50px">#</th>
|
||||
<th scope="col">Description</th>
|
||||
<th scope="col" style="width: 150px">Rate Type</th>
|
||||
<th scope="col" style="width: 100px">Rate</th>
|
||||
<th scope="col" style="width: 100px">Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!--<tbody>-->
|
||||
<tbody *ngFor="let inDet of newInDetails; let i = index">
|
||||
<tr class="p-0 m-0">
|
||||
<!--INV Detail Items: invoiceNum, lineItemNum, poLineItemNum, serviceTypeId, desc, qty, fee-->
|
||||
<td class="p-0 m-0">
|
||||
<button class="btn btn-outline-danger w-100" (click)="newInDetails.splice(0, 1)">-</button>
|
||||
</td>
|
||||
<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.lineItemNum" disabled>
|
||||
</td>
|
||||
<td class="p-0 m-0"><textarea style="height: 36px" class="form-control cell" [value]="inDet.desc"
|
||||
(change)="onNewCellChange(i, 'desc', desc.value)" #desc></textarea>
|
||||
<!--<input type="text" class="form-control cell" [value]="inDet.desc"-->
|
||||
<!--(change)="onNewCellChange(i, 'desc', desc.value)" #desc>-->
|
||||
</td>
|
||||
<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="feeTypes[inDet.feeTypeId - 1]"
|
||||
disabled></td>
|
||||
<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.fee | currency" #fee [disabled] = "poDetails[poDetSelec.value].lineItemNo!==-1"
|
||||
(change)="onNewCellChange(i, 'fee', fee.value.substr(1)); updateNewBillAmt();">
|
||||
</td>
|
||||
<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.qty"
|
||||
[step]="inDet.remainingQty / 100"
|
||||
(change)="onNewCellChange(i, 'qty', qty.value); updateNewBillAmt();" #qty>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum !== -1">
|
||||
<th class="align-content-center">
|
||||
<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>
|
||||
</th>
|
||||
<td colspan="5">
|
||||
<div class="progress" style="height: 25px;">
|
||||
<div class="progress-bar bg-success" role="progressbar"
|
||||
[ngStyle]="{'width': getPerc(qty.value, inDet.remainingQty) + '%'}">
|
||||
Qty - {{(qty.value)}} / Amount - {{(qty.value * inDet.fee) | currency}}
|
||||
</div>
|
||||
<div class="progress-bar bg-danger" role="progressbar"
|
||||
[ngStyle]="{'width': (100 - getPerc(qty.value, inDet.remainingQty)) + '%'}">
|
||||
Qty - {{(inDet.remainingQty - qty.value)}} / Amount - {{(inDet.remainingQty - qty.value) * inDet.fee | currency}}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum == -1">
|
||||
<th class="align-content-center">
|
||||
<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<select class="custom-select"
|
||||
(change)="pushOntoNewDetail(inNumIn.value, newInDetails.length + 1, poDetails[poDetSelec.value].lineItemNo,
|
||||
poDetails[poDetSelec.value].feeTypeId, poDetails[poDetSelec.value].serviceTypeId,
|
||||
poDetails[poDetSelec.value].serviceDesc, 0, poDetails[poDetSelec.value].fee, poDetails[poDetSelec.value].remainingQty,
|
||||
poNumIn.value)"
|
||||
[disabled]="!poDetails.length"
|
||||
#poDetSelec>
|
||||
<option>Add line item...</option>
|
||||
<option *ngFor="let po of poDetails; let i = index;" [value]="i">{{po.serviceDesc}}</option>
|
||||
<option [value]="-1">Out of Pocket Expenses</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--<div class="modal-body">-->
|
||||
<!--<p class="h4 text-right">Detail</p>-->
|
||||
<!--<table class="table">-->
|
||||
<!--<thead>-->
|
||||
<!--<tr>-->
|
||||
<!--<td colspan="6">-->
|
||||
<!--<select class="custom-select"-->
|
||||
<!--(change)="pushOntoNewDetail(inNumIn.value, newInDetails.length + 1, poDetails[poDetSelec.value].lineItemNo,-->
|
||||
<!--poDetails[poDetSelec.value].feeTypeId, poDetails[poDetSelec.value].serviceTypeId,-->
|
||||
<!--poDetails[poDetSelec.value].serviceDesc, 0, poDetails[poDetSelec.value].fee, poDetails[poDetSelec.value].remainingQty,-->
|
||||
<!--poNumIn.value)"-->
|
||||
<!--[disabled]="!poDetails.length"-->
|
||||
<!--#poDetSelec>-->
|
||||
<!--<option>Add line item...</option>-->
|
||||
<!--<option *ngFor="let po of poDetails; let i = index;" [value]="i">{{po.serviceDesc}}</option>-->
|
||||
<!--<option [value]="-1">Out of Pocket Expenses</option>-->
|
||||
<!--</select>-->
|
||||
<!--</td>-->
|
||||
<!--<th scope="col" style="width: 30px"></th>-->
|
||||
<!--<th scope="col" style="width: 50px">#</th>-->
|
||||
<!--<th scope="col">Description</th>-->
|
||||
<!--<th scope="col" style="width: 150px">Rate Type</th>-->
|
||||
<!--<th scope="col" style="width: 100px">Rate</th>-->
|
||||
<!--<th scope="col" style="width: 100px">Quantity</th>-->
|
||||
<!--</tr>-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-right" style="width: 40%" class="text-right"><b>Original Contract Amount</b></td>
|
||||
<td class="text-right" style="width: 10%">
|
||||
<div *ngIf="chosenPo">{{chosenPo.contractAmt | currency}}</div>
|
||||
</td>
|
||||
<td class="text-right" style="width: 30%" class="text-right"> </td>
|
||||
<td class="text-right" style="width: 20%" > </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Net Changes by Change Orders</b></td>
|
||||
<td class="text-right"><div *ngIf="chosenPo">{{0 | currency}}</div></td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Total Contract Amount</b></td>
|
||||
<td class="text-right"><div *ngIf="chosenPo">{{chosenPo.contractAmt | currency}}</div></td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Previously Billed</b></td>
|
||||
<td class="text-right"><div *ngIf="chosenPo">{{chosenPo.previouslyBilledAmount | currency}}</div></td>
|
||||
<td class="text-right"> </td>
|
||||
<td class="text-right"> </td>
|
||||
</tr>
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Amount This Invoice</b></td>-->
|
||||
<!--<td>{{newBillAmt}}</td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td> </td>-->
|
||||
<!--</tr>-->
|
||||
<tr>
|
||||
<td class="text-right"><b>Balance to be Billed</b></td>
|
||||
<td class="text-right"><div *ngIf="chosenPo">{{(chosenPo.contractAmt - chosenPo.previouslyBilledAmount - newBillAmt) | currency}}</div></td>
|
||||
<!--<td>-->
|
||||
<!--<div class="input-group mb-3">-->
|
||||
<!--<div class="input-group-prepend">-->
|
||||
<!--<span class="input-group-text"><b>Total</b></span>-->
|
||||
<!--<span class="input-group-text">$</span>-->
|
||||
<!--</div>-->
|
||||
<!--<input type="number" class="form-control" [value]="newBillAmt" #billAmtIn disabled>-->
|
||||
<!--<div class="input-group-append">-->
|
||||
<!--<span class="input-group-text">.00</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</thead>-->
|
||||
<!--<!–<tbody>–>-->
|
||||
<!--<tbody *ngFor="let inDet of newInDetails; let i = index">-->
|
||||
<!--<tr class="p-0 m-0">-->
|
||||
<!--<!–INV Detail Items: invoiceNum, lineItemNum, poLineItemNum, serviceTypeId, desc, qty, fee–>-->
|
||||
<!--<td class="p-0 m-0">-->
|
||||
<!--<button class="btn btn-outline-danger w-100" (click)="newInDetails.splice(0, 1)">-</button>-->
|
||||
<!--</td>-->
|
||||
<td class="text-right"><b>Total due this invoice</b></td>
|
||||
<td>{{newBillAmt | currency}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.lineItemNum" disabled>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="p-0 m-0"><textarea style="height: 36px" class="form-control cell" [value]="inDet.desc"-->
|
||||
<!--(change)="onNewCellChange(i, 'desc', desc.value)" #desc></textarea>-->
|
||||
<!--<!–<input type="text" class="form-control cell" [value]="inDet.desc"–>-->
|
||||
<!--<!–(change)="onNewCellChange(i, 'desc', desc.value)" #desc>–>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="feeTypes[inDet.feeTypeId - 1]"-->
|
||||
<!--disabled></td>-->
|
||||
<!--<td class="p-0 m-0"><input type="text" class="form-control cell" [value]="inDet.fee | currency" #fee [disabled] = "poDetails[poDetSelec.value].lineItemNo!==-1"-->
|
||||
<!--(change)="onNewCellChange(i, 'fee', fee.value.substr(1)); updateNewBillAmt();">-->
|
||||
<!--</td>-->
|
||||
<!--<td class="p-0 m-0"><input type="number" class="form-control cell" [value]="inDet.qty"-->
|
||||
<!--[step]="inDet.remainingQty / 100"-->
|
||||
<!--(change)="onNewCellChange(i, 'qty', qty.value); updateNewBillAmt();" #qty>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum !== -1">-->
|
||||
<!--<th class="align-content-center">-->
|
||||
<!--<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>-->
|
||||
<!--</th>-->
|
||||
<!--<td colspan="5">-->
|
||||
<!--<div class="progress" style="height: 25px;">-->
|
||||
<!--<div class="progress-bar bg-success" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': getPerc(qty.value, inDet.remainingQty) + '%'}">-->
|
||||
<!--Qty - {{(qty.value)}} / Amount - {{(qty.value * inDet.fee) | currency}}-->
|
||||
<!--</div>-->
|
||||
<!--<div class="progress-bar bg-danger" role="progressbar"-->
|
||||
<!--[ngStyle]="{'width': (100 - getPerc(qty.value, inDet.remainingQty)) + '%'}">-->
|
||||
<!--Qty - {{(inDet.remainingQty - qty.value)}} / Amount - {{(inDet.remainingQty - qty.value) * inDet.fee | currency}}-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr class="p-0 m-0" *ngIf="inDet.poLineItemNum == -1">-->
|
||||
<!--<th class="align-content-center">-->
|
||||
<!--<p>{{getPerc(qty.value, inDet.remainingQty)}}%</p>-->
|
||||
<!--</th>-->
|
||||
<!--</tr>-->
|
||||
<!--</tbody>-->
|
||||
<!--<tbody>-->
|
||||
<!--<tr>-->
|
||||
<!--<td colspan="6">-->
|
||||
<!--<select class="custom-select"-->
|
||||
<!--(change)="pushOntoNewDetail(inNumIn.value, newInDetails.length + 1, poDetails[poDetSelec.value].lineItemNo,-->
|
||||
<!--poDetails[poDetSelec.value].feeTypeId, poDetails[poDetSelec.value].serviceTypeId,-->
|
||||
<!--poDetails[poDetSelec.value].serviceDesc, 0, poDetails[poDetSelec.value].fee, poDetails[poDetSelec.value].remainingQty,-->
|
||||
<!--poNumIn.value)"-->
|
||||
<!--[disabled]="!poDetails.length"-->
|
||||
<!--#poDetSelec>-->
|
||||
<!--<option>Add line item...</option>-->
|
||||
<!--<option *ngFor="let po of poDetails; let i = index;" [value]="i">{{po.serviceDesc}}</option>-->
|
||||
<!--<option [value]="-1">Out of Pocket Expenses</option>-->
|
||||
<!--</select>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
|
||||
<!--<!–<tr>–>-->
|
||||
<!--<!–<td colspan="6">–>-->
|
||||
<!--<!–<select class="custom-select"–>-->
|
||||
<!--<!–(change)="pushOntoNewDetail(inNumIn.value, newInDetails.length + 1, poDetails[poDetSelec.value].lineItemNo,–>-->
|
||||
<!--<!–poDetails[poDetSelec.value].feeTypeId, poDetails[poDetSelec.value].serviceTypeId,–>-->
|
||||
<!--<!–poDetails[poDetSelec.value].serviceDesc, 0, poDetails[poDetSelec.value].fee, poDetails[poDetSelec.value].remainingQty,–>-->
|
||||
<!--<!–poNumIn.value)"–>-->
|
||||
<!--<!–[disabled]="!poDetails.length"–>-->
|
||||
<!--<!–#poDetSelec>–>-->
|
||||
<!--<!–<option>Add line item...</option>–>-->
|
||||
<!--<!–<option *ngFor="let po of poDetails; let i = index;" [value]="i">{{po.serviceDesc}}</option>–>-->
|
||||
<!--<!–<option [value]="-1">Out of Pocket Expenses</option>–>-->
|
||||
<!--<!–</select>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
<!--</tbody>-->
|
||||
<!--</table>-->
|
||||
|
||||
<!--<table class="table table-borderless table-sm">-->
|
||||
<!--<tbody>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right" style="width: 40%" class="text-right"><b>Original Contract Amount</b></td>-->
|
||||
<!--<td class="text-right" style="width: 10%">-->
|
||||
<!--<div *ngIf="chosenPo">{{chosenPo.contractAmt | currency}}</div>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="text-right" style="width: 30%" class="text-right"> </td>-->
|
||||
<!--<td class="text-right" style="width: 20%" > </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Net Changes by Change Orders</b></td>-->
|
||||
<!--<td class="text-right"><div *ngIf="chosenPo">{{0 | currency}}</div></td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Total Contract Amount</b></td>-->
|
||||
<!--<td class="text-right"><div *ngIf="chosenPo">{{chosenPo.contractAmt | currency}}</div></td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Previously Billed</b></td>-->
|
||||
<!--<td class="text-right"><div *ngIf="chosenPo">{{chosenPo.previouslyBilledAmount | currency}}</div></td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--<td class="text-right"> </td>-->
|
||||
<!--</tr>-->
|
||||
<!--<!–<tr>–>-->
|
||||
<!--<!–<td class="text-right"><b>Amount This Invoice</b></td>–>-->
|
||||
<!--<!–<td>{{newBillAmt}}</td>–>-->
|
||||
<!--<!–<td class="text-right"> </td>–>-->
|
||||
<!--<!–<td> </td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="text-right"><b>Balance to be Billed</b></td>-->
|
||||
<!--<td class="text-right"><div *ngIf="chosenPo">{{(chosenPo.contractAmt - chosenPo.previouslyBilledAmount - newBillAmt) | currency}}</div></td>-->
|
||||
<!--<!–<td>–>-->
|
||||
<!--<!–<div class="input-group mb-3">–>-->
|
||||
<!--<!–<div class="input-group-prepend">–>-->
|
||||
<!--<!–<span class="input-group-text"><b>Total</b></span>–>-->
|
||||
<!--<!–<span class="input-group-text">$</span>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–<input type="number" class="form-control" [value]="newBillAmt" #billAmtIn disabled>–>-->
|
||||
<!--<!–<div class="input-group-append">–>-->
|
||||
<!--<!–<span class="input-group-text">.00</span>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</div>–>-->
|
||||
<!--<!–</td>–>-->
|
||||
<!--<td class="text-right"><b>Total due this invoice</b></td>-->
|
||||
<!--<td>{{newBillAmt | currency}}</td>-->
|
||||
<!--</tr>-->
|
||||
<!--</tbody>-->
|
||||
<!--</table>-->
|
||||
<!--</div>-->
|
||||
|
||||
<!--Invoice Footer-->
|
||||
<div class="modal-body">
|
||||
|
@ -653,10 +660,57 @@
|
|||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success"
|
||||
(click)="addInvoice(inNumIn.value, poNumIn.value, coNumIn.value, pmtStatusIn.value, newBillAmt, notesIn.value, certIn.value, 1, new)"
|
||||
[disabled]="!(inNumIn.value && poNumIn.value && newBillAmt && certIn.value)">
|
||||
[disabled]="!(inNumIn.value && poNumIn.value)">
|
||||
<!--[disabled]="!(inNumIn.value && poNumIn.value && newBillAmt && certIn.value)">-->
|
||||
Confirm
|
||||
</button>
|
||||
<button type="reset" class="btn btn-danger" (click)="close(new)">Cancel</button>
|
||||
</div>
|
||||
<!--</form>-->
|
||||
</app-modal-form>
|
||||
|
||||
<!--MODAL: invoice details-->
|
||||
<app-modal-form [title]="'Invoice Details of ' + (chosenInv ? chosenInv.invoiceNumber: '')" #details>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 align-items-end">
|
||||
<ag-grid-angular
|
||||
style="height: 350px;"
|
||||
class="ag-theme-balham"
|
||||
[enableColResize]="true"
|
||||
[enableSorting]="true"
|
||||
[enableFilter]="true"
|
||||
[rowData]="selectedInDetails | async"
|
||||
[columnDefs]="detailColumnDefs"
|
||||
(cellEditingStopped)="updateDetailRow($event)"
|
||||
(gridReady)="onDetailGridReady($event)"
|
||||
(rowDataChanged)="resizeColumns($event)"
|
||||
rowSelection="single"
|
||||
></ag-grid-angular>
|
||||
<div class="input-group mt-2">
|
||||
<select class="custom-select"
|
||||
[disabled]="!selectedPODetails.length"
|
||||
#poDetSelec>
|
||||
<option *ngFor="let po of selectedPODetails" [value]="po.lineItemNo">{{po.serviceDesc}}</option>
|
||||
<option [value]="-1">Out of Pocket Expenses</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary btn-sm" type="button" (click)="addEmptyDetail()">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h4 align="end">Total Cost: {{selectedBillAmt | currency}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="modal-footer">-->
|
||||
<!--<button class="btn btn-outline-danger" (click)="close(details)">Exit</button>-->
|
||||
<!--</div>-->
|
||||
</app-modal-form>
|
|
@ -11,71 +11,23 @@ declare var $: any;
|
|||
styleUrls: ['./invoice.component.css']
|
||||
})
|
||||
export class InvoiceComponent implements OnInit {
|
||||
@ViewChild('agGrid') agGrid;
|
||||
chosenCustomerID: any = 0;
|
||||
chosenInv: any = 0;
|
||||
source;
|
||||
customers;
|
||||
pos = [];
|
||||
chosenPo;
|
||||
correspondingPos = [];
|
||||
correspondingCustomer = [];
|
||||
generatedInvoiceNumber = '';
|
||||
feeTypes = ['Fixed Fee', 'Hourly'];
|
||||
serviceTypes = ['Study', 'Design', 'Peer Review', 'Cost Investigation', 'Forensic Investigation'];
|
||||
gridApi;
|
||||
gridColumnApi;
|
||||
detailGridApi;
|
||||
detailColumnApi;
|
||||
|
||||
columnDefs = [
|
||||
{headerName: 'Customer', field: 'customerId'},
|
||||
{headerName: 'Invoice Number', field: 'invoiceNumber'},
|
||||
{headerName: 'Date', field: 'invoiceDate'},
|
||||
{headerName: 'Sales Order Number', field: 'poNum'},
|
||||
{headerName: 'Change Order Number', field: 'changeOrderNum'},
|
||||
{headerName: 'Outstanding Balance', field: 'outstandingBalance'},
|
||||
{headerName: 'Bll Amount', field: 'billAmt'}
|
||||
{headerName: 'Outstanding Balance', field: 'outstandingBalanceString'},
|
||||
{headerName: 'Bill Amount', field: 'billAmtString'},
|
||||
{headerName: 'Notes', field: 'specialNotes', editable: true, cellEditor: 'agLargeTextCellEditor'}
|
||||
];
|
||||
newInDetails = [];
|
||||
newBillAmt = 0;
|
||||
selectedInDetails = [];
|
||||
selectedPO;
|
||||
selectedBillAmt = 0;
|
||||
poDetails = [];
|
||||
selectedPODetails = [];
|
||||
|
||||
gridOptions = {
|
||||
|
||||
// PROPERTIES - object properties, myRowData and myColDefs are created somewhere in your application
|
||||
rowData: this.source,
|
||||
columnDefs: this.columnDefs,
|
||||
|
||||
// PROPERTIES - simple boolean / string / number properties
|
||||
enableColResize: true,
|
||||
rowSelection: 'single',
|
||||
|
||||
// EVENTS - add event callback handlers
|
||||
onRowClicked: (event) => {
|
||||
this.getSelectedRows();
|
||||
},
|
||||
onColumnResized: function (event) {
|
||||
console.log('a column was resized');
|
||||
},
|
||||
onGridReady: (event) => {
|
||||
},
|
||||
// this.agGrid.sizeColumnsToFit();
|
||||
// 1: draft
|
||||
// 2: submitted
|
||||
// 3: void
|
||||
|
||||
// getRowStyle: function(params) {
|
||||
// if (params.data.invoiceStatus === 1) {
|
||||
// return { 'color': 'red' }
|
||||
// } else if (params.data.invoiceStatus === 3) {
|
||||
// return { 'text-decoration': 'line-through'}
|
||||
// }
|
||||
// }
|
||||
|
||||
rowClassRules: {
|
||||
// apply green to 2008
|
||||
// 'bg-red': true,
|
||||
|
||||
// apply amber 2004
|
||||
'text-danger': function (params) {
|
||||
return params.data.invoiceStatus === 1;
|
||||
},
|
||||
|
@ -84,19 +36,58 @@ export class InvoiceComponent implements OnInit {
|
|||
},
|
||||
'text-warning': function (params) {
|
||||
return params.data.invoiceStatus === 3;
|
||||
},
|
||||
|
||||
// apply red to 2000
|
||||
// 'rag-red-outer': function(params) { return params.data.year === 2000}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
detailColumnDefs = [
|
||||
{headerName: '#', field: 'lineItemNum'},
|
||||
{headerName: 'PO Detail', field: 'poDetailName'},
|
||||
{headerName: 'Description', field: 'desc', editable: true, cellEditor: 'agLargeTextCellEditor'},
|
||||
{headerName: 'Fee Type', field: 'feeTypeName'},
|
||||
{headerName: 'Service Type', field: 'serviceTypeName'},
|
||||
{headerName: 'Qty or Hours', field: 'qty', editable: true},
|
||||
{headerName: '(/Remaining)', field: 'remainingQty'},
|
||||
{headerName: 'Fee', field: 'fee', editable: true}
|
||||
];
|
||||
|
||||
constructor(protected astuteClientService: AstuteClientService, protected printService: PrintInvoiceService) {
|
||||
chosenCustomerID: any = 0;
|
||||
chosenInv: any = 0;
|
||||
source;
|
||||
|
||||
chosenPo;
|
||||
correspondingPos = [];
|
||||
generatedInvoiceNumber = '';
|
||||
|
||||
serviceTypes = [];
|
||||
serviceNames = [];
|
||||
rateTypes = [];
|
||||
rateNames = [];
|
||||
customers;
|
||||
pos = [];
|
||||
allPODetails = [];
|
||||
|
||||
newInDetails = [];
|
||||
newBillAmt = 0;
|
||||
|
||||
selectedInDetails;
|
||||
selectedPO;
|
||||
selectedBillAmt = 0;
|
||||
selectedPODetails = [];
|
||||
|
||||
// poDetails = [];
|
||||
|
||||
|
||||
|
||||
constructor(protected astuteClientService: AstuteClientService,
|
||||
protected printService: PrintInvoiceService) {
|
||||
}
|
||||
|
||||
customerDropdownChange(index) {
|
||||
this.chosenCustomerID = this.customers[index].customerId;
|
||||
this.setCorrespondingPos();
|
||||
this.correspondingPos = this.pos.filter((po) => {
|
||||
console.log(po);
|
||||
return po.customerId === this.chosenCustomerID && !po.oneInvInDraft && po.isFinal;
|
||||
});
|
||||
}
|
||||
|
||||
poDropdownChange(ponum) {
|
||||
|
@ -105,31 +96,22 @@ export class InvoiceComponent implements OnInit {
|
|||
this.chosenPo = po;
|
||||
}
|
||||
})
|
||||
this.astuteClientService.getPODetail(ponum).then((data) => {
|
||||
if (data) {
|
||||
// fee
|
||||
// feeTypeId
|
||||
// lineItemNo
|
||||
// ponum
|
||||
// qty
|
||||
// remainingQty
|
||||
// serviceDesc
|
||||
// serviceTypeId
|
||||
|
||||
// lineItemNo, feeTypeId, serviceTypeId, serviceDesc, fee, remainingQty
|
||||
this.poDetails = data;
|
||||
this.poDetails[-1] = {
|
||||
'lineItemNo': -1,
|
||||
'feeTypeId': 1,
|
||||
'serviceTypeId': 1,
|
||||
'serviceDesc': 'Out of Pocket Expenses',
|
||||
'fee': 0,
|
||||
'remainingQty': 0
|
||||
};
|
||||
} else {
|
||||
alert("get PO detail failed!");
|
||||
}
|
||||
});
|
||||
// this.astuteClientService.getPODetail(ponum).then((data) => {
|
||||
// if (data) {
|
||||
// // lineItemNo, feeTypeId, serviceTypeId, serviceDesc, fee, remainingQty
|
||||
// this.poDetails = data;
|
||||
// this.poDetails[-1] = {
|
||||
// 'lineItemNo': -1,
|
||||
// 'feeTypeId': 1,
|
||||
// 'serviceTypeId': 1,
|
||||
// 'serviceDesc': 'Out of Pocket Expenses',
|
||||
// 'fee': 0,
|
||||
// 'remainingQty': 0
|
||||
// };
|
||||
// } else {
|
||||
// alert('get PO detail failed!');
|
||||
// }
|
||||
// });
|
||||
this.astuteClientService.generateInvoiceNumber(ponum).then((data) => {
|
||||
if (data) {
|
||||
this.generatedInvoiceNumber = data;
|
||||
|
@ -140,42 +122,152 @@ export class InvoiceComponent implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.astuteClientService.getServiceTypes().then((d) => {
|
||||
if (d) {
|
||||
this.serviceTypes = d;
|
||||
this.serviceTypes.forEach((type) => {
|
||||
this.serviceNames.push(type.serviceTypeDesc);
|
||||
});
|
||||
} else {
|
||||
alert ('Get service types failed');
|
||||
}
|
||||
}, reason => {
|
||||
alert('Get service type failed: ' + reason);
|
||||
});
|
||||
this.astuteClientService.getRateTypes().then((d) => {
|
||||
if (d) {
|
||||
this.rateTypes = d;
|
||||
this.rateTypes.forEach((type) => {
|
||||
this.rateNames.push(type.feeTypeDesc);
|
||||
});
|
||||
} else {
|
||||
alert ('Get rate types failed');
|
||||
}
|
||||
}, reason => {
|
||||
alert('Get rate type failed: ' + reason);
|
||||
});
|
||||
this.astuteClientService.getCustomers().then((customers) => {
|
||||
if (customers) {
|
||||
this.customers = customers;
|
||||
} else {
|
||||
alert('Get Customers Failed!');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Get Customers Failed: ' + reason);
|
||||
});
|
||||
this.astuteClientService.getPOs().then((data) => {
|
||||
this.pos = data;
|
||||
this.pos.forEach((po) => {
|
||||
this.astuteClientService.getPODetail(po.ponum).then((details) => {
|
||||
if (details) {
|
||||
details.forEach((detail) => {
|
||||
this.allPODetails.push(detail);
|
||||
});
|
||||
// console.log(this.allPODetails);
|
||||
} else {
|
||||
alert('Get PO Detail for ' + po.ponum + ' failed!');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Get PO Detail for ' + po.ponum + ' failed: ' + reason);
|
||||
|
||||
});
|
||||
});
|
||||
}, (reason) => {
|
||||
alert('Get SOs Failed: ' + reason);
|
||||
});
|
||||
this.refreshData();
|
||||
}
|
||||
|
||||
refreshData() {
|
||||
this.astuteClientService.getInvoices().then((data) => {
|
||||
this.source = data;
|
||||
console.log(data);
|
||||
this.source.forEach((row) => {
|
||||
row.billAmt = formatCurrency(row.billAmt, 'en-US', '$', 'USD');
|
||||
});
|
||||
this.source.forEach((row) => {
|
||||
row.outstandingBalance = formatCurrency(row.outstandingBalance, 'en-US', '$', 'USD');
|
||||
});
|
||||
});
|
||||
|
||||
this.astuteClientService.getCustomers().then((data) => {
|
||||
this.customers = data;
|
||||
});
|
||||
|
||||
this.astuteClientService.getPOs().then((data) => {
|
||||
this.pos = data;
|
||||
if (data) {
|
||||
this.source = data;
|
||||
// console.log(data);
|
||||
this.source.forEach((row) => {
|
||||
row.billAmtString = formatCurrency(row.billAmt, 'en-US', '$', 'USD');
|
||||
row.outstandingBalanceString = formatCurrency(row.outstandingBalance, 'en-US', '$', 'USD');
|
||||
});
|
||||
} else {
|
||||
alert('Get Invoices failed!');
|
||||
}
|
||||
});
|
||||
}
|
||||
refreshDetailsOfSelected() {
|
||||
this.setSelectedRow(null);
|
||||
}
|
||||
|
||||
getPODetails(poIndex) {
|
||||
let ponum = this.pos[poIndex].ponum;
|
||||
this.astuteClientService.getPODetail(ponum).then((data) => {
|
||||
this.selectedInDetails = data;
|
||||
console.log("inDetails:");
|
||||
console.log(this.selectedInDetails);
|
||||
const ponum = this.pos[poIndex].ponum;
|
||||
this.selectedInDetails = this.astuteClientService.getPODetail(ponum);
|
||||
}
|
||||
|
||||
updateRow(event) {
|
||||
const eventData = event.data;
|
||||
console.log(eventData);
|
||||
this.astuteClientService.updateInvoice(eventData.invoiceNumber, eventData).then((data) => {
|
||||
if (!data) {
|
||||
this.refreshData();
|
||||
alert('Invoice Updating Failed, Check Input Fields');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Update invoice failed: ' + reason);
|
||||
});
|
||||
// this.refreshData();
|
||||
}
|
||||
updateDetailRow(event) {
|
||||
const eventData = event.data;
|
||||
console.log(eventData);
|
||||
this.astuteClientService.updateInvoiceDetail(eventData.invoiceNumber, eventData.lineItemNum, eventData).then((data) => {
|
||||
if (!data) {
|
||||
this.refreshDetailsOfSelected();
|
||||
alert('Detail Updating Failed, Check Input Fields');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Update Detail failed: ' + reason);
|
||||
});
|
||||
}
|
||||
|
||||
setSelectedRow(event) {
|
||||
if (event) {
|
||||
this.chosenInv = event.data;
|
||||
}
|
||||
this.selectedBillAmt = this.chosenInv.billAmt;
|
||||
this.selectedPODetails = this.allPODetails.filter((detail) => {
|
||||
return (detail.ponum === this.chosenInv.poNum);
|
||||
});
|
||||
this.selectedInDetails = this.astuteClientService.getInvoiceDetail(this.chosenInv.invoiceNumber).then((data) => {
|
||||
if (data) {
|
||||
data.forEach((invDetail) => {
|
||||
const tempPo = this.selectedPODetails.filter((po) => {
|
||||
return po.lineItemNo === invDetail.poLineItemNum;
|
||||
})[0];
|
||||
if (tempPo) {
|
||||
invDetail.remainingQty = tempPo.remainingQty;
|
||||
}
|
||||
|
||||
invDetail.serviceTypeName = this.serviceNames[invDetail.serviceTypeId - 1];
|
||||
invDetail.rateTypeName = this.rateNames[invDetail.feeTypeId - 1];
|
||||
if (invDetail.poLineItemNum === -1) {
|
||||
invDetail.poDetailName = 'Out of Pocket Expenses';
|
||||
} else {
|
||||
invDetail.poDetailName = this.selectedPODetails[invDetail.poLineItemNum - 1].serviceDesc;
|
||||
}
|
||||
});
|
||||
return data;
|
||||
} else {
|
||||
alert('get Inv detail failed!');
|
||||
}
|
||||
});
|
||||
this.pos.forEach((po) => {
|
||||
if (po.ponum === this.chosenInv.poNum) {
|
||||
this.selectedPO = po;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedCellChange(row: number, col: string, value) {
|
||||
this.selectedInDetails[row][col] = value;
|
||||
console.log(this.selectedInDetails);
|
||||
// this.selectedInDetails[row][col] = value;
|
||||
// console.log(this.selectedInDetails);
|
||||
}
|
||||
|
||||
onNewCellChange(row: number, col: string, value) {
|
||||
|
@ -184,15 +276,15 @@ export class InvoiceComponent implements OnInit {
|
|||
}
|
||||
|
||||
pushOntoSelectedDetail(invoiceNum, lineItemNum, poLineItemNum, serviceTypeId, desc, qty, fee) {
|
||||
this.selectedInDetails.push({
|
||||
'invoiceNum': invoiceNum,
|
||||
'lineItemNum': lineItemNum,
|
||||
'poLineItemNum': poLineItemNum,
|
||||
'serviceTypeId': serviceTypeId,
|
||||
'desc': desc,
|
||||
'qty': +qty,
|
||||
'fee': +fee
|
||||
});
|
||||
// this.selectedInDetails.push({
|
||||
// 'invoiceNum': invoiceNum,
|
||||
// 'lineItemNum': lineItemNum,
|
||||
// 'poLineItemNum': poLineItemNum,
|
||||
// 'serviceTypeId': serviceTypeId,
|
||||
// 'desc': desc,
|
||||
// 'qty': +qty,
|
||||
// 'fee': +fee
|
||||
// });
|
||||
}
|
||||
|
||||
pushOntoNewDetail(invoiceNum, lineItemNum, poLineItemNum, feeTypeId, serviceTypeId, desc, qty, fee, remainingQty, poNum) {
|
||||
|
@ -218,65 +310,68 @@ export class InvoiceComponent implements OnInit {
|
|||
});
|
||||
this.newBillAmt = tot;
|
||||
}
|
||||
|
||||
updateSelectedBillAmt() {
|
||||
let tot = 0;
|
||||
this.selectedInDetails.forEach((d) => {
|
||||
tot += +d.qty * +d.fee;
|
||||
});
|
||||
this.selectedBillAmt = tot;
|
||||
// let tot = 0;
|
||||
// this.selectedInDetails.forEach((d) => {
|
||||
// tot += +d.qty * +d.fee;
|
||||
// });
|
||||
// this.selectedBillAmt = tot;
|
||||
}
|
||||
|
||||
assignActity(): void {
|
||||
window.open('/invoice-gen');
|
||||
}
|
||||
|
||||
printInvoice() {
|
||||
this.printService.printPDF (this.chosenInv.invoiceNumber);
|
||||
}
|
||||
|
||||
getSelectedRows() {
|
||||
const selectedNodes = this.agGrid.api.getSelectedNodes();
|
||||
if (selectedNodes.length) {
|
||||
this.chosenInv = selectedNodes.map(node => node.data)[0];
|
||||
// console.log (this.chosenInv);
|
||||
this.selectedBillAmt = +(this.chosenInv.billAmt.replace(',', '').replace('$', ''));
|
||||
this.astuteClientService.getPODetail(this.chosenInv.poNum).then((poDetails) => {
|
||||
if (poDetails) {
|
||||
this.selectedPODetails = poDetails;
|
||||
this.astuteClientService.getInvoiceDetail(this.chosenInv.invoiceNumber).then((invoiceDetails) => {
|
||||
if (invoiceDetails) {
|
||||
this.selectedInDetails = invoiceDetails;
|
||||
this.selectedInDetails.forEach((invDetail) => {
|
||||
const tempPo = this.selectedPODetails.filter((po) => {
|
||||
// console.log (po.lineItemNo + " and " + invDetail.poLineItemNum);
|
||||
return po.lineItemNo === invDetail.poLineItemNum;
|
||||
})[0];
|
||||
if (tempPo) {
|
||||
invDetail.remainingQty = tempPo.remainingQty;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert("get Inv detail failed!");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert("get PO detail failed!")
|
||||
}
|
||||
});
|
||||
this.pos.forEach((po) => {
|
||||
if (po.ponum === this.chosenInv.poNum) {
|
||||
this.selectedPO = po;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.chosenInv = null;
|
||||
this.selectedPODetails = [];
|
||||
}
|
||||
}
|
||||
// getSelectedRows() {
|
||||
// const selectedNodes = this.gridApi.getSelectedNodes();
|
||||
// if (selectedNodes.length) {
|
||||
// this.chosenInv = selectedNodes.map(node => node.data)[0];
|
||||
// // console.log (this.chosenInv);
|
||||
// this.selectedBillAmt = +(this.chosenInv.billAmt.replace(',', '').replace('$', ''));
|
||||
// this.astuteClientService.getPODetail(this.chosenInv.poNum).then((poDetails) => {
|
||||
// if (poDetails) {
|
||||
// this.selectedPODetails = poDetails;
|
||||
// this.astuteClientService.getInvoiceDetail(this.chosenInv.invoiceNumber).then((invoiceDetails) => {
|
||||
// if (invoiceDetails) {
|
||||
// this.selectedInDetails = invoiceDetails;
|
||||
// this.selectedInDetails.forEach((invDetail) => {
|
||||
// const tempPo = this.selectedPODetails.filter((po) => {
|
||||
// // console.log (po.lineItemNo + " and " + invDetail.poLineItemNum);
|
||||
// return po.lineItemNo === invDetail.poLineItemNum;
|
||||
// })[0];
|
||||
// if (tempPo) {
|
||||
// invDetail.remainingQty = tempPo.remainingQty;
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// alert("get Inv detail failed!");
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// alert("get PO detail failed!")
|
||||
// }
|
||||
// });
|
||||
// this.pos.forEach((po) => {
|
||||
// if (po.ponum === this.chosenInv.poNum) {
|
||||
// this.selectedPO = po;
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// this.chosenInv = null;
|
||||
// this.selectedPODetails = [];
|
||||
// }
|
||||
// }
|
||||
|
||||
open(content, indexPO, indexINV) {
|
||||
this.setCorrespondingCustomer();
|
||||
// open(content, indexPO, indexINV) {
|
||||
open(content) {
|
||||
// this.setCorrespondingCustomer();
|
||||
if (this.gridColumnApi) {
|
||||
this.gridColumnApi.autoSizeAllColumns();
|
||||
}
|
||||
if (this.detailColumnApi) {
|
||||
this.detailColumnApi.autoSizeAllColumns();
|
||||
}
|
||||
content.open();
|
||||
// this.detailDescription = ViewChild('detailDescription');
|
||||
// this.detailAmount = ViewChild('detailAmount');
|
||||
|
@ -295,7 +390,6 @@ export class InvoiceComponent implements OnInit {
|
|||
// this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
|
||||
// });
|
||||
}
|
||||
|
||||
close(content) {
|
||||
content.close();
|
||||
// this.newInDetails = [];
|
||||
|
@ -340,7 +434,6 @@ export class InvoiceComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
addInvoice(invoiceNumber, poNum, changeOrderNum, pmtStatus, billAmt, specialNotes, certification, status, ref) {
|
||||
// String invoiceNumber;
|
||||
// Date invoiceDate;
|
||||
|
@ -372,61 +465,13 @@ export class InvoiceComponent implements OnInit {
|
|||
.then((data) => {
|
||||
if (data) {
|
||||
this.refreshData();
|
||||
this.addInvoiceDetail(this.newInDetails);
|
||||
// this.addInvoiceDetail(this.newInDetails);
|
||||
ref.close();
|
||||
} else {
|
||||
alert('Invoice Creation Failed, Check Input Fields');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
addInvoiceDetail(details) {
|
||||
if (details.length) {
|
||||
// console.log(details[0]);
|
||||
// if (details[0].poLineItemNum !== -1) {
|
||||
this.astuteClientService.createInvoiceDetail(details[0]).then((data) => {
|
||||
if (data) {
|
||||
details.splice(0, 1);
|
||||
this.addInvoiceDetail(details);
|
||||
} else {
|
||||
alert('add inv detail failed');
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// desc
|
||||
// fee
|
||||
// feeTypeId
|
||||
// invoiceNum
|
||||
// lineItemNum
|
||||
// poLineItemNum
|
||||
// qty
|
||||
// remainingQty
|
||||
// serviceTypeId
|
||||
// poNum
|
||||
|
||||
// const data = {
|
||||
// // 'lineItemNo': details[0].,
|
||||
// 'poNum': details[0].poNum,
|
||||
// 'serviceDesc': details[0].desc,
|
||||
// 'feeTypeId': details[0].feeTypeId,
|
||||
// 'serviceTypeId': details[0].serviceTypeId,
|
||||
// 'qty': +details[0].qty,
|
||||
// 'fee': +details[0].fee,
|
||||
// 'remainingQty': +details[0].fee * +details[0].qty
|
||||
// };
|
||||
// this.astuteClientService.createPODetail(data).then((d) => {
|
||||
// if (d) {
|
||||
// console.log (d);
|
||||
// } else {
|
||||
// alert('create custom PO failed.');
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
} else {
|
||||
this.newInDetails = [];
|
||||
}
|
||||
}
|
||||
|
||||
editInvoice(invoiceNumber, poNum, changeOrderNum, pmtStatus, billAmt, specialNotes, certification) {
|
||||
// String invoiceNumber;
|
||||
// Date invoiceDate;
|
||||
|
@ -464,7 +509,6 @@ export class InvoiceComponent implements OnInit {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
voidInvoice(invoiceNumber) {
|
||||
if (confirm('Are you sure you want to void invoice, ' + invoiceNumber)) {
|
||||
this.astuteClientService.voidInvoice(invoiceNumber).then((data) => {
|
||||
|
@ -476,7 +520,6 @@ export class InvoiceComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
submitInvoice(invoiceNumber) {
|
||||
this.astuteClientService.submitInvoice(invoiceNumber).then((data) => {
|
||||
if (data) {
|
||||
|
@ -487,23 +530,141 @@ export class InvoiceComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
// creates empty line item detail
|
||||
addEmptyDetail(poLineItemNum) {
|
||||
const emptyData = {
|
||||
desc: '',
|
||||
fee: 0,
|
||||
feeTypeId: 1,
|
||||
invoiceNum: this.chosenInv.invoiceNumber,
|
||||
// lineItemNum: 1,
|
||||
poLineItemNum: poLineItemNum,
|
||||
qty: 1,
|
||||
remainingQty: 1,
|
||||
serviceTypeId: 1
|
||||
};
|
||||
|
||||
// desc: "Design Somethign"
|
||||
// fee: 2500
|
||||
// feeTypeId: 1
|
||||
// invoiceNum: "MDO-01_DRAFT_157"
|
||||
// lineItemNum: 1
|
||||
// poLineItemNum: 1
|
||||
// qty: 1
|
||||
// remainingQty: 0
|
||||
// serviceTypeId: 2
|
||||
|
||||
this.astuteClientService.createInvoiceDetail(emptyData).then((data) => {
|
||||
if (!data) {
|
||||
this.refreshDetailsOfSelected();
|
||||
alert('Creating SO detailed failed!');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Creating SO detailed failed: ' + reason);
|
||||
});
|
||||
}
|
||||
|
||||
// addInvoiceDetail(details) {
|
||||
// if (details.length) {
|
||||
// // console.log(details[0]);
|
||||
// // if (details[0].poLineItemNum !== -1) {
|
||||
// this.astuteClientService.createInvoiceDetail(details[0]).then((data) => {
|
||||
// if (data) {
|
||||
// details.splice(0, 1);
|
||||
// this.addInvoiceDetail(details);
|
||||
// } else {
|
||||
// alert('add inv detail failed');
|
||||
// }
|
||||
// });
|
||||
// // } else {
|
||||
// // desc
|
||||
// // fee
|
||||
// // feeTypeId
|
||||
// // invoiceNum
|
||||
// // lineItemNum
|
||||
// // poLineItemNum
|
||||
// // qty
|
||||
// // remainingQty
|
||||
// // serviceTypeId
|
||||
// // poNum
|
||||
//
|
||||
// // const data = {
|
||||
// // // 'lineItemNo': details[0].,
|
||||
// // 'poNum': details[0].poNum,
|
||||
// // 'serviceDesc': details[0].desc,
|
||||
// // 'feeTypeId': details[0].feeTypeId,
|
||||
// // 'serviceTypeId': details[0].serviceTypeId,
|
||||
// // 'qty': +details[0].qty,
|
||||
// // 'fee': +details[0].fee,
|
||||
// // 'remainingQty': +details[0].fee * +details[0].qty
|
||||
// // };
|
||||
// // this.astuteClientService.createPODetail(data).then((d) => {
|
||||
// // if (d) {
|
||||
// // console.log (d);
|
||||
// // } else {
|
||||
// // alert('create custom PO failed.');
|
||||
// // }
|
||||
// // });
|
||||
// // }
|
||||
// } else {
|
||||
// this.newInDetails = [];
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
getPerc(amt, total): number {
|
||||
return Math.floor(((amt) / total) * 100);
|
||||
}
|
||||
|
||||
getRangeMax(total, num) {
|
||||
return Math.floor(total / num);
|
||||
}
|
||||
|
||||
setCorrespondingPos() {
|
||||
this.correspondingPos = this.pos.filter((po, index, array) => {
|
||||
return po.customerId === this.chosenCustomerID && !po.oneInvInDraft && po.final;
|
||||
|
||||
// setCorrespondingCustomer() {
|
||||
// this.correspondingCustomer = this.customers.filter((customer, index, array) => {
|
||||
// return customer.customerId === this.chosenInv.customerId;
|
||||
// });
|
||||
// }
|
||||
|
||||
getCustomerNameFromId(customerId) {
|
||||
let name = '';
|
||||
this.customers.forEach((customer) => {
|
||||
if (customer.customerId === customerId) {
|
||||
name = customer.customerName;
|
||||
}
|
||||
});
|
||||
return name;
|
||||
}
|
||||
getServiceIdFromName(name) {
|
||||
let id = -1;
|
||||
this.serviceTypes.forEach((type) => {
|
||||
console.log(type.serviceTypeDesc + ' ' + name);
|
||||
if (type.serviceTypeDesc === name) {
|
||||
id = type.serviceTypeId;
|
||||
}
|
||||
});
|
||||
return id;
|
||||
}
|
||||
getFeeIdFromName(name: any) {
|
||||
let id = -1;
|
||||
this.rateTypes.forEach((type) => {
|
||||
if (type.feeTypeDesc === name) {
|
||||
id = type.feeTypeId;
|
||||
}
|
||||
});
|
||||
return id;
|
||||
}
|
||||
|
||||
setCorrespondingCustomer() {
|
||||
this.correspondingCustomer = this.customers.filter((customer, index, array) => {
|
||||
return customer.customerId === this.chosenInv.customerId;
|
||||
});
|
||||
// ag grid callbacks
|
||||
onGridReady(evt) {
|
||||
this.gridApi = evt.api;
|
||||
this.gridColumnApi = evt.columnApi;
|
||||
}
|
||||
onDetailGridReady(evt) {
|
||||
this.detailGridApi = evt.api;
|
||||
this.detailColumnApi = evt.columnApi;
|
||||
}
|
||||
resizeColumns(evt) {
|
||||
evt.columnApi.autoSizeAllColumns();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,16 @@ export class SalesOrderComponent implements OnInit {
|
|||
{headerName: 'notes', field: 'notes', editable: true, cellEditor: 'agLargeTextCellEditor'}
|
||||
// {headerName: 'oneInvInDraft', field: 'oneInvInDraft'}
|
||||
];
|
||||
gridOptions = {
|
||||
rowClassRules: {
|
||||
'text-danger': function (params) {
|
||||
return !params.data.isFinal;
|
||||
},
|
||||
'text-primary': function (params) {
|
||||
return params.data.isFinal;
|
||||
},
|
||||
}
|
||||
};
|
||||
selected = null; // the selected SO row
|
||||
|
||||
// data for SO detail grid
|
||||
|
@ -85,13 +95,13 @@ export class SalesOrderComponent implements OnInit {
|
|||
this.astuteClientService.getCustomers().then((customers) => {
|
||||
if (customers) {
|
||||
this.customers = customers;
|
||||
this.refreshData();
|
||||
} else {
|
||||
alert('Get Customers Failed!');
|
||||
}
|
||||
}, (reason) => {
|
||||
alert('Get Customers Failed: ' + reason);
|
||||
});
|
||||
this.refreshData();
|
||||
}
|
||||
|
||||
// callback for grid selection
|
||||
|
@ -109,12 +119,12 @@ export class SalesOrderComponent implements OnInit {
|
|||
});
|
||||
// console.log(this.selectedPODetail);
|
||||
this.updateContractAmt();
|
||||
if (this.gridColumnApi) {
|
||||
this.gridColumnApi.autoSizeAllColumns();
|
||||
}
|
||||
if (this.detailColumnApi) {
|
||||
this.detailColumnApi.autoSizeAllColumns();
|
||||
}
|
||||
// if (this.gridColumnApi) {
|
||||
// this.gridColumnApi.autoSizeAllColumns();
|
||||
// }
|
||||
// if (this.detailColumnApi) {
|
||||
// this.detailColumnApi.autoSizeAllColumns();
|
||||
// }
|
||||
return data;
|
||||
} else {
|
||||
alert('Get SO detail failed!');
|
||||
|
@ -132,8 +142,8 @@ export class SalesOrderComponent implements OnInit {
|
|||
this.astuteClientService.updatePO(eventData.poNum, eventData).then((data) => {
|
||||
if (!data) {
|
||||
alert('SO updating failed, check input fields');
|
||||
this.refreshData();
|
||||
}
|
||||
this.refreshData();
|
||||
}, (reason) => {
|
||||
alert('Update SO failed: ' + reason);
|
||||
});
|
||||
|
@ -152,8 +162,8 @@ export class SalesOrderComponent implements OnInit {
|
|||
this.astuteClientService.updatePODetail(eventData.poNum, eventData.lineItemNo, eventData).then((data) => {
|
||||
if (!data) {
|
||||
alert('SO Detail updating failed, check input fields');
|
||||
this.refreshDetailsOfSelected();
|
||||
}
|
||||
this.refreshDetailsOfSelected();
|
||||
}, (reason) => {
|
||||
alert('Update SO Detail failed: ' + reason);
|
||||
});
|
||||
|
@ -270,8 +280,12 @@ export class SalesOrderComponent implements OnInit {
|
|||
// open and closing modal-form components
|
||||
open(ref) {
|
||||
// this.getSelectedRows();
|
||||
this.gridColumnApi.autoSizeAllColumns();
|
||||
this.detailColumnApi.autoSizeAllColumns();
|
||||
if (this.gridColumnApi) {
|
||||
this.gridColumnApi.autoSizeAllColumns();
|
||||
}
|
||||
if (this.detailColumnApi) {
|
||||
this.detailColumnApi.autoSizeAllColumns();
|
||||
}
|
||||
ref.open();
|
||||
}
|
||||
close(ref) {
|
||||
|
|
|
@ -140,7 +140,7 @@ public class SqlDAO extends DAO {
|
|||
updateClause = updateClause + " PO_Date = STR_TO_DATE('" + PODate + "', '%Y-%m-%d')" + ",";
|
||||
updateClause = updateClause + " contract_amt = " + contractAmt+ ",";
|
||||
updateClause = updateClause + " astute_project_num = '" + astuteProjectNumber +"',";
|
||||
updateClause = updateClause + " title = '" + title +"'";
|
||||
updateClause = updateClause + " title = '" + title +"',";
|
||||
updateClause = updateClause + " notes = '" + notes +"'";
|
||||
sql = sql+ updateClause + whereClause;
|
||||
System.out.println(sql);
|
||||
|
@ -266,7 +266,7 @@ public class SqlDAO extends DAO {
|
|||
|
||||
public void finalizePO(String PONum) throws AstuteException {
|
||||
try {
|
||||
String sql = "UPDATE PO_MASTER SET final = 1 WHERE PO_Num = '" + PONum + "''";
|
||||
String sql = "UPDATE PO SET final = 1 WHERE PO_Num = '" + PONum + "'";
|
||||
System.out.println(sql);
|
||||
Statement stmt = conn.createStatement();
|
||||
stmt.executeUpdate(sql);
|
||||
|
@ -278,7 +278,7 @@ public class SqlDAO extends DAO {
|
|||
|
||||
public void deletePO(String PONum) throws AstuteException {
|
||||
try {
|
||||
String sql = "DELETE FROM PO_MASTER SET final = 1 WHERE PO_Num = '" + PONum + "'' AND final = 0";
|
||||
String sql = "DELETE FROM PO SET final = 1 WHERE PO_Num = '" + PONum + "' AND final = 0";
|
||||
System.out.println(sql);
|
||||
Statement stmt = conn.createStatement();
|
||||
stmt.executeUpdate(sql);
|
||||
|
@ -329,7 +329,7 @@ public class SqlDAO extends DAO {
|
|||
public void createServiceType(String desc) throws AstuteException {
|
||||
try {
|
||||
Statement stmt = conn.createStatement();
|
||||
String sql = "INSERT INTO service_type (service_type_id, `desc`) VALUES ((SELECT MAX(service_type_id)+1 FROM SERVICE_TYPE B), desc)";
|
||||
String sql = "INSERT INTO service_type (service_type_id, `desc`) VALUES ((SELECT MAX(service_type_id)+1 FROM SERVICE_TYPE B), '" + desc + "')";
|
||||
stmt.executeUpdate(sql);
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -449,7 +449,6 @@ public class SqlDAO extends DAO {
|
|||
whereClause = whereClause + " pmt_status = "+ pmtStatus;
|
||||
}
|
||||
if (!whereClause.equals(" WHERE ")) {
|
||||
|
||||
sql += whereClause;
|
||||
}
|
||||
System.out.println(sql);
|
||||
|
@ -986,7 +985,7 @@ public class SqlDAO extends DAO {
|
|||
stmt.executeUpdate();
|
||||
result = stmt.getString(1);
|
||||
System.out.println(result);
|
||||
if (!result.equals("SUCCESS")) {
|
||||
if (!result.equals("Success")) {
|
||||
throw new AstuteException(DB_ERROR, result);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
|
@ -1049,25 +1048,24 @@ public class SqlDAO extends DAO {
|
|||
String sql = "select user_id, username, password, CONCAT(first_name, ' ', last_name) as name from user where username='" + username + "'";
|
||||
|
||||
try {
|
||||
Statement stmt = conn.createStatement();
|
||||
ResultSet resultSet = stmt.executeQuery(sql);
|
||||
Statement stmt = conn.createStatement();
|
||||
ResultSet resultSet = stmt.executeQuery(sql);
|
||||
|
||||
User user = null;
|
||||
if(resultSet.next()) {
|
||||
user = new User(resultSet.getInt(1),
|
||||
resultSet.getString(2),
|
||||
resultSet.getString(3),
|
||||
resultSet.getString(4),null
|
||||
);
|
||||
}
|
||||
// conn.close();
|
||||
|
||||
return user;
|
||||
User user = null;
|
||||
if(resultSet.next()) {
|
||||
user = new User(resultSet.getInt(1),
|
||||
resultSet.getString(2),
|
||||
resultSet.getString(3),
|
||||
resultSet.getString(4), null
|
||||
);
|
||||
}
|
||||
// conn.close();
|
||||
return user;
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
throw new AstuteException(DB_ERROR,e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void createSession(int userId, String sessionId) throws AstuteException {
|
||||
try {
|
||||
|
@ -1273,7 +1271,7 @@ public class SqlDAO extends DAO {
|
|||
public User login(String username, String password) throws AstuteException{
|
||||
User user = getUser(username);
|
||||
boolean check = false;
|
||||
if (password.equals(user.getPassword())) {
|
||||
if (user != null && password.equals(user.getPassword())) {
|
||||
check = true;
|
||||
}
|
||||
// try {
|
||||
|
@ -1283,14 +1281,14 @@ public class SqlDAO extends DAO {
|
|||
// } catch (InvalidKeySpecException e) {
|
||||
//
|
||||
// }
|
||||
if(check) {
|
||||
if (check) {
|
||||
//create session
|
||||
String sessionId = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
|
||||
createSession(user.getUserId(), sessionId);
|
||||
user.setSessionId(sessionId);
|
||||
return user;
|
||||
}else{
|
||||
} else {
|
||||
return null; //"Username or password was not correct";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ public class ServiceTypeRequest {
|
|||
this.serviceTypeDesc = serviceTypeDesc;
|
||||
}
|
||||
|
||||
public ServiceTypeRequest() {}
|
||||
|
||||
public ServiceTypeRequest(int serviceTypeId, String desc) {
|
||||
this.serviceTypeId = serviceTypeId;
|
||||
this.serviceTypeDesc = serviceTypeDesc;
|
||||
|
|
|
@ -14,7 +14,7 @@ import javax.ws.rs.Produces;
|
|||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
@Path("auth")
|
||||
@Path("/auth")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
public class AuthResource {
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/webapp/WEB-INF/web.xml" />
|
||||
</descriptors>
|
||||
<webroots>
|
||||
<root url="file://$MODULE_DIR$/webapp" relative="/" />
|
||||
</webroots>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in New Issue
Block a user