diff --git a/NdisPrice.php b/NdisPrice.php index b8c26bf..4254a5c 100644 --- a/NdisPrice.php +++ b/NdisPrice.php @@ -10,7 +10,7 @@ class NdisPrice{ global $wpdb; $this->ndis_table = $wpdb->prefix . 'acare_ndis_price'; - $sql = "SELECT * FROM {$this->ndis_table}"; //for this year + $sql = "SELECT * FROM {$this->ndis_table} order by year desc"; //for this year $results = $wpdb->get_results($sql); $this->tos =[]; diff --git a/Xero.php b/Xero.php index 83db2e8..bba81b8 100644 --- a/Xero.php +++ b/Xero.php @@ -492,4 +492,4 @@ class Xero { return $pc; } -} \ No newline at end of file +} diff --git a/js/bts_office.js b/js/bts_office.js index 8d081bc..28c7146 100644 --- a/js/bts_office.js +++ b/js/bts_office.js @@ -304,12 +304,14 @@ } function get_payroll_start() { - return new Date(bts().pay_calendar.start + " 00:00:00"); + var ret = new Date(bts().pay_calendar.start + " 00:00:00"); + return ret; } function allow_editing(date){ var begin = new Date(date); var pay_begin = get_payroll_start(); - return begin > pay_begin; + var seconds = (begin.getTime() - pay_begin.getTime())/1000; + return seconds > -10; } // $(document).on('click', 'div.bts_editor div.ult-overlay-close', function(){ // $('.Editing').addClass('blink_me');