本文整理汇总了PHP中to_currency函数的典型用法代码示例。如果您正苦于以下问题:PHP to_currency函数的具体用法?PHP to_currency怎么用?PHP to_currency使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了to_currency函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: rupiah
function rupiah($number)
{
if ($number == 0) {
return '-';
}
return to_currency($number);
}
开发者ID:heruprambadi,项目名称:simpeg,代码行数:7,代码来源:util_helper.php
示例2: get_items_barcode_data
function get_items_barcode_data($item_ids)
{
$CI =& get_instance();
$result = array();
$item_ids = explode('~', $item_ids);
foreach ($item_ids as $item_id) {
$item_info = $CI->Item->get_info($item_id);
$item_location_info = $CI->Item_location->get_info($item_id);
$today = strtotime(date('Y-m-d'));
$is_item_location_promo = $item_location_info->start_date !== NULL && $item_location_info->end_date !== NULL && (strtotime($item_location_info->start_date) <= $today && strtotime($item_location_info->end_date) >= $today);
$is_item_promo = $item_info->start_date !== NULL && $item_info->end_date !== NULL && (strtotime($item_info->start_date) <= $today && strtotime($item_info->end_date) >= $today);
$regular_item_price = $item_location_info->unit_price ? $item_location_info->unit_price : $item_info->unit_price;
if ($is_item_location_promo) {
$item_price = $item_location_info->promo_price;
} elseif ($is_item_promo) {
$item_price = $item_info->promo_price;
} else {
$item_price = $item_location_info->unit_price ? $item_location_info->unit_price : $item_info->unit_price;
}
if ($CI->config->item('barcode_price_include_tax')) {
if ($item_info->tax_included) {
$result[] = array('name' => ($is_item_location_promo || $is_item_promo ? '<span style="text-decoration: line-through;">' . to_currency($regular_item_price) . '</span> ' : ' ') . to_currency($item_price) . ': ' . $item_info->name, 'id' => number_pad($item_id, 10));
} else {
$result[] = array('name' => ($is_item_location_promo || $is_item_promo ? '<span style="text-decoration: line-through;">' . to_currency(get_price_for_item_including_taxes($item_id, $regular_item_price)) . '</span> ' : ' ') . to_currency(get_price_for_item_including_taxes($item_id, $item_price)) . ': ' . $item_info->name, 'id' => number_pad($item_id, 10));
}
} else {
if ($item_info->tax_included) {
$result[] = array('name' => ($is_item_location_promo || $is_item_promo ? '<span style="text-decoration: line-through;">' . to_currency(get_price_for_item_excluding_taxes($item_id, $regular_item_price)) . '</span> ' : ' ') . to_currency(get_price_for_item_excluding_taxes($item_id, $item_price)) . ': ' . $item_info->name, 'id' => number_pad($item_id, 10));
} else {
$result[] = array('name' => ($is_item_location_promo || $is_item_promo ? '<span style="text-decoration: line-through;">' . to_currency($regular_item_price) . '</span> ' : ' ') . to_currency($item_price) . ': ' . $item_info->name, 'id' => number_pad($item_id, 10));
}
}
}
return $result;
}
开发者ID:ekchanthorn,项目名称:demo_loan,代码行数:35,代码来源:items_helper.php
示例3: get_item_kits_barcode_data
function get_item_kits_barcode_data($item_kits_ids)
{
$CI =& get_instance();
$result = array();
$item_kit_ids = explode('~', $item_kits_ids);
foreach ($item_kit_ids as $item_kit_id) {
$item_kit_info = $CI->Item_kit->get_info($item_kit_id);
$item_kit_location_info = $CI->Item_kit_location->get_info($item_kit_id);
$item_kit_price = $item_kit_location_info->unit_price ? $item_kit_location_info->unit_price : $item_kit_info->unit_price;
if ($CI->config->item('barcode_price_include_tax')) {
if ($item_kit_info->tax_included) {
$result[] = array('name' => to_currency($item_kit_price) . ' ' . $item_kit_info->name, 'id' => 'KIT ' . number_pad($item_kit_id, 10));
} else {
$result[] = array('name' => to_currency(get_price_for_item_kit_including_taxes($item_kit_id, $item_kit_price)) . ': ' . $item_kit_info->name, 'id' => 'KIT ' . number_pad($item_kit_id, 10));
}
} else {
if ($item_kit_info->tax_included) {
$result[] = array('name' => to_currency(get_price_for_item_kit_excluding_taxes($item_kit_id, $item_kit_price)) . ': ' . $item_kit_info->name, 'id' => 'KIT ' . number_pad($item_kit_id, 10));
} else {
$result[] = array('name' => to_currency($item_kit_price) . ': ' . $item_kit_info->name, 'id' => 'KIT ' . number_pad($item_kit_id, 10));
}
}
}
return $result;
}
开发者ID:ekchanthorn,项目名称:demo_loan,代码行数:25,代码来源:item_kits_helper.php
示例4: manage_display_layout
private function manage_display_layout($layout_type, $item, $barcode_config)
{
$result = '';
if ($layout_type == 'name') {
$result = $this->CI->lang->line('items_name') . " " . $item['name'];
} else {
if ($layout_type == 'category' && isset($item['category'])) {
$result = $this->CI->lang->line('items_category') . " " . $item['category'];
} else {
if ($layout_type == 'cost_price' && isset($item['cost_price'])) {
$result = $this->CI->lang->line('items_cost_price') . " " . to_currency($item['cost_price']);
} else {
if ($layout_type == 'unit_price' && isset($item['unit_price'])) {
$result = $this->CI->lang->line('items_unit_price') . " " . to_currency($item['unit_price']);
} else {
if ($layout_type == 'company_name') {
$result = $this->CI->Appconfig->get('company');
} else {
if ($layout_type == 'item_code') {
$result = $this->CI->Appconfig->get('barcode_content') !== "id" && isset($item['item_number']) ? $item['item_number'] : $item['item_id'];
}
}
}
}
}
}
return $result;
}
开发者ID:zerubbabel,项目名称:pos,代码行数:28,代码来源:Barcode_lib.php
示例5: save
public function save($items, $customer_id, $employee_id, $comment, $payments, $sale_id = false)
{
if (count($items) == 0) {
return -1;
}
//Alain Multiple payments
//Build payment types string
$payment_types = '';
foreach ($payments as $payment_id => $payment) {
$payment_types = $payment_types . $payment['payment_type'] . ': ' . to_currency($payment['payment_amount']) . '<br />';
}
$transfer_data = ['sender' => $this->session->userdata('dblocation'), 'receiver' => $customer_id, 'date' => date('Y-m-d H:i:s'), 'payment_type' => $payment_types, 'comment' => $comment];
//Run these queries as a transaction, we want to make sure we do all or nothing
$this->con->trans_start();
$this->con->insert('transfers', $transfer_data);
$transfer_id = $this->con->insert_id();
foreach ($items as $line => $item) {
$cur_item_info = $this->Item->get_info($item['item_id']);
$sales_items_data = ['transfer_id' => $transfer_id, 'item_id' => $item['item_id'], 'quantity_purchased' => $item['quantity'], 'description' => $item['description'], 'serialnumber' => $item['serialnumber'], 'line' => $item['line'], 'item_cost_price' => $cur_item_info->cost_price, 'item_unit_price' => $item['price'], 'discount_percent' => $item['discount']];
$this->con->insert('transfer_items', $sales_items_data);
}
$this->con->trans_complete();
if ($this->con->trans_status() === false) {
return -1;
}
return $transfer_id;
}
开发者ID:gocanto,项目名称:gocanto-pos,代码行数:27,代码来源:transfers.php
示例6: save
function save($items, $customer_id, $employee_id, $comment, $payments, $sale_id = false)
{
if (count($items) == 0) {
return -1;
}
//Alain Multiple payments
//Build payment types string
$payment_types = '';
foreach ($payments as $payment_id => $payment) {
$payment_types = $payment_types . $payment['payment_type'] . ': ' . to_currency($payment['payment_amount']) . '<br />';
}
$sales_data = array('sale_time' => date('Y-m-d H:i:s'), 'customer_id' => $this->Customer->exists($customer_id) ? $customer_id : null, 'employee_id' => $employee_id, 'payment_type' => $payment_types, 'comment' => $comment);
//Run these queries as a transaction, we want to make sure we do all or nothing
$this->db->trans_start();
$this->db->insert('sales', $sales_data);
$sale_id = $this->db->insert_id();
foreach ($payments as $payment_id => $payment) {
if (substr($payment['payment_type'], 0, strlen($this->lang->line('sales_giftcard'))) == $this->lang->line('sales_giftcard')) {
/* We have a gift card and we have to deduct the used value from the total value of the card. */
$splitpayment = explode(':', $payment['payment_type']);
$cur_giftcard_value = $this->Giftcard->get_giftcard_value($splitpayment[1]);
$this->Giftcard->update_giftcard_value($splitpayment[1], $cur_giftcard_value - $payment['payment_amount']);
}
$sales_payments_data = array('sale_id' => $sale_id, 'payment_type' => $payment['payment_type'], 'payment_amount' => $payment['payment_amount']);
$this->db->insert('sales_payments', $sales_payments_data);
}
foreach ($items as $line => $item) {
$cur_item_info = $this->Item->get_info($item['item_id']);
$sales_items_data = array('sale_id' => $sale_id, 'item_id' => $item['item_id'], 'line' => $item['line'], 'description' => $item['description'], 'serialnumber' => $item['serialnumber'], 'quantity_purchased' => $item['quantity'], 'discount_percent' => $item['discount'], 'item_cost_price' => $cur_item_info->cost_price, 'item_unit_price' => $item['price']);
$this->db->insert('sales_items', $sales_items_data);
//Update stock quantity
$item_data = array('quantity' => $cur_item_info->quantity - $item['quantity']);
$this->Item->save($item_data, $item['item_id']);
//Ramel Inventory Tracking
//Inventory Count Details
$qty_buy = -$item['quantity'];
$sale_remarks = 'POS ' . $sale_id;
$inv_data = array('trans_date' => date('Y-m-d H:i:s'), 'trans_items' => $item['item_id'], 'trans_user' => $employee_id, 'trans_comment' => $sale_remarks, 'trans_inventory' => $qty_buy);
$this->Inventory->insert($inv_data);
//------------------------------------Ramel
$customer = $this->Customer->get_info($customer_id);
if ($customer_id == -1 or $customer->taxable) {
foreach ($this->Item_taxes->get_info($item['item_id']) as $row) {
$this->db->insert('sales_items_taxes', array('sale_id' => $sale_id, 'item_id' => $item['item_id'], 'line' => $item['line'], 'name' => $row['name'], 'percent' => $row['percent']));
}
}
}
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE) {
return -1;
}
return $sale_id;
}
开发者ID:jericmillena,项目名称:pos_cafe,代码行数:53,代码来源:sale.php
示例7: change
public function change($fastUserId = '')
{
$this->load->model('Caja');
$tabular_data = [];
$con = $this->load->database($this->session->userdata('dblocation'), true);
$this->Sale->create_sales_items_temp_table($con);
$this->Receiving->create_receivings_items_temp_table($con);
$this->Caja->con = $con;
$report_data = $this->Caja->getDetailsPayments();
foreach ($report_data as $row) {
$tabular_data[] = [$row['payment_type'], to_currency($row['payment_amount'])];
}
$data = ['data' => $tabular_data, 'headers' => $this->Caja->getDataColumns(), 'summary_data' => $this->Caja->getCierreDetails(), 'fastUser' => $fastUserId];
$this->load->view('caja/cierre_caja', $data);
}
开发者ID:gocanto,项目名称:gocanto-pos,代码行数:15,代码来源:cajas.php
示例8: save
function save($items, $customer_id, $employee_id, $comment, $payments, $sale_id = false)
{
if (count($items) == 0) {
return -1;
}
//Alain Multiple payments
//Build payment types string
$payment_types = '';
foreach ($payments as $payment_id => $payment) {
$payment_types = $payment_types . $payment['payment_type'] . ': ' . to_currency($payment['payment_amount']) . '<br />';
}
$sales_data = array('sale_time' => date('Y-m-d H:i:s'), 'customer_id' => $this->Customer->exists($customer_id) ? $customer_id : null, 'employee_id' => $employee_id, 'payment_type' => $payment_types, 'comment' => $comment);
//Run these queries as a transaction, we want to make sure we do all or nothing
$this->db->trans_start();
$this->db->insert('sales_suspended', $sales_data);
$sale_id = $this->db->insert_id();
foreach ($payments as $payment_id => $payment) {
$sales_payments_data = array('sale_id' => $sale_id, 'payment_type' => $payment['payment_type'], 'payment_amount' => $payment['payment_amount']);
$this->db->insert('sales_suspended_payments', $sales_payments_data);
}
foreach ($items as $line => $item) {
$cur_item_info = $this->Item->get_info($item['item_id']);
$sales_items_data = array('sale_id' => $sale_id, 'item_id' => $item['item_id'], 'line' => $item['line'], 'description' => $item['description'], 'serialnumber' => $item['serialnumber'], 'quantity_purchased' => $item['quantity'], 'discount_percent' => $item['discount'], 'item_cost_price' => $cur_item_info->cost_price, 'item_unit_price' => $item['price']);
$this->db->insert('sales_suspended_items', $sales_items_data);
$customer = $this->Customer->get_info($customer_id);
if ($customer_id == -1 or $customer->taxable) {
foreach ($this->Item_taxes->get_info($item['item_id']) as $row) {
$this->db->insert('sales_suspended_items_taxes', array('sale_id' => $sale_id, 'item_id' => $item['item_id'], 'line' => $item['line'], 'name' => $row['name'], 'percent' => $row['percent']));
}
}
}
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE) {
return -1;
}
return $sale_id;
}
开发者ID:jericmillena,项目名称:pos_cafe,代码行数:37,代码来源:sale_suspended.php
示例9: complete
function complete()
{
$data['cart'] = $this->receiving_lib->get_cart();
$data['total'] = $this->receiving_lib->get_total();
$data['receipt_title'] = $this->lang->line('recvs_receipt');
$data['transaction_time'] = date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'));
$data['mode'] = $this->receiving_lib->get_mode();
$data['show_stock_locations'] = $this->Stock_location->show_locations('receivings');
$supplier_id = $this->receiving_lib->get_supplier();
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$comment = $this->input->post('comment');
$emp_info = $this->Employee->get_info($employee_id);
$payment_type = $this->input->post('payment_type');
$data['stock_location'] = $this->receiving_lib->get_stock_source();
if ($this->input->post('amount_tendered')) {
$data['amount_tendered'] = $this->input->post('amount_tendered');
$data['amount_change'] = to_currency($data['amount_tendered'] - round($data['total'], 2));
}
$data['employee'] = $emp_info->first_name . ' ' . $emp_info->last_name;
$suppl_info = '';
if ($supplier_id != -1) {
$suppl_info = $this->Supplier->get_info($supplier_id);
$data['supplier'] = $suppl_info->company_name;
// first_name.' '.$suppl_info->last_name;
}
$invoice_number = $this->_substitute_invoice_number($suppl_info);
if ($this->receiving_lib->is_invoice_number_enabled() && $this->Receiving->invoice_number_exists($invoice_number)) {
$data['error'] = $this->lang->line('recvs_invoice_number_duplicate');
$this->_reload($data);
} else {
$invoice_number = $this->receiving_lib->is_invoice_number_enabled() ? $invoice_number : NULL;
$data['invoice_number'] = $invoice_number;
$data['payment_type'] = $this->input->post('payment_type');
//SAVE receiving to database
$data['receiving_id'] = 'RECV ' . $this->Receiving->save($data['cart'], $supplier_id, $employee_id, $comment, $invoice_number, $payment_type, $data['stock_location']);
if ($data['receiving_id'] == 'RECV -1') {
$data['error_message'] = $this->lang->line('receivings_transaction_failed');
}
$data['barcode'] = $this->barcode_lib->generate_receipt_barcode($data['receiving_id']);
$data['print_after_sale'] = $this->receiving_lib->is_print_after_sale();
$this->load->view("receivings/receipt", $data);
$this->receiving_lib->clear_all();
}
$this->_remove_duplicate_cookies();
}
开发者ID:ssaiifull,项目名称:opensourcepos,代码行数:45,代码来源:receivings.php
示例10: str_replace
: <?php
echo $this->config->item('round_cash_on_sales') && $is_sale_cash_payment ? str_replace('‑', '-', to_currency(round_to_nearest_05($amount_change))) : str_replace('‑', '-', to_currency($amount_change));
} else {
echo lang('sales_amount_due');
?>
: <?php
echo $this->config->item('round_cash_on_sales') && $is_sale_cash_payment ? str_replace('‑', '-', to_currency(round_to_nearest_05($amount_change * -1))) : str_replace('‑', '-', to_currency($amount_change * -1));
}
if (isset($customer_balance_for_sale) && $customer_balance_for_sale !== FALSE) {
?>
<?php
echo lang('sales_customer_account_balance');
?>
: <?php
echo to_currency($customer_balance_for_sale);
}
if ($ref_no) {
?>
<?php
echo lang('sales_ref_no');
?>
: <?php
echo $ref_no;
}
if (isset($auth_code) && $auth_code) {
?>
<?php
echo lang('sales_auth_code');
开发者ID:ekchanthorn,项目名称:demo_loan,代码行数:31,代码来源:receipt.php
示例11: get_giftcard_data_row
/** GARRISON MODIFIED 4/25/2013 **/
function get_giftcard_data_row($giftcard, $controller)
{
$CI =& get_instance();
$controller_name = strtolower(get_class($CI));
$width = $controller->get_form_width();
$table_data_row = '<tr>';
$table_data_row .= "<td width='3%'><input type='checkbox' id='giftcard_{$giftcard->giftcard_id}' value='" . $giftcard->giftcard_id . "'/></td>";
$table_data_row .= '<td width="15%">' . $giftcard->last_name . '</td>';
$table_data_row .= '<td width="15%">' . $giftcard->first_name . '</td>';
$table_data_row .= '<td width="15%">' . $giftcard->giftcard_number . '</td>';
$table_data_row .= '<td width="20%">' . to_currency($giftcard->value) . '</td>';
$table_data_row .= '<td width="5%">' . anchor($controller_name . "/view/{$giftcard->giftcard_id}/width:{$width}", $CI->lang->line('common_edit'), array('class' => 'thickbox', 'title' => $CI->lang->line($controller_name . '_update'))) . '</td>';
$table_data_row .= '</tr>';
return $table_data_row;
}
开发者ID:praet0ri4n,项目名称:opensourcepos,代码行数:16,代码来源:table_helper.php
示例12: to_currency
?>
" value="<?php
echo $class[1];
?>
">
<tr class="<?php
echo $class[0];
?>
">
<td><input type="button" class="small_button" value="Delete"></td>
<td><?php
echo $tipe;
?>
</td>
<td style="text-align: right;"><?php
echo $mont ? $mont : to_currency($class[1]);
?>
</td>
</tr>
<?php
}
}
}
if ($default_service * 1 > 0) {
?>
<tr>
<td></td>
<td><?php
echo $this->lang->line('config_service_price');
?>
</td>
开发者ID:gocanto,项目名称:gocanto-pos,代码行数:31,代码来源:form.php
示例13: foreach
<?php
foreach ($payments as $payment_id => $payment) {
?>
<tr>
<td colspan="2" style="text-align:right;"><?php
echo $this->lang->line('sales_payment');
?>
</td>
<td colspan="2" style="text-align:right;"><?php
$splitpayment = explode(':', $payment['payment_type']);
echo $splitpayment[0];
?>
</td>
<td colspan="2" style="text-align:right"><?php
echo to_currency($payment['payment_amount'] * -1);
?>
</td>
</tr>
<?php
}
?>
<tr><td colspan="6"> </td></tr>
<tr>
<td colspan="4" style='text-align:right;'><?php
echo $this->lang->line('sales_change_due');
?>
</td>
<td colspan="2" style='text-align:right'><?php
开发者ID:gocanto,项目名称:gocanto-pos,代码行数:30,代码来源:receipt.php
示例14: suspend
function suspend()
{
$data['cart'] = $this->sale_lib->get_cart();
$data['subtotal'] = $this->sale_lib->get_subtotal();
$data['taxes'] = $this->sale_lib->get_taxes();
$data['total'] = $this->sale_lib->get_total();
$data['receipt_title'] = $this->lang->line('sales_receipt');
$data['transaction_time'] = date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'));
$customer_id = $this->sale_lib->get_customer();
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$comment = $this->input->post('comment');
$invoice_number = $this->sale_lib->get_invoice_number();
$emp_info = $this->Employee->get_info($employee_id);
$payment_type = $this->input->post('payment_type');
$data['payment_type'] = $this->input->post('payment_type');
//Alain Multiple payments
$data['payments'] = $this->sale_lib->get_payments();
$data['amount_change'] = to_currency($this->sale_lib->get_amount_due() * -1);
$data['employee'] = $emp_info->first_name . ' ' . $emp_info->last_name;
if ($this->Sale_suspended->invoice_number_exists($invoice_number)) {
$this->_reload(array('error' => $data['error'] = $this->lang->line('sales_invoice_number_duplicate')));
} else {
if ($customer_id != -1) {
$cust_info = $this->Customer->get_info($customer_id);
if (isset($cust_info->company_name)) {
$data['customer'] = $cust_info->company_name;
} else {
$data['customer'] = $cust_info->first_name . ' ' . $cust_info->last_name;
}
}
$total_payments = 0;
foreach ($data['payments'] as $payment) {
$total_payments = bcadd($total_payments, $payment['payment_amount'], PRECISION);
}
//SAVE sale to database
$data['sale_id'] = 'POS ' . $this->Sale_suspended->save($data['cart'], $customer_id, $employee_id, $comment, $invoice_number, $data['payments']);
if ($data['sale_id'] == 'POS -1') {
$data['error_message'] = $this->lang->line('sales_transaction_failed');
}
$this->sale_lib->clear_all();
$this->_reload(array('success' => $this->lang->line('sales_successfully_suspended_sale')));
}
}
开发者ID:salikur,项目名称:opensourcepos,代码行数:43,代码来源:sales.php
示例15: anchor
<?php
echo anchor("suppliers/view/-1/width:350", "<div class='small_button' style='margin:0 auto;'><span>" . $this->lang->line('recvs_new_supplier') . "</span></div>", array('class' => 'thickbox none', 'title' => $this->lang->line('recvs_new_supplier')));
?>
</div>
<div class="clearfix"> </div>
<?php
}
?>
<div id='sale_details'>
<div class="float_left" style='width:55%;'><?php
echo $this->lang->line('sales_total');
?>
:</div>
<div class="float_left" style="width:45%;font-weight:bold;"><?php
echo to_currency($total);
?>
</div>
</div>
<?php
if (count($cart) > 0) {
?>
<div id="finish_sale">
<?php
echo form_open("receivings/complete", array('id' => 'finish_sale_form'));
?>
<br />
<label id="comment_label" for="comment"><?php
echo $this->lang->line('common_comments');
?>
:</label>
开发者ID:dalinhuang,项目名称:easyapp,代码行数:31,代码来源:receiving.php
示例16: to_currency
</td>
<td><?php
echo to_currency($items_info[$i]->cost_price * $items_info[$i]->quantity);
?>
</td>
</tr>
<?php
}
?>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td><strong>Total:</strong> <?php
echo to_currency($total_general);
?>
</td>
</tr>
</tbody>
</table>
</div>
<a class="linkPrint" href="#">
<div class="big_button" style="float: left;"><span>Print</span></div>
</a>
<a class="linkBack" href="#">
<div class="big_button" style="float: left;"><span>Back</span></div>
</a>
<?php
$this->load->view('partial/footer');
开发者ID:gocanto,项目名称:gocanto-pos,代码行数:31,代码来源:test.php
示例17: lang
<div class="widget-title">
<span class="icon">
<i class="fa fa-align-justify"></i>
</span>
<h5><?php
echo lang('sales_closing_amount_desc');
?>
</h5>
</div>
<div class="widget-content nopadding">
<ul class="text-error" id="error_message_box"></ul><?php
echo form_open('sales/closeregister' . $continue, array('id' => 'closing_amount_form', 'class' => 'form-horizontal'));
?>
<h3 class="text-left text-success text-center"><?php
echo sprintf(lang('sales_closing_amount_approx'), to_currency($closeout));
?>
</h3>
<br />
<div class="widget-content">
<div class="row">
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered text-center">
<tr>
<th style="text-align: center;"><?php
echo lang('sales_denomination');
?>
</th>
<th style="text-align: center;"><?php
开发者ID:ekchanthorn,项目名称:demo_loan,代码行数:31,代码来源:closing_amount.php
示例18: complete
function complete()
{
$data['cart'] = $this->receiving_lib->get_cart();
$data['total'] = $this->receiving_lib->get_total();
$data['receipt_title'] = $this->lang->line('recvs_receipt');
$data['transaction_time'] = date('m/d/Y h:i:s a');
$supplier_id = $this->receiving_lib->get_supplier();
$employee_id = $this->Employee->get_logged_in_employee_info()->person_id;
$comment = $this->input->post('comment');
$emp_info = $this->Employee->get_info($employee_id);
$payment_type = $this->input->post('payment_type');
$data['payment_type'] = $this->input->post('payment_type');
if ($this->input->post('amount_tendered')) {
$data['amount_tendered'] = $this->input->post('amount_tendered');
$data['amount_change'] = to_currency($data['amount_tendered'] - round($data['total'], 2));
}
$data['employee'] = $emp_info->first_name . ' ' . $emp_info->last_name;
if ($supplier_id != -1) {
$suppl_info = $this->Supplier->get_info($supplier_id);
$data['supplier'] = $suppl_info->first_name . ' ' . $suppl_info->last_name;
}
//SAVE receiving to database
$data['receiving_id'] = 'RECV ' . $this->Receiving->save($data['cart'], $supplier_id, $employee_id, $comment, $payment_type);
if ($data['receiving_id'] == 'RECV -1') {
$data['error_message'] = $this->lang->line('receivings_transaction_failed');
}
$this->load->view("receivings/receipt", $data);
$this->receiving_lib->clear_all();
}
开发者ID:raouf505,项目名称:php-point-of-sale,代码行数:29,代码来源:receivings.php
示例19: detailed_pawns
function detailed_pawns($start_date, $end_date, $sale_type, $export_excel = 0, $offset = 0)
{
$this->check_action_permission('view_pawns');
$start_date = rawurldecode($start_date);
$end_date = rawurldecode($end_date);
$this->load->model('reports/Detailed_pawns');
$model = $this->Detailed_pawns;
$model->setParams(array('start_date' => $start_date, 'end_date' => $end_date, 'sale_type' => $sale_type, 'offset' => $offset, 'export_excel' => $export_excel));
$this->Pawn->create_pawns_temp_table(array('start_date' => $start_date, 'end_date' => $end_date, 'sale_type' => $sale_type));
$config = array();
$config['base_url'] = site_url("reports/detailed_pawns/" . rawurlencode($start_date) . '/' . rawurlencode($end_date) . "/{$sale_type}/{$export_excel}");
$config['total_rows'] = $model->getTotalRows();
$config['per_page'] = $this->config->item('number_of_items_per_page') ? (int) $this->config->item('number_of_items_per_page') : 20;
$config['uri_segment'] = 7;
$this->pagination->initialize($config);
$headers = $model->getDataColumns();
$report_data = $model->getData();
$summary_data = array();
$details_data = array();
$i = 1;
foreach ($report_data['summary'] as $key => $row) {
$summary_data_row = array();
$summary_data_row[] = array('data' => $i, 'align' => 'left');
$summary_data_row[] = array('data' => $row['borrower'], 'align' => 'left');
$summary_data_row[] = array('data' => to_currency($row['amount']), 'align' => 'left');
$summary_data_row[] = array('data' => to_currency($row['paid_princ']), 'align' => 'left');
$summary_data_row[] = array('data' => to_currency($row['amount_due']), 'align' => 'left');
//$summary_data_row[] = array('data'=>to_currency($row['deposit']), 'align'=>'left');
//$summary_data_row[] = array('data'=>to_currency($row['subtotal']), 'align'=>'right');
$summary_data_row[] = array('data' => to_currency($row['rate']), 'align' => 'right');
$summary_data_row[] = array('data' => to_currency($row['paid_rate']), 'align' => 'right');
if ($this->has_profit_permission) {
$summary_data_row[] = array('data' => to_currency($row['profit']), 'align' => 'right');
}
$summary_data[$key] = $summary_data_row;
$j = 1;
foreach ($report_data['details'][$key] as $drow) {
$details_data_row = array();
$details_data_row[] = array('data' => $j, 'align' => 'left');
$details_data_row[] = array('data' => date(get_date_format(), strtotime($drow['start_date'])), 'align' => 'left');
$details_data_row[] = array('data' => to_currency($drow['amount']), 'align' => 'right');
$details_data_row[] = array('data' => to_currency($drow['paid_princ']), 'align' => 'right');
$details_data_row[] = array('data' => to_currency($drow['amount_due']), 'align' => 'right');
//$details_data_row[] = array('data'=>to_currency($drow['deposit']), 'align'=> 'right');
$details_data_row[] = array('data' => to_currency($drow['rate']), 'align' => 'right');
$details_data_row[] = array('data' => to_currency($drow['paid_rate']), 'align' => 'right');
$details_data_row[] = array('data' => $drow['late'] . ' ' . lang('common_day'), 'align' => 'right');
$details_data_row[] = array('data' => to_currency($drow['pay_fine']), 'align' => 'right');
if ($this->has_profit_permission) {
$details_data_row[] = array('data' => to_currency($drow['profit']), 'align' => 'right');
}
$details_data[$key][] = $details_data_row;
$j++;
}
$i++;
}
$data = array("title" => lang('reports_detailed_pawns_report'), "subtitle" => date(get_date_format(), strtotime($start_date)) . '-' . date(get_date_format(), strtotime($end_date)), "headers" => $model->getDataColumns(), "summary_data" => $summary_data, "details_data" => $details_data, "overall_summary_data" => $model->getSummaryData(), "export_excel" => $export_excel, "pagination" => $this->pagination->create_links());
$this->load->view("reports/tabular_details", $data);
}
开发者ID:ekchanthorn,项目名称:demo_loan,代码行数:59,代码来源:reports.php
示例20: to_currency
echo $payment_type;
?>
</div></td>
</tr>
<?php
if (isset($amount_change)) {
?>
<tr>
<td colspan="3" style='text-align:right;'><?php
echo $this->lang->line('sales_amount_tendered');
?>
</td>
<td><div class="total-value"><?php
echo to_currency($amount_tendered);
?>
</div></td>
</tr>
<tr>
<td colspan="3" style='text-align:right;'><?php
echo $this->lang->line('sales_change_due');
?>
</td>
<td><div class="total-value"><?php
echo $amount_change;
?>
</div></td>
</tr>
<?php
开发者ID:MaizerGomes,项目名称:opensourcepos,代码行数:31,代码来源:receipt.php
注:本文中的to_currency函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论