Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Scope_model extends CI_Model {
- public function get_dsg_numbers_for_the_receiving_invoice_charges() {
- $this->db->where('start_date', $start_date); //this is the Monday of the previous week so does the date_in fall between start date and end date
- $this->db->where('end_date', $end_date); //this is the Sunday of the previous week
- $this->db->where_not_in('customer_id', 100000);//where customer name/id is not unknown
- $this->db->or_where('customer_finally_claimed_the_items', 1);//this grabs items outside of the date parameter where the dsg number was previously assigned to unknown, but during the previous week it was claimed
- $query = $this->db->get('dsg_number');
- return $query->result();
- }
- public function get_completed_delivery_tickets_and_field_transfers_for_invoice_charges() {
- $this->db->where('start_date', $start_date); //this is the Monday of the previous week
- $this->db->where('end_date', $end_date); //this is the Sunday of the previous week
- $this->db->where('completed', 1);
- $query = $this->db->get('logitics');
- return $query->result();
- }
- public function get_storage_charges_for_the_week() {
- $this->db->where('date_in', $date_in); //range is previous Monday thru Sunday
- //checked in two+ weeks ago:
- // charged the previous Monday thru Sunday
- // checked in that week (wedndesday)
- // charged the previous wednesday thru Sunday
- // checked in two+ weeks ago and check out/delivered on wednesday of the previous week
- // charged Monday - Wednesday
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement