本文整理汇总了PHP中Formatter::number方法的典型用法代码示例。如果您正苦于以下问题:PHP Formatter::number方法的具体用法?PHP Formatter::number怎么用?PHP Formatter::number使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Formatter
的用法示例。
在下文中一共展示了Formatter::number方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<th style="width:8em">Saldo <?php
echo SB_CURRENCY;
?>
</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($purchases as $purchase) {
echo "<tr>";
echo "<td>{$purchase->code}</td>";
echo "<td class='date'>" . Formatter::date($purchase->date) . "</td>";
echo "<td>{$purchase->provider}</td>";
echo "<td>{$PURCHASE_STATUS[$purchase->status]}</td>";
echo "<td>" . Formatter::text($purchase->gloss) . "</td>";
echo "<td class='number'>" . Formatter::number($purchase->amount) . "</td>";
echo "<td class='number'>" . Formatter::number($purchase->amount - Purchase::getAmountPaid($purchase->id)) . "</td>";
echo "<td class='ui-state-default'><a href='index.php?pages=purchase_detail&purchase={$purchase->id}' title='Ver'>" . ICON_ZOOMIN . "</a></td>";
echo "<td class='ui-state-default'><a href='index.php?pages=purchase_edit&purchase={$purchase->id}' title='Editar'>" . ICON_PENCIL . "</a></td>";
echo "</tr>";
}
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.default tbody tr:odd').addClass('alternate');
});
</script>
示例2: foreach
</th>
<th style="width:8em">Saldo <?php
echo SB_CURRENCY;
?>
</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($purchases as $purchase) {
echo "<tr>";
echo "<td>{$purchase->code}</td>";
echo "<td class='date'>{$purchase->date}</td>";
echo "<td>{$purchase->provider}</td>";
echo "<td>{$PURCHASE_STATUS[$purchase->status]}</td>";
echo "<td>" . Formatter::text($purchase->gloss) . "</td>";
echo "<td class='number'>" . Formatter::number($purchase->amount) . "</td>";
echo "<td class='number'>" . Formatter::number($purchase->outstanding) . "</td>";
echo "<td class='ui-state-default'><a href='index.php?pages=purchase_detail&purchase={$purchase->id}' title='Ver'>" . ICON_ZOOMIN . "</a></td>";
echo "<td class='ui-state-default'><a href='index.php?pages=purchase_edit&purchase={$purchase->id}' title='Editar'>" . ICON_PENCIL . "</a></td>";
}
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.default tbody tr:odd').addClass('alternate');
});
</script>
示例3:
echo "<td class='number'>" . Formatter::number($payment->amount) . "</td>";
echo "</tr>";
$totalPaid += $payment->amount;
}
$outstanding = $total - $totalPaid;
?>
</tbody>
<tfoot>
<tr>
<td colspan="3" style="text-align:right">Total: </td>
<td class="number total"><?php
echo Formatter::number($totalPaid);
?>
</td>
</tr>
<tr>
<td colspan="3" style="text-align:right">Saldo Pendiente: </td>
<td class="number total"><?php
echo Formatter::number($outstanding);
?>
</td>
</tr>
</tfoot>
</table>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#payments tbody tr:odd,#detail tbody tr:odd').addClass('alternate');
});
</script>
<?php
}
示例4: testNumber
/**
* @covers Formatter::number
*/
public function testNumber()
{
$actual = $this->formatter->number(14304, 4);
$excepted = "14,304.0000";
$this->assertEquals($excepted, $actual);
}
示例5:
?>
</td>
<td class="number"><?php
echo $item->stock;
?>
</td>
<td class="number"><?php
echo Formatter::number($item->priceUnit);
?>
</td>
<td class="number"><?php
echo Formatter::number($item->pricePack);
?>
</td>
<td class="number"><?php
echo Formatter::number($item->priceBox);
?>
</td>
<td class="date"><a href="<?php
echo $urlLotList;
?>
">Ver Lotes</a><br/><a href="<?php
echo $urlLotNew;
?>
">Nuevo Lote</a></td>
<td class="date"><img src="<?php
echo $item->image;
?>
" height="50"/></td>
</tr>
<?php
示例6: currency
/**
*
* @param unknown_type $number
*/
public static function currency($number)
{
return SB_CURRENCY . " " . Formatter::number($number);
}
示例7: foreach
</th>
<th style="width:8em">Saldo <?php
echo SB_CURRENCY;
?>
</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($selles as $sell) {
echo "<tr>";
echo "<td class='number'>{$sell->id}</td>";
echo "<td class='date'>" . Formatter::date($sell->date) . "</td>";
echo "<td>{$sell->provider}</td>";
echo "<td>{$PURCHASE_STATUS[$sell->status]}</td>";
echo "<td class='number'>" . Formatter::number($sell->amount) . "</td>";
echo "<td class='number'>" . Formatter::number($sell->amount - Sell::getAmountPaid($sell->id)) . "</td>";
echo "<td class='ui-state-default'><a href='index.php?pages=sell_detail&sell={$sell->id}' title='Ver'>" . ICON_ZOOMIN . "</a></td>";
echo "<td class='ui-state-default'><a href='index.php?pages=sell_edit&sell={$sell->id}' title='Editar'>" . ICON_PENCIL . "</a></td>";
echo "</tr>";
}
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.default tbody tr:odd').addClass('alternate');
});
</script>
示例8:
<td class="label">Carguio / Desacargio:</td>
<td><?php
echo Formatter::number($lot->costLoad);
?>
</td>
</tr>
<tr>
<td class="label">Otros:</td>
<td><?php
echo Formatter::number($lot->costOther);
?>
</td>
</tr>
<tr>
<td class="label">Precio Final:</td>
<td><?php
echo Formatter::number($lot->price);
?>
( Precio final de compra)</td>
</tr>
<tr>
<td class="label">Observaciones:</td>
<td><?php
echo $lot->gloss;
?>
</td>
</tr>
</table>
<br />
<!-- <button id="save">Guardar</button> -->
示例9: foreach
?>
</th>
<th style="width:8em">Saldo <?php
echo SB_CURRENCY;
?>
</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($selles as $sell) {
echo "<tr>";
echo "<td>{$sell->id}</td>";
echo "<td class='date'>{$sell->date}</td>";
echo "<td>{$sell->customer}</td>";
echo "<td>{$PURCHASE_STATUS[$sell->status]}</td>";
echo "<td class='number'>" . Formatter::number($sell->amount) . "</td>";
echo "<td class='number'>" . Formatter::number($sell->outstanding) . "</td>";
echo "<td class='ui-state-default'><a href='index.php?pages=sell_detail&sell={$sell->id}' title='Ver'>" . ICON_ZOOMIN . "</a></td>";
echo "<td class='ui-state-default'><a href='index.php?pages=sell_edit&sell={$sell->id}' title='Editar'>" . ICON_PENCIL . "</a></td>";
}
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.default tbody tr:odd').addClass('alternate');
});
</script>