Posty bez odpowiedzi |oraz Aktywne tematy Dzisiaj jest 2024-04-24, 11:36x



Odpowiedz w temacie  [ Posty: 2 ] 
Własny tekst na fakturze 
Autor Wiadomość

Rejestracja: 2010-06-28, 10:04
Posty: 12
Post Własny tekst na fakturze
W które miejsce w takim kodzie:
Kod:
//"dokvat01.sc","Dokument VAT I",12100,0,2.1.4,SYSTEM
//"Dokument VAT",12000,14,16
////////////////////////////
// Dokument VAT
// dokvat01.sc
////////////////////////////
String s
#define DEKRET
#define PLATWYD

int VAT = 1

int i,j,x,y
#include "Nagłówek i stopka raportu I"
#include "Engine do dokumentów"

float akcyza
int nDialog,nlp

string sNip, sBuf
int tbl0,tbl1,tbl2,nMalaStopka
int KolTab1(1),StlTab1(1),kol(1),kolumnyNP(1),StyleNP(1),kolNP(1),nkolumna
int KolTabPR(2)= 250,250
int StlTabPR(4)
int nTblWidth1,nTblWidth2,nDiff
int wSKK=170
int StlTabH(1), nSzer, KolTab2(1),StlTab2(1)
int nTblMarg = 5
long lTemp

if GRAF then
   str.wydruk ( 0, -1, -1 )
   strona 50,90,50,100
endif


#include "Formatka - sprzedaż Vat"
#include "Dokument sprzedaży - ramki"

int sub Add(int pos, int szer, int stl, int typ )
   int i,siz=size(KolTab1)
   if KolTab1(1) then  //jeśli nie pierwsze wywołanie
      siz+=1
      Grow KolTab1,1
      Grow StlTab1,1
      Grow kol,1
   endif
   if pos == -1 then
      pos=siz
   else
      if pos >= SWW then
         i = 1
         while kol(i)!=pos && i<siz
            i += 1
         wend
         if i==siz then Error using "Zapetlenie! %d",pos
         pos = i
      endif
      For i = siz To i<=pos+1 step -1
         KolTab1(i) = KolTab1(i-1)
         StlTab1(i) = StlTab1(i-1)
         kol(i) = kol(i-1)
      Next i
      pos+=1
   endif
   KolTab1(pos) = szer
   StlTab1(pos) = stl
   kol(pos) = typ
endsub

//-----------------------------------------
if !GRAF then goto wydruk_tekstowy
bc = Styl ( "nagłówek", 0, "bc" )
nl = Styl ( "tekst", -1, "nl" )
nc = Styl ( "tekst", 0, "nc" )
nr = Styl ( "tekst", 1, "nr" )
kr = Styl ( "kwota", 1, "kr" )
nb = CopyFont ( "tekst",1 )
grub = CopyFont ( "tekst", 1, 45 )
numr = CopyFont ( "tytuł", 1, 45 )
nbl = Styl ( nb, -1, "nbl" )
ss = CopyFont ( "tekst", -1, 25 )
sc = Styl ( ss, 0, "sc" )
sc2 = Styl ( CopyFont ( "tekst", -1, 30 ), 0, "sc2" )
sc3 = Styl ( CopyFont ( "tekst", -1, 32 ), 0, "sc3" )
bb = CopyFont ( "tytuł", 1, 50 )
bbc = Styl ( bb, 0, "bbc" )
StlTabPR(1)=StlTabPR(2)=kr

Add ( -1, 50, nc, 0 )
Add ( -1, 500, nl, 0 )
if nSWW==1 then KolTab1(2) += 100
if nKod==1 then KolTab1(2) += 100
Add ( -1, 100, kr, ILOSC )
Add ( -1, 80, nl, JM )

if bCenaPod || bRabatDlaWartosci then Add ( -1, wSKK, kr, CENAPOD )
if bCenaPod && bRabatDlaWartosci Then Add ( -1, wSKK, kr, WARTPRZEDRAB)

if CZYNETTO then
   If !bRabatDlaWartosci Then
      Add ( -1, wSKK, kr, CENAN )
   Else
      CENAN = WARTN
   EndIf
   Add ( -1, wSKK, kr, WARTN )
   Add ( -1, 110, nr, STAWKAVAT )
   if bWart then
      Add ( -1, wSKK, kr, WARTB )
   else
      CENAN = -1
   EndIf
else
   If !bRabatDlaWartosci Then
      Add ( -1, wSKK, kr, CENAB )
   Else
      CENAB = WARTN
   EndIf
   if bWart then
      Add ( -1, wSKK, kr, WARTN )
   else
      CENAB = -1
   EndIf
   Add ( -1, 110, nr, STAWKAVAT )
   Add ( -1, wSKK, kr, WARTB )
