Bug 798998 - Job Report Not Working

GncOptions add support fo GncOptionUIType::JOB
This commit is contained in:
Christopher Lam 2023-07-05 13:24:21 +08:00
parent 59be6f4974
commit d326cca065
2 changed files with 6 additions and 0 deletions

View File

@ -54,6 +54,8 @@ ui_type_to_owner_type(GncOptionUIType ui_type)
return GNC_OWNER_VENDOR;
if (ui_type == GncOptionUIType::EMPLOYEE)
return GNC_OWNER_EMPLOYEE;
if (ui_type == GncOptionUIType::JOB)
return GNC_OWNER_JOB;
std::ostringstream oss;
oss << "UI type " << static_cast<unsigned int>(ui_type) << " could not be converted to owner type\n";
@ -239,6 +241,8 @@ gnc_business_options_gnome_initialize(void)
create_option_widget<GncOptionUIType::OWNER>);
GncOptionUIFactory::set_func(GncOptionUIType::EMPLOYEE,
create_option_widget<GncOptionUIType::OWNER>);
GncOptionUIFactory::set_func(GncOptionUIType::JOB,
create_option_widget<GncOptionUIType::OWNER>);
GncOptionUIFactory::set_func(GncOptionUIType::INVOICE,
create_option_widget<GncOptionUIType::INVOICE>);
GncOptionUIFactory::set_func(GncOptionUIType::TAX_TABLE,

View File

@ -46,6 +46,8 @@ ui_type_to_owner_type(GncOptionUIType ui_type)
return GNC_OWNER_VENDOR;
if (ui_type == GncOptionUIType::EMPLOYEE)
return GNC_OWNER_EMPLOYEE;
if (ui_type == GncOptionUIType::JOB)
return GNC_OWNER_JOB;
return GNC_OWNER_NONE;
}