Commits

Jesse Terry committed 2858537

Fixes #201 (Invoice options no longer save invoice date if date submitted is empty)

Comments (0)

Files changed (1)

application/modules_core/invoices/models/mdl_invoices.php

 			'invoice_number'            =>  $this->input->post('invoice_number')
 		);
 
+		if (!$this->input->post('invoice_date_entered')) {
+
+			unset($db_array['invoice_date_entered']);
+
+		}
+
 		if (is_numeric($this->input->post('invoice_status_id'))) {
 
 			$db_array['invoice_status_id'] = $this->input->post('invoice_status_id');