コード例 #1
0
ファイル: copy_nat.php プロジェクト: laiello/ebpls
<?php

include_once "class/TaxFeeOtherChargesClass.php";
$FindDup = new TaxFee();
$FindDup->FindDuplicate($natureid, $tfotype, $TaxType);
$duplicate = $FindDup->outnumrow;
if ($duplicate > 0) {
    ?>
        <body onload='alert("Existing Record Found! Duplicate Entries Not Allowed");'></body>
<?php 
} else {
    if ($Indicator == 1) {
        $nConstant = new TaxFee();
        //constant
        $sValues = "'',{$natureid}, {$tfotype}, {$Basis},\n                                    {$Indicator},'','{$AmountFormula}',now(),\n                                    {$TaxType},'{$uom}',{$MinAmount}";
        $nConstant->InsertNewTaxFee($sValues);
    } elseif ($Indicator == 2) {
        //formula
        $nFormula = new TaxFee();
        if ($Fmode == 1) {
            //Normal formula
            $sValues = "'',{$natureid}, {$tfotype}, {$Basis},\n                                    {$Indicator},{$Fmode},'{$AmountFormula}',now(),\n                                    {$TaxType},'{$uom}',{$MinAmount}";
            $nFormula->InsertNewTaxFee($sValues);
        } elseif ($Fmode == 2) {
            $sValues = "'',{$natureid}, {$tfotype}, {$Basis},\n                                    {$Indicator},{$Fmode},'{$orig_complex}',now(),\n                                    {$TaxType},'{$uom}',{$MinAmount}";
            $nFormula->InsertNewTaxFee($sValues);
            $added = 1;
            $tax_fee_id = $nFormula->outid;
            //save to complex
            $loop = 0;
            $staxfee = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_preference", "sassess", "");