epic-s6ts
[kivitendo-erp.git] / js / kivi.AR.js
1 namespace('kivi.AR', function(ns){
2   'use strict';
3
4   ns.check_fields_before_posting = function() {
5     var errors = [];
6
7     if ($('#transdate').val() === '')
8       errors.push(kivi.t8('Invoice Date missing!'));
9
10     if ($('#duedate').val() === '')
11       errors.push(kivi.t8('Due Date missing!'));
12
13     if ($('#customer').val() === '')
14       errors.push(kivi.t8('Customer missing!'));
15
16     if (errors.length === 0)
17       return true;
18
19     alert(errors.join(' '));
20
21     return false;
22   };
23 });