diff --git a/AstuteClient2/src/app/app-box/app-box.component.ts b/AstuteClient2/src/app/app-box/app-box.component.ts
index db65c33..6a1aa0f 100644
--- a/AstuteClient2/src/app/app-box/app-box.component.ts
+++ b/AstuteClient2/src/app/app-box/app-box.component.ts
@@ -22,6 +22,7 @@ export class AppBoxComponent implements OnInit {
       return this.color;
     } else {
       const clr = this.padStart(Math.floor((Math.random() * 16777215)).toString(16), 6, '0');
+      console.log (clr);
       return '#' + clr;
     }
   }
diff --git a/AstuteClient2/src/app/app-routing.module.ts b/AstuteClient2/src/app/app-routing.module.ts
index b24699f..41f605c 100644
--- a/AstuteClient2/src/app/app-routing.module.ts
+++ b/AstuteClient2/src/app/app-routing.module.ts
@@ -11,6 +11,7 @@ import {LoginComponent} from './login/login.component';
 
 const routes: Routes = [
   { path: '', redirectTo: 'login', pathMatch: 'full'},
+  { path: 'home', redirectTo: 'homepage', pathMatch: 'full'},
   { path: 'homepage', component: HomepageComponent },
   { path: 'customer', component: CustomerComponent },
   { path: 'sales-order', component: SalesOrderComponent },
diff --git a/AstuteClient2/src/app/customer/customer.component.html b/AstuteClient2/src/app/customer/customer.component.html
index 712e442..bbe01d5 100644
--- a/AstuteClient2/src/app/customer/customer.component.html
+++ b/AstuteClient2/src/app/customer/customer.component.html
@@ -125,7 +125,7 @@
 
       <tr>
         <td style="width: 1%">
-          <span class="input-group-text">Fax</span>
+          <span class="input-group-text">Fax*</span>
         </td>
         <td colspan="7">
           <input type="tel" class="form-control" placeholder="(123) 456-7890" [value]="''" [textMask]="{mask: usPhoneMask, guide: false}" #inFax>
@@ -137,7 +137,7 @@
 
   <div class="modal-footer">
     <button class="btn btn-success" type="button"
-            [disabled]="!(inId.value && inName.value && inBillToDept.value && inAdd1.value && inCity.value && inState.value && inZIP.value && inEmail.value && inPhone.value)"
+            [disabled]="!(inId.value && inName.value && inBillToDept.value && inAdd1.value && inCity.value && inState.value && inZIP.value && inEmail.value && inPhone.value && inFax.value)"
             (click)="addCustomer(inId.value, inName.value, inBillToDept.value, inAdd1.value, inAdd2.value, inCity.value, inState.value, inZIP.value, inZIP4.value, inEmail.value, inPhone.value, inFax.value, new)">
       +
     </button>
diff --git a/AstuteClient2/src/app/invoice-payment/invoice-payment.component.html b/AstuteClient2/src/app/invoice-payment/invoice-payment.component.html
index 0dfb3cc..e2760b1 100644
--- a/AstuteClient2/src/app/invoice-payment/invoice-payment.component.html
+++ b/AstuteClient2/src/app/invoice-payment/invoice-payment.component.html
@@ -9,7 +9,7 @@
               class="ag-theme-balham"
               [enableSorting]="true"
               [enableFilter]="true"
-              [rowData]="rowData | async"
+              [rowData]="rowData"
               [columnDefs]="columnDefs"
               rowSelection="single"
       ></ag-grid-angular>
@@ -27,68 +27,71 @@
 
 <!--MODAL: new Invoice Payment-->
 <app-modal-form [title]="'New Invoice Payment'" #new>
-  <div class="modal-body">
-    <table class="table table-borderless table-sm">
-      <tbody>
-      <tr>
-        <td>
-          <span class="input-group-text">Invoice Number*</span>
-        </td>
-        <td>
-          <select class="custom-select" (change)="invoiceDropdownChange(invoiceSelect.value)"
-                  #invoiceSelect>
-            <!--[value]="chosenInv.invoiceNumber"-->
-            <option [value]="-1">Choose Invoice...</option>
-            <option *ngFor="let invoice of invoices; let i = index;" [value]="i">{{invoice.invoiceNumber}}
-            </option>
-          </select>
-        </td>
-      </tr>
+  <form>
+    <div class="modal-body">
+      <table class="table table-borderless table-sm">
+        <tbody>
+        <tr>
+          <td>
+            <span class="input-group-text">Invoice Number*</span>
+          </td>
+          <td>
+            <select class="custom-select" (change)="invoiceDropdownChange(invoiceSelect.value)"
+                    #invoiceSelect>
+              <!--[value]="chosenInv.invoiceNumber"-->
+              <option [value]="-1">Choose Invoice...</option>
+              <option *ngFor="let invoice of invoices; let i = index;" [value]="i">{{invoice.invoiceNumber}}
+              </option>
+            </select>
+          </td>
+        </tr>
 
-      <tr>
-        <td style="width: 10%">
-          <span class="input-group-text">Payment Received*</span>
-        </td>
-        <td colspan="7">
-          <input type="text" class="form-control" placeholder="$00.00" #inPaymentReceived>
-        </td>
-      </tr>
+        <tr>
+          <td style="width: 10%">
+            <span class="input-group-text">Payment Received*</span>
+          </td>
+          <td colspan="7">
+            <input type="text" class="form-control" placeholder="$00.00" #inPaymentReceived>
+          </td>
+        </tr>
 
-      <tr>
-        <td style="width: 10%">
-          <span class="input-group-text">Payment Type*</span>
-        </td>
-        <td>
-            <select class="custom-select" (change)="paymentTypeDropdownChange(paymentTypeSelect.value)"
-                    #paymentTypeSelect>
+        <tr>
+          <td style="width: 10%">
+            <span class="input-group-text">Payment Type*</span>
+          </td>
+          <td>
+              <select class="custom-select" (change)="paymentTypeDropdownChange(paymentTypeSelect.value)"
+                      #paymentTypeSelect>
 
-            <option selected>Choose...</option>
-            <option *ngFor="let paymentType of paymentTypes;  let i = index;" [value]="i">{{paymentType.paymentTypeName}}</option>
-          </select>
-        </td>
-      </tr>
+              <option selected>Choose...</option>
+              <option *ngFor="let paymentType of paymentTypes;  let i = index;" [value]="i">{{paymentType.paymentTypeName}}</option>
+            </select>
+          </td>
+        </tr>
 
-      <tr>
-        <td style="width: 10%">
-          <span class="input-group-text">Payment Date*</span>
-        </td>
-        <td colspan="7">
-          <input type="date" class="form-control" #inDateReceived>
-        </td>
-      </tr>
+        <tr>
+          <td style="width: 10%">
+            <span class="input-group-text">Payment Date*</span>
+          </td>
+          <td colspan="7">
+            <input type="date" class="form-control" #inDateReceived>
+          </td>
+        </tr>
 
-      </tbody>
-    </table>
-  </div>
+        </tbody>
+      </table>
+    </div>
 
-  <div class="modal-footer">
-    <button class="btn btn-success" type="button"
-            [disabled]="!(chosenInv && inPaymentReceived.value && chosenPaymentType && inDateReceived.value)"
-            (click)="addInvoicePayment(chosenInv, null, chosenPaymentType, null, inDateReceived.value, inPaymentReceived.value, new)">
-      +
-    </button>
-    <button type="button" class="btn btn-danger" (click)="close(new)">Cancel</button>
-  </div>
+    <div class="modal-footer">
+      <button class="btn btn-success" type="button"
+              [disabled]="!(chosenInv && inPaymentReceived.value && chosenPaymentType && inDateReceived.value)"
+              (click)="addInvoicePayment(chosenInv, null, chosenPaymentType, null, inDateReceived.value, inPaymentReceived.value, new)">
+        +
+      </button>
+      <!--<input type="reset" (click)="close(new)">Cancel-->
+      <button type="reset" class="btn btn-danger" (click)="close(new)">Cancel</button>
+    </div>
+  </form>
 </app-modal-form>
 
 <!--MODAL: edit invoice payment-->
@@ -126,7 +129,6 @@
         </tbody>
       </table>
     </div>
-
     <div class="modal-footer">
       <button class="btn btn-warning" type="button"
               [disabled]="!(invoiceSelect.value && inPaymentReceived.value && inDateReceived.value)"
@@ -138,7 +140,7 @@
   </div>
   <div *ngIf="!selected">
     <div class="modal-body">
-      Choose an Invoice First!
+      Choose an Invoice Payment First!
     </div>
     <div class="modal-footer">
       <button class="btn btn-warning" type="button"
diff --git a/AstuteClient2/src/app/invoice-payment/invoice-payment.component.ts b/AstuteClient2/src/app/invoice-payment/invoice-payment.component.ts
index 240107e..c549da0 100644
--- a/AstuteClient2/src/app/invoice-payment/invoice-payment.component.ts
+++ b/AstuteClient2/src/app/invoice-payment/invoice-payment.component.ts
@@ -19,7 +19,7 @@ export class InvoicePaymentComponent implements OnInit {
     columnDefs = [
         {headerName: 'Invoice Payment Id', field: 'invoicePaymentId'},
         {headerName: 'Invoice Number', field: 'invoiceNum'},
-        {headerName: 'payment Received', field: 'invoiceAmount'},
+        {headerName: 'Payment Received', field: 'invoiceAmount'},
         {headerName: 'Date Received', field: 'paymentDate'},
         {headerName: 'Payment Type', field: 'paymentType'}
 
@@ -108,9 +108,13 @@ export class InvoicePaymentComponent implements OnInit {
             this.paymentTypes = data;
         });
 
-        this.rowData = this.astuteClientService.getInvoicePayments();
-        this.rowData.forEach((row) => {
-            row.invoiceAmount = formatCurrency(row.invoiceAmount, 'en-US', '$', "USD");
+        this.astuteClientService.getInvoicePayments().then ((data) => {
+            if (data) {
+                this.rowData = data;
+                this.rowData.forEach((row) => {
+                    row.invoiceAmount = formatCurrency(row.invoiceAmount, 'en-US', '$', 'USD');
+                });
+            }
         });
         this.astuteClientService.getInvoicePayments().then((data) => {
             this.invoicePaymentData = data;
diff --git a/AstuteClient2/src/app/invoice/invoice.component.html b/AstuteClient2/src/app/invoice/invoice.component.html
index 424a2ba..dcbf1e3 100644
--- a/AstuteClient2/src/app/invoice/invoice.component.html
+++ b/AstuteClient2/src/app/invoice/invoice.component.html
@@ -183,7 +183,7 @@
                 <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></textarea>
+                                              (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>
@@ -194,7 +194,7 @@
                 </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>
+                                           (change)="onSelectedCellChange(i, 'qty', qty.value); updateSelectedBillAmt()" #qty [disabled]="chosenInv.invoiceStatus !== 1">
                 </td>
             </tr>
             <tr class="p-0 m-0" *ngIf="inDet.poLineItemNum != -1">
@@ -254,7 +254,7 @@
                             (change)="pushOntoSelectedDetail(inNumIn.value, newInDetails.length + 1, selectedPODetails[poDetSelec.value].lineItemNo,
                   selectedPODetails[poDetSelec.value].feeTypeId, selectedPODetails[poDetSelec.value].serviceTypeId,
                   selectedPODetails[poDetSelec.value].serviceDesc, 1, 0, selectedPODetails[poDetSelec.value].remainingQty)"
-                            [disabled]="!selectedPODetails.length"
+                            [disabled]="!selectedPODetails.length && chosenInv.invoiceStatus !== 1"
                             #poDetSelec>
                         <option>Choose PO Detail...</option>
                         <option *ngFor="let po of selectedPODetails; let i = index;" [value]="i">{{po.serviceDesc}}
@@ -369,247 +369,247 @@
 
 <!--MODAL: new invoice-->
 <app-modal-form [title]="'New Invoice'" #new>
-    <!--General-->
-    <div class="modal-body">
-        <p class="h4 text-right">General</p>
-        <hr>
-        <table class="table table-borderless table-sm">
-            <tbody>
-                <tr>
-                    <td style="width: 1%">
-                        <span class="input-group-text">Customer </span>
-                    </td>
-                    <td>
-                        <select class="custom-select" (change)="customerDropdownChange(customerSelec.value)" #customerSelec>
-                            <option [value]="-1">Choose Customer...</option>
-                            <option *ngFor="let customer of customers; let i = index;" [value]="i">{{customer.customerName}}
-                            </option>
-                        </select>
-                    </td>
-                    <td style="width: 5%"></td>
-                    <td style="width: 10%">
-                        <span class="input-group-text">SO Number*</span>
-                    </td>
-                    <td>
-                        <select class="custom-select" (change)="poDropdownChange(poNumIn.value)"
-                                [disabled]="!correspondingPos.length" #poNumIn>
-                            <option>Choose Sales Order...</option>
-                            <option *ngFor="let po of correspondingPos;" [value]="po.ponum">{{po.ponum}}</option>
-                        </select>
-                    </td>
-                </tr>
-                <!--add1, add2, billToDept, city, customerId, customerName, email, fax, phone, state, zip, ziplast4-->
-                <tr>
-                    <td colspan="2">
-                        <p *ngIf="customerSelec.value >= 0" class="p-0 m-0 mt-2">
-                            To, {{customers[customerSelec.value].billToDept}}
-                        </p>
-                    </td>
-                    <td></td>
-                    <td>
-                        <span class="input-group-text">Invoice Number*</span>
-                    </td>
-                    <td>
-                        <input type="text" class="form-control" [value]="generatedInvoiceNumber" #inNumIn>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan="2">
-                        <p *ngIf="customerSelec.value >= 0" class="p-0 m-0 mt-2">
-                            {{customers[customerSelec.value].add1}} {{customers[customerSelec.value].add2}}
-                        </p>
-                    </td>
-                    <td></td>
-                    <td>
-                        <span class="input-group-text">Change Order Num</span>
-                    </td>
-                    <td>
-                        <input type="text" class="form-control" #coNumIn>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan="2">
-                        <p *ngIf="customerSelec.value >= 0" class="p-0 m-0 mt-2">
-                            {{customers[customerSelec.value].city}} {{customers[customerSelec.value].state}} {{customers[customerSelec.value].zip}}-{{customers[customerSelec.value].ziplast4}}
-                        </p>
-                    </td>
-                    <td></td>
-                    <td>
-                        <span class="input-group-text">Payment Status*</span>
-                    </td>
-                    <td>
-                        <select class="custom-select" #pmtStatusIn>
-                            <option value=0>Not Paid</option>
-                            <option value=1>Paid</option>
-                        </select>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </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>
-                    <button class="btn btn-outline-danger m-0 p-0" (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>
-                                           <!--(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.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>
-            </tbody>
-            <tbody>
-            <tr>
-                <td colspan="5">
-                    <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>Choose PO Detail...</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">&nbsp;</td>
-                <td class="text-right" style="width: 20%" >&nbsp;</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">&nbsp;</td>
-                <td class="text-right">&nbsp;</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">&nbsp;</td>
-                <td class="text-right">&nbsp;</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">&nbsp;</td>
-                <td class="text-right">&nbsp;</td>
-            </tr>
-            <!--<tr>-->
-                <!--<td class="text-right"><b>Amount This Invoice</b></td>-->
-                <!--<td>{{newBillAmt}}</td>-->
-                <!--<td class="text-right">&nbsp;</td>-->
-                <!--<td>&nbsp;</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">
-        <p class="h4 text-right">Footer</p>
-        <hr>
-        <div class="input-group mb-3">
-            <div class="input-group-prepend">
-                <span class="input-group-text">Notes:</span>
-            </div>
-            <textarea class="form-control" #notesIn></textarea>
+    <!--<form>-->
+        <!--General-->
+        <div class="modal-body">
+            <p class="h4 text-right">General</p>
+            <hr>
+            <table class="table table-borderless table-sm">
+                <tbody>
+                    <tr>
+                        <td style="width: 1%">
+                            <span class="input-group-text">Customer </span>
+                        </td>
+                        <td>
+                            <select class="custom-select" (change)="customerDropdownChange(customerSelec.value)" #customerSelec>
+                                <option [value]="-1">Choose Customer...</option>
+                                <option *ngFor="let customer of customers; let i = index;" [value]="i">{{customer.customerName}}
+                                </option>
+                            </select>
+                        </td>
+                        <td style="width: 5%"></td>
+                        <td style="width: 10%">
+                            <span class="input-group-text">SO Number*</span>
+                        </td>
+                        <td>
+                            <select class="custom-select" (change)="poDropdownChange(poNumIn.value)"
+                                    [disabled]="!correspondingPos.length" #poNumIn>
+                                <option>Choose Sales Order...</option>
+                                <option *ngFor="let po of correspondingPos;" [value]="po.ponum">{{po.ponum}}</option>
+                            </select>
+                        </td>
+                    </tr>
+                    <!--add1, add2, billToDept, city, customerId, customerName, email, fax, phone, state, zip, ziplast4-->
+                    <tr>
+                        <td colspan="2">
+                            <p *ngIf="customerSelec.value >= 0" class="p-0 m-0 mt-2">
+                                To, {{customers[customerSelec.value].billToDept}}
+                            </p>
+                        </td>
+                        <td></td>
+                        <td>
+                            <span class="input-group-text">Invoice Number*</span>
+                        </td>
+                        <td>
+                            <input type="text" class="form-control" [value]="generatedInvoiceNumber" #inNumIn>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td colspan="2">
+                            <p *ngIf="customerSelec.value >= 0" class="p-0 m-0 mt-2">
+                                {{customers[customerSelec.value].add1}} {{customers[customerSelec.value].add2}}
+                            </p>
+                        </td>
+                        <td></td>
+                        <td>
+                            <span class="input-group-text">Change Order Num</span>
+                        </td>
+                        <td>
+                            <input type="text" class="form-control" #coNumIn>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td colspan="2">
+                            <p *ngIf="customerSelec.value >= 0" class="p-0 m-0 mt-2">
+                                {{customers[customerSelec.value].city}} {{customers[customerSelec.value].state}} {{customers[customerSelec.value].zip}}-{{customers[customerSelec.value].ziplast4}}
+                            </p>
+                        </td>
+                        <td></td>
+                        <td>
+                            <span class="input-group-text">Payment Status*</span>
+                        </td>
+                        <td>
+                            <select class="custom-select" #pmtStatusIn>
+                                <option value=0>Not Paid</option>
+                                <option value=1>Paid</option>
+                            </select>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
         </div>
 
-        <div class="input-group mb-3">
-            <div class="input-group-prepend">
-                <span class="input-group-text">Certification:</span>
-            </div>
-            <textarea class="form-control"
-                      [value]="'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned'"
-                      #certIn>
-            </textarea>
-        </div>
-    </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>
+                                               <!--(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.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>
+                </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>Choose PO Detail...</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>
 
-    <!--Modal Footer-->
-    <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 && pmtStatusIn.value && newBillAmt && notesIn.value && certIn.value)">
-            Confirm
-        </button>
-        <button type="button" class="btn btn-danger" (click)="close(new)">Cancel</button>
-    </div>
+            <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">&nbsp;</td>
+                    <td class="text-right" style="width: 20%" >&nbsp;</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">&nbsp;</td>
+                    <td class="text-right">&nbsp;</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">&nbsp;</td>
+                    <td class="text-right">&nbsp;</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">&nbsp;</td>
+                    <td class="text-right">&nbsp;</td>
+                </tr>
+                <!--<tr>-->
+                    <!--<td class="text-right"><b>Amount This Invoice</b></td>-->
+                    <!--<td>{{newBillAmt}}</td>-->
+                    <!--<td class="text-right">&nbsp;</td>-->
+                    <!--<td>&nbsp;</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">
+            <p class="h4 text-right">Footer</p>
+            <hr>
+            <div class="input-group mb-3">
+                <div class="input-group-prepend">
+                    <span class="input-group-text">Notes:</span>
+                </div>
+                <textarea class="form-control" #notesIn></textarea>
+            </div>
+
+            <div class="input-group mb-3">
+                <div class="input-group-prepend">
+                    <span class="input-group-text">Certification:</span>
+                </div>
+                <textarea class="form-control"
+                          [value]="'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned'"
+                          #certIn>
+                </textarea>
+            </div>
+        </div>
+
+        <!--Modal Footer-->
+        <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 && pmtStatusIn.value && newBillAmt && notesIn.value && certIn.value)">
+                Confirm
+            </button>
+            <button type="reset" class="btn btn-danger" (click)="close(new)">Cancel</button>
+        </div>
+    <!--</form>-->
 </app-modal-form>
diff --git a/AstuteClient2/src/app/invoice/invoice.component.ts b/AstuteClient2/src/app/invoice/invoice.component.ts
index 5a586e9..b9eecc5 100644
--- a/AstuteClient2/src/app/invoice/invoice.component.ts
+++ b/AstuteClient2/src/app/invoice/invoice.component.ts
@@ -49,7 +49,7 @@ export class InvoiceComponent implements OnInit {
 
         // EVENTS - add event callback handlers
         onRowClicked: (event) => {
-            this.getSelectedRows()
+            this.getSelectedRows();
         },
         onColumnResized: function (event) {
             console.log('a column was resized');
@@ -221,7 +221,6 @@ export class InvoiceComponent implements OnInit {
         this.selectedBillAmt = tot;
     }
 
-
     assignActity(): void {
         window.open('/invoice-gen');
     }
@@ -288,6 +287,7 @@ export class InvoiceComponent implements OnInit {
 
     close(content) {
         content.close();
+        // this.newInDetails = [];
     }
 
     getCurrDate() {
diff --git a/AstuteClient2/src/app/sales-order/sales-order.component.html b/AstuteClient2/src/app/sales-order/sales-order.component.html
index 185bb4b..0171e5e 100644
--- a/AstuteClient2/src/app/sales-order/sales-order.component.html
+++ b/AstuteClient2/src/app/sales-order/sales-order.component.html
@@ -86,8 +86,8 @@
         <th scope="col">Description</th>
         <th scope="col">Rate Type</th>
         <th scope="col">Service Type</th>
-        <th scope="col" style="width: 75px">Qty</th>
-        <th scope="col" style="width: 100px">Rate</th>
+        <th scope="col" style="width: 75px">Qty(#)</th>
+        <th scope="col" style="width: 100px">Rate($)</th>
       </tr>
       </thead>
 
@@ -282,8 +282,8 @@
           <th scope="col">Description</th>
           <th scope="col">Rate Type</th>
           <th scope="col">Service Type</th>
-          <th scope="col" style="width: 75px">Qty</th>
-          <th scope="col" style="width: 100px">Rate</th>
+          <th scope="col" style="width: 75px">Qty(#)</th>
+          <th scope="col" style="width: 100px">Rate($)</th>
           <!--<th scope="col">Remaining Quantity</th>-->
         </tr>
         </thead>
@@ -358,7 +358,7 @@
     <div class="modal-footer">
       <button class="btn btn-success" type="button"
               [disabled]="!(ponum.value && podate.value && contractnum.value && contractamt.value)"
-              (click)="editPo(projNum.value, ponum.value, podate.value, contractnum.value.repalce(',', '').replace('$', ''), contractamt.value, title.value, edit)"
+              (click)="editPo(projNum.value, ponum.value, podate.value, contractnum.value, contractamt.value.replace(',', '').replace('$', ''), title.value, edit)"
       >
         Update
       </button>
diff --git a/AstuteClient2/src/app/sales-order/sales-order.component.ts b/AstuteClient2/src/app/sales-order/sales-order.component.ts
index 52e700d..8bbe0ca 100644
--- a/AstuteClient2/src/app/sales-order/sales-order.component.ts
+++ b/AstuteClient2/src/app/sales-order/sales-order.component.ts
@@ -41,7 +41,7 @@ export class SalesOrderComponent implements OnInit {
             } else {
                 alert ('get service types failed');
             }
-        })
+        });
     }
 
     printValue(val) {
@@ -119,7 +119,7 @@ export class SalesOrderComponent implements OnInit {
                     details.splice(0, 1);
                     this.editPODetail(details);
                 } else {
-                    alert("add detail failed")
+                    alert('add detail failed');
                 }
             });
         } else {
@@ -214,13 +214,15 @@ export class SalesOrderComponent implements OnInit {
         const selectedNodes = this.agGrid.api.getSelectedNodes();
         if (selectedNodes.length) {
             this.selected = selectedNodes.map(node => node.data)[0];
-            this.editContractAmount = +this.selected.contractAmt;
+            // this.editContractAmount = +this.selected.contractAmt;
+            console.log(this.selected.contractNum);
             this.astuteClientService.getPODetail(this.selected.ponum).then((data) => {
                 if (data) {
                     this.selectedPODetail = data;
-                    console.log(this.selectedPODetail);
+                    // console.log(this.selectedPODetail);
+                    this.updateEditContractAmt();
                 } else {
-                    alert("get PO detail failed!")
+                    alert('get PO detail failed!');
                 }
             });
         } else {
@@ -244,14 +246,14 @@ export class SalesOrderComponent implements OnInit {
                     }
                 });
             } else {
-                alert("get Customers Failed!");
+                alert('get Customers Failed!');
             }
         });
         // this.rowData = this.astuteClientService.getPOs();
     }
 
     getCustomerName(customerId) {
-        let name = "";
+        let name = '';
         this.customers.forEach((customer) => {
             if (customer.customerId === customerId) {
                 name = customer.customerName;
diff --git a/AstuteClient2/src/app/services/astute-client-service.ts b/AstuteClient2/src/app/services/astute-client-service.ts
index 10251cf..4365e4e 100644
--- a/AstuteClient2/src/app/services/astute-client-service.ts
+++ b/AstuteClient2/src/app/services/astute-client-service.ts
@@ -15,7 +15,7 @@ export class AstuteClientService {
   private invoiceDetailUrl = 'http://localhost:8080/astutesystem/invoice/detail';
   private invoiceGenUrl = 'http://localhost:8080/astutesystem/invoice/generatedInvoice';
   private invoicePaymentUrl = 'http://localhost:8080/astutesystem/invoicePayment';
-  private sessionId=localStorage.getItem('');
+  private sessionId = localStorage.getItem('');
   private sessionString = `?sessionId=${this.sessionId}`;
 
   constructor(private http: HttpClient) { }