当前位置: 首页>>代码示例>>PHP>>正文


PHP moneyf函数代码示例

本文整理汇总了PHP中moneyf函数的典型用法代码示例。如果您正苦于以下问题:PHP moneyf函数的具体用法?PHP moneyf怎么用?PHP moneyf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了moneyf函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: smarty_modifier_money_format

function smarty_modifier_money_format($number)
{
    return moneyf($number);
}
开发者ID:kornelek,项目名称:lms,代码行数:4,代码来源:modifier.money_format.php

示例2: array

    $descriptions = array();
    if ($candidates) {
        foreach ($candidates as $idx => $row) {
            $desc = $row['name'];
            if ($row['serialnumber']) {
                $desc = $desc . " (S/N: " . $row['serialnumber'] . ")";
            }
            $actions[$row['id']] = '?m=stckproductinfo&id=' . $row['productid'];
            $eglible[$row['id']] = escape_js(($row['deleted'] ? '<font class="blend">' : '') . truncate_str($desc, 100) . ($row['deleted'] ? '</font>' : ''));
            if (is_null($row['warranty'])) {
                $row['warranty'] = 'b/d';
            }
            if ($row['leavedate'] < 1) {
                $row['leavedate'] = 'b/d';
            } else {
                $row['leavedate'] = date("d/m/Y", $row['leavedate']);
            }
            $descriptions[$row['id']] = '<b>' . trans("Gross:") . " " . moneyf($row['pricesell']) . "</b> " . trans("Sold:") . " " . $row['leavedate'] . " " . trans("Warranty:") . " " . $row['warranty'];
        }
    }
    header('Content-type: text/plain');
    if ($eglible) {
        print "this.eligible = [\"" . implode('","', $eglible) . "\"];\n";
        print "this.descriptions = [\"" . implode('","', $descriptions) . "\"];\n";
        print "this.actions = [\"" . implode('","', $actions) . "\"];\n";
    } else {
        print "false;\n";
    }
}
exit;
break;
开发者ID:krzysztofpuchala,项目名称:lms-magazyn,代码行数:31,代码来源:quicksearch-productwarranty.php

示例3: invoice_balance_v2

function invoice_balance_v2() {
	global $pdf, $invoice, $LMS;

	$pdf->SetFont('arial', '', 7);
	$kasa = $LMS->GetCustomerBalance($invoice['customerid'], $invoice['cdate']);
	$tekst = '';
	$pdf->writeHTMLCell(0, 0, '', '', 'Saldo przed wystawieniem dokumentu:' . ' ' . moneyf($kasa), 0, 1, 0, true, 'L');
	$pdf->setFont('arial','',6);
	$tekst = 'Informujemy, że saldo zostało wyliczone przed wystawieniem bieżącego dokumentu i może nie uwzględniać ostatnich wpłat ze względu na możliwe opóźnienia w realizacji przelewów bankowych. Dodatni stan salda oznacza nadpłatę. Jeżeli w wyniku wnoszenia opłat za pobrane towary lub wykonane usługi powstała nadpłata, podlega ona zaliczeniu na poczet płatności ustalonych na najbliższy okres rozliczenowy, o ile Odbiorca nie zarząda jej zwrotu. Dyspozycję zwrotu nadpłaty należy złożyć w Biurze Obsługi Klienta';
	$pdf->writeHTMLCell(0, 0, '', '', $tekst, 0, 1, 0, true, 'J');
}
开发者ID:pcela,项目名称:lms,代码行数:11,代码来源:invoice_tcpdf_v2.inc.php

