Created
May 21, 2024 15:41
-
-
Save dennisnissle/1ecec6d17e04ef797a5ba96423ba4392 to your computer and use it in GitHub Desktop.
Use Fremdleistungen § 13b instead of Innergemeinschaftliche Lieferung as lexoffice category
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'storeabill_external_sync_lexoffice_voucher_item_category_id', 'my_child_adjust_lexoffice_category_id', 10, 3 ); | |
function my_child_adjust_lexoffice_category_id( $category, $item, $invoice ) { | |
$categories = array( | |
'reverse_charge' => '9075a4e3-66de-4795-a016-3889feca0d20', | |
'fremdleistungen' => '380a20cb-d04c-426e-b49c-84c22adfa362', | |
); | |
// Only adjust reverse charge category | |
if ( $categories['reverse_charge'] === $category ) { | |
$category = $categories['fremdleistungen']; | |
} | |
return $category; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment