From 57cfcfda0cd8dd9d7cb71cf0fc420fa8c98c78bf Mon Sep 17 00:00:00 2001 From: Alda Vigdis Skarphedinsdottir Date: Mon, 14 Oct 2024 15:07:04 +0200 Subject: [PATCH] Fixing a bug whereast the removal of the credit invoice option cause a 500 error (#201) --- js/admin.js | 1 - src/Rest/Settings.php | 4 ---- 2 files changed, 5 deletions(-) diff --git a/js/admin.js b/js/admin.js index 2a402f0..fd3a869 100644 --- a/js/admin.js +++ b/js/admin.js @@ -87,7 +87,6 @@ class NineteenEightyWoo { make_invoice_if_kennitala_is_set: Boolean( formData.get( 'make_invoice_if_kennitala_is_set' ) ), make_invoice_if_kennitala_is_missing: Boolean( formData.get( 'make_invoice_if_kennitala_is_missing' ) ), email_invoice: Boolean( formData.get( 'email_invoice' ) ), - make_credit_invoice: Boolean( formData.get( 'make_credit_invoice' ) ), domestic_customer_ledger_code: formData.get( 'domestic_customer_ledger_code' ), international_customer_ledger_code: formData.get( 'international_customer_ledger_code' ), use_attribute_description: Boolean( formData.get( 'use_attribute_description' ) ), diff --git a/src/Rest/Settings.php b/src/Rest/Settings.php index 39630c9..8957082 100644 --- a/src/Rest/Settings.php +++ b/src/Rest/Settings.php @@ -186,10 +186,6 @@ public static function rest_api_callback( ); } - if ( property_exists( $rest_json, 'make_credit_invoice' ) ) { - Config::set_make_credit_invoice( $rest_json->make_credit_invoice ); - } - if ( property_exists( $rest_json, 'make_invoice_if_kennitala_is_set' ) ) { Config::set_make_invoice_if_kennitala_is_set( $rest_json->make_invoice_if_kennitala_is_set