• 主单位与次单位


    static Qty ConvertUnit(InventTable _inventTable,Qty _qtyFrom,UnitID _unitTo)
    {
        qty         qtyTo;
        ;

        setprefix("Unit Conversion");

        if (_inventTable.inventTableModuleInvent().UnitId == "CT" ||
                                            _inventTable.inventTableModuleInvent().UnitId == "GM")
                {
                    qtyTo  += UnitConvert::qty(_qtyFrom,
                                                _inventTable.inventTableModuleInvent().UnitId,
                                                _unitTo,
                                                _inventTable.ItemId);
                }
                else
                {
                    if (_inventTable.ACT_SecUnitID == "CT" || _inventTable.ACT_SecUnitID == "GM")
                    {
                        qtyTo += UnitConvert::qty(_qtyFrom,
                                                   _inventTable.ACT_SecUnitID,
                                                   _unitTo,
                                                   _inventTable.ItemId);
                    }
                    else
                        Warning(strfmt("Units can not be converted to CT! ItemID:%1,Unit:%2,SecUnit:%3",
                                        _inventTable.ItemId,
                                        _inventTable.inventTableModuleInvent().UnitId,
                                        _inventTable.ACT_SecUnitID
                                        ));
                }

        return qtyTo;

    }

  • 相关阅读:
    Linux环境下为普通用户添加sudo权限
    【转】在 Ubuntu 中使用 NTP 进行时间同步
    Shell脚本:批量添加用户,并设置随机字符为密码
    【转】Linux目录结构和常用命令
    系统启动流程
    linux系统利用libudev获取USB设备的VID和PID
    cJSON详解
    ajax读取文件内容
    window.location网页URL信息
    html实现网站全局按钮点击后置灰,不允许连续点击
  • 原文地址:https://www.cnblogs.com/perock/p/2375310.html
Copyright © 2020-2023  润新知