示例4: receipt_data

 protected function receipt_data($x, $y)
 {
     $font_size = 12;
     $yy = $y;
     $xmax = $x + 420;
     $this->backend->line($x, $y, $xmax, $y);
     $y -= 8;
     $this->backend->text_align_center($x + 140, $y, 8, trans('For what'));
     $this->backend->text_align_center($x + 315, $y, 8, trans('Value'));
     $this->backend->text_align_center($x + 385, $y, 8, trans('Number'));
     $y -= 2;
     $this->backend->line($x, $y, $xmax, $y);
     $y -= $font_size;
     $i = 0;
     if ($this->data['contents']) {
         foreach ($this->data['contents'] as $item) {
             $i++;
             $this->backend->text_align_left($x + 2, $y, $font_size - 2, '<b>' . $i . '.</b>');
             $y = $this->backend->text_wrap($x + 15, $y, 270, $font_size - 2, $item['description'], '');
             $this->backend->text_align_right($x + 345, $y + $font_size, $font_size - 2, moneyf($item['value']));
         }
     }
     $y += $font_size / 2;
     $this->backend->line($x, $y, $xmax, $y);
     $y -= $font_size;
     $this->backend->text_align_right($x + 275, $y - 6, $font_size - 2, '<b>' . trans('Total:') . '</b>');
     $this->backend->text_align_right($x + 345, $y - 6, $font_size - 2, '<b>' . moneyf($this->data['total']) . '</b>');
     $y -= $this->backend->text_align_center($x + 385, $y, 8, 'Symbole');
     $y -= $this->backend->text_align_center($x + 385, $y, 8, 'PL. KAS. Nr');
     $this->backend->line($x, $yy, $x, $y);
     $this->backend->line($x + 280, $yy, $x + 280, $y);
     $this->backend->line($x + 350, $yy, $x + 350, $y);
     $this->backend->line($xmax, $yy, $xmax, $y);
     $this->backend->line($x, $y, $xmax, $y);
     $y -= 16;
     $this->backend->text_align_left($x + 2, $y, 8, trans('In words:'));
     $y = $this->backend->text_wrap($x + 40, $y, 300, $font_size - 2, trans('$a dollars $b cents', to_words(floor($this->data['total'])), to_words($this->data['totalg'])), '');
     $y -= 8;
     $y += $font_size / 2;
     $this->backend->line($x, $yy, $x, $y);
     $this->backend->line($x + 350, $yy, $x + 350, $y);
     $this->backend->line($xmax, $yy, $xmax, $y);
     $this->backend->line($x, $y, $xmax, $y);
     return $y;
 }
开发者ID:Akheon23,项目名称:lms,代码行数:45,代码来源:LMSEzpdfReceipt.php

