Skip to content
logo Knowledgebase

Order Entry: Inserting Tender Type value on printed Sales Orders Invoices

Created on  | Last modified on  Highlight Matches

Summary

Learn how to insert the Tender Type value on the printed Sales Order Invoice in Sage 200 Evolution.

Description

This article explains how to insert the Tender Type value on the Sales Order Invoice.

This is when accepting payments/tendering on processed Sales Order invoices, as seen below.

Image

Resolution

First, note the following:

Only professional Evolution support consultants should fix these types of queries. 

This is due to the solution requiring an understanding of MS SQL Server and SQL Management Studio (including how to navigate it). 

In addition, this article assumes you have a basic understanding of working with, navigating in the Report Writer module and working in the Design screen of a report or source document layout.

Therefore, please contact your Evolution business partner (BP) or Evolution Support to resolve this issue.

 

Consider the following advice to achieve the above outcome: 

1. Back up the company and ensure all users are logged out. 

2. Run the following SQL script on the company database: 

alter VIEW [dbo].[_bvInvNumARFull]

as

select

 Xz.TenderDescription,

  I.*,

  I.InvTotIncl + I.fDepositAmountNew as InvTotInclEffective,

  C.*,

  AccountTermDescription = case C.AccountTerms

              when 0 then T.cTermDesc1

              when 1 then T.cTermDesc2

              when 2 then T.cTermDesc3

              when 3 then T.cTermDesc4

              when 4 then T.cTermDesc5

              when 5 then T.cTermDesc6

              when 6 then T.cTermDesc7

             else

                 ''

             end,

  CopyDescription = case isnull(I.iDocPrinted,0)

                      when 0 then ''

                    else

                      'Copy'

                    end,

  EmailDescription = case isnull(I.iDocEmailed,0)

                      when 1 then case C.bElecDocAcceptance when 1 then 'Computer Generated' else '' end

                    else

                      ''

                    end,

  Emailed = case isnull(I.iDocEmailed, 0)

     when 0 then 'Not Emailed'

     else 'Emailed'

   end,

  isnull(Rep.Code,'')    as RepCode,

  isnull(Rep.[Name],'')  as RepName,

  TillNo =

 case

  when (I.DocType in (9,10,11)) then _retTill.cTillCode -- idtRetailDocket, idtLayBy, idtKeepAside

  else Tills.TillNo

 end,

  P.ProjectCode,

  P.ProjectName,

  P.ProjectDescription,

  D.Method       as DeliveryMethod,

  D.Comment         as DeliveryComment,

  Ag.cAgentName     as INVNUMAgentName,

  G.Code            as [group],

  G.Description     as GroupDescription,

  A.Code            as Area,

  A.Description     as AreaDescription,

  C.iAgentID   as CustomerAgentID,

  I.iINVNUMAgentID  as INVNUMAgentID,

  Curr.CurrencyCode,

  Curr.Description       as CurrencyDescription,

  Curr.cCurrencySymbol   as CurrencySymbol,

  O.StatusDescrip        as StatusDescrip,

  IP.cDescription        as PriorityDescrip,

  Opp.cOpportunityNumber as OpportunityNumber,

  CAIL.cAgentName as CreatedAgentName,

  CAIL.cFirstName as CreatedAgentFirstName,

  CAIL.cLastName as CreatedAgentLastName,

  MAIL.cAgentName as ModifiedAgentName,

  MAIL.cFirstName as ModifiedFirstName,

  MAIL.cLastName as ModifiedAgentLastName,

  PP.cCompanyName        as ProspectCompanyName,

  PP.cTelephone as ProspectTelephone,

  PP.cFax as ProspectFax,

  PP.cPhysicalAddress1 as ProspectPhy1,

  PP.cPhysicalAddress2 as ProspectPhy2,

  PP.cPhysicalAddress3 as ProspectPhy3,

  PP.cPhysicalAddress4 as ProspectPhy4,

  PP.cPhysicalAddress5 as ProspectPhy5,

  PP.cPhysicalAddressPC as ProspectPhyPC,

  PP.cPostalAddress1 as ProspectPost1,

  PP.cPostalAddress2 as ProspectPost2,

  PP.cPostalAddress3 as ProspectPost3,

  PP.cPostalAddress4 as ProspectPost4,

  PP.cPostalAddress5 as ProspectPost5,

  PP.cPostalAddressPC as ProspectPostPC,

  PP.cWebsite as ProspectWebsite,

  PP.cEmail as ProspectEmail,

  PP.bChargeTax as ProspectChargeTax,

  CR.cCancellationReasonCode as CancelReasonCode,

  CR.cCancellationReasonDesc as CancelReason,

  EUC.cEUCountryCode     as EUCountryCode,

  EUC.cEUCountryName     as EUCountryName,

  MergedInto = case isnull(I.iMergedDocID,0) when 0 then '' else (select InvNumber from InvNum where AutoIndex=I.iMergedDocID) end,

  DocTypeDescription = case I.DocType when 0 then 'Invoice'

                                    when 1 then 'Credit Note'

                                    when 2 then 'Goods Received Voucher'

                                    when 3 then 'Return To Supplier'

                                    when 4 then 'Sales Order'

                                    when 5 then 'Purchase Order'

                                    when 6 then 'POS Sale Invoice'

                                    when 7 then 'POS Return'

                                    else 'Unknown'

                     end,

  DocStateDescription = case I.DocState when 1 then 'Unprocessed'

                                      when 2 then 'Quotation'

                                      when 3 then 'Partially Processed'

                                  when 4 then 'Archived'

                                      when 5 then 'Template'

                                      when 6 then 'Contract Template'

                                      when 7 then 'Cancelled'

                                      when 8 then 'Pending'

                                      when 9 then 'Merged'

                                      when 10 then 'Archived Quotation'

                                      else 'Unknown'

  end,

  CANR.cCancellationReasonCode,

  CANR.cCancellationReasonDesc,

  OrigI.InvNumber as OrigInvNumber,

  OrigI.InvDate as OrigInvDate

