nageswaragunupudi wrote:
thanks for the sample test but I must search a string on field Invoice this string is 13 Cr
before i couldn't find the data because i didn't order for the index i needed now it's ok
now I'm here asking you something elseonce I have found the record in the Reserva.dbf file I have to load all the data I need for the reservation,
in particular I should also search for invoice in the oRigheInvoice archive which would be the lines of the invoice body,
and I have them different fields and for now I have done in the traditional method that is with do while / adddd () / endo
so I have to populate an array to put in the xbrowse as you can seeon this picture
in this array I have exactly 18 fields
my problem now is to save
i.e. for the reserva.dbf archive i.e. for the fields of the invoice header I have no problem,
instead I am afraid for the aData array that must be saved in the oRigheInvoice archive,
which for the first entry there is no problem for the modification I do not know how to do
Since I cannot pack I had thought of deleting the records that had invoice = nInvoice
and then inserting the new records but in doing so the archive becomes very large until the maintenance
operation by the administrator who can operate with archives in exclusive mode and will be able to pack the archive.
Or I have to come up with some other system that is what I saw on yunus.prg but I have not been able to implement it
in yunus' editinvoice function I saw that to load the records you do this
aItems := IIT->( FW_DbfToArray( cItemFlds, { || IIT->INVNUM == oRec:InvNum } ) )
I changed this line
static cItemFlds := "INVNUM,SERIAL,ITEMCODE,ITEMNAME,QUANTITY,
UNIT,PRICE,DISCOUNT,RECNO()"
into
static cItemFlds := "ICO,TIPO,DESC,QTA,PREUNI,TOTQTA,DATAINI,DATAFIN,GIORNI,SCONTO,TOTALE,INVOICE,PRINTA4,PRINTPOS,STRUCTURE,BREVEDESC,PREZZOBASE,SERIAL,RECNO()"
how do i translate it into tdatabase?
I tried with
aData := oRigheInvoice:DbfToArray( cItemFlds, { || oRigheInvoice:Invoice == oRecPrenota:Invoice } )
but it not load any records
aData := oRigheInvoice:DbfToArray( cItemFlds, { || alltrim(oRigheInvoice:Invoice) == nInvoice } )
load all records from oRigheInvoice
then before save the array there is a part on source I not understood from this
WITH OBJECT oBrw
---
END
then I made the same from if lSave /endif but here make me error
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com