Overview

Namespaces

  • emberlabs
    • Barcode
  • None

Classes

  • Appconfig
  • Barcode_lib
  • Config
  • Customer
  • Customer_rewards
  • Customers
  • Detailed_receivings
  • Detailed_sales
  • Dinner_table
  • Email_lib
  • Employee
  • Employees
  • Giftcard
  • Giftcards
  • Home
  • Inventory
  • Inventory_low
  • Inventory_summary
  • Item
  • Item_kit
  • Item_kit_items
  • Item_kits
  • Item_lib
  • Item_quantity
  • Item_taxes
  • Items
  • Login
  • Mailchimp_lib
  • MailchimpConnector
  • Messages
  • Migrate
  • Migration_Sales_Tax_Data
  • Module
  • MY_Lang
  • No_Access
  • Person
  • Persons
  • Receiving
  • Receiving_lib
  • Receivings
  • Report
  • Reports
  • Rewards
  • Rounding_code
  • Sale
  • Sale_lib
  • Sale_suspended
  • Sales
  • Secure_Controller
  • Sms_lib
  • Specific_customer
  • Specific_discount
  • Specific_employee
  • Stock_location
  • Summary_categories
  • Summary_customers
  • Summary_discounts
  • Summary_employees
  • Summary_items
  • Summary_payments
  • Summary_report
  • Summary_sales
  • Summary_suppliers
  • Summary_taxes
  • Supplier
  • Suppliers
  • Tax
  • Tax_lib
  • Taxes
  • Token
  • Token_customer
  • Token_invoice_count
  • Token_invoice_sequence
  • Token_lib
  • Token_quote_sequence
  • Token_suspended_invoice_count
  • Token_year_invoice_count
  • Tracking_lib

Functions

  • currency_side
  • current_language
  • current_language_code
  • dateformat_bootstrap
  • dateformat_momentjs
  • db_log_queries
  • get_customer_data_row
  • get_customer_manage_table_headers
  • get_giftcard_data_row
  • get_giftcards_manage_table_headers
  • get_item_data_row
  • get_item_kit_data_row
  • get_item_kits_manage_table_headers
  • get_items_manage_table_headers
  • get_people_manage_table_headers
  • get_person_data_row
  • get_sale_data_last_row
  • get_sale_data_row
  • get_sales_manage_payments_summary
  • get_sales_manage_table_headers
  • get_supplier_data_row
  • get_suppliers_manage_table_headers
  • get_tax_data_row
  • get_taxes_manage_table_headers
  • load_config
  • load_language_files
  • load_stats
  • parse_decimals
  • pdf_create
  • quantity_decimals
  • show_report
  • show_report_if_allowed
  • to_currency
  • to_currency_no_money
  • to_decimals
  • to_quantity_decimals
  • to_tax_decimals
  • totals_decimals
  • transform_headers
  • transform_headers_readonly
  • Overview
  • Namespace
  • Class

Class Sale

Sale class

CI_Model
Extended by Sale
Author: N/A
Since: 1.0
Link: github.com/jekkos/opensourcepos
Located at models/Sale.php
Methods summary
public
# get_info( $sale_id )

Get sale info

Get sale info

public
# get_found_rows( $search, $filters )

Get number of rows for the takings (sales/manage) view

Get number of rows for the takings (sales/manage) view

public
# search( $search, $filters, $rows = 0, $limit_from = 0, $sort = 'sale_time', $order = 'desc' )

Get the sales data for the takings (sales/manage) view

Get the sales data for the takings (sales/manage) view

public
# get_payments_summary( $search, $filters )

Get the payment summary for the takings (sales/manage) view

Get the payment summary for the takings (sales/manage) view

public
# get_total_rows( )

Gets total of rows

Gets total of rows

public
# get_search_suggestions( $search, $limit = 25 )

Gets search suggestions

Gets search suggestions

public
# get_invoice_count( )

Gets total of invoice rows

Gets total of invoice rows

public
# get_sale_by_invoice_number( $invoice_number )

