Quote Originally Posted by wila View Post
Hi Dave,

I think we miss context in two ways.
First I am not completely clear as what part you think is wrong.
Second, the extra indenting on the code block is because of the rest of the source.

To illustrate I took your code and ran reindent on it, this is the result:
AHS_nextbit:                  //RETURN here when Clearpopup on discount popup       MISC stuff
page vHelpSale1            //C23h
showhelp "<Enter> if Item is correct,  <F5 then enter> to clear line." //C23

If (gbItemMisc or gbItemRepair) Begin
        showhelp "Overwrite with Item number, brief descrip, etc"
        ENTRY invmast.ALT_PART        wLineAltPart {REQUIRED,NOPUT}
    Until (wLineAltPart<>invmast.alt_part) //MUST change it...
    Move wLineALtPart to wLinedescrip //? was move ""
End //misc

If (gbItemMiscEtc) Begin
    //        Repeat
    //            showhelp "Overwrite with Brief Details"    //C21a
    //            //Zrepair items are old method. leftin as sold by kirkid, not repair#. includes loose batteries bat1 etc
    //            If (gbItemRepair) Begin
    //                  If (invmast.group<>"BAT") Begin
    //                      Move "Repair#" to wLineDescrip          //cs0035c
    //                      Showhelp ", Include Repair #"         //cs0025c7
    //                End
    //                  Else Begin
    //                      Move "fitted to"  to wLineDescrip       //cs0035c
    //                      Showhelp ", Battery fitted to..."     //cs0035c7
    //                End
    //            End
    //            ENTRY invmast.DESCRIPTION     wLineDescrip   {REQUIRED,NOPUT}
    //        Until (wLineDescrip<>"??" and wLineDescrip<>"Repair#" and wLineDescrip<>"fitted to")

    If (Inventri.item_no="") Begin
        Get stopbox "I can't recognise this, cancelling this item......A" to iRet
        Goto AHS_Exit

    If (not(gbItemReturned)) Begin
        If (gbItemSpotBullion) Begin   //All CS0040N5
            //cs0040N8 - dont check individual metal floor price as they keep adding metals we've never used before and refnum1 then crashes POS
            //Get RefNumN1 "MINSPOT" to gnFloorPrice //cs0040N8 repaces individual metals

                showhelp "Enter ITEM PRICE as per the Web Page. Check VERY CAREFULLY"
                ACCEPT wLinePrice to gnPriceFull       {REQUIRED, range=0.00,99999999}       //cs0040N7 revert to 0,9999999 can t have differenty ranges!
            Until (wLinePrice>=0.00)
            //CS0040N8 replace metal-by-metal floor price check with rock-bottom warning as we can't otherwise cope with fractional weights
            If (wLinePrice<gnFloorPrice) Begin
                Get YesNobox "Seems Cheap! Are you sure?" to iRet
                If (iRet=1) Goto AHS_Exit
            Move wLinePrice  to gnPriceFull
            Move gnPriceFull to gnPriceNet
            Move (gnPriceFull / 1.07) to gnUnitCost
            Move (gnPriceFull / 1.07) to gnAvgFirst
        End                                            //cs0040N5 to here
        Else Begin
                If (not(gbItemDeposit)) showhelp "Enter RETAIL Price"
                Else showhelp "Enter Deposited Amount"
                If (wLineTreatment="DC") Show ", Discount will be calculated"
                ACCEPT wLinePrice to gnPriceFull
                Move wLinePrice   to gnPriceNet
            Until (wLinePrice>=0)  //allow zero price misc items cs0025
End //misc_etc
Which doesn't look very weird to me.

Also note that we don't do anything specific for old fashioned console mode labels.
At least not at this moment.

Fair enough, mine was a cut and paste from a much larger section for illustration purposes rather than a complaint. Not an issue per se as this code is all being chopped about at the moment and the indent wasn't the primary goal of the DFRefactoring.
As with old-style images I wondered if charmode was tripping things up. If I get time I will retry the reindent on it again, in a more controlled scenario.

Anyway, thanks for all you do, and compliments of the season.