Invoice class language issue












2















I would like to change the custom description in the invoice class with custom description in greek.



Problems:




  1. I could change some english descriptions that are in english but I can't change the table description.

  2. Change the $ to euro.


Is there any way to change all that? Thank you for your answers in advance.



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}

def tab {hspace*{3ex}}

begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \
selectlanguage{english}

begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Expenses}

feerow{Web Hosting: October, 2012}{60}

end{invoiceTable}



end{document}









share|improve this question




















  • 1





    Please don't use two letter font commands. They have been deprecated for more than 20 years. See Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Alan Munn
    Mar 8 at 16:20
















2















I would like to change the custom description in the invoice class with custom description in greek.



Problems:




  1. I could change some english descriptions that are in english but I can't change the table description.

  2. Change the $ to euro.


Is there any way to change all that? Thank you for your answers in advance.



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}

def tab {hspace*{3ex}}

begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \
selectlanguage{english}

begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Expenses}

feerow{Web Hosting: October, 2012}{60}

end{invoiceTable}



end{document}









share|improve this question




















  • 1





    Please don't use two letter font commands. They have been deprecated for more than 20 years. See Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Alan Munn
    Mar 8 at 16:20














2












2








2








I would like to change the custom description in the invoice class with custom description in greek.



Problems:




  1. I could change some english descriptions that are in english but I can't change the table description.

  2. Change the $ to euro.


Is there any way to change all that? Thank you for your answers in advance.



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}

def tab {hspace*{3ex}}

begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \
selectlanguage{english}

begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Expenses}

feerow{Web Hosting: October, 2012}{60}

end{invoiceTable}



end{document}









share|improve this question
















I would like to change the custom description in the invoice class with custom description in greek.



Problems:




  1. I could change some english descriptions that are in english but I can't change the table description.

  2. Change the $ to euro.


Is there any way to change all that? Thank you for your answers in advance.



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}

def tab {hspace*{3ex}}

begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \
selectlanguage{english}

begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Expenses}

feerow{Web Hosting: October, 2012}{60}

end{invoiceTable}



end{document}






babel invoice






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 12:57









Kurt

39.4k850164




39.4k850164










asked Mar 8 at 12:02









Petros MourouzisPetros Mourouzis

999




999








  • 1





    Please don't use two letter font commands. They have been deprecated for more than 20 years. See Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Alan Munn
    Mar 8 at 16:20














  • 1





    Please don't use two letter font commands. They have been deprecated for more than 20 years. See Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Alan Munn
    Mar 8 at 16:20








1




1





Please don't use two letter font commands. They have been deprecated for more than 20 years. See Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

– Alan Munn
Mar 8 at 16:20





Please don't use two letter font commands. They have been deprecated for more than 20 years. See Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

– Alan Munn
Mar 8 at 16:20










2 Answers
2






active

oldest

votes


















1














Because I do not speak greek I can only show you where to change the english words to greek. The translation please do yourselve.



Please have a look into the following MWe. I added there an Greek: where you have to translate the following english text, for example:



        {bf Greek:Subtotal} & {bf total{subhours} hours} &  & {bf $total{subcost}}
% ^^^^^^^^^^^^^^


shows you to translate Subtotal.



To get the euro symbol into the the invoice add the two lines



usepackage{eurosym} % <================================================
renewcommand{$}{euro} % <============================================


to the code.



