Change from hourly price to daily price

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3















I do not know where, but the following code is always billing price per hour and sometimes I get paid per day, not per hour, is there a way to change this?



Here is the link to the repository:
https://github.com/d-koppenhagen/latex-rechnung I'm using.



And does someone have a solution for, when I get paid for one day of work, but need to work extra hours and would like to bill them.



% koma_env.tex
documentclass[a4paper]scrlttr2

usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
usepackagegraphicx
usepackagelmodern
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[ngerman]babel
usepackagecolor
usepackage[hidelinks]hyperref

usepackage[german]invoice


renewcommandfamilydefaultsfdefault

% include meta data
include_data
% ################## invoice DATA ##################
newcommandinvoiceDatetoday % Datum der rechnungsstellung, change `today' to a different date, if you do not want to use todays date
newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
newcommandinvoiceSalutation % die Anrede
newcommandinvoiceTextFolgende Positionen werden in Rechnung gestellt: % Rechnungstext
newcommandinvoiceEnclosures % encl einfügen
newcommandinvoiceClosingMit freundlichen Grüßen
% ################## invoice DATA ##################

% ################## Customer DATA ##################
newcommandcustomerCompanyFirma XYZ %ggf. Firma
newcommandcustomerNameMax Mustermann % Name
newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
newcommandcustomerZIP12345 % Postleitzahl
newcommandcustomerCityMusterstadt % Ort
% ################## Customer DATA ##################

setkomavarfromnamesenderName
setkomavarfromaddresssenderStreet \ senderZIP senderCity
setkomavarplacesenderCity
setkomavardateinvoiceDate
setkomavarfromphonesenderTelephone
setkomavarfrommobilephonesenderMobilephone
setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
setkomavarsubjectRechnung
setkomavarlocation
\[baselineskip] \[baselineskip]
flushright small vspace1cmRechnungsnummer:
invoiceReference


setkomavarfirstheadhfill
parbox[t][headheight][t]7.2cm% <================================== 6cm
footnotesize
raggedright
flushright
color[gray].3%
begintabularrl
Anschrift & usekomavarfromname\
& senderStreet\
& senderZIP senderCity \
\
%Telefon Telefon: ` senderTelephone \
Mobil & usekomavarfrommobilephone \
E-Mail & usekomavarfromemail \
Webseite & normalfontttfamily senderWeb \
\
Steuernummer & taxID \
\
Institut & accountBankName \
IBAN & accountIBAN \
BIC & accountBIC
endtabular
%



begindocument
beginlettercustomerCompany \ customerName \
customerStreet \ customerZIP customerCity

includegraphics[width=0.15textwidth]logo.png
openinginvoiceSalutation
invoiceText
begininvoiceEuro0


ProjectTitleProjekttitel % <=========================================
FeeMusterdienstleistung 130.004
FeeMusterdienstleistung 236.007

% Auslagen
%EBCiHotel, 12 Nächte 2400.00
%STExpenses

% Rabatt
DiscountRabatt 20 % <==============================================
endinvoice
ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
enthalten.

closinginvoiceClosing
invoiceEnclosures



endletter
enddocument









