From f71a457ce3867528fc3fef8b7389839f37a2b01d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 27 Aug 2024 08:28:05 -0400 Subject: [PATCH] Quote bools as strings to reduce cruft in the settings diff --- .../Com/ByWaterSolutions/EdifactEnhanced.pm | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm b/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm index 406f0721..1f2ae818 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/EdifactEnhanced.pm @@ -633,59 +633,59 @@ sub configure { }; my $new_settings = { - lin_use_ean => $cgi->param('lin_use_ean') ? 1 : 0, - lin_use_issn => $cgi->param('lin_use_issn') ? 1 : 0, - lin_use_isbn => $cgi->param('lin_use_isbn') ? 1 : 0, - lin_force_first_isbn => $cgi->param('lin_force_first_isbn') ? 1 : 0, - lin_use_invalid_isbn13 => $cgi->param('lin_use_invalid_isbn13') ? 1 : 0, - lin_use_invalid_isbn_any => $cgi->param('lin_use_invalid_isbn_any') ? 1 : 0, - lin_use_upc => $cgi->param('lin_use_upc') ? 1 : 0, - lin_use_product_id => $cgi->param('lin_use_product_id') ? 1 : 0, - pia_send_lin => $cgi->param('pia_send_lin') ? 1 : 0, - pia_use_ean => $cgi->param('pia_use_ean') ? 1 : 0, - pia_use_issn => $cgi->param('pia_use_issn') ? 1 : 0, - pia_use_isbn10 => $cgi->param('pia_use_isbn10') ? 1 : 0, - pia_use_isbn13 => $cgi->param('pia_use_isbn13') ? 1 : 0, - pia_use_upc => $cgi->param('pia_use_upc') ? 1 : 0, - pia_use_product_id => $cgi->param('pia_use_product_id') ? 1 : 0, - send_basketname => $cgi->param('send_basketname') ? 1 : 0, - send_rff_bfn => $cgi->param('send_rff_bfn') ? 1 : 0, - send_rff_bfn_biblionumber => $cgi->param('send_rff_bfn_biblionumber') ? 1 : 0, - gir_disable => $cgi->param('gir_disable') ? 1 : 0, + lin_use_ean => $cgi->param('lin_use_ean') ? "1" : "0", + lin_use_issn => $cgi->param('lin_use_issn') ? "1" : "0", + lin_use_isbn => $cgi->param('lin_use_isbn') ? "1" : "0", + lin_force_first_isbn => $cgi->param('lin_force_first_isbn') ? "1" : "0", + lin_use_invalid_isbn13 => $cgi->param('lin_use_invalid_isbn13') ? "1" : "0", + lin_use_invalid_isbn_any => $cgi->param('lin_use_invalid_isbn_any') ? "1" : "0", + lin_use_upc => $cgi->param('lin_use_upc') ? "1" : "0", + lin_use_product_id => $cgi->param('lin_use_product_id') ? "1" : "0", + pia_send_lin => $cgi->param('pia_send_lin') ? "1" : "0", + pia_use_ean => $cgi->param('pia_use_ean') ? "1" : "0", + pia_use_issn => $cgi->param('pia_use_issn') ? "1" : "0", + pia_use_isbn10 => $cgi->param('pia_use_isbn10') ? "1" : "0", + pia_use_isbn13 => $cgi->param('pia_use_isbn13') ? "1" : "0", + pia_use_upc => $cgi->param('pia_use_upc') ? "1" : "0", + pia_use_product_id => $cgi->param('pia_use_product_id') ? "1" : "0", + send_basketname => $cgi->param('send_basketname') ? "1" : "0", + send_rff_bfn => $cgi->param('send_rff_bfn') ? "1" : "0", + send_rff_bfn_biblionumber => $cgi->param('send_rff_bfn_biblionumber') ? "1" : "0", + gir_disable => $cgi->param('gir_disable') ? "1" : "0", order_file_suffix => $cgi->param('order_file_suffix') || q{}, invoice_file_suffix => $cgi->param('invoice_file_suffix') || q{}, buyer_san => $cgi->param('buyer_san') || q{}, - buyer_san_use_username => $cgi->param('buyer_san_use_username') ? 1 : 0, - buyer_san_use_library_ean_split_first_part => $cgi->param('buyer_san_use_library_ean_split_first_part') ? 1 : 0, - buyer_san_extract_from_library_ean_description => $cgi->param('buyer_san_extract_from_library_ean_description') ? 1 : 0, + buyer_san_use_username => $cgi->param('buyer_san_use_username') ? "1" : "0", + buyer_san_use_library_ean_split_first_part => $cgi->param('buyer_san_use_library_ean_split_first_part') ? "1" : "0", + buyer_san_extract_from_library_ean_description => $cgi->param('buyer_san_extract_from_library_ean_description') ? "1" : "0", gir_mapping => $cgi->param('gir_mapping') || q{}, gir_value_replacements_map => $cgi->param('gir_value_replacements_map') || q{}, split_gir => $cgi->param('split_gir') || '0', buyer_id_code_qualifier => $cgi->param('buyer_id_code_qualifier') || q{}, - buyer_san_in_header => $cgi->param('buyer_san_in_header') ? 1 : 0, - buyer_san_in_nadby => $cgi->param('buyer_san_in_nadby') ? 1 : 0, - branch_ean_in_header => $cgi->param('branch_ean_in_header') ? 1 : 0, - branch_ean_in_nadby => $cgi->param('branch_ean_in_nadby') ? 1 : 0, - set_bookseller_from_order_basket => $cgi->param('set_bookseller_from_order_basket') ? 1 : 0, - ignore_duplicate_reciepts => $cgi->param('ignore_duplicate_reciepts') ? 1 : 0, - add_tax_to_shipping_costs => $cgi->param('add_tax_to_shipping_costs') ? 1 : 0, - update_pricing_from_vendor_settings => $cgi->param('update_pricing_from_vendor_settings') ? 1 : 0, - ship_budget_from_orderline => $cgi->param('ship_budget_from_orderline') ? 1 : 0, - shipment_charges_alc_dl => $cgi->param('shipment_charges_alc_dl') ? 1 : 0, - shipment_charges_moa_8 => $cgi->param('shipment_charges_moa_8') ? 1 : 0, - shipment_charges_moa_79 => $cgi->param('shipment_charges_moa_79') ? 1 : 0, - shipment_charges_moa_124 => $cgi->param('shipment_charges_moa_124') ? 1 : 0, - shipment_charges_moa_131 => $cgi->param('shipment_charges_moa_131') ? 1 : 0, - shipment_charges_moa_304 => $cgi->param('shipment_charges_moa_304') ? 1 : 0, - close_invoice_on_receipt => $cgi->param('close_invoice_on_receipt') ? 1 : 0, - add_itemnote_on_receipt => $cgi->param('add_itemnote_on_receipt') ? 1 : 0, + buyer_san_in_header => $cgi->param('buyer_san_in_header') ? "1" : "0", + buyer_san_in_nadby => $cgi->param('buyer_san_in_nadby') ? "1" : "0", + branch_ean_in_header => $cgi->param('branch_ean_in_header') ? "1" : "0", + branch_ean_in_nadby => $cgi->param('branch_ean_in_nadby') ? "1" : "0", + set_bookseller_from_order_basket => $cgi->param('set_bookseller_from_order_basket') ? "1" : "0", + ignore_duplicate_reciepts => $cgi->param('ignore_duplicate_reciepts') ? "1" : "0", + add_tax_to_shipping_costs => $cgi->param('add_tax_to_shipping_costs') ? "1" : "0", + update_pricing_from_vendor_settings => $cgi->param('update_pricing_from_vendor_settings') ? "1" : "0", + ship_budget_from_orderline => $cgi->param('ship_budget_from_orderline') ? "1" : "0", + shipment_charges_alc_dl => $cgi->param('shipment_charges_alc_dl') ? "1" : "0", + shipment_charges_moa_8 => $cgi->param('shipment_charges_moa_8') ? "1" : "0", + shipment_charges_moa_79 => $cgi->param('shipment_charges_moa_79') ? "1" : "0", + shipment_charges_moa_124 => $cgi->param('shipment_charges_moa_124') ? "1" : "0", + shipment_charges_moa_131 => $cgi->param('shipment_charges_moa_131') ? "1" : "0", + shipment_charges_moa_304 => $cgi->param('shipment_charges_moa_304') ? "1" : "0", + close_invoice_on_receipt => $cgi->param('close_invoice_on_receipt') ? "1" : "0", + add_itemnote_on_receipt => $cgi->param('add_itemnote_on_receipt') ? "1" : "0", no_update_item_price => $cgi->param('no_update_item_price'), set_nfl_on_receipt => $cgi->param('set_nfl_on_receipt') // q{}, pia_limit => $cgi->param('pia_limit') // 25, lin_use_item_field => $cgi->param('lin_use_item_field') || q{}, lin_use_item_field_qualifier => $cgi->param('lin_use_item_field_qualifier') || q{}, - lin_use_item_field_clear_on_invoice => $cgi->param('lin_use_item_field_clear_on_invoice') ? 1 : 0, - skip_nonmatching_san_suffix => $cgi->param('skip_nonmatching_san_suffix') ? 1 : 0, + lin_use_item_field_clear_on_invoice => $cgi->param('lin_use_item_field_clear_on_invoice') ? "1" : "0", + skip_nonmatching_san_suffix => $cgi->param('skip_nonmatching_san_suffix') ? "1" : "0", shipping_budget_id => $cgi->param('shipping_budget_id') || q{}, };