• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP filter_number_input函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: elseif

        $_SESSION['Adjustment' . $identifier]->Quantity = 0;
    }
    $NewAdjustment = true;
} elseif (isset($_POST['StockID'])) {
    if (isset($_POST['StockID']) and $_POST['StockID'] != $_SESSION['Adjustment' . $identifier]->StockID) {
        $NewAdjustment = true;
        $_SESSION['Adjustment' . $identifier]->StockID = trim(mb_strtoupper($_POST['StockID']));
        $StockID = trim(mb_strtoupper($_POST['StockID']));
    }
    $_SESSION['Adjustment' . $identifier]->tag = $_POST['tag'];
    $_SESSION['Adjustment' . $identifier]->Narrative = $_POST['Narrative'];
    $_SESSION['Adjustment' . $identifier]->StockLocation = $_POST['StockLocation'];
    if ($_POST['Quantity'] == '') {
        $_POST['Quantity'] = 0;
    } else {
        $_POST['Quantity'] = filter_number_input($_POST['Quantity']);
    }
    $_SESSION['Adjustment' . $identifier]->Quantity = $_POST['Quantity'];
}
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . _('Inventory Adjustment') . '" alt="" />' . ' ' . _('Inventory Adjustment') . '</p>';
if (isset($_POST['CheckCode'])) {
    echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Dispatch') . '" alt="" />' . ' ' . _('Select Item to Adjust') . '</p>';
    if (mb_strlen($_POST['StockText']) > 0) {
        $sql = "SELECT stockid, description FROM stockmaster WHERE description LIKE '%" . $_POST['StockText'] . "%'";
    } else {
        $sql = "SELECT stockid, description FROM stockmaster WHERE stockid LIKE '%" . $_POST['StockCode'] . "%'";
    }
    $ErrMsg = _('The stock information cannot be retrieved because');
    $DbgMsg = _('The SQL to get the stock description was');
    $result = DB_query($sql, $db, $ErrMsg, $DbgMsg);
    echo '<table class="selection">
开发者ID:patmark,项目名称:weberp-elct,代码行数:31,代码来源:StockAdjustments.php


示例2: DB_query

            if (isset($UOM) and $Quantity > 0) {
                $sql = "SELECT description, decimalplaces FROM stockmaster WHERE stockid='" . $StockID . "'";
                $result = DB_query($sql, $db);
                $myrow = DB_fetch_array($result);
                $_SESSION['offer' . $identifier]->add_to_offer($_SESSION['offer' . $identifier]->LinesOnOffer, $StockID, $Quantity, $myrow['description'], $Price, $UOM, $myrow['decimalplaces'], DateAdd(date($_SESSION['DefaultDateFormat']), 'm', 3));
                unset($UOM);
            }
        }
    }
}
if (isset($_POST['Refresh']) and !isset($_POST['NewItem'])) {
    foreach ($_POST as $key => $value) {
        if (mb_substr($key, 0, 7) == 'StockID') {
            $Index = mb_substr($key, 7, mb_strlen($key) - 7);
            $StockID = $value;
            $Quantity = filter_number_input($_POST['Qty' . $Index]);
            $Price = filter_currency_input($_POST['Price' . $Index]);
            $ExpiryDate = $_POST['expirydate' . $Index];
        }
        if (isset($ExpiryDate)) {
            $_SESSION['offer' . $identifier]->update_offer_item($Index, $Quantity, $Price, $ExpiryDate);
            unset($ExpiryDate);
        }
    }
}
if (isset($_POST['Update'])) {
    foreach ($_POST as $key => $value) {
        if (mb_substr($key, 0, 3) == 'Qty') {
            $LineNo = mb_substr($key, 3);
            $Quantity = $value;
        }
开发者ID:patmark,项目名称:weberp-elct,代码行数:31,代码来源:SupplierTenders.php


示例3: _

 }
 if (Date1GreaterThanDate2($_POST['StartDate'], $_POST['EndDate']) and $_POST['EndDate'] != '') {
     $InputError = 1;
     $msg = _('The end date is expected to be after the start date, enter an end date after the start date for this price');
 }
 if (Date1GreaterThanDate2(Date($_SESSION['DefaultDateFormat']), $_POST['EndDate']) and $_POST['EndDate'] != '') {
     $InputError = 1;
     $msg = _('The end date is expected to be after today. There is no point entering a new price where the effective date is before today!');
 }
 if (isset($_POST['Editing']) and $_POST['Editing'] == 'Yes' and strlen($Item) > 1 and $InputError != 1) {
     //editing an existing price
     $sql = "UPDATE prices SET typeabbrev='" . $SalesType . "',\n\t\t                        currabrev='" . $CurrCode . "',\n\t\t\t\t\t\t\t\tprice='" . filter_currency_input($_POST['Price']) . "',\n\t\t\t\t\t\t\t\tunits='" . $_POST['Units'] . "',\n\t\t\t\t\t\t\t\tconversionfactor='" . filter_number_input($_POST['ConversionFactor']) . "',\n\t\t\t\t\t\t\t\tdecimalplaces='" . round($_POST['DecimalPlaces'], 0) . "',\n\t\t\t\t\t\t\t\tbranchcode='" . $_POST['Branch'] . "',\n\t\t\t\t\t\t\t\tstartdate='" . FormatDateForSQL($_POST['StartDate']) . "',\n\t\t\t\t\t\t\t\tenddate='" . FormatDateForSQL($_POST['EndDate']) . "'\n\t\t\t\tWHERE prices.stockid='" . $Item . "'\n\t\t\t\tAND prices.typeabbrev='" . $SalesType . "'\n\t\t\t\tAND prices.currabrev='" . $CurrCode . "'\n\t\t\t\tAND prices.startdate='" . $_POST['OldStartDate'] . "'\n\t\t\t\tAND prices.enddate='" . $_POST['OldEndDate'] . "'\n\t\t\t\tAND prices.debtorno='" . $_SESSION['CustomerID'] . "'";
     $msg = _('Price Updated');
 } elseif ($InputError != 1) {
     /*Selected price is null cos no item selected on first time round so must be adding a	record must be submitting new entries in the new price form */
     $sql = "INSERT INTO prices (stockid,\n\t\t                            typeabbrev,\n\t\t\t\t\t\t\t\t\tcurrabrev,\n\t\t\t\t\t\t\t\t\tdebtorno,\n\t\t\t\t\t\t\t\t\tprice,\n\t\t\t\t\t\t\t\t\tunits,\n\t\t\t\t\t\t\t\t\tconversionfactor,\n\t\t\t\t\t\t\t\t\tdecimalplaces,\n\t\t\t\t\t\t\t\t\tbranchcode,\n\t\t\t\t\t\t\t\t\tstartdate,\n\t\t\t\t\t\t\t\t\tenddate)\n\t\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t\t\t'" . $Item . "',\n\t\t\t\t\t\t\t\t\t'" . $SalesType . "',\n\t\t\t\t\t\t\t\t\t'" . $CurrCode . "',\n\t\t\t\t\t\t\t\t\t'" . $_SESSION['CustomerID'] . "',\n\t\t\t\t\t\t\t\t\t'" . filter_currency_input($_POST['Price']) . "',\n\t\t\t\t\t\t\t\t\t'" . $_POST['Units'] . "',\n\t\t\t\t\t\t\t\t\t'" . filter_number_input($_POST['ConversionFactor']) . "',\n\t\t\t\t\t\t\t\t\t'" . round($_POST['DecimalPlaces'], 0) . "',\n\t\t\t\t\t\t\t\t\t'" . $_POST['Branch'] . "',\n\t\t\t\t\t\t\t\t\t'" . FormatDateForSQL($_POST['StartDate']) . "',\n\t\t\t\t\t\t\t\t\t'" . FormatDateForSQL($_POST['EndDate']) . "'\n\t\t\t\t\t\t\t\t\t)";
     $msg = _('Price added') . '.';
 }
 //run the SQL from either of the above possibilites
 if ($InputError != 1) {
     $result = DB_query($sql, $db, '', '', false, false);
     if (DB_error_no($db) != 0) {
         if ($msg == _('Price Updated')) {
             $msg = _('The price could not be updated because') . ' - ' . DB_error_msg($db);
         } else {
             $msg = _('The price could not be added because') . ' - ' . DB_error_msg($db);
         }
     } else {
         ReSequenceEffectiveDates($Item, $SalesType, $CurrCode, $_SESSION['CustomerID'], $db);
         unset($_POST['EndDate']);
         unset($_POST['StartDate']);
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:Prices_Customer.php


示例4: prnMsg

     prnMsg(_('The price entered was not numeric and a number is expected. No changes have been made to the database'), 'error');
 }
 if ($_POST['Price'] == 0) {
     prnMsg(_('The price entered is zero') . '   ' . _('Is this intentional?'), 'warn');
 }
 if (!is_numeric(filter_number_input($_POST['LeadTime']))) {
     $InputError = 1;
     unset($_POST['LeadTime']);
     prnMsg(_('The lead time entered was not numeric a number of days is expected no changes have been made to the database'), 'error');
 }
 if (!is_numeric(filter_number_input($_POST['MinOrderQty']))) {
     $InputError = 1;
     unset($_POST['MinOrderQty']);
     prnMsg(_('The minimum order quantity was not numeric and a number is expected no changes have been made to the database'), 'error');
 }
 if (!is_numeric(filter_number_input($_POST['ConversionFactor']))) {
     $InputError = 1;
     unset($_POST['ConversionFactor']);
     prnMsg(_('The conversion factor entered was not numeric') . ' (' . _('a number is expected') . '). ' . _('The conversion factor is the number which the price must be divided by to get the unit price in our unit of measure') . '. <br />' . _('E.g.') . ' ' . _('The supplier sells an item by the tonne and we hold stock by the kg') . '. ' . _('The suppliers price must be divided by 1000 to get to our cost per kg') . '. ' . _('The conversion factor to enter is 1000') . '. <br /><br />' . _('No changes will be made to the database'), 'error');
 }
 if ($InputError == 0 and isset($_POST['AddRecord'])) {
     $sql = "INSERT INTO purchdata (supplierno,\n\t\t\t\t\t\t\t\t\t\tstockid,\n\t\t\t\t\t\t\t\t\t\tprice,\n\t\t\t\t\t\t\t\t\t\teffectivefrom,\n\t\t\t\t\t\t\t\t\t\tsuppliersuom,\n\t\t\t\t\t\t\t\t\t\tconversionfactor,\n\t\t\t\t\t\t\t\t\t\tuomdecimalplaces,\n\t\t\t\t\t\t\t\t\t\tsupplierdescription,\n\t\t\t\t\t\t\t\t\t\tsuppliers_partno,\n\t\t\t\t\t\t\t\t\t\tleadtime,\n\t\t\t\t\t\t\t\t\t\tminorderqty,\n\t\t\t\t\t\t\t\t\t\tpreferred)\n\t\t\t\t\t\t\t\t\tVALUES ('" . $SupplierID . "',\n\t\t\t\t\t\t\t\t\t\t'" . $StockID . "',\n\t\t\t\t\t\t\t\t\t\t'" . filter_currency_input($_POST['Price']) . "',\n\t\t\t\t\t\t\t\t\t\t'" . FormatDateForSQL($_POST['EffectiveFrom']) . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['SuppliersUOM'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['ConversionFactor'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['DecimalPlaces'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['SupplierDescription'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['SupplierCode'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['LeadTime'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['MinOrderQty'] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_POST['Preferred'] . "'\n\t\t\t\t\t\t\t\t\t)";
     $ErrMsg = _('The supplier purchasing details could not be added to the database because');
     $DbgMsg = _('The SQL that failed was');
     $AddResult = DB_query($sql, $db, $ErrMsg, $DbgMsg);
     prnMsg(_('This supplier purchasing data has been added to the database'), 'success');
     /* If the new purchdata is the preferred one, the old ones from the same suppliers shouldn't be preferred.
     		Are kept only for historic information only */
     if ($_POST['Preferred'] == 1) {
         $sql = "UPDATE purchdata SET preferred='0'\n\t\t\t\t\t\t\t\tWHERE purchdata.stockid='" . $StockID . "'\n\t\t\t\t\t\t\t\t\tAND purchdata.supplierno='" . $SupplierID . "'\n\t\t\t\t\t\t\t\t\tAND purchdata.effectivefrom < '" . FormatDateForSQL($_POST['EffectiveFrom']) . "'";
         $ErrMsg = _('The preferred supplier details could not be update because');
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:PurchData.php


示例5: foreach

     //page called attempting to delete a line - GET['Delete'] = the line number to delete
     $QuantityAlreadyDelivered = $_SESSION['Items' . $identifier]->Some_Already_Delivered($_GET['Delete']);
     if ($QuantityAlreadyDelivered == 0) {
         $_SESSION['Items' . $identifier]->remove_from_cart($_GET['Delete'], 'Yes');
         /*Do update DB */
     } else {
         $_SESSION['Items' . $identifier]->LineItems[$_GET['Delete']]->Quantity = $QuantityAlreadyDelivered;
     }
 }
 $AlreadyWarnedAboutCredit = false;
 foreach ($_SESSION['Items' . $identifier]->LineItems as $OrderLine) {
     if (isset($_POST['Quantity_' . $OrderLine->LineNumber])) {
         if (!isset($PropertiesArray[$OrderLine->LineNumber])) {
             $PropertiesArray[$OrderLine->LineNumber] = '';
         }
         $Quantity = filter_number_input($_POST['Quantity_' . $OrderLine->LineNumber]);
         if (ABS($OrderLine->Price - $_POST['Price_' . $OrderLine->LineNumber]) > 0.01) {
             $Price = filter_currency_input($_POST['Price_' . $OrderLine->LineNumber]);
             $_POST['GPPercent_' . $OrderLine->LineNumber] = ($Price * (1 - $_POST['Discount_' . $OrderLine->LineNumber] / 100) - $OrderLine->StandardCost * $ExRate) / ($Price * (1 - $_POST['Discount_' . $OrderLine->LineNumber]) / 100);
         } elseif (ABS($OrderLine->GPPercent - $_POST['GPPercent_' . $OrderLine->LineNumber]) >= 0.01) {
             //then do a recalculation of the price at this new GP Percentage
             $Price = $OrderLine->StandardCost * $ExRate / (1 - ($_POST['GPPercent_' . $OrderLine->LineNumber] + $_POST['Discount_' . $OrderLine->LineNumber]) / 100);
         } else {
             $Price = $_POST['Price_' . $OrderLine->LineNumber];
         }
         $DiscountPercentage = $_POST['Discount_' . $OrderLine->LineNumber];
         if ($_SESSION['AllowOrderLineItemNarrative'] == 1) {
             $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber];
         } else {
             $Narrative = '';
         }
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:SelectOrderItems.php


示例6: LevelNetting

function LevelNetting(&$db, $part, $eoq, $PanSize, $ShrinkFactor, $LeadTime)
{
    // Create an array of mrprequirements and an array of mrpsupplies, then read through
    // them seeing if all requirements are covered by supplies. Create a planned order
    // for any unmet requirements. Change dates if necessary for the supplies.
    //echo '<br />Part is ' . "$part" . '<br />';
    // Get decimal places from stockmaster for rounding of shrinkage factor
    $sql = "SELECT decimalplaces FROM stockmaster WHERE stockid = '" . $part . "'";
    $result = DB_query($sql, $db);
    $myrow = DB_fetch_row($result);
    $DecimalPlaces = $myrow[0];
    // Load mrprequirements into $Requirements array
    $sql = "SELECT * FROM mrprequirements WHERE part = '" . $part . "' ORDER BY daterequired";
    $result = DB_query($sql, $db);
    $Requirements = array();
    $i = 0;
    while ($myrow = DB_fetch_array($result)) {
        array_push($Requirements, $myrow);
        $i++;
    }
    //end of while loop
    // Load mrpsupplies into $Supplies array
    $sql = "SELECT * FROM mrpsupplies WHERE part = '" . $part . "' ORDER BY duedate";
    $result = DB_query($sql, $db);
    $Supplies = array();
    $i = 0;
    while ($myrow = DB_fetch_array($result)) {
        array_push($Supplies, $myrow);
        $i++;
    }
    //end of while loop
    // Go through all requirements and check if have supplies to cover them
    $RequirementCount = count($Requirements);
    $SupplyCount = count($Supplies);
    $reqi = 0;
    //Index for requirements
    $supi = 0;
    // index for supplies
    $TotalRequirement = 0;
    $TotalSupply = 0;
    if ($RequirementCount > 0 && $SupplyCount > 0) {
        $TotalRequirement += $Requirements[$reqi]['quantity'];
        $TotalSupply += $Supplies[$supi]['supplyquantity'];
        while ($TotalRequirement > 0 && $TotalSupply > 0) {
            $Supplies[$supi]['updateflag'] = 1;
            // ******** Put leeway calculation in here ********
            $DueDate = ConvertSQLDate($Supplies[$supi]['duedate']);
            $ReqDate = ConvertSQLDate($Requirements[$reqi]['daterequired']);
            $DateDiff = DateDiff($DueDate, $ReqDate, 'd');
            //if ($Supplies[$supi]['duedate'] > $Requirements[$reqi]['daterequired']) {
            if ($DateDiff > abs(filter_number_input($_POST['Leeway']))) {
                $sql = "UPDATE mrpsupplies SET mrpdate = '" . $Requirements[$reqi]['daterequired'] . "' WHERE id = '" . $Supplies[$supi]['id'] . "' AND duedate = mrpdate";
                $result = DB_query($sql, $db);
            }
            if ($TotalRequirement > $TotalSupply) {
                $TotalRequirement -= $TotalSupply;
                $Requirements[$reqi]['quantity'] -= $TotalSupply;
                $TotalSupply = 0;
                $Supplies[$supi]['supplyquantity'] = 0;
                $supi++;
                if ($SupplyCount > $supi) {
                    $TotalSupply += $Supplies[$supi]['supplyquantity'];
                }
            } else {
                $TotalSupply -= $TotalRequirement;
                $Supplies[$supi]['supplyquantity'] -= $TotalRequirement;
                $TotalRequirement = 0;
                $Requirements[$reqi]['quantity'] = 0;
                $reqi++;
                if ($RequirementCount > $reqi) {
                    $TotalRequirement += $Requirements[$reqi]['quantity'];
                }
            }
            // End of if $TotalRequirement > $TotalSupply
        }
        // End of while
    }
    // End of if
    // When get to this part of code, have gone through all requirements, If there is any
    // unmet requirements, create an mrpplannedorder to cover it. Also call the
    // CreateLowerLevelRequirement() function to create gross requirements for lower level parts.
    // There is an excess quantity if the eoq is higher than the actual required amount.
    // If there is a subsuquent requirement, the excess quantity is subtracted from that
    // quantity. For instance, if the first requirement was for 2 and the eoq was 5, there
    // would be an excess of 3; if there was another requirement for 3 or less, the excess
    // would cover it, so no planned order would have to be created for the second requirement.
    $ExcessQty = 0;
    foreach ($Requirements as $key => $row) {
        $DateRequired[$key] = $row['daterequired'];
    }
    if (count($Requirements)) {
        array_multisort($DateRequired, SORT_ASC, $Requirements);
    }
    foreach ($Requirements as $Requirement) {
        // First, inflate requirement if there is a shrinkage factor
        // Should the quantity be rounded?
        if ($_POST['shrinkageflag'] == 'y' and $ShrinkFactor > 0) {
            $Requirement['quantity'] = $Requirement['quantity'] * 100 / (100 - $ShrinkFactor);
            $Requirement['quantity'] = round($Requirement['quantity'], $DecimalPlaces);
        }
//.........这里部分代码省略.........
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:101,代码来源:MRP.php


示例7: _

        if ($_POST['FromStockLocation'] == $_POST['ToStockLocation']) {
            $InputError = True;
            $ErrorMessage .= _('The transfer must have a different location to receive into and location sent from');
        }
    }
    //end if the transfer is not a duplicated
}
if (isset($_POST['Submit']) and $InputError == False) {
    $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to BEGIN Location Transfer transaction');
    DB_Txn_Begin($db);
    for ($i = 0; $i < $_POST['LinesCounter']; $i++) {
        if ($_POST['StockID' . $i] != '') {
            $DecimalsSql = "SELECT decimalplaces\n\t\t\t\t\t\t\tFROM stockmaster\n\t\t\t\t\t\t\tWHERE stockid='" . $_POST['StockID' . $i] . "'";
            $DecimalResult = DB_Query($DecimalsSql, $db);
            $DecimalRow = DB_fetch_array($DecimalResult);
            $sql = "INSERT INTO loctransfers (reference,\n\t\t\t\t\t\t\t\tstockid,\n\t\t\t\t\t\t\t\tshipqty,\n\t\t\t\t\t\t\t\tshipdate,\n\t\t\t\t\t\t\t\tshiploc,\n\t\t\t\t\t\t\t\trecloc)\n\t\t\t\t\t\tVALUES ('" . $_POST['Trf_ID'] . "',\n\t\t\t\t\t\t\t'" . $_POST['StockID' . $i] . "',\n\t\t\t\t\t\t\t'" . round(filter_number_input($_POST['StockQTY' . $i]), $DecimalRow['decimalplaces']) . "',\n\t\t\t\t\t\t\t'" . Date('Y-m-d') . "',\n\t\t\t\t\t\t\t'" . $_POST['FromStockLocation'] . "',\n\t\t\t\t\t\t\t'" . $_POST['ToStockLocation'] . "')";
            $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for') . ' ' . $_POST['StockID' . $i];
            $resultLocShip = DB_query($sql, $db, $ErrMsg);
        }
    }
    $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to COMMIT Location Transfer transaction');
    DB_Txn_Commit($db);
    prnMsg(_('The inventory transfer records have been created successfully'), 'success');
    echo '<p><a href="' . $rootpath . '/PDFStockLocTransfer.php?TransferNo=' . $_POST['Trf_ID'] . '">' . _('Print the Transfer Docket') . '</a></p>';
    include 'includes/footer.inc';
} else {
    //Get next Inventory Transfer Shipment Reference Number
    if (isset($_GET['Trf_ID'])) {
        $Trf_ID = $_GET['Trf_ID'];
    } elseif (isset($_POST['Trf_ID'])) {
        $Trf_ID = $_POST['Trf_ID'];
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:StockLocTransfer.php


示例8: _

            }
            $ErrMsg = _('The customer could not be updated because');
            $result = DB_query($sql, $db, $ErrMsg);
            prnMsg(_('Customer updated'), 'success');
            echo '<br />';
        } else {
            //it is a new customer
            /* set the DebtorNo if $AutoDebtorNo in config.php has been set to
            			something greater 0 */
            if ($_SESSION['AutoDebtorNo'] > 0) {
                /* system assigned, sequential, numeric */
                if ($_SESSION['AutoDebtorNo'] == 1) {
                    $_POST['DebtorNo'] = GetNextTransNo(500, $db);
                }
            }
            $sql = "INSERT INTO debtorsmaster (\n\t\t\t\t\t\t\tdebtorno,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\taddress1,\n\t\t\t\t\t\t\taddress2,\n\t\t\t\t\t\t\taddress3,\n\t\t\t\t\t\t\taddress4,\n\t\t\t\t\t\t\taddress5,\n\t\t\t\t\t\t\taddress6,\n\t\t\t\t\t\t\tcurrcode,\n\t\t\t\t\t\t\tclientsince,\n\t\t\t\t\t\t\tholdreason,\n\t\t\t\t\t\t\tpaymentterms,\n\t\t\t\t\t\t\tdiscount,\n\t\t\t\t\t\t\tdiscountcode,\n\t\t\t\t\t\t\tpymtdiscount,\n\t\t\t\t\t\t\tcreditlimit,\n\t\t\t\t\t\t\tsalestype,\n\t\t\t\t\t\t\tinvaddrbranch,\n\t\t\t\t\t\t\ttaxref,\n\t\t\t\t\t\t\tcustomerpoline,\n\t\t\t\t\t\t\ttypeid)\n\t\t\t\tVALUES ('" . $_POST['DebtorNo'] . "',\n\t\t\t\t\t'" . $_POST['CustName'] . "',\n\t\t\t\t\t'" . $_POST['Address1'] . "',\n\t\t\t\t\t'" . $_POST['Address2'] . "',\n\t\t\t\t\t'" . $_POST['Address3'] . "',\n\t\t\t\t\t'" . $_POST['Address4'] . "',\n\t\t\t\t\t'" . $_POST['Address5'] . "',\n\t\t\t\t\t'" . $_POST['Address6'] . "',\n\t\t\t\t\t'" . $_POST['CurrCode'] . "',\n\t\t\t\t\t'" . $SQL_ClientSince . "',\n\t\t\t\t\t'" . $_POST['HoldReason'] . "',\n\t\t\t\t\t'" . $_POST['PaymentTerms'] . "',\n\t\t\t\t\t " . filter_number_input($_POST['Discount']) . "/100,\n\t\t\t\t\t'" . $_POST['DiscountCode'] . "',\n\t\t\t\t\t " . filter_number_input($_POST['PymtDiscount']) . "/100,\n\t\t\t\t\t'" . filter_currency_input($_POST['CreditLimit']) . "',\n\t\t\t\t\t'" . $_POST['SalesType'] . "',\n\t\t\t\t\t'" . $_POST['AddrInvBranch'] . "',\n\t\t\t\t\t'" . $_POST['TaxRef'] . "',\n\t\t\t\t\t'" . $_POST['CustomerPOLine'] . "',\n\t\t\t\t\t'" . $_POST['typeid'] . "'\n\t\t\t\t\t)";
            $ErrMsg = _('This customer could not be added because');
            $result = DB_query($sql, $db, $ErrMsg);
            $BranchCode = mb_substr($_POST['DebtorNo'], 0, 4);
            echo '<meta http-equiv="Refresh" content="0; url=' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '">';
            echo '<div class="centre">' . _('You should automatically be forwarded to the entry of a new Customer Branch page') . '. ' . _('If this does not happen') . ' (' . _('if the browser does not support META Refresh') . ') ' . '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_POST['DebtorNo'] . '"></a></div>';
            include 'includes/footer.inc';
            exit;
        }
    } else {
        prnMsg(_('Validation failed') . '. ' . _('No updates or deletes took place'), 'error');
    }
} elseif (isset($_POST['delete'])) {
    //the link to delete a selected record was clicked instead of the submit button
    $CancelDelete = 0;
    // PREVENT DELETES IF DEPENDENT RECORDS IN 'DebtorTrans'
开发者ID:patmark,项目名称:weberp-elct,代码行数:31,代码来源:Customers.php


示例9: _

<?php

/* $Id$*/
include 'includes/session.inc';
if (isset($_POST['PrintPDF'])) {
    include 'includes/PDFStarter.php';
    $pdf->addInfo('Title', _('Customer Listing'));
    $pdf->addInfo('Subject', _('Customer Listing'));
    $line_height = 12;
    $PageNumber = 0;
    $FontSize = 10;
    if ($_POST['Activity'] != 'All') {
        $_POST['ActivityAmount'] = filter_number_input($_POST['ActivityAmount']);
        if (!is_numeric($_POST['ActivityAmount'])) {
            $title = _('Customer List') . ' - ' . _('Problem Report') . '....';
            include 'includes/header.inc';
            echo '<br />';
            prnMsg(_('The activity amount is not numeric and you elected to print customer relative to a certain amount of activity') . ' - ' . _('this level of activity must be specified in the local currency') . '.', 'error');
            include 'includes/footer.inc';
            exit;
        }
    }
    /* Now figure out the customer data to report for the selections made */
    if (in_array('All', $_POST['Areas'])) {
        if (in_array('All', $_POST['SalesPeople'])) {
            $SQL = "SELECT debtorsmaster.debtorno,\n\t\t\t\t\tdebtorsmaster.name,\n\t\t\t\t\tdebtorsmaster.address1,\n\t\t\t\t\tdebtorsmaster.address2,\n\t\t\t\t\tdebtorsmaster.address3,\n\t\t\t\t\tdebtorsmaster.address4,\n\t\t\t\t\tdebtorsmaster.address5,\n\t\t\t\t\tdebtorsmaster.address6,\n\t\t\t\t\tdebtorsmaster.salestype,\n\t\t\t\t\tcustbranch.branchcode,\n\t\t\t\t\tcustbranch.brname,\n\t\t\t\t\tcustbranch.braddress1,\n\t\t\t\t\tcustbranch.braddress2,\n\t\t\t\t\tcustbranch.braddress3,\n\t\t\t\t\tcustbranch.braddress4,\n\t\t\t\t\tcustbranch.braddress5,\n\t\t\t\t\tcustbranch.braddress6,\n\t\t\t\t\tcustbranch.contactname,\n\t\t\t\t\tcustbranch.phoneno,\n\t\t\t\t\tcustbranch.faxno,\n\t\t\t\t\tcustbranch.email,\n\t\t\t\t\tcustbranch.area,\n\t\t\t\t\tcustbranch.salesman,\n\t\t\t\t\tareas.areadescription,\n\t\t\t\t\tsalesman.salesmanname\n\t\t\t\tFROM debtorsmaster INNER JOIN custbranch\n\t\t\t\tON debtorsmaster.debtorno=custbranch.debtorno\n\t\t\t\tINNER JOIN areas\n\t\t\t\tON custbranch.area = areas.areacode\n\t\t\t\tINNER JOIN salesman\n\t\t\t\tON custbranch.salesman=salesman.salesmancode\n\t\t\t\tORDER BY area,\n\t\t\t\t\tsalesman,\n\t\t\t\t\tdebtorsmaster.debtorno,\n\t\t\t\t\tcustbranch.branchcode";
        } else {
            /* there are a range of salesfolk selected need to build the where clause */
            $SQL = "SELECT debtorsmaster.debtorno,\n\t\t\t\t\tdebtorsmaster.name,\n\t\t\t\t\tdebtorsmaster.address1,\n\t\t\t\t\tdebtorsmaster.address2,\n\t\t\t\t\tdebtorsmaster.address3,\n\t\t\t\t\tdebtorsmaster.address4,\n\t\t\t\t\tdebtorsmaster.address5,\n\t\t\t\t\tdebtorsmaster.address6,\n\t\t\t\t\tdebtorsmaster.salestype,\n\t\t\t\t\tcustbranch.branchcode,\n\t\t\t\t\tcustbranch.brname,\n\t\t\t\t\tcustbranch.braddress1,\n\t\t\t\t\tcustbranch.braddress2,\n\t\t\t\t\tcustbranch.braddress3,\n\t\t\t\t\tcustbranch.braddress4,\n\t\t\t\t\tcustbranch.braddress5,\n\t\t\t\t\tcustbranch.braddress6,\n\t\t\t\t\tcustbranch.contactname,\n\t\t\t\t\tcustbranch.phoneno,\n\t\t\t\t\tcustbranch.faxno,\n\t\t\t\t\tcustbranch.email,\n\t\t\t\t\tcustbranch.area,\n\t\t\t\t\tcustbranch.salesman,\n\t\t\t\t\tareas.areadescription,\n\t\t\t\t\tsalesman.salesmanname\n\t\t\t\tFROM debtorsmaster INNER JOIN custbranch\n\t\t\t\tON debtorsmaster.debtorno=custbranch.debtorno\n\t\t\t\tINNER JOIN areas\n\t\t\t\tON custbranch.area = areas.areacode\n\t\t\t\tINNER JOIN salesman\n\t\t\t\tON custbranch.salesman=salesman.salesmancode\n\t\t\t\tWHERE (";
            $i = 0;
            foreach ($_POST['SalesPeople'] as $Salesperson) {
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:PDFCustomerList.php


示例10: while

echo $TableHeader;
$j = 1;
$k = 0;
//row colour counter
while ($myrow = DB_fetch_array($LocStockResult)) {
    if ($k == 1) {
        echo '<tr class="EvenTableRows">';
        $k = 0;
    } else {
        echo '<tr class="OddTableRows">';
        $k = 1;
    }
    if (isset($_POST[$myrow['loccode']])) {
        $_POST[$myrow['loccode']] = filter_number_input($_POST[$myrow['loccode']]);
    } else {
        $_POST[$myrow['loccode']] = filter_number_input(0);
    }
    if (isset($_POST['Old' . $myrow['loccode']]) and $_POST['Old' . $myrow['loccode']] != $_POST[$myrow['loccode']] and isset($_POST['UpdateData']) and is_numeric($_POST[$myrow['loccode']]) and $_POST[$myrow['loccode']] >= 0) {
        $myrow['reorderlevel'] = $_POST[$myrow['loccode']];
        $sql = "UPDATE locstock SET reorderlevel = '" . $_POST[$myrow['loccode']] . "'\n\t   \t\tWHERE stockid = '" . $StockID . "'\n\t\t\tAND loccode = '" . $myrow['loccode'] . "'";
        $UpdateReorderLevel = DB_query($sql, $db);
    }
    printf('<td>%s</td>
		<td class="number">%s</td>
		<td><input type="text" class="number" name="%s" maxlength="10" size="10" value="%s" /></td>
		<input type="hidden" name="Old%s" maxlength="10" size="10" value="%s" />', $myrow['locationname'], locale_number_format($myrow['quantity'], $myrow['decimalplaces']), $myrow['loccode'], locale_number_format($myrow['reorderlevel'], $myrow['decimalplaces']), $myrow['loccode'], locale_number_format($myrow['reorderlevel'], $myrow['decimalplaces']));
    $j++;
    if ($j == 12) {
        $j = 1;
        echo $TableHeader;
    }
开发者ID:patmark,项目名称:weberp-elct,代码行数:31,代码来源:StockReorderLevel.php


示例11: prnMsg

    } else {
        prnMsg(_('The other contract requirements cannot be altered because the customer has already placed the order'), 'warn');
    }
}
if (isset($_POST['EnterNewRequirement'])) {
    $InputError = false;
    if (!is_numeric(filter_number_input($_POST['Quantity']))) {
        prnMsg(_('The quantity of the new requirement is expected to be numeric'), 'error');
        $InputError = true;
    }
    if (!is_numeric(filter_currency_input($_POST['CostPerUnit']))) {
        prnMsg(_('The cost per unit of the new requirement is expected to be numeric'), 'error');
        $InputError = true;
    }
    if (!$InputError) {
        $_SESSION['Contract' . $identifier]->Add_To_ContractRequirements($_POST['RequirementDescription'], filter_number_input($_POST['Quantity']), filter_currency_input($_POST['CostPerUnit']));
        unset($_POST['RequirementDescription']);
        unset($_POST['Quantity']);
        unset($_POST['CostPerUnit']);
    }
}
/* This is where the other requirement as entered/modified should be displayed reflecting any deletions or insertions*/
echo '<form name="ContractReqtsForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier=' . $identifier . '" method="post">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/contract.png" title="' . _('Contract Other Requirements') . '" alt="" />  ' . _('Contract Other Requirements') . ' - ' . $_SESSION['Contract' . $identifier]->CustomerName . '</p>';
if (count($_SESSION['Contract' . $identifier]->ContractReqts) > 0) {
    echo '<table cellpadding="2" class="selection">';
    if (isset($_SESSION['Contract' . $identifier]->ContractRef)) {
        echo '<tr><th colspan="5">' . _('Contract Reference:') . ' ' . $_SESSION['Contract' . $identifier]->ContractRef . '</th></tr>';
    }
    echo '<tr>
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:ContractOtherReqts.php


示例12: filter_currency_input

        /* Need to see if there is also a price entered that has an end date after the start date of this price and if
        		so we will need to update it so there is no ambiguity as to which price will be used*/
        //editing an existing price
        $sql = "UPDATE prices SET\n\t\t\t\t\ttypeabbrev='" . $_POST['TypeAbbrev'] . "',\n\t\t\t\t\tcurrabrev='" . $_POST['CurrAbrev'] . "',\n\t\t\t\t\tprice='" . filter_currency_input($_POST['Price']) . "',\n\t\t\t\t\tunits='" . $_POST['Units'] . "',\n\t\t\t\t\tconversionfactor='" . $_POST['ConversionFactor'] . "',\n\t\t\t\t\tdecimalplaces='" . $_POST['DecimalPlaces'] . "',\n\t\t\t\t\tstartdate='" . FormatDateForSQL($_POST['StartDate']) . "',\n\t\t\t\t\tenddate='" . $SQLEndDate . "'\n\t\t\t\tWHERE prices.stockid='" . $Item . "'\n\t\t\t\tAND startdate='" . $_POST['OldStartDate'] . "'\n\t\t\t\tAND enddate ='" . $_POST['OldEndDate'] . "'\n\t\t\t\tAND prices.typeabbrev='" . $_POST['OldTypeAbbrev'] . "'\n\t\t\t\tAND prices.currabrev='" . $_POST['OldCurrAbrev'] . "'\n\t\t\t\tAND prices.debtorno=''";
        $ErrMsg = _('Could not be update the existing prices');
        $result = DB_query($sql, $db, $ErrMsg);
        ReSequenceEffectiveDates($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db);
        prnMsg(_('The price has been updated'), 'success');
        echo '<br />';
    } elseif ($InputError != 1) {
        /*Selected price is null cos no item selected on first time round so must be adding a	record must be submitting new entries in the new price form */
        $sql = "UPDATE prices SET\n\t\t\t\t\tenddate='" . date('Y-m-d') . "'\n\t\t\t\tWHERE prices.stockid='" . $Item . "'\n\t\t\t\tAND startdate='" . FormatDateForSQL($_POST['StartDate']) . "'\n\t\t\t\tAND enddate ='" . $SQLEndDate . "'\n\t\t\t\tAND prices.typeabbrev='" . $_POST['TypeAbbrev'] . "'\n\t\t\t\tAND prices.currabrev='" . $_POST['CurrAbrev'] . "'\n\t\t\t\tAND prices.debtorno=''";
        $ErrMsg = _('Could not be update the existing prices');
        $result = DB_query($sql, $db, $ErrMsg);
        ReSequenceEffectiveDates($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db);
        $sql = "INSERT INTO prices (stockid,\n\t\t\t\t\t\t\t\t\ttypeabbrev,\n\t\t\t\t\t\t\t\t\tcurrabrev,\n\t\t\t\t\t\t\t\t\tunits,\n\t\t\t\t\t\t\t\t\tconversionfactor,\n\t\t\t\t\t\t\t\t\tdecimalplaces,\n\t\t\t\t\t\t\t\t\tstartdate,\n\t\t\t\t\t\t\t\t\tenddate,\n\t\t\t\t\t\t\t\t\tprice)\n\t\t\t\t\t\t\tVALUES ('" . $Item . "',\n\t\t\t\t\t\t\t\t'" . $_POST['TypeAbbrev'] . "',\n\t\t\t\t\t\t\t\t'" . $_POST['CurrAbrev'] . "',\n\t\t\t\t\t\t\t\t'" . $_POST['Units'] . "',\n\t\t\t\t\t\t\t\t'" . filter_number_input($_POST['ConversionFactor']) . "',\n\t\t\t\t\t\t\t\t'" . $_POST['DecimalPlaces'] . "',\n\t\t\t\t\t\t\t\t'" . FormatDateForSQL($_POST['StartDate']) . "',\n\t\t\t\t\t\t\t\t'" . $SQLEndDate . "',\n\t\t\t\t\t\t\t\t'" . filter_currency_input($_POST['Price']) . "')";
        $ErrMsg = _('The new price could not be added');
        $result = DB_query($sql, $db, $ErrMsg);
        ReSequenceEffectiveDates($Item, $_POST['TypeAbbrev'], $_POST['CurrAbrev'], $db);
        prnMsg(_('The new price has been inserted'), 'success');
        echo '<br />';
    }
    unset($_POST['Price']);
    unset($_POST['StartDate']);
    unset($_POST['EndDate']);
    unset($_POST['Units']);
    unset($_POST['ConversionFactor']);
    unset($_POST['DecimalPlaces']);
} elseif (isset($_GET['delete'])) {
    //the link to delete a selected record was clicked instead of the submit button
    $sql = "DELETE FROM prices\n\t\t\t\tWHERE prices.stockid = '" . $Item . "'\n\t\t\t\tAND prices.typeabbrev='" . $_GET['TypeAbbrev'] . "'\n\t\t\t\tAND prices.currabrev ='" . $_GET['CurrAbrev'] . "'\n\t\t\t\tAND  prices.startdate = '" . $_GET['StartDate'] . "'\n\t\t\t\tAND  prices.enddate = '" . $_GET['EndDate'] . "'\n\t\t\t\tAND prices.debtorno=''";
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:Prices.php


示例13: _

     $QtyOnHandPrior = 0;
 }
 $QtyOnHand = $QtyOnHandPrior - $InTransitQuantity;
 if ($_SESSION['ProhibitNegativeStock'] == 0 or $_SESSION['ProhibitNegativeStock'] == 1 and $QtyOnHand >= $Quantity) {
     //stock moves were here removed
     $SQL = "UPDATE stockrequestitems\n\t\t\t\t\t\t\tSET qtydelivered=qtydelivered+" . $Quantity . "\n\t\t\t\t\t\t\tWHERE dispatchid='" . $RequestID . "'\n\t\t\t\t\t\t\t\tAND dispatchitemsid='" . $LineID . "'";
     $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The location stock record could not be updated because');
     $DbgMsg = _('The following SQL to update the stock record was used');
     $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true);
     $DecimalsSql = "SELECT decimalplaces\n\t\t\t\t\t\t\tFROM stockmaster\n\t\t\t\t\t\t\tWHERE stockid='" . $StockID . "'";
     $DecimalResult = DB_Query($DecimalsSql, $db);
     $DecimalRow = DB_fetch_array($DecimalResult);
     $sql_loccode = "SELECT loccode FROM locations WHERE locationname='" . $ReceiveLoc . "'";
     $LoccodeResult = DB_query($sql_loccode, $db);
     $LoccodeRow = DB_Fetch_array($LoccodeResult);
     $SQL = "INSERT INTO loctransfers (reference,\n\t\t\t\t\t\t\t\tstockid,\n\t\t\t\t\t\t\t\tshipqty,\n\t\t\t\t\t\t\t\tshipdate,\n\t\t\t\t\t\t\t\tshiploc,\n\t\t\t\t\t\t\t\trecloc)\n\t\t\t\t\t\tVALUES ('" . $Transid . "',\n\t\t\t\t\t\t\t'" . $StockID . "',\n\t\t\t\t\t\t\t'" . round(filter_number_input($Quantity), $DecimalRow['decimalplaces']) . "',\n\t\t\t\t\t\t\t'" . Date('Y-m-d') . "',\n\t\t\t\t\t\t\t'" . $Location . "',\n\t\t\t\t\t\t\t'" . $LoccodeRow['loccode'] . "')";
     $ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to enter Location Transfer record for') . $Stockid;
     $resultLocShip = DB_query($SQL, $db, $ErrMsg);
     if ($Quantity >= $RequestedQuantity or $Completed == True) {
         $SQL = "UPDATE stockrequestitems\n\t\t\t\t\t\t\tSET completed=1\n\t\t\t\t\t\t\tWHERE dispatchid='" . $RequestID . "'\n\t\t\t\t\t\t\t\tAND dispatchitemsid='" . $LineID . "'";
         $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true);
     }
     $Result = DB_Txn_Commit($db);
     $ConfirmationText = _('A stock adjustment for') . ' ' . $StockID . _('has been created from location') . ' ' . $Location . ' ' . _('for a quantity of') . ' ' . $Quantity;
     prnMsg($ConfirmationText, 'success');
     if ($_SESSION['InventoryManagerEmail'] != '') {
         $ConfirmationText = $ConfirmationText . ' ' . _('by user') . ' ' . $_SESSION['UserID'] . ' ' . _('at') . ' ' . Date('Y-m-d H:i:s');
         $EmailSubject = _('Stock adjustment for') . ' ' . $StockID;
         mail($_SESSION['InventoryManagerEmail'], $EmailSubject, $ConfirmationText);
     }
 } else {
开发者ID:patmark,项目名称:weberp-elct,代码行数:31,代码来源:InternalStockRequestFulfill.php


示例14: prnMsg

    if ($_POST['This_QuantityInv'] >= $_POST['QtyRecd'] - $_POST['Prev_QuantityInv']) {
        $Complete = True;
    } else {
        $Complete = False;
    }
    if ($_SESSION['Check_Qty_Charged_vs_Del_Qty'] == True) {
        if (($_POST['This_QuantityInv'] + $_POST['Prev_QuantityInv']) / $_POST['QtyRecd'] > 1 + $_SESSION['OverChargeProportion'] / 100) {
            prnMsg(_('The quantity being invoiced is more than the outstanding quantity by more than') . ' ' . $_SESSION['OverChargeProportion'] . ' ' . _('percent. The system is set up to prohibit this so will put this invoice on hold until it is authorised'), 'warn');
            $Hold = True;
        }
    }
    if (!is_numeric($_POST['ChgPrice']) and $_POST['ChgPrice'] < 0) {
        $InputError = True;
        prnMsg(_('The price charged in the suppliers currency is either not numeric or negative') . '. ' . _('The goods received cannot be invoiced at this price'), 'error');
    } elseif ($_SESSION['Check_Price_Charged_vs_Order_Price'] == True) {
        $_POST['ChgPrice'] = filter_number_input($_POST['ChgPrice']);
        if ($_POST['ChgPrice'] / $_POST['OrderPrice'] > 1 + $_SESSION['OverChargeProportion'] / 100) {
            prnMsg(_('The price being invoiced is more than the purchase order price by more than') . ' ' . $_SESSION['OverChargeProportion'] . '%. ' . _('The system is set up to prohibit this so will put this invoice on hold until it is authorised'), 'warn');
            $Hold = True;
        }
    }
    if ($InputError == False) {
        //		$_SESSION['SuppTrans']->Remove_GRN_From_Trans($_POST['GRNNumber']);
        $_SESSION['SuppTrans']->Modify_GRN_To_Trans($_POST['GRNNumber'], $_POST['PODetailItem'], $_POST['ItemCode'], $_POST['ItemDescription'], $_POST['QtyRecd'], $_POST['Prev_QuantityInv'], $_POST['This_QuantityInv'], $_POST['OrderPrice'], $_POST['ChgPrice'], $Complete, $_POST['StdCostUnit'], $_POST['ShiptRef'], $_POST['JobRef'], $_POST['GLCode'], $Hold, 0, $_POST['DecimalPlaces']);
    }
}
if (isset($_GET['Delete'])) {
    $_SESSION['SuppTransTmp']->Copy_GRN_To_Trans($_SESSION['SuppTrans']->GRNs[$_GET['Delete']]);
    $_SESSION['SuppTrans']->Remove_GRN_From_Trans($_GET['Delete']);
}
/*Show all the selected GRNs so far from the SESSION['SuppTrans']->GRNs array */
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:SuppInvGRNs.php


示例15: _

             $ErrMsg = _('Cannot insert a GL entry for the change of asset category because');
             $DbgMsg = _('The SQL that failed to insert the cost GL Trans record was');
             $result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true);
         }
         /*end if there was accumulated depreciation for the asset */
     }
     /* end if there is a change in asset category */
     $sql = "UPDATE fixedassets\n\t\t\t\t\t\t\t\t\tSET longdescription='" . $_POST['LongDescription'] . "',\n\t\t\t\t\t\t\t\t\t\tdescription='" . $_POST['Description'] . "',\n\t\t\t\t\t\t\t\t\t\tassetcategoryid='" . $_POST['AssetCategoryID'] . "',\n\t\t\t\t\t\t\t\t\t\tassetlocation='" . $_POST['AssetLocation'] . "',\n\t\t\t\t\t\t\t\t\t\tdepntype='" . $_POST['DepnType'] . "',\n\t\t\t\t\t\t\t\t\t\tdepnrate='" . filter_number_input($_POST['DepnRate']) . "',\n\t\t\t\t\t\t\t\t\t\tbarcode='" . $_POST['BarCode'] . "',\n\t\t\t\t\t\t\t\t\t\tserialno='" . $_POST['SerialNo'] . "'\n\t\t\t\t\t\t\t\t\tWHERE assetid='" . $AssetID . "'";
     $ErrMsg = _('The asset could not be updated because');
     $DbgMsg = _('The SQL that was used to update the asset and failed was');
     $result = DB_query($sql, $db, $ErrMsg, $DbgMsg);
     prnMsg(_('Asset') . ' ' . $AssetID . ' ' . _('has been updated'), 'success');
     echo '<br />';
 } else {
     //it is a NEW part
     $sql = "INSERT INTO fixedassets (description,\n\t\t\t\t\t\t\t\t\t\t\tlongdescription,\n\t\t\t\t\t\t\t\t\t\t\tassetcategoryid,\n\t\t\t\t\t\t\t\t\t\t\tassetlocation,\n\t\t\t\t\t\t\t\t\t\t\tdepntype,\n\t\t\t\t\t\t\t\t\t\t\tdepnrate,\n\t\t\t\t\t\t\t\t\t\t\tbarcode,\n\t\t\t\t\t\t\t\t\t\t\tserialno)\n\t\t\t\t\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t\t\t\t\t'" . $_POST['Description'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $_POST['LongDescription'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $_POST['AssetCategoryID'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $_POST['AssetLocation'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $_POST['DepnType'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . filter_number_input($_POST['DepnRate']) . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $_POST['BarCode'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $_POST['SerialNo'] . " 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP filter_out_sefurl函数代码示例发布时间:2022-05-15
下一篇:
PHP filter_number_format函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap