static void gnc_plugin_business_cmd_employee_new_expense_voucher (GtkAction *action, GncMainWindowActionData *mw) { GncPluginBusiness *plugin; GncPluginBusinessPrivate *priv; g_return_if_fail (mw != NULL); g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data)); plugin = GNC_PLUGIN_BUSINESS (mw->data); priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin); last_window = mw->window; gnc_ui_invoice_new (GTK_WINDOW (mw->window), priv->last_employee, gnc_get_current_book ()); }
static void gnc_plugin_business_cmd_vendor_new_bill (GtkAction *action, GncMainWindowActionData *mw) { GncPluginBusiness *plugin; GncPluginBusinessPrivate *priv; g_return_if_fail (mw != NULL); g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data)); plugin = GNC_PLUGIN_BUSINESS (mw->data); priv = GNC_PLUGIN_BUSINESS_GET_PRIVATE (plugin); last_window = mw->window; gnc_ui_invoice_new (priv->last_vendor, gnc_get_current_book()); }
static void gnc_plugin_page_owner_tree_cmd_new_invoice (GtkAction *action, GncPluginPageOwnerTree *page) { GncPluginPageOwnerTreePrivate *priv; GncOwner current_owner; ENTER("action %p, page %p", action, page); priv = GNC_PLUGIN_PAGE_OWNER_TREE_GET_PRIVATE(page); switch (priv->owner_type) { case GNC_OWNER_NONE : case GNC_OWNER_UNDEFINED : gncOwnerInitUndefined(¤t_owner, NULL); break; case GNC_OWNER_CUSTOMER : { gncOwnerInitCustomer(¤t_owner, gncOwnerGetCustomer(gnc_plugin_page_owner_tree_get_current_owner (page)) ); break; } case GNC_OWNER_JOB : { gncOwnerInitJob(¤t_owner, gncOwnerGetJob(gnc_plugin_page_owner_tree_get_current_owner (page)) ); break; } case GNC_OWNER_VENDOR : { gncOwnerInitVendor(¤t_owner, gncOwnerGetVendor(gnc_plugin_page_owner_tree_get_current_owner (page)) ); break; } case GNC_OWNER_EMPLOYEE : { gncOwnerInitEmployee(¤t_owner, gncOwnerGetEmployee(gnc_plugin_page_owner_tree_get_current_owner (page)) ); break; } } if (gncOwnerGetType(¤t_owner) != GNC_OWNER_UNDEFINED) gnc_ui_invoice_new (¤t_owner, gnc_get_current_book()); LEAVE(" "); }