示例5: DelBalance

    function DelBalance($id)
    {
        $this->exechook('lms_balance_del_before', $id);
        $row = $this->DB->GetRow('SELECT docid, itemid, cash.customerid AS cid, value, documents.type AS doctype, importid, comment 
					FROM cash
					LEFT JOIN documents ON (docid = documents.id)
					WHERE cash.id = ? ', array($id));
        if ($row['doctype'] == DOC_INVOICE || $row['doctype'] == DOC_CNOTE || $row['doctype'] == DOC_INVOICE_PRO) {
            $this->InvoiceContentDelete($row['docid'], $row['itemid']);
        } elseif ($row['doctype'] == DOC_RECEIPT) {
            $this->ReceiptContentDelete($row['docid'], $row['itemid']);
        } elseif ($row['doctype'] == DOC_DNOTE) {
            $this->DebitNoteContentDelete($row['docid'], $row['itemid']);
        } else {
            if (SYSLOG) {
                $cusname = $this->getcustomername($row['cid']);
                addlogs('skasowano zobowiązanie Pozycja: <b>"' . $row['comment'] . '"</b> na kwotę: <b>' . moneyf($row['value']) . '</b> dla ' . $cusname, 'e=rm;m=fin;c=' . $row['cid']);
            }
            $this->DB->Execute('DELETE FROM cash WHERE id = ?', array($id));
            if ($row['importid']) {
                $this->DB->Execute('UPDATE cashimport SET closed = 0 WHERE id = ?', array($row['importid']));
            }
        }
        $this->exechook('lms_balance_del_after', $id);
    }
开发者ID:bochniak,项目名称:lms,代码行数:25,代码来源:LMS.class.php

示例6: invoice_to_pay

function invoice_to_pay($x, $y)
{
    global $pdf, $invoice;
    if (isset($invoice['rebate'])) {
        $y = $y - text_align_left($x, $y, 14, trans('To repay:') . ' ' . moneyf($invoice['value']));
    } else {
        $y = $y - text_align_left($x, $y, 14, trans('To pay:') . ' ' . moneyf($invoice['value']));
    }
    $y = $y - text_align_left($x, $y, 10, trans('In words:') . ' ' . trans('$a dollars $b cents', to_words(floor($invoice['value'])), to_words(round(($invoice['value'] - floor($invoice['value'])) * 100))));
    return $y;
}
开发者ID:krzysztofpuchala,项目名称:lms-1,代码行数:11,代码来源:invoice_ezpdf.inc.php

示例7: invoice_to_pay

function invoice_to_pay($x, $y)
{
    global $pdf, $invoice;
    $y = $y - text_align_left($x, $y, 14, iconv("UTF-8", "ISO-8859-2", trans('To pay:')) . ' ' . iconv("UTF-8", "ISO-8859-2", moneyf($invoice['total'])));
    $y = $y - text_align_left($x, $y, 10, iconv("UTF-8", "ISO-8859-2", trans('In words:')) . ' ' . iconv("UTF-8", "ISO-8859-2", trans('$a dollars $b cents', to_words(floor($invoice['total'])), to_words(round(($invoice['total'] - floor($invoice['total'])) * 100)))));
    return $y;
}
开发者ID:kornelek,项目名称:lms,代码行数:7,代码来源:invoice_pdf.php

示例8: invoice_to_pay

 protected function invoice_to_pay($x, $y)
 {
     if (isset($this->data['rebate'])) {
         $y = $y - $this->backend->text_align_left($x, $y, 14, trans('To repay:') . ' ' . moneyf($this->data['value']));
     } else {
         $y = $y - $this->backend->text_align_left($x, $y, 14, trans('To pay:') . ' ' . moneyf($this->data['value']));
     }
     $y = $y - $this->backend->text_align_left($x, $y, 10, trans('In words:') . ' ' . trans('$a dollars $b cents', to_words(floor($this->data['value'])), to_words(round(($this->data['value'] - floor($this->data['value'])) * 100))));
     return $y;
 }
开发者ID:prezeskk,项目名称:lms,代码行数:10,代码来源:LMSEzpdfInvoice.php

示例9: invoice_balance

 protected function invoice_balance()
 {
     global $LMS;
     $this->backend->SetFont('arial', '', 7);
     $this->backend->writeHTMLCell(0, 0, '', '', trans('Your balance on date of invoice issue:') . ' ' . moneyf($LMS->GetCustomerBalance($this->data['customerid'], $this->data['cdate'])), 0, 1, 0, true, 'L');
 }
开发者ID:pjona,项目名称:lms,代码行数:6,代码来源:LMSTcpdfInvoice.php

示例10: invoice_to_pay

 protected function invoice_to_pay()
 {
     $this->backend->Ln(0);
     $this->backend->SetFont('arial', 'B', 14);
     $this->backend->writeHTMLCell(0, 0, '', '', trans('To pay:') . ' ' . moneyf($this->data['value']), 0, 1, 0, true, 'R');
     $this->backend->SetFont('arial', '', 10);
     $this->backend->writeHTMLCell(0, 6, '', '', trans('In words:') . ' ' . trans('$a dollars $b cents', to_words(floor($this->data['value'])), to_words(round(($this->data['value'] - floor($this->data['value'])) * 100))), 0, 1, 0, true, 'R');
 }
开发者ID:itav,项目名称:lms,代码行数:8,代码来源:LMSTcpdfDebitNote.php

示例11: parse_customer_data

function parse_customer_data($data, $row)
{
    global $DB;
    $amount = -$row['balance'];
    $data = preg_replace("/\\%bankaccount/", format_bankaccount(bankaccount($row['id'], $row['account'])), $data);
    $data = preg_replace("/\\%b/", $amount, $data);
    $data = preg_replace("/\\%date-y/", strftime("%Y"), $data);
    $data = preg_replace("/\\%date-m/", strftime("%m"), $data);
    $data = preg_replace("/\\%date_month_name/", strftime("%B"), $data);
    $deadline = $row['cdate'] + $row['paytime'] * 86400;
    $data = preg_replace("/\\%deadline-y/", strftime("%Y", $deadline), $data);
    $data = preg_replace("/\\%deadline-m/", strftime("%m", $deadline), $data);
    $data = preg_replace("/\\%deadline-d/", strftime("%d", $deadline), $data);
    $data = preg_replace("/\\%B/", $row['balance'], $data);
    $data = preg_replace("/\\%saldo/", moneyf($row['balance']), $data);
    $data = preg_replace("/\\%pin/", $row['pin'], $data);
    $data = preg_replace("/\\%cid/", $row['id'], $data);
    if (preg_match("/\\%abonament/", $data)) {
        $saldo = $DB->GetOne("SELECT SUM(value)\n\t\t\tFROM assignments, tariffs\n\t\t\tWHERE tariffid = tariffs.id AND customerid = ?\n\t\t\t\tAND (datefrom <= {$currtime} OR datefrom = 0)\n\t\t\t\tAND (dateto > {$currtime} OR dateto = 0)\n\t\t\t\tAND ((datefrom < dateto) OR (datefrom = 0 AND datefrom = 0))", array($row['id']));
        $data = preg_replace("/\\%abonament/", $saldo, $data);
    }
    // invoices, debit notes
    $data = preg_replace("/\\%invoice/", $row['doc_number'], $data);
    $data = preg_replace("/\\%number/", $row['doc_number'], $data);
    $data = preg_replace("/\\%value/", $row['value'], $data);
    $data = preg_replace("/\\%cdate-y/", strftime("%Y", $row['cdate']), $data);
    $data = preg_replace("/\\%cdate-m/", strftime("%m", $row['cdate']), $data);
    $data = preg_replace("/\\%cdate-d/", strftime("%d", $row['cdate']), $data);
    list($now_y, $now_m) = explode('/', strftime("%Y/%m", time()));
    $data = preg_replace("/\\%lastday/", strftime("%d", mktime(12, 0, 0, $now_m + 1, 0, $now_y)), $data);
    return $data;
}
开发者ID:kornelek,项目名称:lms,代码行数:32,代码来源:lms-notify.php

示例12: parse_customer_data

function parse_customer_data($data, $row)
{
    $DB = LMSDB::getInstance();
    $amount = -$row['balance'];
    $totalamount = -$row['totalbalance'];
    $data = preg_replace("/\\%bankaccount/", format_bankaccount(bankaccount($row['id'], $row['account'])), $data);
    $data = preg_replace("/\\%b/", $amount, $data);
    $data = preg_replace("/\\%totalb/", $totalamount, $data);
    $data = preg_replace("/\\%date-y/", strftime("%Y"), $data);
    $data = preg_replace("/\\%date-m/", strftime("%m"), $data);
    $data = preg_replace("/\\%date_month_name/", strftime("%B"), $data);
    $deadline = $row['cdate'] + $row['paytime'] * 86400;
    $data = preg_replace("/\\%deadline-y/", strftime("%Y", $deadline), $data);
    $data = preg_replace("/\\%deadline-m/", strftime("%m", $deadline), $data);
    $data = preg_replace("/\\%deadline-d/", strftime("%d", $deadline), $data);
    $data = preg_replace("/\\%B/", $row['balance'], $data);
    $data = preg_replace("/\\%totalB/", $row['totalbalance'], $data);
    $data = preg_replace("/\\%saldo/", moneyf($row['balance']), $data);
    $data = preg_replace("/\\%totalsaldo/", moneyf($row['totalbalance']), $data);
    $data = preg_replace("/\\%pin/", $row['pin'], $data);
    $data = preg_replace("/\\%cid/", $row['id'], $data);
    if (preg_match("/\\%abonament/", $data)) {
        $saldo = $DB->GetOne("SELECT SUM(value)\n\t\t\tFROM assignments, tariffs\n\t\t\tWHERE tariffid = tariffs.id AND customerid = ?\n\t\t\t\tAND datefrom <= {$currtime} AND (dateto > {$currtime} OR dateto = 0)\n\t\t\t\tAND ((datefrom < dateto) OR (datefrom = 0 AND datefrom = 0))", array($row['id']));
        $data = preg_replace("/\\%abonament/", $saldo, $data);
    }
    if (preg_match("/\\%last_10_in_a_table/", $data)) {
        $last10 = $DB->GetAll("SELECT comment, value, time FROM cash WHERE\n\t\t\tcustomerid = ? ORDER BY time DESC LIMIT 10", array($row['id']));
        // ok, now we are going to rise up system's load
        $l10 = "-----------+-----------+----------------------------------------------------\n";
        foreach ($last10 as $row_s) {
            $op_time = strftime("%Y/%m/%d", $row_s['time']);
            $op_amount = sprintf("%9.2f", $row_s['value']);
            $for_what = sprintf("%-52s", $row_s['comment']);
            $l10 = $l10 . "{$op_time} | {$op_amount} | {$for_what}\n";
        }
        $l10 = $l10 . "-----------+-----------+----------------------------------------------------\n";
        $data = preg_replace("/\\%last_10_in_a_table/", $l10, $data);
    }
    // invoices, debit notes
    $data = preg_replace("/\\%invoice/", $row['doc_number'], $data);
    $data = preg_replace("/\\%number/", $row['doc_number'], $data);
    $data = preg_replace("/\\%value/", $row['value'], $data);
    $data = preg_replace("/\\%cdate-y/", strftime("%Y", $row['cdate']), $data);
    $data = preg_replace("/\\%cdate-m/", strftime("%m", $row['cdate']), $data);
    $data = preg_replace("/\\%cdate-d/", strftime("%d", $row['cdate']), $data);
    list($now_y, $now_m) = explode('/', strftime("%Y/%m", time()));
    $data = preg_replace("/\\%lastday/", strftime("%d", mktime(12, 0, 0, $now_m + 1, 0, $now_y)), $data);
    return $data;
}
开发者ID:prezeskk,项目名称:lms,代码行数:49,代码来源:lms-notify.php


注:本文中的moneyf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。