Gets sale by invoice number

Gets sale by invoice number

public
# get_invoice_number_for_year( $year = '', $start_from = 0 )

Gets invoice number by year

Gets invoice number by year

public
# is_valid_receipt( & $receipt_sale_id )

Checks if valid receipt

Checks if valid receipt

public
# exists( $sale_id )

Checks if sale exists

Checks if sale exists

public
# update( $sale_id, $sale_data, $payments )

Update sale

Update sale

public
# save( & $sale_status, & $items, $customer_id, $employee_id, $comment, $invoice_number, $quote_number, $payments, $dinner_table, & $sales_taxes, $sale_id = FALSE )

Save the sale information after the sales is complete but before the final document is printed The sales_taxes variable needs to be initialized to an empty array before calling

Save the sale information after the sales is complete but before the final document is printed The sales_taxes variable needs to be initialized to an empty array before calling

public
# save_sales_item_tax( & $customer, & $sale_id, & $item, $tax_basis, & $sales_taxes, & $sequence, $tax_category_id )

Apply customer sales tax if the customer sales tax is enabledl The original tax is still supported if the user configures it, but it won't make sense unless it's used exclusively for the purpose of VAT tax which becomes a price component. VAT taxes must still be reported as a separate tax entry on the invoice.

Apply customer sales tax if the customer sales tax is enabledl The original tax is still supported if the user configures it, but it won't make sense unless it's used exclusively for the purpose of VAT tax which becomes a price component. VAT taxes must still be reported as a separate tax entry on the invoice.

public
# save_sales_tax( & $sales_taxes )

Saves sale tax

Saves sale tax

public
# delete_list( $sale_ids, $employee_id, $update_inventory = TRUE )

Deletes list of sales

Deletes list of sales

public
# delete( $sale_id, $employee_id, $update_inventory = TRUE )

Delete sale

Delete sale

public
# get_sale_items( $sale_id )

Gets sale item

Gets sale item

public
# get_sale_items_ordered( $sale_id )

Used by the invoice and receipt programs

Used by the invoice and receipt programs

public
# get_sale_payments( $sale_id )

Gets sale payments

Gets sale payments

public
# get_payment_options( $giftcard = TRUE, $reward_points = FALSE )

Gets sale payment options

Gets sale payment options

public
# get_customer( $sale_id )

Gets sale customer name

Gets sale customer name

public
# get_employee( $sale_id )

Gets sale employee name

Gets sale employee name

public
# check_quote_number_exists( $quote_number, $sale_id = '' )
public
# check_invoice_number_exists( $invoice_number, $sale_id = '' )

Checks if invoice number exists

Checks if invoice number exists

public
# get_giftcard_value( $giftcardNumber )

Gets Giftcard value

Gets Giftcard value

public
# create_temp_table( array $inputs )

Creates sales temporary dimentional table We create a temp table that allows us to do easy report/sales queries

Creates sales temporary dimentional table We create a temp table that allows us to do easy report/sales queries

public
# get_all_suspended( $customer_id = NULL )

Retrieves all sales that are in a suspended state

Retrieves all sales that are in a suspended state

public
# get_dinner_table( $sale_id )

Gets the dinner table for the selected sale

Gets the dinner table for the selected sale

public
# get_quote_number( $sale_id )

Gets the quote_number for the selected sale

Gets the quote_number for the selected sale

public
# get_comment( $sale_id )

Gets the quote_number for the selected sale

Gets the quote_number for the selected sale

public
# get_suspended_invoice_count( )

Gets total of suspended invoices rows

Gets total of suspended invoices rows

public
# delete_suspended_sale( $sale_id )

Removes a selected sale from the sales table. This function should only be called for suspended sales that are being restored to the current cart

Removes a selected sale from the sales table. This function should only be called for suspended sales that are being restored to the current cart

public
# get_suspended_sale_info( $sale_id )

Gets suspended sale info

Gets suspended sale info

API documentation generated by ApiGen