With the complete MWE



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{
{bf Greek:Subtotal} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
setcounter{subhours}{0}
\*[1.5ex]
}
newcommand{subtotalStar}{
{bf Greek:Subtotal} & & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


you get the result:



resulting pdf



With the changings mentioned in the comments you get the code:



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{%
{selectlanguage{greek}textbf{ΤΕΛΙΚΟ ΠΟΣΟ}} & {textbf{total{subhours}}selectlanguage{greek} textbf{Greek:hours}} & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}%
setcounter{subhours}{0}%
\*[1.5ex]
}
newcommand{subtotalStar}{%
{bf Greek:Subtotal} & & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{%
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{selectlanguage{greek} Greek:hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


and the result:



enter image description here



Of course you have to translate to greek, then the table gets smaller again ...






share|improve this answer


























  • Thank yo for your answer, I did what you told me but I get errors when I write in Greek. For example } newcommand{subtotalNoStar}{ {textbf ΤΕΛΙΚΟ ΠΟΣΟ} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================ setcounter{subcost}{0} setcounter{subhours}{0} *[1.5ex] }

    – Petros Mourouzis
    Mar 9 at 8:38













  • @PetrosMourouzis add selectlanguage[greek]: selectlanguage{greek} textbf{ΤΕΛΙΚΟ ΠΟΣΟ}. Same with the other changes I mentioned ...

    – Kurt
    Mar 9 at 9:10











  • ΟΚ.that work fine. One final question, could you tell me how to remove "hours" under "Quantity"? Thank you

    – Petros Mourouzis
    Mar 9 at 11:22











  • @PetrosMourouzis Same procedure as before: see next column in command subtotalNoStar: change Greek:hours to what you need, use first selectlanguage as done before. ({bf total{subhours} Greek:hours}). similar in command: hourrow: {hours} -> `{selectlanguage{greek} Greek:hours}

    – Kurt
    Mar 9 at 11:36











  • Thank you very much..

    – Petros Mourouzis
    Mar 9 at 11:46



















0














To change the currency you could adapt this answer and add the following:



renewcommand{$}{euro}.



Why do you do selectlanguage{english} all the time, for example before begin{invoiceTable}?






share|improve this answer
























  • thank you, I tried to use foreignlanguage but there were a lot of issues. When i tried selectlanguage{english} I didn't have any errors. I put the renewcommand{$}{euro} in the preamble and i got errors with the default table of the invoice. If i use renewcommand{$}{pounds} the $ changes to pounds

    – Petros Mourouzis
    Mar 8 at 12:23













  • I put usepackage{eurosym} and everything is alright, but I can't change the default titles from the default invoice template to greek titles.

    – Petros Mourouzis
    Mar 8 at 12:29











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478405%2finvoice-class-language-issue%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Because I do not speak greek I can only show you where to change the english words to greek. The translation please do yourselve.



Please have a look into the following MWe. I added there an Greek: where you have to translate the following english text, for example:



        {bf Greek:Subtotal} & {bf total{subhours} hours} &  & {bf $total{subcost}}
% ^^^^^^^^^^^^^^


shows you to translate Subtotal.



To get the euro symbol into the the invoice add the two lines



usepackage{eurosym} % <================================================
renewcommand{$}{euro} % <============================================


to the code.



With the complete MWE



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{
{bf Greek:Subtotal} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
setcounter{subhours}{0}
\*[1.5ex]
}
newcommand{subtotalStar}{
{bf Greek:Subtotal} & & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


you get the result:



resulting pdf



With the changings mentioned in the comments you get the code:



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{%
{selectlanguage{greek}textbf{ΤΕΛΙΚΟ ΠΟΣΟ}} & {textbf{total{subhours}}selectlanguage{greek} textbf{Greek:hours}} & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}%
setcounter{subhours}{0}%
\*[1.5ex]
}
newcommand{subtotalStar}{%
{bf Greek:Subtotal} & & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{%
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{selectlanguage{greek} Greek:hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


and the result:



enter image description here



Of course you have to translate to greek, then the table gets smaller again ...






share|improve this answer


























  • Thank yo for your answer, I did what you told me but I get errors when I write in Greek. For example } newcommand{subtotalNoStar}{ {textbf ΤΕΛΙΚΟ ΠΟΣΟ} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================ setcounter{subcost}{0} setcounter{subhours}{0} *[1.5ex] }

    – Petros Mourouzis
    Mar 9 at 8:38













  • @PetrosMourouzis add selectlanguage[greek]: selectlanguage{greek} textbf{ΤΕΛΙΚΟ ΠΟΣΟ}. Same with the other changes I mentioned ...

    – Kurt
    Mar 9 at 9:10











  • ΟΚ.that work fine. One final question, could you tell me how to remove "hours" under "Quantity"? Thank you

    – Petros Mourouzis
    Mar 9 at 11:22











  • @PetrosMourouzis Same procedure as before: see next column in command subtotalNoStar: change Greek:hours to what you need, use first selectlanguage as done before. ({bf total{subhours} Greek:hours}). similar in command: hourrow: {hours} -> `{selectlanguage{greek} Greek:hours}

    – Kurt
    Mar 9 at 11:36











  • Thank you very much..

    – Petros Mourouzis
    Mar 9 at 11:46
















1














Because I do not speak greek I can only show you where to change the english words to greek. The translation please do yourselve.



Please have a look into the following MWe. I added there an Greek: where you have to translate the following english text, for example:



        {bf Greek:Subtotal} & {bf total{subhours} hours} &  & {bf $total{subcost}}
% ^^^^^^^^^^^^^^


shows you to translate Subtotal.



To get the euro symbol into the the invoice add the two lines



usepackage{eurosym} % <================================================
renewcommand{$}{euro} % <============================================


to the code.



With the complete MWE



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{
{bf Greek:Subtotal} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
setcounter{subhours}{0}
\*[1.5ex]
}
newcommand{subtotalStar}{
{bf Greek:Subtotal} & & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


you get the result:



resulting pdf



With the changings mentioned in the comments you get the code:



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{%
{selectlanguage{greek}textbf{ΤΕΛΙΚΟ ΠΟΣΟ}} & {textbf{total{subhours}}selectlanguage{greek} textbf{Greek:hours}} & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}%
setcounter{subhours}{0}%
\*[1.5ex]
}
newcommand{subtotalStar}{%
{bf Greek:Subtotal} & & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{%
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{selectlanguage{greek} Greek:hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


and the result:



enter image description here



Of course you have to translate to greek, then the table gets smaller again ...






share|improve this answer


























  • Thank yo for your answer, I did what you told me but I get errors when I write in Greek. For example } newcommand{subtotalNoStar}{ {textbf ΤΕΛΙΚΟ ΠΟΣΟ} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================ setcounter{subcost}{0} setcounter{subhours}{0} *[1.5ex] }

    – Petros Mourouzis
    Mar 9 at 8:38













  • @PetrosMourouzis add selectlanguage[greek]: selectlanguage{greek} textbf{ΤΕΛΙΚΟ ΠΟΣΟ}. Same with the other changes I mentioned ...

    – Kurt
    Mar 9 at 9:10











  • ΟΚ.that work fine. One final question, could you tell me how to remove "hours" under "Quantity"? Thank you

    – Petros Mourouzis
    Mar 9 at 11:22











  • @PetrosMourouzis Same procedure as before: see next column in command subtotalNoStar: change Greek:hours to what you need, use first selectlanguage as done before. ({bf total{subhours} Greek:hours}). similar in command: hourrow: {hours} -> `{selectlanguage{greek} Greek:hours}

    – Kurt
    Mar 9 at 11:36











  • Thank you very much..

    – Petros Mourouzis
    Mar 9 at 11:46














1












1








1







Because I do not speak greek I can only show you where to change the english words to greek. The translation please do yourselve.



Please have a look into the following MWe. I added there an Greek: where you have to translate the following english text, for example:



        {bf Greek:Subtotal} & {bf total{subhours} hours} &  & {bf $total{subcost}}
% ^^^^^^^^^^^^^^


shows you to translate Subtotal.



To get the euro symbol into the the invoice add the two lines



usepackage{eurosym} % <================================================
renewcommand{$}{euro} % <============================================


to the code.



With the complete MWE



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{
{bf Greek:Subtotal} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
setcounter{subhours}{0}
\*[1.5ex]
}
newcommand{subtotalStar}{
{bf Greek:Subtotal} & & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


you get the result:



resulting pdf



With the changings mentioned in the comments you get the code:



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{%
{selectlanguage{greek}textbf{ΤΕΛΙΚΟ ΠΟΣΟ}} & {textbf{total{subhours}}selectlanguage{greek} textbf{Greek:hours}} & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}%
setcounter{subhours}{0}%
\*[1.5ex]
}
newcommand{subtotalStar}{%
{bf Greek:Subtotal} & & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{%
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{selectlanguage{greek} Greek:hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


and the result:



enter image description here



Of course you have to translate to greek, then the table gets smaller again ...






share|improve this answer















Because I do not speak greek I can only show you where to change the english words to greek. The translation please do yourselve.



Please have a look into the following MWe. I added there an Greek: where you have to translate the following english text, for example:



        {bf Greek:Subtotal} & {bf total{subhours} hours} &  & {bf $total{subcost}}
% ^^^^^^^^^^^^^^


shows you to translate Subtotal.



To get the euro symbol into the the invoice add the two lines



usepackage{eurosym} % <================================================
renewcommand{$}{euro} % <============================================


to the code.



With the complete MWE



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{
{bf Greek:Subtotal} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
setcounter{subhours}{0}
\*[1.5ex]
}
newcommand{subtotalStar}{
{bf Greek:Subtotal} & & & {bf $total{subcost}} % <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


you get the result:



resulting pdf



With the changings mentioned in the comments you get the code:



documentclass{invoice} 

usepackage[english,greek]{babel}

usepackage[utf8]{inputenc}

usepackage[T1]{fontenc}
usepackage{eurosym} % <================================================

def tab {hspace*{3ex}}
renewcommand{$}{euro} % <============================================


makeatletter
renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
newcommand*{unitrow}[4]{%
addtocounter{cost}{1000 * real{##2} * real{##3}}%
addtocounter{subcost}{1000 * real{##2} * real{##3}}%
##1 & formatNumber{##2} ##4 & $formatNumber{##3} & $FPmul{cost}{##2}{##3}formatNumber{cost}%
\
}
% Create a new row from title and expense amount
newcommand*{feerow}[2]{%
addtocounter{cost}{1000 * real{##2}}%
addtocounter{subcost}{1000 * real{##2}}%
##1 & & $formatNumber{##2} & $FPmul{cost}{##2}{1}formatNumber{cost}%
\
}

newcommand{subtotalNoStar}{%
{selectlanguage{greek}textbf{ΤΕΛΙΚΟ ΠΟΣΟ}} & {textbf{total{subhours}}selectlanguage{greek} textbf{Greek:hours}} & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}%
setcounter{subhours}{0}%
\*[1.5ex]
}
newcommand{subtotalStar}{%
{bf Greek:Subtotal} & & & {bf $total{subcost}}% <================================================
setcounter{subcost}{0}
\*[1.5ex]
}
newcommand{subtotal}{%
hline
@ifstar
subtotalStar%
subtotalNoStar%
}

% Create a new row from date and hours worked (use stored fee type and hourly rate)
newcommand*{hourrow}[3]{%
addtocounter{hours}{1000 * real{##2}}%
addtocounter{subhours}{1000 * real{##2}}%
unitrow{##1}{##2}{##3}{selectlanguage{greek} Greek:hours}%
}
renewcommand{tabcolsep}{0.8ex}
setlengthLTleft{0pt}
setlengthLTright{0pt}
begin{longtable}{@{extracolsep{fill}hspace{tabcolsep}} l r r r }
hline
{bf Greek:Description of Services} & multicolumn{1}{c}{bf Greek:Quantity} & multicolumn{1}{c}{bf Greek:Unit Price} & multicolumn{1}{c}{bf Greek:Amount} \* % <================================================
hlinehline
endhead
}{
hlinehlinehline
{bf Greek:Balance Due} & & & {bf $total{cost}} \ % <================================================
end{longtable}
}
makeatother



begin{document}

hfil{Hugebf Οδοντιατρείο Πέτρου Μουρούζη}hfil
bigskipbreak
hrule

Κ.Καραμανλή 77 hfill (2310) 911-890 \
Θεσσαλονίκη, 54642 hfill selectlanguage{english}{mr.mourouzis@gmail.com}
\ \
selectlanguage{greek}
{bf Οικονομική ανάλυση εργασιών:} \
tab Αθανάσιος \
tab \
{bf Ημερομηνία:} \
tab today \

selectlanguage{english}
begin{invoiceTable}

selectlanguage{greek}

feetype{Οδοντιατρικές εργασίες}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}


selectlanguage{greek}

feetype{Προσωρινές αποκαταστάσεις}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}

selectlanguage{greek}

hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}

selectlanguage{greek}

hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}

subtotal



feetype{Greek:Expenses} % <================================================

feerow{Greek:Web Hosting: October, 2012}{60} % <================================================

end{invoiceTable}



end{document}


and the result:



enter image description here



Of course you have to translate to greek, then the table gets smaller again ...







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 9 at 11:52

























answered Mar 8 at 12:55









KurtKurt

39.4k850164




39.4k850164













  • Thank yo for your answer, I did what you told me but I get errors when I write in Greek. For example } newcommand{subtotalNoStar}{ {textbf ΤΕΛΙΚΟ ΠΟΣΟ} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================ setcounter{subcost}{0} setcounter{subhours}{0} *[1.5ex] }

    – Petros Mourouzis
    Mar 9 at 8:38













  • @PetrosMourouzis add selectlanguage[greek]: selectlanguage{greek} textbf{ΤΕΛΙΚΟ ΠΟΣΟ}. Same with the other changes I mentioned ...

    – Kurt
    Mar 9 at 9:10











  • ΟΚ.that work fine. One final question, could you tell me how to remove "hours" under "Quantity"? Thank you

    – Petros Mourouzis
    Mar 9 at 11:22











  • @PetrosMourouzis Same procedure as before: see next column in command subtotalNoStar: change Greek:hours to what you need, use first selectlanguage as done before. ({bf total{subhours} Greek:hours}). similar in command: hourrow: {hours} -> `{selectlanguage{greek} Greek:hours}

    – Kurt
    Mar 9 at 11:36











  • Thank you very much..

    – Petros Mourouzis
    Mar 9 at 11:46



















  • Thank yo for your answer, I did what you told me but I get errors when I write in Greek. For example } newcommand{subtotalNoStar}{ {textbf ΤΕΛΙΚΟ ΠΟΣΟ} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================ setcounter{subcost}{0} setcounter{subhours}{0} *[1.5ex] }

    – Petros Mourouzis
    Mar 9 at 8:38













  • @PetrosMourouzis add selectlanguage[greek]: selectlanguage{greek} textbf{ΤΕΛΙΚΟ ΠΟΣΟ}. Same with the other changes I mentioned ...

    – Kurt
    Mar 9 at 9:10











  • ΟΚ.that work fine. One final question, could you tell me how to remove "hours" under "Quantity"? Thank you

    – Petros Mourouzis
    Mar 9 at 11:22











  • @PetrosMourouzis Same procedure as before: see next column in command subtotalNoStar: change Greek:hours to what you need, use first selectlanguage as done before. ({bf total{subhours} Greek:hours}). similar in command: hourrow: {hours} -> `{selectlanguage{greek} Greek:hours}

    – Kurt
    Mar 9 at 11:36











  • Thank you very much..

    – Petros Mourouzis
    Mar 9 at 11:46

















Thank yo for your answer, I did what you told me but I get errors when I write in Greek. For example } newcommand{subtotalNoStar}{ {textbf ΤΕΛΙΚΟ ΠΟΣΟ} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================ setcounter{subcost}{0} setcounter{subhours}{0} *[1.5ex] }

– Petros Mourouzis
Mar 9 at 8:38







Thank yo for your answer, I did what you told me but I get errors when I write in Greek. For example } newcommand{subtotalNoStar}{ {textbf ΤΕΛΙΚΟ ΠΟΣΟ} & {bf total{subhours} hours} & & {bf $total{subcost}} % <================================================ setcounter{subcost}{0} setcounter{subhours}{0} *[1.5ex] }

– Petros Mourouzis
Mar 9 at 8:38















@PetrosMourouzis add selectlanguage[greek]: selectlanguage{greek} textbf{ΤΕΛΙΚΟ ΠΟΣΟ}. Same with the other changes I mentioned ...

– Kurt
Mar 9 at 9:10





@PetrosMourouzis add selectlanguage[greek]: selectlanguage{greek} textbf{ΤΕΛΙΚΟ ΠΟΣΟ}. Same with the other changes I mentioned ...

– Kurt
Mar 9 at 9:10













ΟΚ.that work fine. One final question, could you tell me how to remove "hours" under "Quantity"? Thank you

– Petros Mourouzis
Mar 9 at 11:22





ΟΚ.that work fine. One final question, could you tell me how to remove "hours" under "Quantity"? Thank you

– Petros Mourouzis
Mar 9 at 11:22













@PetrosMourouzis Same procedure as before: see next column in command subtotalNoStar: change Greek:hours to what you need, use first selectlanguage as done before. ({bf total{subhours} Greek:hours}). similar in command: hourrow: {hours} -> `{selectlanguage{greek} Greek:hours}

– Kurt
Mar 9 at 11:36





@PetrosMourouzis Same procedure as before: see next column in command subtotalNoStar: change Greek:hours to what you need, use first selectlanguage as done before. ({bf total{subhours} Greek:hours}). similar in command: hourrow: {hours} -> `{selectlanguage{greek} Greek:hours}

– Kurt
Mar 9 at 11:36













Thank you very much..

– Petros Mourouzis
Mar 9 at 11:46





Thank you very much..

– Petros Mourouzis
Mar 9 at 11:46











0














To change the currency you could adapt this answer and add the following:



renewcommand{$}{euro}.



Why do you do selectlanguage{english} all the time, for example before begin{invoiceTable}?






share|improve this answer
























  • thank you, I tried to use foreignlanguage but there were a lot of issues. When i tried selectlanguage{english} I didn't have any errors. I put the renewcommand{$}{euro} in the preamble and i got errors with the default table of the invoice. If i use renewcommand{$}{pounds} the $ changes to pounds

    – Petros Mourouzis
    Mar 8 at 12:23













  • I put usepackage{eurosym} and everything is alright, but I can't change the default titles from the default invoice template to greek titles.

    – Petros Mourouzis
    Mar 8 at 12:29
















0














To change the currency you could adapt this answer and add the following:



renewcommand{$}{euro}.



Why do you do selectlanguage{english} all the time, for example before begin{invoiceTable}?






share|improve this answer
























  • thank you, I tried to use foreignlanguage but there were a lot of issues. When i tried selectlanguage{english} I didn't have any errors. I put the renewcommand{$}{euro} in the preamble and i got errors with the default table of the invoice. If i use renewcommand{$}{pounds} the $ changes to pounds

    – Petros Mourouzis
    Mar 8 at 12:23













  • I put usepackage{eurosym} and everything is alright, but I can't change the default titles from the default invoice template to greek titles.

    – Petros Mourouzis
    Mar 8 at 12:29














0












0








0







To change the currency you could adapt this answer and add the following:



renewcommand{$}{euro}.



Why do you do selectlanguage{english} all the time, for example before begin{invoiceTable}?






share|improve this answer













To change the currency you could adapt this answer and add the following:



renewcommand{$}{euro}.



Why do you do selectlanguage{english} all the time, for example before begin{invoiceTable}?







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 8 at 12:06









Superuser27Superuser27

66415




66415













  • thank you, I tried to use foreignlanguage but there were a lot of issues. When i tried selectlanguage{english} I didn't have any errors. I put the renewcommand{$}{euro} in the preamble and i got errors with the default table of the invoice. If i use renewcommand{$}{pounds} the $ changes to pounds

    – Petros Mourouzis
    Mar 8 at 12:23













  • I put usepackage{eurosym} and everything is alright, but I can't change the default titles from the default invoice template to greek titles.

    – Petros Mourouzis
    Mar 8 at 12:29



















  • thank you, I tried to use foreignlanguage but there were a lot of issues. When i tried selectlanguage{english} I didn't have any errors. I put the renewcommand{$}{euro} in the preamble and i got errors with the default table of the invoice. If i use renewcommand{$}{pounds} the $ changes to pounds

    – Petros Mourouzis
    Mar 8 at 12:23













  • I put usepackage{eurosym} and everything is alright, but I can't change the default titles from the default invoice template to greek titles.

    – Petros Mourouzis
    Mar 8 at 12:29

















thank you, I tried to use foreignlanguage but there were a lot of issues. When i tried selectlanguage{english} I didn't have any errors. I put the renewcommand{$}{euro} in the preamble and i got errors with the default table of the invoice. If i use renewcommand{$}{pounds} the $ changes to pounds

– Petros Mourouzis
Mar 8 at 12:23







thank you, I tried to use foreignlanguage but there were a lot of issues. When i tried selectlanguage{english} I didn't have any errors. I put the renewcommand{$}{euro} in the preamble and i got errors with the default table of the invoice. If i use renewcommand{$}{pounds} the $ changes to pounds

– Petros Mourouzis
Mar 8 at 12:23















I put usepackage{eurosym} and everything is alright, but I can't change the default titles from the default invoice template to greek titles.

– Petros Mourouzis
Mar 8 at 12:29





I put usepackage{eurosym} and everything is alright, but I can't change the default titles from the default invoice template to greek titles.

– Petros Mourouzis
Mar 8 at 12:29


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478405%2finvoice-class-language-issue%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?