Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Tax on Admin Commission
- This topic has 4 replies, 2 voices, and was last updated 5 years, 1 month ago by WCFM Forum.
- AuthorPosts
- September 29, 2019 at 12:53 am #84302xyz.muraliParticipant
Hi, Currently there is a feature for adding tax on vendor commission. Is there a similar option to add tax on admin commission to be deducted from vendor payout?
As per Indian GST, Admins of marketplace collect Commission and tax (GST) of 18% on this commission has to be deducted from vendor payout. The commission invoice should show both this Admin commission and the GST on commission separately
Regards,
Murali - September 30, 2019 at 3:23 pm #84515WCFM ForumMember
HI,
Setup “Commission Tax” setting GST 18% and add this code to your site –
add_action( 'wcfmmp_order_item_processed', function( $commission_id, $order_id, $order, $vendor_id, $product_id, $order_item_id, $grosse_total, $total_commission, $is_auto_withdrawal ) { global $WCFM, $WCFMmp, $wpdb; if( apply_filters( 'wcfm_is_admin_fee_mode', false ) ) { $commission_rule = unserialize( $WCFMmp->wcfmmp_commission->wcfmmp_get_commission_meta( $commission_id, 'commission_rule' ) ); $gross_sale_order = (float) $WCFM->wcfm_vendor_support->wcfm_get_gross_sales_by_vendor( $vendor_id, '', '', $order_id ); $commission_tax = (float) $WCFMmp->wcfmmp_commission->wcfmmp_get_commission_meta( $commission_id, 'commission_tax' ); $total_commission += $commission_tax; $admin_fee = (float) $gross_sale_order - (float) $total_commission; if( isset( $commission_rule['tax_enable'] ) && ( $commission_rule['tax_enable'] == 'yes' ) ) { $commission_tax = $admin_fee * ( (float)$commission_rule['tax_percent'] / 100 ); $total_commission -= (float) $commission_tax; $WCFMmp->wcfmmp_commission->wcfmmp_delete_commission_meta( $commission_id, 'commission_tax' ); $WCFMmp->wcfmmp_commission->wcfmmp_update_commission_meta( $commission_id, 'commission_tax', round($commission_tax, 2) ); $wpdb->update("{$wpdb->prefix}wcfm_marketplace_orders", array('total_commission' => $total_commission), array('ID' => $commission_id), array('%s'), array('%d')); } } }, 50, 9 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- October 2, 2019 at 4:43 pm #84790xyz.muraliParticipant
Appreciate your response. I also have to add another tax TCS to be deducted from seller payment on top of GST on commission.
Please attached image for the complete calculation of commission and the setting i have in the WCFM.I should basically raise two invoices for every sale.
1. To Buyer with the order value (ordered items value + tax for items + shipping including shipping tax),
2. To Seller for Admin Commission (order value – Commission on order value – 18% tax on commission – 1% TCS on ordered items value)Will I be able to achieve it?
Attachments:
You must be logged in to view attached files. - October 3, 2019 at 5:54 pm #84922xyz.muraliParticipant
Can someone help here please….
- October 11, 2019 at 10:20 am #86178WCFM ForumMember
Code given at wordpress.org forum topic.
- AuthorPosts
- The topic ‘Tax on Admin Commission’ is closed to new replies.