Exemple #1
0
        public OwnFeeResult creditRowOnPatientsOrder(string onr, string row)
        {
            OrderRowFunc oOR = new OrderRowFunc();
            OrderRowDefinitions.OrderRow or = oOR.getRow(onr, row);
            OwnFeeResult ofr = new OwnFeeResult();

            // Orderrad på patientens order
            string rownr = oOR.addNewRow(onr, "", "EA");
            or.OrderNo = onr;
            or.AidNr = "";
            or.Rad = rownr;
            or.Artikel = "EA";
            or.Antal = "0";
            or.Beloppsrad = true;

            try
            {
                or.APris = ECS.doubleToString(ECS.stringToDouble(or.APris) * -1, '.');
                oOR.saveOrderRow(or, false, false);
            }
            catch
            {
                MessageBox.Show(null, "Inget gilltigt belopp", "Fel inmatning (2)", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            if (or.Levstatus.Equals("5"))
                ofr.FsNo = oOR.deliverOwnFeeRow(or.OrderNo, or.Rad, or.Antal, "", mFsNr);
            else
                ofr.FsNo = "";

            ofr.OrderNo = or.OrderNo;
            ofr.OrderRow = or.Rad;

            return ofr;
        }
Exemple #2
0
        private string createRowOnPatientsOrder()
        {
            orderFunc oOH = new orderFunc();
            OrderRowFunc oOR = new OrderRowFunc();
            OrderHeadDefinition oh = oOH.addOH(mKnr);

            if (oh == null)
            {
                return "";
            }

            oh.OrderType = "E";
            oh.PaymentCondition = mBvk;
            oOH.saveOH(oh);
            oOH.changeAddress(oh.OrderNo, mNamn, mAdress1, mAdress2, mOrt);

            // Orderrad på patientens order
            string rownr = oOR.addNewRow(oh.OrderNo, "", "EA");
            mOr = new OrderRowDefinitions.OrderRow();
            mOr.OrderNo = oh.OrderNo;
            mOr.AidNr = "";
            mOr.Rad = rownr;
            mOr.Artikel = "EA";
            mOr.Antal = "0";
            //			mOr.AccountNo = oOR.getAccountOnAid(mOnr, mAidId);
            mOr.Beloppsrad = true;
            mOr.EA_ProductGroup = mProductGroup;

            try
            {
                mOr.APris = mAmount;
                oOR.saveOrderRow(mOr, false, false);
            }
            catch
            {
                MessageBox.Show(null, "Inget gilltigt belopp", "Fel inmatning (2)", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            mFsNr = oOR.deliverOwnFeeRow(mOr.OrderNo, mOr.Rad, mOr.Antal, "", mFsNr);

            return mOr.OrderNo.PadRight(6) + " - " + mOr.Rad;
        }