endif
if bWartVat then Add ( STAWKAVAT, wSKK, kr, KWOTAVAT )
if !nSWW then
   if !bWartVat then
      Add ( STAWKAVAT, wSKK, nc, SWW )
   else
      if !bWart then
         if CZYNETTO then
            Add ( -1, wSKK, nc, SWW )
         else
            Add ( CENAB, wSKK, nc, SWW )
         endif
      else
         Add ( 2, 170, nc, SWW )
      endif
   endif
endif
if !nKod then
   if !bWartVat && nSWW then
         //JM
      Add ( STAWKAVAT, wSKK, nl, KOD )
   else
      if !bWart && !(bWartVat && !nSWW) then
         if CZYNETTO then
               //JM
            Add ( -1, wSKK, nl, KOD )
         else
               //JM
            Add ( CENAB, wSKK, nl, KOD )
         endif
      else
            //JM
         Add ( 2, 180, nl, KOD )
      endif
   endif
endif
if bDostawy then
   if !bWartVat && ((nSWW && nKod) || (!nSWW && nKod) || (nSWW && !nKod))then
      Add ( STAWKAVAT, 220, nl, DOSTAWA )
   else
      Add ( 2, 220, nl, DOSTAWA )
   endif
endif
if bCena then
   if !bWartVat && nSWW && nKOD && !bDostawy then
      if CZYNETTO then
         If !bRabatDlaWartosci Then Add ( STAWKAVAT, wSKK, kr, CENAB1 )
      else
         If !bRabatDlaWartosci Then Add ( STAWKAVAT, wSKK, kr, CENAN1 )
      endif
   else
      if !bWart && (nSWW || nKod || !bDostawy) then
         if CZYNETTO then
            If !bRabatDlaWartosci Then Add ( -1, wSKK, kr, CENAB1 )
         else
            If !bRabatDlaWartosci Then Add ( CENAB, wSKK, kr, CENAN1 )
         endif
      else
         if CZYNETTO then
            If !bRabatDlaWartosci Then Add ( CENAN, wSKK, kr, CENAB1 )
         else
            If !bRabatDlaWartosci Then Add ( CENAB, wSKK, kr, CENAN1 )
         endif
      endif
   endif
endif
if bRabaty then
   If bRabatDlaWartosci && bCenaPod Then Add ( WARTPRZEDRAB, 120, kr, RABATY)
   If bRabatDlaWartosci && !bCenaPod Then Add ( CENAPOD, 120, kr, RABATY)
   
   If bCenaPod && !bRabatDlaWartosci then Add ( CENAPOD, 120, kr, RABATY )
   If !bCenaPod && !bRabatDlaWartosci then Add ( JM, 120, kr, RABATY )
endif
nkol=Size(kol)
if CZYNETTO then
   while kol(nNettoPos)!=WARTN
      nNettoPos += 1
   wend
   if nNettoPos == nkol-1 then
      Add(-1,wSKK,0,TEMPKOL)
      Add(-1,wSKK,0,TEMPKOL)
   else
      if nNettoPos==nkol-2 then Add(-1,wSKK,0,TEMPKOL)
   endif
endif

CENAN = CENAN1
CENAB = CENAB1

nkol=Size(kol)
grow StlTabH,nkol-1
for i=1 to i>nkol
   StlTabH (i) = bc
   nTblWidth1 += KolTab1 (i)
next i
nSzer=str.szer
if nTblWidth1 > nSzer then
   message sMarg : error ""
else
   nDiff = ( nSzer - nTblWidth1 ) / nkol
   nTblWidth1 = 0
   for i = 1 to i > nkol
      nTblWidth1 += ( KolTab1 (i) += nDiff )
   next i
   if nTblWidth1 < nSzer then KolTab1(2) += nSzer-nTblWidth1
   nTblWidth1 = nSzer
endif
For i = 1 To i>=nNettoPos
   nNettoX += KolTab1(i)
Next i

grow KolTab2,3
grow StlTab2,3
dxramk = KolTab1(nkol-4)
if CZYNETTO then
   KolTab2(1) = KolTab1(nNettoPos)
   KolTab2(2) = KolTab1(nNettoPos+1)
   KolTab2(3) = KolTab1(nNettoPos+2)
   KolTab2(4) = KolTab1(nNettoPos+3)
   while kol(nkol)==TEMPKOL
      nTblWidth1-=KolTab1(nkol)
      shrink kol,1
      shrink KolTab1,1
      shrink StlTab1,1
      nkol-=1
   wend
else
   lastpos = nkol
   KolTab2(4) = KolTab1(lastpos)
   KolTab2(3) = KolTab1(lastpos-=1)
   if KolTab2(3)<wSKK then
      KolTab2(3) = wSKK
      KolTab2(2) = 110
      KolTab2(1) = wSKK
   else
      KolTab2(2) = KolTab1(lastpos-=1)
      if KolTab2(2)>wSKK then
         KolTab2(2) = 110
         KolTab2(1) = wSKK
      else
         KolTab2(1) = KolTab1(lastpos-=1)
         if KolTab2(1)<wSKK then KolTab2(1) = wSKK
      endif
   endif
