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" >
</mat-form-field>
<br>
<mat-form-field class="w-100">
<mat-checkbox formControlName="goodsOrServices">Goods or Services Received</mat-checkbox>
</mat-form-field>
<mat-checkbox formControlName="goodsOrServices">Goods Or Services Received?</mat-checkbox>
<br>
<br>
<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>

View File

@ -33,7 +33,7 @@ exports.addArray = async function(transactions) {
try {
for(let i = 0; i < transactions.length; 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);
results.push(result);
}
@ -44,7 +44,7 @@ exports.addArray = async function(transactions) {
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 = {
Date: date,
TypeId: typeId,
@ -53,7 +53,8 @@ function getTransaction(date, typeId, checkNumber, contributorId, fundId, descri
FundId: fundId,
Description: description,
Amount: amount,
TaxYear: taxYear
TaxYear: taxYear,
GoodsOrServices: goodsOrServices
};
return newTrans;
}