share|improve this question




























    3















    I do not know where, but the following code is always billing price per hour and sometimes I get paid per day, not per hour, is there a way to change this?



    Here is the link to the repository:
    https://github.com/d-koppenhagen/latex-rechnung I'm using.



    And does someone have a solution for, when I get paid for one day of work, but need to work extra hours and would like to bill them.



    % koma_env.tex
    documentclass[a4paper]scrlttr2

    usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
    usepackagegraphicx
    usepackagelmodern
    usepackage[utf8]inputenc
    usepackage[T1]fontenc
    usepackage[ngerman]babel
    usepackagecolor
    usepackage[hidelinks]hyperref

    usepackage[german]invoice


    renewcommandfamilydefaultsfdefault

    % include meta data
    include_data
    % ################## invoice DATA ##################
    newcommandinvoiceDatetoday % Datum der rechnungsstellung, change `today' to a different date, if you do not want to use todays date
    newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
    newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
    newcommandinvoiceSalutation % die Anrede
    newcommandinvoiceTextFolgende Positionen werden in Rechnung gestellt: % Rechnungstext
    newcommandinvoiceEnclosures % encl einfügen
    newcommandinvoiceClosingMit freundlichen Grüßen
    % ################## invoice DATA ##################

    % ################## Customer DATA ##################
    newcommandcustomerCompanyFirma XYZ %ggf. Firma
    newcommandcustomerNameMax Mustermann % Name
    newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
    newcommandcustomerZIP12345 % Postleitzahl
    newcommandcustomerCityMusterstadt % Ort
    % ################## Customer DATA ##################

    setkomavarfromnamesenderName
    setkomavarfromaddresssenderStreet \ senderZIP senderCity
    setkomavarplacesenderCity
    setkomavardateinvoiceDate
    setkomavarfromphonesenderTelephone
    setkomavarfrommobilephonesenderMobilephone
    setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
    setkomavarsubjectRechnung
    setkomavarlocation
    \[baselineskip] \[baselineskip]
    flushright small vspace1cmRechnungsnummer:
    invoiceReference


    setkomavarfirstheadhfill
    parbox[t][headheight][t]7.2cm% <================================== 6cm
    footnotesize
    raggedright
    flushright
    color[gray].3%
    begintabularrl
    Anschrift & usekomavarfromname\
    & senderStreet\
    & senderZIP senderCity \
    \
    %Telefon Telefon: ` senderTelephone \
    Mobil & usekomavarfrommobilephone \
    E-Mail & usekomavarfromemail \
    Webseite & normalfontttfamily senderWeb \
    \
    Steuernummer & taxID \
    \
    Institut & accountBankName \
    IBAN & accountIBAN \
    BIC & accountBIC
    endtabular
    %



    begindocument
    beginlettercustomerCompany \ customerName \
    customerStreet \ customerZIP customerCity

    includegraphics[width=0.15textwidth]logo.png
    openinginvoiceSalutation
    invoiceText
    begininvoiceEuro0


    ProjectTitleProjekttitel % <=========================================
    FeeMusterdienstleistung 130.004
    FeeMusterdienstleistung 236.007

    % Auslagen
    %EBCiHotel, 12 Nächte 2400.00
    %STExpenses

    % Rabatt
    DiscountRabatt 20 % <==============================================
    endinvoice
    ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
    enthalten.

    closinginvoiceClosing
    invoiceEnclosures



    endletter
    enddocument









    share|improve this question


























      3












      3








      3








      I do not know where, but the following code is always billing price per hour and sometimes I get paid per day, not per hour, is there a way to change this?



      Here is the link to the repository:
      https://github.com/d-koppenhagen/latex-rechnung I'm using.



      And does someone have a solution for, when I get paid for one day of work, but need to work extra hours and would like to bill them.



      % koma_env.tex
      documentclass[a4paper]scrlttr2

      usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
      usepackagegraphicx
      usepackagelmodern
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usepackage[ngerman]babel
      usepackagecolor
      usepackage[hidelinks]hyperref

      usepackage[german]invoice


      renewcommandfamilydefaultsfdefault

      % include meta data
      include_data
      % ################## invoice DATA ##################
      newcommandinvoiceDatetoday % Datum der rechnungsstellung, change `today' to a different date, if you do not want to use todays date
      newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
      newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
      newcommandinvoiceSalutation % die Anrede
      newcommandinvoiceTextFolgende Positionen werden in Rechnung gestellt: % Rechnungstext
      newcommandinvoiceEnclosures % encl einfügen
      newcommandinvoiceClosingMit freundlichen Grüßen
      % ################## invoice DATA ##################

      % ################## Customer DATA ##################
      newcommandcustomerCompanyFirma XYZ %ggf. Firma
      newcommandcustomerNameMax Mustermann % Name
      newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
      newcommandcustomerZIP12345 % Postleitzahl
      newcommandcustomerCityMusterstadt % Ort
      % ################## Customer DATA ##################

      setkomavarfromnamesenderName
      setkomavarfromaddresssenderStreet \ senderZIP senderCity
      setkomavarplacesenderCity
      setkomavardateinvoiceDate
      setkomavarfromphonesenderTelephone
      setkomavarfrommobilephonesenderMobilephone
      setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
      setkomavarsubjectRechnung
      setkomavarlocation
      \[baselineskip] \[baselineskip]
      flushright small vspace1cmRechnungsnummer:
      invoiceReference


      setkomavarfirstheadhfill
      parbox[t][headheight][t]7.2cm% <================================== 6cm
      footnotesize
      raggedright
      flushright
      color[gray].3%
      begintabularrl
      Anschrift & usekomavarfromname\
      & senderStreet\
      & senderZIP senderCity \
      \
      %Telefon Telefon: ` senderTelephone \
      Mobil & usekomavarfrommobilephone \
      E-Mail & usekomavarfromemail \
      Webseite & normalfontttfamily senderWeb \
      \
      Steuernummer & taxID \
      \
      Institut & accountBankName \
      IBAN & accountIBAN \
      BIC & accountBIC
      endtabular
      %



      begindocument
      beginlettercustomerCompany \ customerName \
      customerStreet \ customerZIP customerCity

      includegraphics[width=0.15textwidth]logo.png
      openinginvoiceSalutation
      invoiceText
      begininvoiceEuro0


      ProjectTitleProjekttitel % <=========================================
      FeeMusterdienstleistung 130.004
      FeeMusterdienstleistung 236.007

      % Auslagen
      %EBCiHotel, 12 Nächte 2400.00
      %STExpenses

      % Rabatt
      DiscountRabatt 20 % <==============================================
      endinvoice
      ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
      enthalten.

      closinginvoiceClosing
      invoiceEnclosures



      endletter
      enddocument









      share|improve this question
















      I do not know where, but the following code is always billing price per hour and sometimes I get paid per day, not per hour, is there a way to change this?



      Here is the link to the repository:
      https://github.com/d-koppenhagen/latex-rechnung I'm using.



      And does someone have a solution for, when I get paid for one day of work, but need to work extra hours and would like to bill them.



      % koma_env.tex
      documentclass[a4paper]scrlttr2

      usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
      usepackagegraphicx
      usepackagelmodern
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usepackage[ngerman]babel
      usepackagecolor
      usepackage[hidelinks]hyperref

      usepackage[german]invoice


      renewcommandfamilydefaultsfdefault

      % include meta data
      include_data
      % ################## invoice DATA ##################
      newcommandinvoiceDatetoday % Datum der rechnungsstellung, change `today' to a different date, if you do not want to use todays date
      newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
      newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
      newcommandinvoiceSalutation % die Anrede
      newcommandinvoiceTextFolgende Positionen werden in Rechnung gestellt: % Rechnungstext
      newcommandinvoiceEnclosures % encl einfügen
      newcommandinvoiceClosingMit freundlichen Grüßen
      % ################## invoice DATA ##################

      % ################## Customer DATA ##################
      newcommandcustomerCompanyFirma XYZ %ggf. Firma
      newcommandcustomerNameMax Mustermann % Name
      newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
      newcommandcustomerZIP12345 % Postleitzahl
      newcommandcustomerCityMusterstadt % Ort
      % ################## Customer DATA ##################

      setkomavarfromnamesenderName
      setkomavarfromaddresssenderStreet \ senderZIP senderCity
      setkomavarplacesenderCity
      setkomavardateinvoiceDate
      setkomavarfromphonesenderTelephone
      setkomavarfrommobilephonesenderMobilephone
      setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
      setkomavarsubjectRechnung
      setkomavarlocation
      \[baselineskip] \[baselineskip]
      flushright small vspace1cmRechnungsnummer:
      invoiceReference


      setkomavarfirstheadhfill
      parbox[t][headheight][t]7.2cm% <================================== 6cm
      footnotesize
      raggedright
      flushright
      color[gray].3%
      begintabularrl
      Anschrift & usekomavarfromname\
      & senderStreet\
      & senderZIP senderCity \
      \
      %Telefon Telefon: ` senderTelephone \
      Mobil & usekomavarfrommobilephone \
      E-Mail & usekomavarfromemail \
      Webseite & normalfontttfamily senderWeb \
      \
      Steuernummer & taxID \
      \
      Institut & accountBankName \
      IBAN & accountIBAN \
      BIC & accountBIC
      endtabular
      %



      begindocument
      beginlettercustomerCompany \ customerName \
      customerStreet \ customerZIP customerCity

      includegraphics[width=0.15textwidth]logo.png
      openinginvoiceSalutation
      invoiceText
      begininvoiceEuro0


      ProjectTitleProjekttitel % <=========================================
      FeeMusterdienstleistung 130.004
      FeeMusterdienstleistung 236.007

      % Auslagen
      %EBCiHotel, 12 Nächte 2400.00
      %STExpenses

      % Rabatt
      DiscountRabatt 20 % <==============================================
      endinvoice
      ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
      enthalten.

      closinginvoiceClosing
      invoiceEnclosures



      endletter
      enddocument






      invoice






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 27 at 15:11









      Kurt

      37.8k847162




      37.8k847162










      asked Jan 27 at 13:33









      Lala_GhostLala_Ghost

      764




      764




















          1 Answer
          1






          active

          oldest

          votes


















          2














          Well you need to expand the style invoice in the preamble of your document with the following code:



          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          Please see that you have to define new commnands defUnitDay (I did only for german!), FeeDay@Title to print the heading with "Preis/Tag" and FeeDay to print one calculation for one work done at x days.



          So you can use this commands in this way:



          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003


          In the following MWE I keept the old invoice and added the new commands and code I showed above:



          documentclass[a4paper]scrlttr2

          usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
          usepackagegraphicx
          usepackagelmodern
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackage[ngerman]babel
          usepackagecolor
          usepackage[hidelinks]hyperref

          usepackage[german]invoice


          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          renewcommandfamilydefaultsfdefault

          % include meta data
          include_data % <============== delete in this file the following data!
          % ################## invoice DATA ##################
          newcommandinvoiceDateDD.MM.YYYY % Datum der rechnungsstellung
          newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
          newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
          newcommandinvoiceSalutationSehr geehrte Damen und Herren, % die Anrede
          newcommandinvoiceTextFür die von mir erbrachte Leistung erhalten sie
          hiermit die Rechnung. Bitte zahlen Sie den unten aufgeführten Gesamtbetrag
          unter Angabe der Rechnungsnummer (invoiceReference) bis
          zum payDate auf das angegebene Konto ein. % Rechnungstext
          newcommandinvoiceEnclosures % encl einfügen
          newcommandinvoiceClosingMit freundlichen Grüßen
          % ################## invoice DATA ##################

          % ################## Customer DATA ##################
          newcommandcustomerCompanyFirma XYZ %ggf. Firma
          newcommandcustomerNameMax Mustermann % Name
          newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
          newcommandcustomerZIP12345 % Postleitzahl
          newcommandcustomerCityMusterstadt % Ort
          % ################## Customer DATA ##################

          setkomavarfromnamesenderName
          setkomavarfromaddresssenderStreet \ senderZIP senderCity
          setkomavarplacesenderCity
          setkomavardateinvoiceDate
          setkomavarfromphonesenderTelephone
          setkomavarfrommobilephonesenderMobilephone
          setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
          setkomavarsubjectRechnung
          setkomavarlocation
          \[baselineskip] \[baselineskip]
          flushright small vspace1cmRechnungsnummer:
          invoiceReference


          setkomavarfirstheadhfill
          parbox[t][headheight][t]7cm% <================================== 6cm
          footnotesize
          raggedright
          flushright
          color[gray].3%
          begintabularrl
          Anschrift & usekomavarfromname\
          & senderStreet\
          & senderZIP senderCity \
          \
          %Telefon Telefon: ` senderTelephone \
          Mobil & usekomavarfrommobilephone \
          E-Mail & usekomavarfromemail \
          Webseite & normalfontttfamily senderWeb \
          \
          Steuernummer & taxID \
          \
          Institut & accountBankName \
          IBAN & accountIBAN \
          BIC & accountBIC
          endtabular
          %



          begindocument
          beginlettercustomerCompany \ customerName \
          customerStreet \ customerZIP customerCity

          includegraphics[width=0.15textwidth]logo.png
          openinginvoiceSalutation
          invoiceText
          begininvoiceEuro0
          ProjectTitleProjekttitel % <=========================================
          FeeMusterdienstleistung 130.004
          FeeMusterdienstleistung 236.007
          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003

          % Auslagen
          %EBCHotel, 12 Nächte 2400.00 % EBCiHotel, 12 Nächte 2400.00
          %STExpenses

          % Rabatt
          DiscountRabatt 20 % <==============================================
          endinvoice
          ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
          enthalten.

          closinginvoiceClosing
          invoiceEnclosures



          endletter
          enddocument


          with the result:



          enter image description here






          share|improve this answer























          • A good answer addressing the original questions. However I note the rebate is applied as simple fixed discount of -20.00 Whereas I would normally in this type of case expect it to alternately be available as say 5% is there an(other) variable (did I miss one) that can be addressed to expand that functionality ?

            – KJO
            Jan 27 at 15:32












          • @KJO You need to add it to the style file or your preamble by your own.

            – Kurt
            Jan 27 at 16:05











          • @kurt not wishing to cloud comments too much, but as I am not good at embedding maths asking is it possible to replace fixed field 20 with something like $subtotal X 5%$

            – KJO
            Jan 27 at 16:14











          • @KJO I looked a little bit on the code. You can for example define a new command DiscountPercent that should do what you want. At last it depends on how the discount has to be calculated, with or without VAT etc.

            – Kurt
            Jan 27 at 23:06











          • Thanks Kurt (I build my own invoices in word and let it do the calcs :-) it was mainly that other users looking at your answer may want to apply percent "off"(er) before VAT

            – KJO
            Jan 27 at 23:57










          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%2f472083%2fchange-from-hourly-price-to-daily-price%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Well you need to expand the style invoice in the preamble of your document with the following code:



          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          Please see that you have to define new commnands defUnitDay (I did only for german!), FeeDay@Title to print the heading with "Preis/Tag" and FeeDay to print one calculation for one work done at x days.



          So you can use this commands in this way:



          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003


          In the following MWE I keept the old invoice and added the new commands and code I showed above:



          documentclass[a4paper]scrlttr2

          usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
          usepackagegraphicx
          usepackagelmodern
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackage[ngerman]babel
          usepackagecolor
          usepackage[hidelinks]hyperref

          usepackage[german]invoice


          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          renewcommandfamilydefaultsfdefault

          % include meta data
          include_data % <============== delete in this file the following data!
          % ################## invoice DATA ##################
          newcommandinvoiceDateDD.MM.YYYY % Datum der rechnungsstellung
          newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
          newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
          newcommandinvoiceSalutationSehr geehrte Damen und Herren, % die Anrede
          newcommandinvoiceTextFür die von mir erbrachte Leistung erhalten sie
          hiermit die Rechnung. Bitte zahlen Sie den unten aufgeführten Gesamtbetrag
          unter Angabe der Rechnungsnummer (invoiceReference) bis
          zum payDate auf das angegebene Konto ein. % Rechnungstext
          newcommandinvoiceEnclosures % encl einfügen
          newcommandinvoiceClosingMit freundlichen Grüßen
          % ################## invoice DATA ##################

          % ################## Customer DATA ##################
          newcommandcustomerCompanyFirma XYZ %ggf. Firma
          newcommandcustomerNameMax Mustermann % Name
          newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
          newcommandcustomerZIP12345 % Postleitzahl
          newcommandcustomerCityMusterstadt % Ort
          % ################## Customer DATA ##################

          setkomavarfromnamesenderName
          setkomavarfromaddresssenderStreet \ senderZIP senderCity
          setkomavarplacesenderCity
          setkomavardateinvoiceDate
          setkomavarfromphonesenderTelephone
          setkomavarfrommobilephonesenderMobilephone
          setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
          setkomavarsubjectRechnung
          setkomavarlocation
          \[baselineskip] \[baselineskip]
          flushright small vspace1cmRechnungsnummer:
          invoiceReference


          setkomavarfirstheadhfill
          parbox[t][headheight][t]7cm% <================================== 6cm
          footnotesize
          raggedright
          flushright
          color[gray].3%
          begintabularrl
          Anschrift & usekomavarfromname\
          & senderStreet\
          & senderZIP senderCity \
          \
          %Telefon Telefon: ` senderTelephone \
          Mobil & usekomavarfrommobilephone \
          E-Mail & usekomavarfromemail \
          Webseite & normalfontttfamily senderWeb \
          \
          Steuernummer & taxID \
          \
          Institut & accountBankName \
          IBAN & accountIBAN \
          BIC & accountBIC
          endtabular
          %



          begindocument
          beginlettercustomerCompany \ customerName \
          customerStreet \ customerZIP customerCity

          includegraphics[width=0.15textwidth]logo.png
          openinginvoiceSalutation
          invoiceText
          begininvoiceEuro0
          ProjectTitleProjekttitel % <=========================================
          FeeMusterdienstleistung 130.004
          FeeMusterdienstleistung 236.007
          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003

          % Auslagen
          %EBCHotel, 12 Nächte 2400.00 % EBCiHotel, 12 Nächte 2400.00
          %STExpenses

          % Rabatt
          DiscountRabatt 20 % <==============================================
          endinvoice
          ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
          enthalten.

          closinginvoiceClosing
          invoiceEnclosures



          endletter
          enddocument


          with the result:



          enter image description here






          share|improve this answer























          • A good answer addressing the original questions. However I note the rebate is applied as simple fixed discount of -20.00 Whereas I would normally in this type of case expect it to alternately be available as say 5% is there an(other) variable (did I miss one) that can be addressed to expand that functionality ?

            – KJO
            Jan 27 at 15:32












          • @KJO You need to add it to the style file or your preamble by your own.

            – Kurt
            Jan 27 at 16:05











          • @kurt not wishing to cloud comments too much, but as I am not good at embedding maths asking is it possible to replace fixed field 20 with something like $subtotal X 5%$

            – KJO
            Jan 27 at 16:14











          • @KJO I looked a little bit on the code. You can for example define a new command DiscountPercent that should do what you want. At last it depends on how the discount has to be calculated, with or without VAT etc.

            – Kurt
            Jan 27 at 23:06











          • Thanks Kurt (I build my own invoices in word and let it do the calcs :-) it was mainly that other users looking at your answer may want to apply percent "off"(er) before VAT

            – KJO
            Jan 27 at 23:57















          2














          Well you need to expand the style invoice in the preamble of your document with the following code:



          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          Please see that you have to define new commnands defUnitDay (I did only for german!), FeeDay@Title to print the heading with "Preis/Tag" and FeeDay to print one calculation for one work done at x days.



          So you can use this commands in this way:



          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003


          In the following MWE I keept the old invoice and added the new commands and code I showed above:



          documentclass[a4paper]scrlttr2

          usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
          usepackagegraphicx
          usepackagelmodern
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackage[ngerman]babel
          usepackagecolor
          usepackage[hidelinks]hyperref

          usepackage[german]invoice


          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          renewcommandfamilydefaultsfdefault

          % include meta data
          include_data % <============== delete in this file the following data!
          % ################## invoice DATA ##################
          newcommandinvoiceDateDD.MM.YYYY % Datum der rechnungsstellung
          newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
          newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
          newcommandinvoiceSalutationSehr geehrte Damen und Herren, % die Anrede
          newcommandinvoiceTextFür die von mir erbrachte Leistung erhalten sie
          hiermit die Rechnung. Bitte zahlen Sie den unten aufgeführten Gesamtbetrag
          unter Angabe der Rechnungsnummer (invoiceReference) bis
          zum payDate auf das angegebene Konto ein. % Rechnungstext
          newcommandinvoiceEnclosures % encl einfügen
          newcommandinvoiceClosingMit freundlichen Grüßen
          % ################## invoice DATA ##################

          % ################## Customer DATA ##################
          newcommandcustomerCompanyFirma XYZ %ggf. Firma
          newcommandcustomerNameMax Mustermann % Name
          newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
          newcommandcustomerZIP12345 % Postleitzahl
          newcommandcustomerCityMusterstadt % Ort
          % ################## Customer DATA ##################

          setkomavarfromnamesenderName
          setkomavarfromaddresssenderStreet \ senderZIP senderCity
          setkomavarplacesenderCity
          setkomavardateinvoiceDate
          setkomavarfromphonesenderTelephone
          setkomavarfrommobilephonesenderMobilephone
          setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
          setkomavarsubjectRechnung
          setkomavarlocation
          \[baselineskip] \[baselineskip]
          flushright small vspace1cmRechnungsnummer:
          invoiceReference


          setkomavarfirstheadhfill
          parbox[t][headheight][t]7cm% <================================== 6cm
          footnotesize
          raggedright
          flushright
          color[gray].3%
          begintabularrl
          Anschrift & usekomavarfromname\
          & senderStreet\
          & senderZIP senderCity \
          \
          %Telefon Telefon: ` senderTelephone \
          Mobil & usekomavarfrommobilephone \
          E-Mail & usekomavarfromemail \
          Webseite & normalfontttfamily senderWeb \
          \
          Steuernummer & taxID \
          \
          Institut & accountBankName \
          IBAN & accountIBAN \
          BIC & accountBIC
          endtabular
          %



          begindocument
          beginlettercustomerCompany \ customerName \
          customerStreet \ customerZIP customerCity

          includegraphics[width=0.15textwidth]logo.png
          openinginvoiceSalutation
          invoiceText
          begininvoiceEuro0
          ProjectTitleProjekttitel % <=========================================
          FeeMusterdienstleistung 130.004
          FeeMusterdienstleistung 236.007
          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003

          % Auslagen
          %EBCHotel, 12 Nächte 2400.00 % EBCiHotel, 12 Nächte 2400.00
          %STExpenses

          % Rabatt
          DiscountRabatt 20 % <==============================================
          endinvoice
          ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
          enthalten.

          closinginvoiceClosing
          invoiceEnclosures



          endletter
          enddocument


          with the result:



          enter image description here






          share|improve this answer























          • A good answer addressing the original questions. However I note the rebate is applied as simple fixed discount of -20.00 Whereas I would normally in this type of case expect it to alternately be available as say 5% is there an(other) variable (did I miss one) that can be addressed to expand that functionality ?

            – KJO
            Jan 27 at 15:32












          • @KJO You need to add it to the style file or your preamble by your own.

            – Kurt
            Jan 27 at 16:05











          • @kurt not wishing to cloud comments too much, but as I am not good at embedding maths asking is it possible to replace fixed field 20 with something like $subtotal X 5%$

            – KJO
            Jan 27 at 16:14











          • @KJO I looked a little bit on the code. You can for example define a new command DiscountPercent that should do what you want. At last it depends on how the discount has to be calculated, with or without VAT etc.

            – Kurt
            Jan 27 at 23:06











          • Thanks Kurt (I build my own invoices in word and let it do the calcs :-) it was mainly that other users looking at your answer may want to apply percent "off"(er) before VAT

            – KJO
            Jan 27 at 23:57













          2












          2








          2







          Well you need to expand the style invoice in the preamble of your document with the following code:



          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          Please see that you have to define new commnands defUnitDay (I did only for german!), FeeDay@Title to print the heading with "Preis/Tag" and FeeDay to print one calculation for one work done at x days.



          So you can use this commands in this way:



          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003


          In the following MWE I keept the old invoice and added the new commands and code I showed above:



          documentclass[a4paper]scrlttr2

          usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
          usepackagegraphicx
          usepackagelmodern
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackage[ngerman]babel
          usepackagecolor
          usepackage[hidelinks]hyperref

          usepackage[german]invoice


          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          renewcommandfamilydefaultsfdefault

          % include meta data
          include_data % <============== delete in this file the following data!
          % ################## invoice DATA ##################
          newcommandinvoiceDateDD.MM.YYYY % Datum der rechnungsstellung
          newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
          newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
          newcommandinvoiceSalutationSehr geehrte Damen und Herren, % die Anrede
          newcommandinvoiceTextFür die von mir erbrachte Leistung erhalten sie
          hiermit die Rechnung. Bitte zahlen Sie den unten aufgeführten Gesamtbetrag
          unter Angabe der Rechnungsnummer (invoiceReference) bis
          zum payDate auf das angegebene Konto ein. % Rechnungstext
          newcommandinvoiceEnclosures % encl einfügen
          newcommandinvoiceClosingMit freundlichen Grüßen
          % ################## invoice DATA ##################

          % ################## Customer DATA ##################
          newcommandcustomerCompanyFirma XYZ %ggf. Firma
          newcommandcustomerNameMax Mustermann % Name
          newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
          newcommandcustomerZIP12345 % Postleitzahl
          newcommandcustomerCityMusterstadt % Ort
          % ################## Customer DATA ##################

          setkomavarfromnamesenderName
          setkomavarfromaddresssenderStreet \ senderZIP senderCity
          setkomavarplacesenderCity
          setkomavardateinvoiceDate
          setkomavarfromphonesenderTelephone
          setkomavarfrommobilephonesenderMobilephone
          setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
          setkomavarsubjectRechnung
          setkomavarlocation
          \[baselineskip] \[baselineskip]
          flushright small vspace1cmRechnungsnummer:
          invoiceReference


          setkomavarfirstheadhfill
          parbox[t][headheight][t]7cm% <================================== 6cm
          footnotesize
          raggedright
          flushright
          color[gray].3%
          begintabularrl
          Anschrift & usekomavarfromname\
          & senderStreet\
          & senderZIP senderCity \
          \
          %Telefon Telefon: ` senderTelephone \
          Mobil & usekomavarfrommobilephone \
          E-Mail & usekomavarfromemail \
          Webseite & normalfontttfamily senderWeb \
          \
          Steuernummer & taxID \
          \
          Institut & accountBankName \
          IBAN & accountIBAN \
          BIC & accountBIC
          endtabular
          %



          begindocument
          beginlettercustomerCompany \ customerName \
          customerStreet \ customerZIP customerCity

          includegraphics[width=0.15textwidth]logo.png
          openinginvoiceSalutation
          invoiceText
          begininvoiceEuro0
          ProjectTitleProjekttitel % <=========================================
          FeeMusterdienstleistung 130.004
          FeeMusterdienstleistung 236.007
          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003

          % Auslagen
          %EBCHotel, 12 Nächte 2400.00 % EBCiHotel, 12 Nächte 2400.00
          %STExpenses

          % Rabatt
          DiscountRabatt 20 % <==============================================
          endinvoice
          ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
          enthalten.

          closinginvoiceClosing
          invoiceEnclosures



          endletter
          enddocument


          with the result:



          enter image description here






          share|improve this answer













          Well you need to expand the style invoice in the preamble of your document with the following code:



          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          Please see that you have to define new commnands defUnitDay (I did only for german!), FeeDay@Title to print the heading with "Preis/Tag" and FeeDay to print one calculation for one work done at x days.



          So you can use this commands in this way:



          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003


          In the following MWE I keept the old invoice and added the new commands and code I showed above:



          documentclass[a4paper]scrlttr2

          usepackage[top=2cm, bottom=1cm, left=2cm, right=2cm]geometry
          usepackagegraphicx
          usepackagelmodern
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackage[ngerman]babel
          usepackagecolor
          usepackage[hidelinks]hyperref

          usepackage[german]invoice


          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          makeatletter
          defUnitDay Preis/Tag% <========================================

          newcommandFeeDay@Title% <==========================================
          \
          noindenttextbfActivity&&UnitDay&Count&Amount (BC)\
          hline%
          %

          newcommandFeeDay[3]% Yields state 3, Print Fee Item <==============
          %
          % #1 Contents
          % #2 Fee per Day
          % #3 Unit Count
          %
          ifcaseFlag % 0: Invoice not started yet
          error@messageMissingOpening%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 1: Start invoice
          %
          error@messageMissingProject%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 2: Start project, print title
          %
          FeeDay@Title%
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 3: Print remuneration item
          %
          Fee@Line#1#2#3%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 4: Print subtotal remuneration
          %
          warning@messageFeeSTExists%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 5: Expense item
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 6: Print subtotal expenses
          %
          error@messageFeeBeforeExpense%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 7: Print subtotal project
          %
          error@messageProjectCompletedNoFee%
          %
          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          or % 8: Print total, close invoice
          %
          error@messageInvoiceCompletedNoFee%
          %
          %
          else error@messageInternalError%
          fi%
          %
          makeatother


          renewcommandfamilydefaultsfdefault

          % include meta data
          include_data % <============== delete in this file the following data!
          % ################## invoice DATA ##################
          newcommandinvoiceDateDD.MM.YYYY % Datum der rechnungsstellung
          newcommandpayDateDD.MM.YYYY % Datum der Zahlungsfrist
          newcommandinvoiceReferenceYYYYMMDD-1 % Rechnungsnummer (z.B. 20150122-4)
          newcommandinvoiceSalutationSehr geehrte Damen und Herren, % die Anrede
          newcommandinvoiceTextFür die von mir erbrachte Leistung erhalten sie
          hiermit die Rechnung. Bitte zahlen Sie den unten aufgeführten Gesamtbetrag
          unter Angabe der Rechnungsnummer (invoiceReference) bis
          zum payDate auf das angegebene Konto ein. % Rechnungstext
          newcommandinvoiceEnclosures % encl einfügen
          newcommandinvoiceClosingMit freundlichen Grüßen
          % ################## invoice DATA ##################

          % ################## Customer DATA ##################
          newcommandcustomerCompanyFirma XYZ %ggf. Firma
          newcommandcustomerNameMax Mustermann % Name
          newcommandcustomerStreetRobert-Koch-Str. 12 % Straße
          newcommandcustomerZIP12345 % Postleitzahl
          newcommandcustomerCityMusterstadt % Ort
          % ################## Customer DATA ##################

          setkomavarfromnamesenderName
          setkomavarfromaddresssenderStreet \ senderZIP senderCity
          setkomavarplacesenderCity
          setkomavardateinvoiceDate
          setkomavarfromphonesenderTelephone
          setkomavarfrommobilephonesenderMobilephone
          setkomavarfromemailhrefmailto:senderEmailnolinkurlsenderEmail
          setkomavarsubjectRechnung
          setkomavarlocation
          \[baselineskip] \[baselineskip]
          flushright small vspace1cmRechnungsnummer:
          invoiceReference


          setkomavarfirstheadhfill
          parbox[t][headheight][t]7cm% <================================== 6cm
          footnotesize
          raggedright
          flushright
          color[gray].3%
          begintabularrl
          Anschrift & usekomavarfromname\
          & senderStreet\
          & senderZIP senderCity \
          \
          %Telefon Telefon: ` senderTelephone \
          Mobil & usekomavarfrommobilephone \
          E-Mail & usekomavarfromemail \
          Webseite & normalfontttfamily senderWeb \
          \
          Steuernummer & taxID \
          \
          Institut & accountBankName \
          IBAN & accountIBAN \
          BIC & accountBIC
          endtabular
          %



          begindocument
          beginlettercustomerCompany \ customerName \
          customerStreet \ customerZIP customerCity

          includegraphics[width=0.15textwidth]logo.png
          openinginvoiceSalutation
          invoiceText
          begininvoiceEuro0
          ProjectTitleProjekttitel % <=========================================
          FeeMusterdienstleistung 130.004
          FeeMusterdienstleistung 236.007
          ProjectTitleTagesleistungen % <=========================================
          FeeDayMusterdienstleistung 3360.003

          % Auslagen
          %EBCHotel, 12 Nächte 2400.00 % EBCiHotel, 12 Nächte 2400.00
          %STExpenses

          % Rabatt
          DiscountRabatt 20 % <==============================================
          endinvoice
          ps Im ausgewiesenen Betrag ist gemäß § 19 UStG keine Umsatzsteuer
          enthalten.

          closinginvoiceClosing
          invoiceEnclosures



          endletter
          enddocument


          with the result:



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 27 at 15:07









          KurtKurt

          37.8k847162




          37.8k847162












          • A good answer addressing the original questions. However I note the rebate is applied as simple fixed discount of -20.00 Whereas I would normally in this type of case expect it to alternately be available as say 5% is there an(other) variable (did I miss one) that can be addressed to expand that functionality ?

            – KJO
            Jan 27 at 15:32












          • @KJO You need to add it to the style file or your preamble by your own.

            – Kurt
            Jan 27 at 16:05











          • @kurt not wishing to cloud comments too much, but as I am not good at embedding maths asking is it possible to replace fixed field 20 with something like $subtotal X 5%$

            – KJO
            Jan 27 at 16:14











          • @KJO I looked a little bit on the code. You can for example define a new command DiscountPercent that should do what you want. At last it depends on how the discount has to be calculated, with or without VAT etc.

            – Kurt
            Jan 27 at 23:06











          • Thanks Kurt (I build my own invoices in word and let it do the calcs :-) it was mainly that other users looking at your answer may want to apply percent "off"(er) before VAT

            – KJO
            Jan 27 at 23:57

















          • A good answer addressing the original questions. However I note the rebate is applied as simple fixed discount of -20.00 Whereas I would normally in this type of case expect it to alternately be available as say 5% is there an(other) variable (did I miss one) that can be addressed to expand that functionality ?

            – KJO
            Jan 27 at 15:32












          • @KJO You need to add it to the style file or your preamble by your own.

            – Kurt
            Jan 27 at 16:05











          • @kurt not wishing to cloud comments too much, but as I am not good at embedding maths asking is it possible to replace fixed field 20 with something like $subtotal X 5%$

            – KJO
            Jan 27 at 16:14











          • @KJO I looked a little bit on the code. You can for example define a new command DiscountPercent that should do what you want. At last it depends on how the discount has to be calculated, with or without VAT etc.

            – Kurt
            Jan 27 at 23:06











          • Thanks Kurt (I build my own invoices in word and let it do the calcs :-) it was mainly that other users looking at your answer may want to apply percent "off"(er) before VAT

            – KJO
            Jan 27 at 23:57
















          A good answer addressing the original questions. However I note the rebate is applied as simple fixed discount of -20.00 Whereas I would normally in this type of case expect it to alternately be available as say 5% is there an(other) variable (did I miss one) that can be addressed to expand that functionality ?

          – KJO
          Jan 27 at 15:32






          A good answer addressing the original questions. However I note the rebate is applied as simple fixed discount of -20.00 Whereas I would normally in this type of case expect it to alternately be available as say 5% is there an(other) variable (did I miss one) that can be addressed to expand that functionality ?

          – KJO
          Jan 27 at 15:32














          @KJO You need to add it to the style file or your preamble by your own.

          – Kurt
          Jan 27 at 16:05





          @KJO You need to add it to the style file or your preamble by your own.

          – Kurt
          Jan 27 at 16:05













          @kurt not wishing to cloud comments too much, but as I am not good at embedding maths asking is it possible to replace fixed field 20 with something like $subtotal X 5%$

          – KJO
          Jan 27 at 16:14





          @kurt not wishing to cloud comments too much, but as I am not good at embedding maths asking is it possible to replace fixed field 20 with something like $subtotal X 5%$

          – KJO
          Jan 27 at 16:14













          @KJO I looked a little bit on the code. You can for example define a new command DiscountPercent that should do what you want. At last it depends on how the discount has to be calculated, with or without VAT etc.

          – Kurt
          Jan 27 at 23:06





          @KJO I looked a little bit on the code. You can for example define a new command DiscountPercent that should do what you want. At last it depends on how the discount has to be calculated, with or without VAT etc.

          – Kurt
          Jan 27 at 23:06













          Thanks Kurt (I build my own invoices in word and let it do the calcs :-) it was mainly that other users looking at your answer may want to apply percent "off"(er) before VAT

          – KJO
          Jan 27 at 23:57





          Thanks Kurt (I build my own invoices in word and let it do the calcs :-) it was mainly that other users looking at your answer may want to apply percent "off"(er) before VAT

          – KJO
          Jan 27 at 23:57

















          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%2f472083%2fchange-from-hourly-price-to-daily-price%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 check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?