endif
For i = 1 To i>4
   nTblWidth2 += KolTab2(i)
   StlTab2(i) = kr
Next i

if nBitmap==1 then
   if !nBmpCoord(1) then nBmpCoord(1)=str.szer
   if !nBmpCoord(2) then nBmpCoord(2)=250
   bmp = Bitmap nBmpCoord(1),nBmpCoord(2),sBitmap
   Bitmap #bmp, at nBmpCoord(3),nBmpCoord(4)
   print lf : print at #X,#Y+5;
endif
FRNewRow(0)
select case nBitmap
   case 0
      FRAddCol(-33,220,1,bRamki,0)
      FRAddCol(-34,220,0,0,0)
      FRAddColRow(130,2,bRamki,nGray)
      FRAddColRow(80,3,bRamki,0)
      FRAddCol(-33,220,0,0,0)
      if iTyp!=FWS && iTyp!=WKS then
         FRAddColRow(65,4,bRamki,0)
         FRAddColRow(-100,5,0,0)
         FRAddColRow(80,6,bRamki,0)
      else
         FRAddColRow(100,4,bRamki,0)
      endif
   case 1
      FRAddCol(-33,170,0,0,0)
      FRAddColRow(80,3,bRamki,0)
      if iTyp!=FWS && iTyp!=WKS then FRAddColRow(-100,6,bRamki,0)
      FRAddCol(-34,170,2,1,nGray)
      FRAddCol(-33,170,0,0,0)
      if iTyp!=FWS && iTyp!=WKS then
         FRAddColRow(-50,4,bRamki,0)
         FRAddColRow(-50,5,0,0)
      else
         FRAddColRow(100,4,bRamki,0)
      endif
   case 2

      lTemp = str.szer
      lTemp = lTemp*66/100
      nPom=lTemp
      if !nBmpCoord(1) then nBmpCoord(1)=nPom - nBmpCoord(3)
      if !nBmpCoord(2) then nBmpCoord(2)=450 - iif(nBmpCoord(4)>=450,0,nBmpCoord(4))
      if nBmpCoord(1)>nPom then nBmpCoord(1)= nPom
      if nBmpCoord(1)+nBmpCoord(3)>nPom then nBmpCoord(3)=0

      nPom = iif(nBmpCoord(2)+nBmpCoord(4)>450,nBmpCoord(2)+nBmpCoord(4),450)
      FRAddCol(nBmpCoord(1)+nBmpCoord(3),nPom,7,0,0)
      FRAddCol(-100,nPom,0,0,0)
      FRAddColRow(130,2,1,nGray)
      if iTyp!=FWS && iTyp!=WKS then
         FRAddColRow(65,4,bRamki,0)
         FRAddColRow(-100,5,0,0)
      else
         FRAddColRow(100,4,bRamki,0)
      endif
      FRAddColRow(80,3,bRamki,0)
      if iTyp!=FWS && iTyp!=WKS then FRAddColRow(80,6,bRamki,0)

endselect
FRDraw()
FRNewRow(-1)


if  (iTyp == FWS && bRW) || iTyp == WKS then
   if bSprzedawca || !nBitmap then
      FRAddCol(-100,10,8,bRamki,0)   
   endif   
else
   if bSprzedawca || !nBitmap then
      FRAddCol(-50,10,8,bRamki,0)   
      FRAddCol(-50,10,9,bRamki,0)   
   else
      FRAddCol(-100,10,9,bRamki,0)   
   endif
endif
FRDraw()

FRNewRow(-1)
if iTyp==FWS || iTyp== WKS then
   if bOdbiorca then FRAddCol(-100,10,11,bRamki,0)
else
   FRAddCol(-100+50*bOdbiorca,10,10,bRamki,0)
   if bOdbiorca then FRAddCol(-100+50*bOdbiorca,10,11,bRamki,0)
endif
FRDraw()

if bOpis && sOpis then
   Ramka od 0,#B+10,str.szer,10,bRamki
      SetFont ( "tekst" )
      print " " + sOpis
   koniec
endif

if bAnulowano then
   ramka od 0,#Y+10, str.szer,10
      SetFont( CopyFont( "tekst",1,100 ) )
      Align(0)
      print "ANULOWANO"
   koniec
endif

