Skip to content

Commit

Permalink
Merge pull request #14 from IvanKuchin/development
Browse files Browse the repository at this point in the history
bugfix: incorrect reference to secret file
  • Loading branch information
IvanKuchin authored Jun 23, 2021
2 parents 4524154 + bec0135 commit f8be42a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/pd/c_invoice_bt_agency_to_cc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ auto C_Invoice_BT_Agency_To_CC::GenerateDocumentArchive() -> string
bt_printer.SetBT(bt);
bt_printer.SetVariableSet(&invoicing_vars);

bt_printer.xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
bt_printer.xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
bt_printer.SetFilename(filename_xls);
error_message = bt_printer.PrintAsXLS();
if(error_message.length())
Expand Down Expand Up @@ -165,7 +165,7 @@ auto C_Invoice_BT_Agency_To_CC::GenerateDocumentArchive() -> string

if(error_message.empty())
{
invoice_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
invoice_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
invoice_printer->SetFilename(invoice_filename_xls);
error_message = invoice_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -199,7 +199,7 @@ auto C_Invoice_BT_Agency_To_CC::GenerateDocumentArchive() -> string

if(error_message.empty())
{
act_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
act_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
act_printer->SetFilename(act_filename_xls);
error_message = act_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -233,7 +233,7 @@ auto C_Invoice_BT_Agency_To_CC::GenerateDocumentArchive() -> string

if(error_message.empty())
{
vat_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
vat_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
vat_printer->SetFilename(vat_filename_xls);
error_message = vat_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down
8 changes: 4 additions & 4 deletions src/pd/c_invoice_bt_subc_to_agency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ auto C_Invoice_BT_Subc_To_Agency::GenerateDocumentArchive() -> string
bt_printer.SetBT(bt);
bt_printer.SetVariableSet(&invoicing_vars);

bt_printer.xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
bt_printer.xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
bt_printer.SetFilename(filename_xls);
error_message = bt_printer.PrintAsXLS();
if(error_message.length())
Expand Down Expand Up @@ -137,7 +137,7 @@ auto C_Invoice_BT_Subc_To_Agency::GenerateDocumentArchive() -> string

if(error_message.empty())
{
invoice_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
invoice_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
invoice_printer->SetFilename(invoice_filename_xls);
error_message = invoice_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -173,7 +173,7 @@ auto C_Invoice_BT_Subc_To_Agency::GenerateDocumentArchive() -> string

if(error_message.empty())
{
act_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
act_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
act_printer->SetFilename(act_filename_xls);
error_message = act_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -210,7 +210,7 @@ auto C_Invoice_BT_Subc_To_Agency::GenerateDocumentArchive() -> string

if(error_message.empty())
{
vat_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
vat_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
vat_printer->SetFilename(vat_filename_xls);
error_message = vat_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down
8 changes: 4 additions & 4 deletions src/pd/c_invoice_service_agency_to_cc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ auto C_Invoice_Service_Agency_To_CC::GenerateDocumentArchive() -> string
timecard_printer.SetVariableSet(&invoicing_vars);
timecard_printer.SetHolidays(GetHolidaysSet(GetSpellingFormattedDate(timecard.GetDateStart(), "%F"), db));

timecard_printer.xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
timecard_printer.xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
timecard_printer.SetFilename(filename_xls);
error_message = timecard_printer.PrintAsXLS();
if(error_message.length())
Expand Down Expand Up @@ -237,7 +237,7 @@ auto C_Invoice_Service_Agency_To_CC::GenerateDocumentArchive() -> string

if(error_message.empty())
{
invoice_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
invoice_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
invoice_printer->SetFilename(invoice_filename_xls);
error_message = invoice_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -271,7 +271,7 @@ auto C_Invoice_Service_Agency_To_CC::GenerateDocumentArchive() -> string

if(error_message.empty())
{
act_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
act_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
act_printer->SetFilename(act_filename_xls);
error_message = act_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -305,7 +305,7 @@ auto C_Invoice_Service_Agency_To_CC::GenerateDocumentArchive() -> string

if(error_message.empty())
{
vat_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
vat_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
vat_printer->SetFilename(vat_filename_xls);
error_message = vat_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down
8 changes: 4 additions & 4 deletions src/pd/c_invoice_service_subc_to_agency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ auto C_Invoice_Service_Subc_To_Agency::GenerateDocumentArchive() -> string
timecard_printer.SetVariableSet(&invoicing_vars);
timecard_printer.SetHolidays(GetHolidaysSet(GetSpellingFormattedDate(timecard.GetDateStart(), "%F"), db));

timecard_printer.xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
timecard_printer.xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
timecard_printer.SetFilename(filename_xls);
error_message = timecard_printer.PrintAsXLS();
if(error_message.length())
Expand Down Expand Up @@ -191,7 +191,7 @@ auto C_Invoice_Service_Subc_To_Agency::GenerateDocumentArchive() -> string

if(error_message.empty())
{
invoice_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
invoice_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
invoice_printer->SetFilename(invoice_filename_xls);
error_message = invoice_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -226,7 +226,7 @@ auto C_Invoice_Service_Subc_To_Agency::GenerateDocumentArchive() -> string

if(error_message.empty())
{
act_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
act_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
act_printer->SetFilename(act_filename_xls);
error_message = act_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down Expand Up @@ -264,7 +264,7 @@ auto C_Invoice_Service_Subc_To_Agency::GenerateDocumentArchive() -> string

if(error_message.empty())
{
vat_printer->xlSetKey(config->GetFromFile("secret", "XL_USERNAME"), config->GetFromFile("secret", "XL_KEY"));
vat_printer->xlSetKey(config->GetFromFile(SECRET_FILE, "XL_USERNAME"), config->GetFromFile(SECRET_FILE, "XL_KEY"));
vat_printer->SetFilename(vat_filename_xls);
error_message = vat_printer->PrintAsXLS();
if(error_message.empty()) {}
Expand Down

0 comments on commit f8be42a

Please sign in to comment.