Fix errors

test
dan 2019-11-23 11:56:21 -07:00
parent ba9ab39a40
commit 3be4ad6617
2 changed files with 6 additions and 6 deletions

View File

@ -41,9 +41,8 @@
<input matInput placeholder="Description" type="text" formControlName="description" > <input matInput placeholder="Description" type="text" formControlName="description" >
</mat-form-field> </mat-form-field>
<br> <br>
<mat-form-field class="w-100"> <mat-checkbox formControlName="goodsOrServices">Goods Or Services Received?</mat-checkbox>
<mat-checkbox formControlName="goodsOrServices">Goods or Services Received</mat-checkbox> <br>
</mat-form-field>
<br> <br>
<button mat-raised-button class="m-5" type="button" (click)="cancel()" >Cancel</button> <button mat-raised-button class="m-5" type="button" (click)="cancel()" >Cancel</button>
<button mat-raised-button class="m-5" type="submit" [disabled]="!form.valid || saveBtnDisabled">{{ saveBtnTxt }}</button> <button mat-raised-button class="m-5" type="submit" [disabled]="!form.valid || saveBtnDisabled">{{ saveBtnTxt }}</button>

View File

@ -33,7 +33,7 @@ exports.addArray = async function(transactions) {
try { try {
for(let i = 0; i < transactions.length; i++) { for(let i = 0; i < transactions.length; i++) {
const t = transactions[i]; const t = transactions[i];
const newTrans = getTransaction(t.date, t.typeId, t.checkNumber, t.contributorId, t.fundId, t.description, t.amount, t.taxYear); const newTrans = getTransaction(t.date, t.typeId, t.checkNumber, t.contributorId, t.fundId, t.description, t.amount, t.taxYear, t.goodsOrServices);
const result = await conn.nonQuery('INSERT INTO Transactions Set ?', newTrans); const result = await conn.nonQuery('INSERT INTO Transactions Set ?', newTrans);
results.push(result); results.push(result);
} }
@ -44,7 +44,7 @@ exports.addArray = async function(transactions) {
return results; return results;
} }
function getTransaction(date, typeId, checkNumber, contributorId, fundId, description, amount, taxYear) { function getTransaction(date, typeId, checkNumber, contributorId, fundId, description, amount, taxYear, goodsOrServices) {
const newTrans = { const newTrans = {
Date: date, Date: date,
TypeId: typeId, TypeId: typeId,
@ -53,7 +53,8 @@ function getTransaction(date, typeId, checkNumber, contributorId, fundId, descri
FundId: fundId, FundId: fundId,
Description: description, Description: description,
Amount: amount, Amount: amount,
TaxYear: taxYear TaxYear: taxYear,
GoodsOrServices: goodsOrServices
}; };
return newTrans; return newTrans;
} }