if CzyNP then
   grow kolNP,1
   grow KolTab1NP,10 : grow StlTab1NP,10
   KolTab1NP(1)=KolTab1(1)
   StlTab1NP(1)=StlTab1(1)
   KolTab1NP(2)=KolTab1(2)
   StlTab1NP(2)=StlTab1(2)
   for i=3 to i > nkol
      Select case kol(i)
         case STAWKAVAT,SWW,KWOTAVAT,CENAN,WARTN,CENAB,WARTB
            Select case kol(i)
               case CENAN, WARTN
                  if CZYNETTO then
                     if Kol(i)==CENAN then
                        KolTab1NP(10)+=KolTab1(i)
                        StlTab1NP(10)=nr //StlTab1(i)
                     else
                        KolTab1NP(11)+=KolTab1(i)
                        StlTab1NP(11)=nr
                     endif
                  else
                     KolTab1NP(2)+=KolTab1(i)
                  endif
               case CENAB, WARTB
                  if !CZYNETTO then
                     if kol(i)==CENAB then
                        KolTab1NP(10)+=KolTab1(i)
                        StlTab1NP(10)=nr //StlTab1(i)
                     else
                        KolTab1NP(11)+=KolTab1(i)
                        StlTab1NP(11)=nr
                     endif
                  else
                     KolTab1NP(2)+=KolTab1(i)
                  endif
               case else
                  KolTab1NP(2)+=KolTab1(i)
            endselect
         case KOD
            KolTab1NP(5)=KolTab1(i)
            StlTab1NP(5)=nl
         case ILOSC
            KolTab1NP(2)-=20
            KolTab1NP(3)=KolTab1(i)+20
            StlTab1NP(3)=StlTab1(i)
         case JM
            KolTab1NP(4)=KolTab1(i)
            StlTab1NP(4)=StlTab1(i)
         case CENAPOD
            KolTab1NP(6)=KolTab1(i)
            StlTab1NP(6)=StlTab1(i)
         case RABATY
            KolTAb1NP(7)+=KolTab1(i)
            StlTab1NP(7)=StlTAb1(i)
         case WARTPRZEDRAB
            KolTab1NP(8)+=KolTAb1(i)
            StlTAb1NP(8)=StlTab1(i)
         case DOSTAWA
            KolTAb1NP(9)+=KolTab1(i)
            StlTab1NP(9)=StlTab1(i)
      endselect
   next i
   for i=1 to i > 11
      if KolTab1NP(i)!=0 then
         if KolumnyNP(size(KolumnyNP))!=0 then grow kolumnyNP,1 : grow StyleNP,1
         KolumnyNP(size(KolumnyNP))=KolTab1NP(i)
         StyleNP(size(StyleNP))=StlTab1NP(i)
      endif
   next i
   grow StlTabHNP, size(kolumnyNP)-1 //tabela stylow headera
   for i=1 to i > size(StlTabHNP)
      StlTabHNP(i)=StlTabH(1)
   next i
   for i=1 to i > size(KolumnyNP)-2
      nMalaStopka+=KolumnyNP(i)
   next i
endif