/*

If you are adding new columns, please add them above this commented out lines. User Hist Linked Values are injected in the below lines.

PLEASE NOTE THAT THE LAST COLUMN FIELD MUST NOT HAVE A "," AS THIS IS ADDED VIA THE INJECTION CODE

--UserHistValue Begin Injection Marker*/

,(u1.UserValue) AS ucIDSOrdReg

,(u2.UserValue) AS ucRETDHRegNumber

,(u3.UserValue) AS ucRETDHTrailerNumber

,(u4.UserValue) AS uiIDSOrdkilo

,(u5.UserValue) AS uiRETDHMileage

,(u6.UserValue) AS ucIDSOrdAuthNumber

,(u7.UserValue) AS ucRETDHMake

,(u8.UserValue) AS ucIDSOrdVehicleMake

,(u9.UserValue) AS ucIDSOrdVehicleModel

,(u10.UserValue) AS ucRETDHModel

,(u11.UserValue) AS ucIDSOrdYearModel

 

--UserHistValue End Injection Marker*/

from InvNum I

left join Client C on I.AccountID = C.DCLink

--UserApply Begin Injection Marker*/

outer apply dbo._efnGetUserHistValue(9, AutoIndex) u1

outer apply dbo._efnGetUserHistValue(1, AutoIndex) u2

outer apply dbo._efnGetUserHistValue(2, AutoIndex) u3

outer apply dbo._efnGetUserHistValue(10, AutoIndex) u4

outer apply dbo._efnGetUserHistValue(3, AutoIndex) u5

outer apply dbo._efnGetUserHistValue(11, AutoIndex) u6

outer apply dbo._efnGetUserHistValue(4, AutoIndex) u7

outer apply dbo._efnGetUserHistValue(22, AutoIndex) u8

outer apply dbo._efnGetUserHistValue(23, AutoIndex) u9

outer apply dbo._efnGetUserHistValue(5, AutoIndex) u10

outer apply dbo._efnGetUserHistValue(24, AutoIndex) u11

 

--UserApply End Injection Marker*/

left join SalesRep Rep on I.DocRepID = Rep.idSalesRep

left join Tills on I.TillID = Tills.idTills

left join _retTill on I.TillID = _retTill.idTill

left join Project P on I.ProjectID = P.ProjectLink

left join DelTbl D on I.DelMethodID = D.Counter

left join _rtblAgents Ag on I.iINVNUMAgentID = Ag.idAgents

left join CliClass G on (C.iClassID = G.idCliClass)

left join Areas A on (C.iAreasID = A.idAreas)

left join Currency Curr on Curr.CurrencyLink = I.ForeignCurrencyID

left join OrdersSt O on O.StatusCounter = I.OrderStatusID

left join _rtblIncidentPriority IP on IP.idIncidentPriority = I.OrderPriorityID

left join _rtblOpportunity Opp on Opp.IDOpportunity = I.iOpportunityID

left join _rtblProspect PP on PP.IDProspect = I.iProspectID

left join _etblOrderCancelReason CR on CR.idOrderCancelReason = I.iOrderCancelReasonID

left join _etblEUCountry EUC on EUC.IdEUCountry = C.iEUCountryID

left join _etblTerms T on T.iModule = 0 and T.iTermID = C.iAgeingTermID

left join _rtblAgents CAIL on CAIL.idAgents = I.InvNum_iCreatedAgentID

left join _rtblAgents MAIL on MAIL.idAgents = I.InvNum_iModifiedAgentID

left join _etblOrderCancelReason CANR on CANR.idOrderCancelReason = I.iCancellationReasonID

left join InvNum OrigI on OrigI.AutoIndex = I.iLinkedDocID

left join _bvPOSXZTenderTxFull XZ on i.AutoIndex = XZ.iInvNumID

 

3. Open the Evolution company.

4. Go to Order Entry | Transactions | Sales Orders.

5. Go to Print | Print Options | Print Options (Sales Order Invoice)…

 Image

6. On the Layout Options tab, if you have an already customised SO Invoice layout, select it and click the Design Layout button.

Otherwise, copy the standard SO Invoice layout (in the blue font) below and open the Design screen.

Image

7. Insert the DBText field as shown below.

Image

8. Also, insert an appropriate label field as seen below.

Image

9. When done, save the changes and close the layout.

10. When the SO invoice transaction is processed and printed, the Tender Type used in the SO invoice transaction is displayed below.

In this case, the sale was paid via Credit Card.

Image