mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-20 15:27:53 -05:00
1315 lines
32 KiB
HTML
1315 lines
32 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<title>Class Sale</title>
|
|
|
|
<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div id="left">
|
|
<div id="menu">
|
|
<a href="index.html" title="Overview"><span>Overview</span></a>
|
|
|
|
|
|
<div id="groups">
|
|
<h3>Namespaces</h3>
|
|
<ul>
|
|
<li>
|
|
<a href="namespace-emberlabs.html">
|
|
emberlabs<span></span>
|
|
</a>
|
|
|
|
<ul>
|
|
<li>
|
|
<a href="namespace-emberlabs.Barcode.html">
|
|
Barcode </a>
|
|
|
|
</li>
|
|
</ul></li>
|
|
<li class="active">
|
|
<a href="namespace-None.html">
|
|
None </a>
|
|
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
|
|
<div id="elements">
|
|
<h3>Classes</h3>
|
|
<ul>
|
|
<li><a href="class-Appconfig.html">Appconfig</a></li>
|
|
<li><a href="class-Barcode_lib.html">Barcode_lib</a></li>
|
|
<li><a href="class-Config.html">Config</a></li>
|
|
<li><a href="class-Customer.html">Customer</a></li>
|
|
<li><a href="class-Customer_rewards.html">Customer_rewards</a></li>
|
|
<li><a href="class-Customers.html">Customers</a></li>
|
|
<li><a href="class-Detailed_receivings.html">Detailed_receivings</a></li>
|
|
<li><a href="class-Detailed_sales.html">Detailed_sales</a></li>
|
|
<li><a href="class-Dinner_table.html">Dinner_table</a></li>
|
|
<li><a href="class-Email_lib.html">Email_lib</a></li>
|
|
<li><a href="class-Employee.html">Employee</a></li>
|
|
<li><a href="class-Employees.html">Employees</a></li>
|
|
<li><a href="class-Giftcard.html">Giftcard</a></li>
|
|
<li><a href="class-Giftcards.html">Giftcards</a></li>
|
|
<li><a href="class-Home.html">Home</a></li>
|
|
<li><a href="class-Inventory.html">Inventory</a></li>
|
|
<li><a href="class-Inventory_low.html">Inventory_low</a></li>
|
|
<li><a href="class-Inventory_summary.html">Inventory_summary</a></li>
|
|
<li><a href="class-Item.html">Item</a></li>
|
|
<li><a href="class-Item_kit.html">Item_kit</a></li>
|
|
<li><a href="class-Item_kit_items.html">Item_kit_items</a></li>
|
|
<li><a href="class-Item_kits.html">Item_kits</a></li>
|
|
<li><a href="class-Item_lib.html">Item_lib</a></li>
|
|
<li><a href="class-Item_quantity.html">Item_quantity</a></li>
|
|
<li><a href="class-Item_taxes.html">Item_taxes</a></li>
|
|
<li><a href="class-Items.html">Items</a></li>
|
|
<li><a href="class-Login.html">Login</a></li>
|
|
<li><a href="class-Mailchimp_lib.html">Mailchimp_lib</a></li>
|
|
<li><a href="class-MailchimpConnector.html">MailchimpConnector</a></li>
|
|
<li><a href="class-Messages.html">Messages</a></li>
|
|
<li><a href="class-Migrate.html">Migrate</a></li>
|
|
<li><a href="class-Migration_Sales_Tax_Data.html">Migration_Sales_Tax_Data</a></li>
|
|
<li><a href="class-Module.html">Module</a></li>
|
|
<li><a href="class-MY_Lang.html">MY_Lang</a></li>
|
|
<li><a href="class-No_Access.html">No_Access</a></li>
|
|
<li><a href="class-Person.html">Person</a></li>
|
|
<li><a href="class-Persons.html">Persons</a></li>
|
|
<li><a href="class-Receiving.html">Receiving</a></li>
|
|
<li><a href="class-Receiving_lib.html">Receiving_lib</a></li>
|
|
<li><a href="class-Receivings.html">Receivings</a></li>
|
|
<li><a href="class-Report.html">Report</a></li>
|
|
<li><a href="class-Reports.html">Reports</a></li>
|
|
<li><a href="class-Rewards.html">Rewards</a></li>
|
|
<li><a href="class-Rounding_code.html">Rounding_code</a></li>
|
|
<li class="active"><a href="class-Sale.html">Sale</a></li>
|
|
<li><a href="class-Sale_lib.html">Sale_lib</a></li>
|
|
<li><a href="class-Sale_suspended.html">Sale_suspended</a></li>
|
|
<li><a href="class-Sales.html">Sales</a></li>
|
|
<li><a href="class-Secure_Controller.html">Secure_Controller</a></li>
|
|
<li><a href="class-Sms_lib.html">Sms_lib</a></li>
|
|
<li><a href="class-Specific_customer.html">Specific_customer</a></li>
|
|
<li><a href="class-Specific_discount.html">Specific_discount</a></li>
|
|
<li><a href="class-Specific_employee.html">Specific_employee</a></li>
|
|
<li><a href="class-Stock_location.html">Stock_location</a></li>
|
|
<li><a href="class-Summary_categories.html">Summary_categories</a></li>
|
|
<li><a href="class-Summary_customers.html">Summary_customers</a></li>
|
|
<li><a href="class-Summary_discounts.html">Summary_discounts</a></li>
|
|
<li><a href="class-Summary_employees.html">Summary_employees</a></li>
|
|
<li><a href="class-Summary_items.html">Summary_items</a></li>
|
|
<li><a href="class-Summary_payments.html">Summary_payments</a></li>
|
|
<li><a href="class-Summary_report.html">Summary_report</a></li>
|
|
<li><a href="class-Summary_sales.html">Summary_sales</a></li>
|
|
<li><a href="class-Summary_suppliers.html">Summary_suppliers</a></li>
|
|
<li><a href="class-Summary_taxes.html">Summary_taxes</a></li>
|
|
<li><a href="class-Supplier.html">Supplier</a></li>
|
|
<li><a href="class-Suppliers.html">Suppliers</a></li>
|
|
<li><a href="class-Tax.html">Tax</a></li>
|
|
<li><a href="class-Tax_lib.html">Tax_lib</a></li>
|
|
<li><a href="class-Taxes.html">Taxes</a></li>
|
|
<li><a href="class-Token.html">Token</a></li>
|
|
<li><a href="class-Token_customer.html">Token_customer</a></li>
|
|
<li><a href="class-Token_invoice_count.html">Token_invoice_count</a></li>
|
|
<li><a href="class-Token_invoice_sequence.html">Token_invoice_sequence</a></li>
|
|
<li><a href="class-Token_lib.html">Token_lib</a></li>
|
|
<li><a href="class-Token_quote_sequence.html">Token_quote_sequence</a></li>
|
|
<li><a href="class-Token_suspended_invoice_count.html">Token_suspended_invoice_count</a></li>
|
|
<li><a href="class-Token_year_invoice_count.html">Token_year_invoice_count</a></li>
|
|
<li><a href="class-Tracking_lib.html">Tracking_lib</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Functions</h3>
|
|
<ul>
|
|
<li><a href="function-cash_decimals.html">cash_decimals</a></li>
|
|
<li><a href="function-currency_side.html">currency_side</a></li>
|
|
<li><a href="function-current_language.html">current_language</a></li>
|
|
<li><a href="function-current_language_code.html">current_language_code</a></li>
|
|
<li><a href="function-dateformat_bootstrap.html">dateformat_bootstrap</a></li>
|
|
<li><a href="function-dateformat_momentjs.html">dateformat_momentjs</a></li>
|
|
<li><a href="function-db_log_queries.html">db_log_queries</a></li>
|
|
<li><a href="function-get_customer_data_row.html">get_customer_data_row</a></li>
|
|
<li><a href="function-get_customer_manage_table_headers.html">get_customer_manage_table_headers</a></li>
|
|
<li><a href="function-get_giftcard_data_row.html">get_giftcard_data_row</a></li>
|
|
<li><a href="function-get_giftcards_manage_table_headers.html">get_giftcards_manage_table_headers</a></li>
|
|
<li><a href="function-get_item_data_row.html">get_item_data_row</a></li>
|
|
<li><a href="function-get_item_kit_data_row.html">get_item_kit_data_row</a></li>
|
|
<li><a href="function-get_item_kits_manage_table_headers.html">get_item_kits_manage_table_headers</a></li>
|
|
<li><a href="function-get_items_manage_table_headers.html">get_items_manage_table_headers</a></li>
|
|
<li><a href="function-get_people_manage_table_headers.html">get_people_manage_table_headers</a></li>
|
|
<li><a href="function-get_person_data_row.html">get_person_data_row</a></li>
|
|
<li><a href="function-get_sale_data_last_row.html">get_sale_data_last_row</a></li>
|
|
<li><a href="function-get_sale_data_row.html">get_sale_data_row</a></li>
|
|
<li><a href="function-get_sales_manage_payments_summary.html">get_sales_manage_payments_summary</a></li>
|
|
<li><a href="function-get_sales_manage_table_headers.html">get_sales_manage_table_headers</a></li>
|
|
<li><a href="function-get_supplier_data_row.html">get_supplier_data_row</a></li>
|
|
<li><a href="function-get_suppliers_manage_table_headers.html">get_suppliers_manage_table_headers</a></li>
|
|
<li><a href="function-get_tax_data_row.html">get_tax_data_row</a></li>
|
|
<li><a href="function-get_taxes_manage_table_headers.html">get_taxes_manage_table_headers</a></li>
|
|
<li><a href="function-load_config.html">load_config</a></li>
|
|
<li><a href="function-load_language_files.html">load_language_files</a></li>
|
|
<li><a href="function-load_stats.html">load_stats</a></li>
|
|
<li><a href="function-parse_decimals.html">parse_decimals</a></li>
|
|
<li><a href="function-pdf_create.html">pdf_create</a></li>
|
|
<li><a href="function-quantity_decimals.html">quantity_decimals</a></li>
|
|
<li><a href="function-show_report.html">show_report</a></li>
|
|
<li><a href="function-show_report_if_allowed.html">show_report_if_allowed</a></li>
|
|
<li><a href="function-tax_decimals.html">tax_decimals</a></li>
|
|
<li><a href="function-to_currency.html">to_currency</a></li>
|
|
<li><a href="function-to_currency_no_money.html">to_currency_no_money</a></li>
|
|
<li><a href="function-to_currency_tax.html">to_currency_tax</a></li>
|
|
<li><a href="function-to_decimals.html">to_decimals</a></li>
|
|
<li><a href="function-to_quantity_decimals.html">to_quantity_decimals</a></li>
|
|
<li><a href="function-to_tax_decimals.html">to_tax_decimals</a></li>
|
|
<li><a href="function-totals_decimals.html">totals_decimals</a></li>
|
|
<li><a href="function-transform_headers.html">transform_headers</a></li>
|
|
<li><a href="function-transform_headers_readonly.html">transform_headers_readonly</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="splitter"></div>
|
|
|
|
<div id="right">
|
|
<div id="rightInner">
|
|
<form id="search">
|
|
<input type="hidden" name="cx" value="">
|
|
<input type="hidden" name="ie" value="UTF-8">
|
|
<input type="text" name="q" class="text" placeholder="Search">
|
|
</form>
|
|
|
|
<div id="navigation">
|
|
<ul>
|
|
<li>
|
|
<a href="index.html" title="Overview"><span>Overview</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="namespace-None.html" title="Summary of None"><span>Namespace</span></a>
|
|
</li>
|
|
<li class="active">
|
|
<span>Class</span> </li>
|
|
</ul>
|
|
<ul>
|
|
</ul>
|
|
<ul>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="content" class="class">
|
|
<h1>Class Sale</h1>
|
|
|
|
|
|
<div class="description">
|
|
<p>Sale class</p>
|
|
</div>
|
|
|
|
<dl class="tree">
|
|
<dd style="padding-left:0px">
|
|
CI_Model
|
|
|
|
|
|
</dd>
|
|
<dd style="padding-left:30px">
|
|
<img src="resources/inherit.png" alt="Extended by">
|
|
<b><span>Sale</span></b>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="info">
|
|
|
|
|
|
|
|
|
|
|
|
<b>Located at</b> <a href="source-class-Sale.html#4-1332" title="Go to source code">models/Sale.php</a>
|
|
<br>
|
|
</div>
|
|
|
|
|
|
|
|
<table class="summary methods" id="methods">
|
|
<caption>Methods summary</caption>
|
|
<tr data-order="get_info" id="_get_info">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_info">#</a>
|
|
<code><a href="source-class-Sale.html#9-100" title="Go to source code">get_info</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Get sale info</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Get sale info</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_found_rows" id="_get_found_rows">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_found_rows">#</a>
|
|
<code><a href="source-class-Sale.html#102-108" title="Go to source code">get_found_rows</a>( <span> <var>$search</var></span>, <span> <var>$filters</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Get number of rows for the takings (sales/manage) view</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Get number of rows for the takings (sales/manage) view</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="search" id="_search">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_search">#</a>
|
|
<code><a href="source-class-Sale.html#110-277" title="Go to source code">search</a>( <span> <var>$search</var></span>, <span> <var>$filters</var></span>, <span> <var>$rows</var> = <span class="php-num">0</span></span>, <span> <var>$limit_from</var> = <span class="php-num">0</span></span>, <span> <var>$sort</var> = <span class="php-quote">'sale_time'</span></span>, <span> <var>$order</var> = <span class="php-quote">'desc'</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Get the sales data for the takings (sales/manage) view</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Get the sales data for the takings (sales/manage) view</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_payments_summary" id="_get_payments_summary">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_payments_summary">#</a>
|
|
<code><a href="source-class-Sale.html#279-375" title="Go to source code">get_payments_summary</a>( <span> <var>$search</var></span>, <span> <var>$filters</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Get the payment summary for the takings (sales/manage) view</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Get the payment summary for the takings (sales/manage) view</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_total_rows" id="_get_total_rows">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_total_rows">#</a>
|
|
<code><a href="source-class-Sale.html#377-385" title="Go to source code">get_total_rows</a>( )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets total of rows</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets total of rows</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_search_suggestions" id="_get_search_suggestions">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_search_suggestions">#</a>
|
|
<code><a href="source-class-Sale.html#387-417" title="Go to source code">get_search_suggestions</a>( <span> <var>$search</var></span>, <span> <var>$limit</var> = <span class="php-num">25</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets search suggestions</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets search suggestions</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_invoice_count" id="_get_invoice_count">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_invoice_count">#</a>
|
|
<code><a href="source-class-Sale.html#419-428" title="Go to source code">get_invoice_count</a>( )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets total of invoice rows</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets total of invoice rows</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_sale_by_invoice_number" id="_get_sale_by_invoice_number">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_sale_by_invoice_number">#</a>
|
|
<code><a href="source-class-Sale.html#430-439" title="Go to source code">get_sale_by_invoice_number</a>( <span> <var>$invoice_number</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets sale by invoice number</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets sale by invoice number</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_invoice_number_for_year" id="_get_invoice_number_for_year">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_invoice_number_for_year">#</a>
|
|
<code><a href="source-class-Sale.html#441-454" title="Go to source code">get_invoice_number_for_year</a>( <span> <var>$year</var> = <span class="php-quote">''</span></span>, <span> <var>$start_from</var> = <span class="php-num">0</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets invoice number by year</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets invoice number by year</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="is_valid_receipt" id="_is_valid_receipt">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_is_valid_receipt">#</a>
|
|
<code><a href="source-class-Sale.html#456-483" title="Go to source code">is_valid_receipt</a>( <span> <var>& $receipt_sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Checks if valid receipt</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Checks if valid receipt</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="exists" id="_exists">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_exists">#</a>
|
|
<code><a href="source-class-Sale.html#485-494" title="Go to source code">exists</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Checks if sale exists</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Checks if sale exists</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="update" id="_update">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_update">#</a>
|
|
<code><a href="source-class-Sale.html#496-531" title="Go to source code">update</a>( <span> <var>$sale_id</var></span>, <span> <var>$sale_data</var></span>, <span> <var>$payments</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Update sale</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Update sale</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="save" id="_save">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_save">#</a>
|
|
<code><a href="source-class-Sale.html#534-769" title="Go to source code">save</a>( <span> <var>& $sale_status</var></span>, <span> <var>& $items</var></span>, <span> <var>$customer_id</var></span>, <span> <var>$employee_id</var></span>, <span> <var>$comment</var></span>, <span> <var>$invoice_number</var></span>, <span> <var>$quote_number</var></span>, <span> <var>$payments</var></span>, <span> <var>$dinner_table</var></span>, <span> <var>& $sales_taxes</var></span>, <span> <var>$sale_id</var> = <span class="php-keyword1">FALSE</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>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</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>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</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="save_sales_item_tax" id="_save_sales_item_tax">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_save_sales_item_tax">#</a>
|
|
<code><a href="source-class-Sale.html#771-801" title="Go to source code">save_sales_item_tax</a>( <span> <var>& $customer</var></span>, <span> <var>& $sale_id</var></span>, <span> <var>& $item</var></span>, <span> <var>$tax_basis</var></span>, <span> <var>& $sales_taxes</var></span>, <span> <var>& $sequence</var></span>, <span> <var>$tax_category_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>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.</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>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.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="save_sales_tax" id="_save_sales_tax">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_save_sales_tax">#</a>
|
|
<code><a href="source-class-Sale.html#803-812" title="Go to source code">save_sales_tax</a>( <span> <var>& $sales_taxes</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Saves sale tax</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Saves sale tax</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="delete_list" id="_delete_list">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_delete_list">#</a>
|
|
<code><a href="source-class-Sale.html#814-827" title="Go to source code">delete_list</a>( <span> <var>$sale_ids</var></span>, <span> <var>$employee_id</var></span>, <span> <var>$update_inventory</var> = <span class="php-keyword1">TRUE</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Deletes list of sales</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Deletes list of sales</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="delete" id="_delete">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_delete">#</a>
|
|
<code><a href="source-class-Sale.html#829-879" title="Go to source code">delete</a>( <span> <var>$sale_id</var></span>, <span> <var>$employee_id</var></span>, <span> <var>$update_inventory</var> = <span class="php-keyword1">TRUE</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Delete sale</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Delete sale</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_sale_items" id="_get_sale_items">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_sale_items">#</a>
|
|
<code><a href="source-class-Sale.html#881-890" title="Go to source code">get_sale_items</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets sale item</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets sale item</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_sale_items_ordered" id="_get_sale_items_ordered">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_sale_items_ordered">#</a>
|
|
<code><a href="source-class-Sale.html#892-943" title="Go to source code">get_sale_items_ordered</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Used by the invoice and receipt programs</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Used by the invoice and receipt programs</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_sale_payments" id="_get_sale_payments">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_sale_payments">#</a>
|
|
<code><a href="source-class-Sale.html#945-954" title="Go to source code">get_sale_payments</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets sale payments</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets sale payments</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_payment_options" id="_get_payment_options">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_payment_options">#</a>
|
|
<code><a href="source-class-Sale.html#956-995" title="Go to source code">get_payment_options</a>( <span> <var>$giftcard</var> = <span class="php-keyword1">TRUE</span></span>, <span> <var>$reward_points</var> = <span class="php-keyword1">FALSE</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets sale payment options</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets sale payment options</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_customer" id="_get_customer">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_customer">#</a>
|
|
<code><a href="source-class-Sale.html#997-1006" title="Go to source code">get_customer</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets sale customer name</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets sale customer name</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_employee" id="_get_employee">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_employee">#</a>
|
|
<code><a href="source-class-Sale.html#1008-1017" title="Go to source code">get_employee</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets sale employee name</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets sale employee name</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="check_quote_number_exists" id="_check_quote_number_exists">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_check_quote_number_exists">#</a>
|
|
<code><a href="source-class-Sale.html#1023-1033" title="Go to source code">check_quote_number_exists</a>( <span> <var>$quote_number</var></span>, <span> <var>$sale_id</var> = <span class="php-quote">''</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="check_invoice_number_exists" id="_check_invoice_number_exists">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_check_invoice_number_exists">#</a>
|
|
<code><a href="source-class-Sale.html#1035-1048" title="Go to source code">check_invoice_number_exists</a>( <span> <var>$invoice_number</var></span>, <span> <var>$sale_id</var> = <span class="php-quote">''</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Checks if invoice number exists</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Checks if invoice number exists</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_giftcard_value" id="_get_giftcard_value">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_giftcard_value">#</a>
|
|
<code><a href="source-class-Sale.html#1050-1064" title="Go to source code">get_giftcard_value</a>( <span> <var>$giftcardNumber</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets Giftcard value</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets Giftcard value</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="create_temp_table" id="_create_temp_table">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_create_temp_table">#</a>
|
|
<code><a href="source-class-Sale.html#1066-1204" title="Go to source code">create_temp_table</a>( <span>array <var>$inputs</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Creates sales temporary dimentional table
|
|
We create a temp table that allows us to do easy report/sales queries</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Creates sales temporary dimentional table
|
|
We create a temp table that allows us to do easy report/sales queries</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_all_suspended" id="_get_all_suspended">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_all_suspended">#</a>
|
|
<code><a href="source-class-Sale.html#1206-1228" title="Go to source code">get_all_suspended</a>( <span> <var>$customer_id</var> = <span class="php-keyword1">NULL</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Retrieves all sales that are in a suspended state</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Retrieves all sales that are in a suspended state</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_dinner_table" id="_get_dinner_table">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_dinner_table">#</a>
|
|
<code><a href="source-class-Sale.html#1230-1239" title="Go to source code">get_dinner_table</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets the dinner table for the selected sale</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets the dinner table for the selected sale</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_quote_number" id="_get_quote_number">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_quote_number">#</a>
|
|
<code><a href="source-class-Sale.html#1241-1259" title="Go to source code">get_quote_number</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets the quote_number for the selected sale</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets the quote_number for the selected sale</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_comment" id="_get_comment">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_comment">#</a>
|
|
<code><a href="source-class-Sale.html#1261-1279" title="Go to source code">get_comment</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets the quote_number for the selected sale</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets the quote_number for the selected sale</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_suspended_invoice_count" id="_get_suspended_invoice_count">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_suspended_invoice_count">#</a>
|
|
<code><a href="source-class-Sale.html#1281-1291" title="Go to source code">get_suspended_invoice_count</a>( )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets total of suspended invoices rows</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets total of suspended invoices rows</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="delete_suspended_sale" id="_delete_suspended_sale">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_delete_suspended_sale">#</a>
|
|
<code><a href="source-class-Sale.html#1293-1319" title="Go to source code">delete_suspended_sale</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>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</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>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</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get_suspended_sale_info" id="_get_suspended_sale_info">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get_suspended_sale_info">#</a>
|
|
<code><a href="source-class-Sale.html#1321-1331" title="Go to source code">get_suspended_sale_info</a>( <span> <var>$sale_id</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
<p>Gets suspended sale info</p>
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
<p>Gets suspended sale info</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
API documentation generated by <a href="http://apigen.org">ApiGen</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="resources/combined.js"></script>
|
|
<script src="elementlist.js"></script>
|
|
</body>
|
|
</html>
|