1 namespace('kivi.AR', function(ns){
 
   4   ns.check_fields_before_posting = function() {
 
   7     if ($('#transdate').val() === '')
 
   8       errors.push(kivi.t8('Invoice Date missing!'));
 
  10     if ($('#duedate').val() === '')
 
  11       errors.push(kivi.t8('Due Date missing!'));
 
  13     if ($('#customer').val() === '')
 
  14       errors.push(kivi.t8('Customer missing!'));
 
  16     if (errors.length === 0)
 
  19     alert(errors.join(' '));