if !bNoPoz then
   tbl0 = tabela 1,nTblMarg,KolTab1,StlTabH
   ramka od 0, #Y+10,nTblWidth1,10,0,nGray
      tabela #tbl0
         sPom = "Nazwa"
         if nSWW==1 then sPom += ","+sSWW_ //",SWW/PKWiU"
         if nKod==1 then
            sPom += ",kod"
            if nKodTyp==2 then sPom+=" obcy"
            if nKodTyp==3 then sPom+=" paskowy"
         endif
         kolumna 1 : y = TextHeight("X")/2 : print at #X,y; " Lp. "
         kolumna 2 : print at #X,y; PiszWyrazy(sPom,KolTab1(2)-10)
         for i = 3 to i > nkol
            select case kol(i)
               case SWW
                  sPom = sSWW_ //"SWW/PKWiU"
               case KOD
                  sPom = "Kod"
                  if nKodTyp==2 then sPom+=" obcy"
                  if nKodTyp==3 then sPom+=" paskowy"
               case ILOSC
                  sPom = "Ilość"
               case JM
                  sPom = "Jm"
               case CENAPOD
                  If bRabatDlaWartosci Then
                     If CZYNETTO Then
                        sPom = "Cena netto"
                     Else
                        sPom = "Cena brutto"
                     EndIf
                  Else
                     sPom = "Cennik"
                  EndIf
               case CENAN
                  sPom = "Cena"+lf+"netto"
               case CENAB
                  sPom = "Cena"+lf+"brutto"
               case WARTN
                  sPom = "Wartość"+lf+"netto"
               case WARTB
                  sPom = "Wartość"+lf+"brutto"
               case STAWKAVAT
                  sPom = "Stawka"+lf+"VAT"
               case KWOTAVAT
                  sPom = "Kwota"+lf+"VAT"
               case RABATY
                  sPom = "Rabat %"
               case WARTPRZEDRAB
                  sPom = "Wartość przed rab."
               case DOSTAWA
                  sPom = "Nazwa dostawy"
            endselect
            select case kol(i)
               case SWW,KOD,ILOSC,JM,RABATY//,CENAPOD
                  y = TextHeight(sPom)/2
               case else
                  y = 0
            endselect
            kolumna i : print at #X,y; sPom
         next i
      koniec
   koniec
   nTblMarg=4005
   tbl1 = tabela 1*!bVertLines,nTblMarg,KolTab1,StlTab1
   nlp=1
   For i = 1 To i > size( Pozycje )
      if Pozycje(i).stawka!=-1 then
      ramka nTblWidth1,5,0,nOddGray*grayTrigger
      if bOddGray then grayTrigger = !grayTrigger
      tabela #tbl1,od 0,#Y
      kolumna 1, (using "%d",nlp) + " "
      nlp+=1
      buf=Poz_opis.Get(using"%d",i)
      if nSWW==1 then buf+= ", " + Pozycje(i).sww
      if nKod==1 then
         select case nKodTyp
            case 1
               buf+= ", " + Pozycje(i).Kod
            case 2
               buf+= ", " + Pozycje(i).KodObcy
            case 3
               buf+= ", " + KodPaskowy_pozycji(i)
         endselect
      endif
      kolumna 2,PiszWyrazy(buf,KolTab1(2)-10)
      For j = 3 To j > nkol
         select case kol(j)
            case KOD
               select case nKodTyp
                  case 1
                     buf = Pozycje(i).Kod
                  case 2
                     buf = Pozycje(i).KodObcy
                  case 3
                     buf = KodPaskowy_pozycji(i)
               endselect
            case SWW
               buf = Pozycje(i).sww
            case JM
               buf = iif(nJednMiary,Pozycje(i).JmWP,Pozycje(i).Jm)
            case CENAPOD
               if bRabatDlaWartosci then
                  if CZYNETTO then
                     buf = formatuj ( Round(iif(nJednMiary,Pozycje(i).CenaNettoWP,Pozycje(i).CenaNetto),nCenaRound+1),nCenaRound+1 )
                  else
                     buf = formatuj ( Round(iif(nJednMiary,Pozycje(i).CenaBruttoWP,Pozycje(i).CenaBrutto),nCenaRound+1),nCenaRound+1 )
                  endif
               else
                  buf = formatuj ( Round(iif(nJednMiary,Pozycje(i).CenaPodstawowaWP,Pozycje(i).CenaPodstawowa),nCenaRound+1),nCenaRound+1 )
               endif
            case ILOSC
               buf = using "%4.4f",iif(nJednMiary,Pozycje(i).IloscWP,Pozycje(i).Ilosc)   
               delete regular "(0#$)|(.0#$)"
               s = buf : buf = s : Replace "." , ","
            case CENAB
               buf = formatuj( Round(iif(nJednMiary,Pozycje(i).CenaBruttoWP,Pozycje(i).CenaBrutto),nCenaRound+1),nCenaRound+1 )
            case CENAN
               buf = formatuj( Round(iif(nJednMiary,Pozycje(i).CenaNettoWP,Pozycje(i).CenaNetto),nCenaRound+1),nCenaRound+1 )
            case WARTB
               buf = kwota ( IIF(nIloczynowa,Pozycje(i).WartoscBruttoIl,Pozycje(i).WartoscBrutto) )
            case WARTN
               buf = kwota ( IIF(nIloczynowa,Pozycje(i).WartoscNettoIl,Pozycje(i).WartoscNetto) )
            case STAWKAVAT
               buf = stvat( Pozycje(i).stawka ).nazwa
            case KWOTAVAT
               buf = kwota ( IIF(nIloczynowa,Pozycje(i).KwotaVatIl,Pozycje(i).KwotaVat) )
            case RABATY
               buf = using "%2.2f", Round(Pozycje(i).rabat , nRabatRound)
               find regular "{(/-)|():d##}.{:d##}"
               if (regular 2) == "00" then buf = (regular 1)
               if buf == "0" then buf=""
               s = buf : buf = s : Replace "." , ","
            case WARTPRZEDRAB
               buf = kwota ( Pozycje(i).CenaPodstawowa * Pozycje(i).Ilosc)
            case DOSTAWA
               buf=""
               for idw=1 to idw>nDostawy
                  if Dostawy(idw).lp == i then
                     //ObliczWys(Dostawy(idw).nazwa,KolTab1(j)-15)
                     buf+= Dostawy(idw).nazwa+" "//sBroken
                  endif
               next idw
         endselect   
         kolumna j, PiszWyrazy(buf,KolTab1(j)-10)
      next j
   koniec
      koniec
      if bVertLines then
         if i==1 then DrawLine at 0,#T,nTblWidth1,0
         y = str.pozycja(#B)-str.pozycja(#T)
         x=0
         nPom = 1
         do
            x+=KolTab1(nPom)
            nPom+=1
            DrawLine at x,#T,0,y
         loop until nPom>size(KolTab1)
         DrawLine at 0,#T,0,y
      endif
      endif
   Next i
endif
if bVertLines then DrawLine at 0,#B,nTblWidth1,0

nTblMarg =6005
if bWart && bWartVat then
   tbl2 = tabela 5,nTblMarg,KolTab2,StlTab2
   yramk = str.pozycja(#Y) + 10
   fkol = 1
   tabela #tbl2, od str.szer-nTblWidth2, yramk
      kolumna fkol,   kwota ( tot_netto-tot_nettoNP )
      kolumna fkol+1 : Align(0) : print "X"
      kolumna fkol+2, kwota ( tot_vat )
      kolumna fkol+3, kwota ( tot_netto-tot_nettoNP+tot_vat)//tot_brutto ) + " "
   koniec
   dyramk=str.pozycja(#B)-str.pozycja(#T)
   yramk = str.pozycja(#T)
   ramka od str.szer-nTblWidth2-dxramk,yramk,dxramk,dyramk,1,nGray
      SetFont ( "kwota" ) : align(0)
      print at 0,6;"RAZEM"
   koniec
   yBoldRamk  = yramk
   dyBoldRamk = dyramk
   yramk = -1
   tbl2 = tabela 1,nTblMarg,KolTab2,StlTab2
   For i = 1 To i>cursize
     if ( bZerVat && stvat(kolvat(i)).aktywna ) || sign ( stvat(kolvat(i)).brutto, 2 ) then
        tabela #tbl2,od str.szer-nTblWidth2,#Y
           kolumna fkol,kwota ( stvat(kolvat(i)).netto )
           kolumna fkol+1,stvat(kolvat(i)).nazwa 
           kolumna fkol+2,kwota ( stvat(kolvat(i)).vat )
           kolumna fkol+3,kwota ( stvat(kolvat(i)).brutto )
        koniec
      if yramk==-1 then
         dyramk=str.pozycja(#B)-str.pozycja(#T)
         yramk = str.pozycja(#T)
         Ramka od str.szer-nTblWidth2-dxramk,yramk,dxramk,dyramk,1,nGray
            SetFont ( "kwota" ) : align(0)
            print at 0,6;"W tym"
         koniec
      endif
     endif
   Next i
   y = str.Pozycja(#B)
else
   tbl2 = tabela 1,nTblMarg,KolTab2,StlTab2
   tbl0 = tabela 1,nTblMarg,KolTab2,StlTabH
   if CZYNETTO then
      xtab = nNettoX
   else
      xtab = str.szer-nTblWidth2
   endif
   Ramka od xtab,#Y+10,nTblWidth2,10,0,nGray
      tabela #tbl0
         kolumna 1,"Netto"
         kolumna 2,"%"
         kolumna 3,"VAT"
         kolumna 4,"Brutto"
      koniec
   koniec
   For i = 1 To i>cursize
        if ( bZerVat && stvat(kolvat(i)).aktywna ) || sign ( stvat(kolvat(i)).brutto, 2 ) then
         tabela #tbl2, od xtab,#B
            kolumna 1, kwota ( stvat(kolvat(i)).netto )
            kolumna 2, stvat(kolvat(i)).nazwa
            kolumna 3, kwota ( stvat(kolvat(i)).vat )
            kolumna 4, kwota ( stvat(kolvat(i)).brutto )
         koniec
      endif
   next i
   tbl2 = tabela 5,nTblMarg,KolTab2,StlTab2
   tabela #tbl2, od xtab,#B
      kolumna 1, kwota ( tot_netto-tot_nettoNP )
      kolumna 2 :   Align(0) : print "Razem"
      kolumna 3, kwota ( tot_vat )
      kolumna 4, kwota ( tot_netto-tot_nettoNP+tot_vat)
   koniec
   y = str.Pozycja(#B)
endif

if !bNoPoz && CzyNP then
   tbl0=tabela 0, nTblMarg,str.szer,nc
   tabela #tbl0, od #X,#B+20
      kolumna 1, "POZYCJE NIE PODLEGAJĄCE VAT"
   koniec
   nTblMarg=4005
   tbl0 = tabela 1,nTblMarg,kolumnyNP,StlTabHNP
   ramka od 0, #Y+10,nTblWidth1,10,0,nGray
      tabela #tbl0
         sPom = "Nazwa"
         if nSWW==1 then sPom += ","+sSWW_//   ",SWW/PKWiU"
         if nKod==1 then
            sPom += ",kod"
            if nKodTyp==2 then sPom+=" obcy"
            if nKodTyp==3 then sPom+=" paskowy"
         endif
         //TextHeight("X")/2
         kolumna 1 : y = 0 : print at #X,y; " Lp. "
         kolumna 2 : print at #X,y; sPom
         nkolumna=2
         for i = 3 to i > size(KolTab1NP)
            if KolTab1NP(i)!=0 then
               nkolumna+=1
               Select case i
                  case 5
                     sPom = "Kod"
                     if nKodTyp==2 then sPom+=" obcy"
                     if nKodTyp==3 then sPom+=" paskowy"
                  case 3
                     sPom="Ilość"
                  case 4
                     sPom="Jm"
                  case 6
//                     If bRabatDlaWartosci Then
//                        sPom = "Cena"
//                     Else
                        sPom = "Cennik"
//                     EndIf
                  case 7
                     sPom="Rabat %"
                  case 8
                     sPom="Wartość przed rab."
                  case 9
                     sPom="Nazwa dostawy"
                  case 10
                     sPom="Cena"
                  case 11
                     sPom="Wartość"
               endselect
               select case KolTab1NP(i)
                  case 3,4,5,6,7,9
                     y = 0//TextHeight(sPom)/2
                  case else
                     y = 0
               endselect
               kolumna nkolumna : print at #X,y; sPom
         endif
      next i
   koniec
   koniec
   nTblMarg = 4005
   tbl1 = tabela 1*!bVertLines,nTblMarg,KolumnyNP,StyleNP
   nlp=1
   For i = 1 To i > size( Pozycje )
      if Pozycje(i).stawka==-1 then
      ramka od 0,#Y,nTblWidth1,5,0,nOddGray*grayTrigger
      if bOddGray then grayTrigger = !grayTrigger
      tabela #tbl1,od 0,#Y
      kolumna 1, (using "%d",nlp) + " "
      nlp+=1
         buf= Poz_opis.Get(using"%d",i)
      if nKod==1 then
         select case nKodTyp
            case 1
               buf+= ", " + Pozycje(i).Kod
            case 2
               buf+= ", " + Pozycje(i).KodObcy
            case 3
               buf+= ", " + KodPaskowy_pozycji(i)
         endselect
      endif
      kolumna 2,PiszWyrazy(buf,KolumnyNP(2)-10) : buf=""
      nkolumna=2
      For j = 3 To j > size(KolTab1NP)
         if KolTab1NP(j)!=0 then
            nkolumna+=1
            select case j
               case 5
                  select case nKodTyp
                  case 1
                     buf = Pozycje(i).Kod
                  case 2
                     buf = Pozycje(i).KodObcy
                  case 3
                     buf = KodPaskowy_pozycji(i)
                  endselect
               case 3
                  buf = using "%4.4f",iif(nJednMiary,Pozycje(i).IloscWP,Pozycje(i).Ilosc)   
                  delete regular "(0#$)|(.0#$)"
                  s = buf : buf = s : Replace "." , ","
               case 4
                  buf = iif(nJednMiary,Pozycje(i).JmWP,Pozycje(i).Jm)
               case 6
                  buf = formatuj ( Round(iif(nJednMiary,Pozycje(i).CenaPodstawowaWP,Pozycje(i).CenaPodstawowa),nCenaRound+1),nCenaRound+1 )
               case 7
                  buf = using "%2.2f", Round(Pozycje(i).rabat , nRabatRound)
                  find regular "{(/-)|():d##}.{:d##}"
                  if (regular 2) == "00" then buf = (regular 1)
                  if buf == "0" then buf=""
                  s = buf : buf = s : Replace "." , ","
               case 8
                  buf = kwota ( Pozycje(i).CenaPodstawowa * Pozycje(i).Ilosc)
               case 9
                  buf=""
                  for idw=1 to idw>nDostawy
                     if Dostawy(idw).lp == i then
                        //ObliczWys(Dostawy(idw).nazwa,KolTab1NP(nKolumna)-15)
                        buf+= Dostawy(idw).nazwa+" "//sBroken
                     endif
                  next idw
               case 10
                  buf = formatuj( Round(iif(nJednMiary,Pozycje(i).CenaNettoWP,Pozycje(i).CenaNetto),nCenaRound+1),nCenaRound+1 )
               case 11
                  buf = kwota ( Pozycje(i).WartoscNetto )
            endselect   
            kolumna nkolumna, PiszWyrazy(buf,KolumnyNP(nKolumna)-10)
         endif
      next j
   koniec
   koniec
   if bVertLines then
      if nLp==2 then DrawLine at 0,#T,nTblWidth1,0
      y = str.pozycja(#B)-str.pozycja(#T)
      x=0
      nPom = 1
      do
         x+=kolumnyNP(nPom)//KolTab1(nPom)
         nPom+=1
         DrawLine at x,#T,0,y
      loop until nPom>size(KolumnyNP)//KolTab1)
      DrawLine at 0,#T,0,y
   endif
   endif
Next i
if bVertLines then DrawLine at 0,#B,nTblWidth1,0
tbl1=tabela 1,nTblMarg,KolumnyNP(size(KolumnyNP)-1),nc,KolumnyNP(size(KolumnyNP)),nr
tabela #tbl1, od nMalaStopka,#Y
   kolumna 1, "RAZEM"
   kolumna 2, kwota(tot_nettoNP)
koniec
y = str.Pozycja(#B)
endif
//if bVertLines then DrawLine at 0,#B,nTblWidth1,0

print at 0,y+20;
FRNewRow(0)
if iTyp!=FWS && iTyp!=WKS then FRAddCol(700,90,18,bRamki,0)
FRAddCol(50,90,0,0,-1)
if iTyp!=FWS && iTyp!= WKS then FRAddCol(-100,90,13,0,-1)
FRDraw()
ramka od 0,#B+10,str.szer,90,bRamki
   SetStyl ( nbl )
   print at 30,20;"Słownie: "
   SetFont ( "tekst" )
   print KwotaNaTekst( (using "%.2f",tot_brutto), "" )
koniec

IF (bWartoscAkcyzy) THEN
   akcyza = ObliczAkcyze()
   ramka od 0,#B+10,700,90,bRamki
      SetStyl ( nbl )
      print at 30,20;"Wartość akcyzy: "
      SetFont ( "tekst" )
      IF akcyza == -1 THEN
         print "nie znana"
      ELSE
         print Kwota(akcyza)
      ENDIF
   koniec
ENDIF

if bRabPods then
   tbl0 = tabela 1,nTblMarg,KolTabPR,StlTabH
   Ramka od str.szer-500,#Y+50,500,10,0,nGray
      tabela #tbl0
         if fRabat >= 0 then
            kolumna 1,"W sumie rabat"
         else
            kolumna 1,"W sumie narzut"
         endif
         if CZYNETTO then
            kolumna 2,"Netto"
         else
            kolumna 2,"Brutto"
         endif
      koniec
   koniec
   tbl0 = tabela 1,nTblMarg,KolTabPR,StlTabPR
   tabela #tbl0, od str.szer-500,#Y   
      if fRabat >= 0 then
         kolumna 1, kwota( Round(fRabat , nRabatRound) ) + "%"
      else
         kolumna 1, kwota( -Round(fRabat , nRabatRound) ) + "%"
      endif
      if CZYNETTO then
         if fRabat >= 0 then
            kolumna 2, kwota ( tot_wartbaza - tot_netto )
         else
            kolumna 2, kwota ( tot_netto - tot_wartbaza )
         endif
      else
         if fRabat >= 0 then
            kolumna 2, kwota ( tot_wartbaza - tot_brutto )
         else
            kolumna 2, kwota ( tot_brutto - tot_wartbaza )
         endif
      endif
   koniec
endif
print at 0,#B+50;
FRNewRow(0)
FRAddCol(-100,250,14,0,0)
FRDraw()
PlatWyd()
Notatka()
NotatkaRodz()
Dekretacje()
Footer(1)
end

wydruk_tekstowy:
   #include "dokument VAT tryb tekstowy"
FooterTxt(1)


I co należy dopisać, żeby na fakturze pojawiło się coś takiego:

Obrazek

Mniej więcej po polach kto odebrał i kto wystawił fakturę.


2010-06-29, 09:53
Wyświetl profil
Autor Wiadomość
 


Ekspert
Ekspert
Awatar użytkownika

Rejestracja: 2008-04-18, 18:52
Posty: 5169
Pomógł: 59
Post 
cos w stylu

ustaw font
print

ale to moze sama najpierw pokombinuj a potem jak cos nie wyjdzie to pytaj juz konkretnie


2010-06-29, 12:03
Wyświetl profil
Wyświetl posty nie starsze niż:  Sortuj wg  
Odpowiedz w temacie   [ Posty: 2 ] 
   Podobne tematy   Autor   Odpowiedzi   Odsłony   Ostatni post 
Na tym forum nie ma nowych nieprzeczytanych postów. Załączniki Dodatkowa informacja (tekst) na fakturze

[ Przejdź na stronę: 1, 2 ]

w Programy Handlowe

suska

18

10718

2017-09-04, 23:23

suska Wyświetl najnowszy post

Na tym forum nie ma nowych nieprzeczytanych postów. Ddatkowy tekst na Fakturze Symfonia 2.0 Handel

w Programy Handlowe

Konar

3

2464

2021-11-09, 15:45

rafal Wyświetl najnowszy post

Na tym forum nie ma nowych nieprzeczytanych postów. Załączniki Dodatkowy tekst (informacja) na fakturze Symfonia 2.0 Handel

w Programy Handlowe

suska

2

2567

2017-10-03, 15:27

suska Wyświetl najnowszy post

Na tym forum nie ma nowych nieprzeczytanych postów. Załączniki tekst dodany do faktury

w Programy Handlowe

symfoni

8

3840

2014-08-05, 13:31

rafal Wyświetl najnowszy post



Kto jest online

Użytkownicy przeglądający to forum: Nie ma żadnego zarejestrowanego użytkownika i 4 gości


Nie możesz tworzyć nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz dodawać załączników

Szukaj:
Przejdź do:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Support forum phpbb by phpBB Assistant