Fix payment dates not being set correctly

This commit is contained in:
FrancescoUK
2020-01-19 23:02:26 +00:00
parent 6e523a30ab
commit c871c68aeb
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Migration_PaymentDateFix extends CI_Migration
{
public function __construct()
{
parent::__construct();
}
public function up()
{
execute_script(APPPATH . 'migrations/sqlscripts/3.3.2_paymentdatefix.sql');
}
public function down()
{
}
}
?>

View File

@@ -0,0 +1,3 @@
UPDATE `ospos_sales_payments`
JOIN `ospos_sales` ON `ospos_sales`.`sale_id`=`ospos_sales_payments`.`sale_id`
SET `ospos_sales_payments`.`payment_time`=`ospos_sales`.`sale_time`;