diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index 19921f86..08f5bb40 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -712,6 +712,8 @@ "label.credit":"Credit", "label.searchbytransaction":"Search by Transaction", "label.editglaccount":"Edit GL Account", + "label.selectcredit":"Select credit", + "label.selectdebit":"Select debit", "#Reports Related":"...................", diff --git a/app/scripts/controllers/accounting/AccFreqPostingController.js b/app/scripts/controllers/accounting/AccFreqPostingController.js index ce7bf564..0bafcb8e 100644 --- a/app/scripts/controllers/accounting/AccFreqPostingController.js +++ b/app/scripts/controllers/accounting/AccFreqPostingController.js @@ -8,6 +8,8 @@ scope.first = {}; scope.allowCreditEntries = true; scope.allowDebitEntries = true; + scope.errorcreditevent = false; + scope.errordebitevent = false; resourceFactory.accountingRulesResource.getAllRules({associations : 'all'}, function(data){ scope.rules = data; @@ -35,6 +37,7 @@ //events for credits scope.addCrAccount = function () { if(scope.formData.crAmountTemplate != undefined){ + scope.errorcreditevent = false; scope.formData.crAccounts.push({crGlAccountId: scope.formData.creditAccountTemplate.id, crGlcode: scope.formData.creditAccountTemplate.glCode, crGlName : scope.formData.creditAccountTemplate.name , crAmount : scope.formData.crAmountTemplate}); scope.formData.crAmountTemplate = undefined; if (scope.formData.rule) { @@ -42,6 +45,8 @@ scope.allowCreditEntries = false; } } + } else { + scope.errorcreditevent = true; } } @@ -55,6 +60,7 @@ //events for debits scope.addDebitAccount = function () { if(scope.formData.debitAmountTemplate != undefined){ + scope.errordebitevent = false; scope.formData.dbAccounts.push({debitGlAccountId: scope.formData.debitAccountTemplate.id, debitGlcode: scope.formData.debitAccountTemplate.glCode, debitGlName : scope.formData.debitAccountTemplate.name , debitAmount : scope.formData.debitAmountTemplate}); scope.formData.debitAmountTemplate = undefined; if (scope.formData.rule) { @@ -62,6 +68,8 @@ scope.allowDebitEntries = false; } } + } else { + scope.errordebitevent = true; } } diff --git a/app/scripts/controllers/accounting/JournalEntryController.js b/app/scripts/controllers/accounting/JournalEntryController.js index 4f41841a..03ba268b 100644 --- a/app/scripts/controllers/accounting/JournalEntryController.js +++ b/app/scripts/controllers/accounting/JournalEntryController.js @@ -6,6 +6,10 @@ scope.formData.crAccounts = []; scope.formData.dbAccounts = []; scope.first = {}; + scope.errorcreditevent = false; + scope.errordebitevent = false; + scope.creditaccounttemplate = false; + scope.debitaccounttemplate = false; resourceFactory.accountCoaResource.getAllAccountCoas({manualEntriesAllowed:true, usage:1, disabled:false}, function(data){ scope.glAccounts = data; @@ -23,8 +27,18 @@ //events for credits scope.addCrAccount = function () { if(scope.formData.crAmountTemplate != undefined){ - scope.formData.crAccounts.push({crGlAccountId: scope.formData.creditAccountTemplate.id, crGlcode: scope.formData.creditAccountTemplate.glCode, crGlName : scope.formData.creditAccountTemplate.name , crAmount : scope.formData.crAmountTemplate}); - scope.formData.crAmountTemplate = undefined; + scope.errorcreditevent = false; + if (scope.formData.creditAccountTemplate) { + scope.creditaccounttemplate = false; + scope.formData.crAccounts.push({crGlAccountId: scope.formData.creditAccountTemplate.id, crGlcode: scope.formData.creditAccountTemplate.glCode, crGlName : scope.formData.creditAccountTemplate.name , crAmount : scope.formData.crAmountTemplate}); + scope.formData.crAmountTemplate = undefined; + } else { + scope.creditaccounttemplate = true; + scope.labelcrediterror = 'selectcredit'; + } + } else { + scope.errorcreditevent = true; + scope.labelcrediterror = 'requiredfield'; } } @@ -35,8 +49,18 @@ //events for debits scope.addDebitAccount = function () { if(scope.formData.debitAmountTemplate != undefined){ - scope.formData.dbAccounts.push({debitGlAccountId: scope.formData.debitAccountTemplate.id, debitGlcode: scope.formData.debitAccountTemplate.glCode, debitGlName : scope.formData.debitAccountTemplate.name , debitAmount : scope.formData.debitAmountTemplate}); - scope.formData.debitAmountTemplate = undefined; + scope.errordebitevent = false; + if (scope.formData.debitAccountTemplate) { + scope.debitaccounttemplate = false; + scope.formData.dbAccounts.push({debitGlAccountId: scope.formData.debitAccountTemplate.id, debitGlcode: scope.formData.debitAccountTemplate.glCode, debitGlName : scope.formData.debitAccountTemplate.name , debitAmount : scope.formData.debitAmountTemplate}); + scope.formData.debitAmountTemplate = undefined; + } else { + scope.debitaccounttemplate = true; + scope.labeldebiterror = 'selectdebit'; + } + } else { + scope.errordebitevent = true; + scope.labeldebiterror = 'requiredfield'; } } diff --git a/app/views/accounting/add_acc_rule.html b/app/views/accounting/add_acc_rule.html index 9134bbe0..412092cc 100644 --- a/app/views/accounting/add_acc_rule.html +++ b/app/views/accounting/add_acc_rule.html @@ -10,18 +10,14 @@ -
+
{{ 'label.accounting.rule.title' | translate }}
- - - - {{ 'label.requiredfield' | translate }} - - + +
diff --git a/app/views/accounting/createglaccounting.html b/app/views/accounting/createglaccounting.html index 730628ec..5acff762 100644 --- a/app/views/accounting/createglaccounting.html +++ b/app/views/accounting/createglaccounting.html @@ -6,7 +6,7 @@
+ ng-controller="AccCreateGLAccountController" rc-submit="submit()">
@@ -25,11 +25,7 @@
- - - {{'label.requiredfield' | translate}} - - +
@@ -43,11 +39,7 @@
- - - {{'label.requiredfield' | translate}} - - +
diff --git a/app/views/accounting/edit_acc_rule.html b/app/views/accounting/edit_acc_rule.html index f746bc21..7f2ca580 100644 --- a/app/views/accounting/edit_acc_rule.html +++ b/app/views/accounting/edit_acc_rule.html @@ -12,18 +12,14 @@ - +
{{ 'label.accounting.rule.edit.title' | translate }}
- - - Required Field - - +
diff --git a/app/views/accounting/editglaccounting.html b/app/views/accounting/editglaccounting.html index 9b36805c..3757d6c4 100644 --- a/app/views/accounting/editglaccounting.html +++ b/app/views/accounting/editglaccounting.html @@ -12,7 +12,7 @@
- +
{{'label.editglaccount' | translate}} @@ -23,11 +23,7 @@
- - - Required Field - - +
@@ -38,11 +34,7 @@
- - - Required Field - - +
diff --git a/app/views/accounting/freqposting.html b/app/views/accounting/freqposting.html index 23032a99..23166335 100644 --- a/app/views/accounting/freqposting.html +++ b/app/views/accounting/freqposting.html @@ -5,7 +5,7 @@ - +
@@ -23,17 +23,19 @@
- +
- +
@@ -52,21 +54,31 @@
-   +       + + + {{'label.requiredfield' | translate}} + +

- + {{allowDebitEntries}}  
-   +       + + + {{'label.requiredfield' | translate}} + +

@@ -88,7 +100,7 @@
- +
diff --git a/app/views/accounting/journalentry_posting.html b/app/views/accounting/journalentry_posting.html index cd2cc54c..cb633b9a 100644 --- a/app/views/accounting/journalentry_posting.html +++ b/app/views/accounting/journalentry_posting.html @@ -4,7 +4,7 @@
  • {{'label.journalentry.posting.title' | translate}}
  • - +
    @@ -22,9 +22,10 @@
    - +
    @@ -45,8 +46,13 @@ -   +       + + + {{'label.'+labelcrediterror | translate}} + +

    @@ -60,8 +66,13 @@ -   +       + + + {{'label.'+labeldebiterror | translate}} + +

    @@ -83,7 +94,7 @@
    - +