#The full software license can be found here:
#http://www.accounting-123.com/a.php?a=153/GPLv3
#
#
#
#
#
#
#
#
#
#
#
require "settings.php";
# show current stock
$OUTPUT = printCurr();
require "template.php";
# show stock
function printCurr()
{
    # Set up table to display in
    $printCurr = "\n\t\t<h3>View Currency</h3>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t\t<tr>\n\t\t\t\t<th>Name</th>\n\t\t\t\t<th>Code</th>\n\t\t\t\t<th>Currency Symbol</th>\n\t\t\t\t<th>Current Rate</th>\n\t\t\t\t<th colspan='2'>Options</th>\n\t\t\t</tr>";
    # connect to database
    db_conn("cubit");
    # Query server
    $i = 0;
    $sql = "SELECT * FROM currency ORDER BY fcid ASC";
    $curRslt = db_exec($sql) or errDie("Unable to retrieve currency from database.");
    if (pg_numrows($curRslt) < 1) {
        return "<li class='err'>There are no currency in Cubit.</li>";
    }
                            ?>
disabled="disabled" <?php 
                        }
                        ?>
>
<?php 
                        $values = preg_split("/[\r\n]+/", $field['ValueList']);
                        if ($field['PriceList'] > "") {
                            $prices = preg_split("/[\r\n]+/", $field['PriceList']);
                        }
                        $checked = preg_split("/ /", $field['DefValue']);
                        $checknum = 0;
                        foreach ($values as $value => $caption) {
                            if ($field['PriceList'] > "") {
                                if ($prices[$value] != "-") {
                                    $caption = sp2nbsp($caption . "          " . printCurr($prices[$value], $settings));
                                }
                            }
                            ?>
											<option value="<?php 
                            echo $value + 1;
                            ?>
"<?php 
                            if ($checked[$checknum] == $value + 1) {
                                ?>
 selected="selected"<?php 
                                $checknum++;
                            }
                            ?>
><?php 
                            echo $caption;
예제 #3
0
					</td>
				</tr>
<?php 
}
if ($confirm) {
    if ($totalPrice < 0) {
        $totalPrice = 0;
    }
    ?>
				<tr>
					<td>
						<table width="100%">
							<tr>
								<td align="right"><strong>Total Price:</strong></td>
								<td align="right" width="75"><strong><?php 
    echo printCurr($totalPrice, $settings);
    ?>
</strong><input name="totalprice" id="totalprice" type="hidden" value="<?php 
    echo $totalPrice;
    ?>
" /></td>
								<td width="25"></td>
							</tr>
						</table>
					</td>
				</tr>
<?php 
}
if (!$finished) {
    ?>
				<tr>
예제 #4
0
                }
                $checked = explode(" ", $rego[$field['UID']]);
                $checknum = 0;
                foreach ($values as $value => $caption) {
                    if ($checked[$checknum] == $value + 1) {
                        ?>
											<tr>
												<td><?php 
                        echo $caption;
                        ?>
</td>
<?php 
                        if ($field['PriceList'] > "") {
                            ?>
												<td align="right" width="75"><?php 
                            echo $prices[$value] == "-" ? "" : printCurr($prices[$value], $settings);
                            ?>
</td>
<?php 
                        }
                        ?>
											</tr>
<?php 
                        $checknum++;
                    }
                }
                ?>
										</table>
									</td>
								</tr>
<?php 
예제 #5
0
                echo $settings->CurrencyPrefix;
                ?>
<input name="payamount[<?php 
                echo $pay['RegoID'];
                ?>
]" type="text" id="pay<?php 
                echo $rowNum;
                ?>
" style="width: 75px; text-align: right;" value="<?php 
                echo printCurr($pay['PriceRemain'], $settings, false);
                ?>
" onchange="return rlMaxAmount(this, '<?php 
                echo printCurr($pay['PriceRemain'], $settings, false);
                ?>
', '<?php 
                echo printCurr($pay['PriceRemain'], $settings);
                ?>
')" /><?php 
                echo $settings->CurrencySuffix;
            }
            ?>
</td>
<?php 
        }
        ?>
		</tr>
<?php 
    }
    if ($rsPay->RecordCount() == 0) {
        ?>
		<tr>