Skip to main content

Function: updateFertilizerFromCatalogue()

updateFertilizerFromCatalogue(fdm, principal_id, b_id_farm, p_id_catalogue, properties): Promise<void>

Defined in: fdm-core/src/fertilizer.ts:357

Alpha

Updates an existing fertilizer in the catalogue of a farm.

Parameters

fdm

any

The FDM instance providing the connection to the database. The instance can be created with createFdmServer.

principal_id

any

The ID of the principal making the request.

b_id_farm

any

The ID of the farm.

p_id_catalogue

any

The ID of the fertilizer in the catalogue to update

properties

Partial<{ p_a: any; p_as_rt: any; p_b_rt: any; p_c_fr: any; p_c_if: any; p_c_of: any; p_c_rt: any; p_ca_rt: any; p_cd_rt: any; p_cl_rt: any; p_cn_of: any; p_co_rt: any; p_cr_rt: any; p_cr_vi: any; p_cu_rt: any; p_density: any; p_description: any; p_dm: any; p_eoc: any; p_eom: any; p_fe_rt: any; p_hc: any; p_hg_rt: any; p_k_rt: any; p_mg_rt: any; p_mn_rt: any; p_mo_rt: any; p_n_if: any; p_n_of: any; p_n_rt: any; p_n_wc: any; p_na_rt: any; p_name_en: any; p_name_nl: any; p_ne: any; p_ni_rt: any; p_om: any; p_p_rt: any; p_pb_rt: any; p_s_rt: any; p_s_wc: any; p_si_rt: any; p_type_compost: any; p_type_manure: any; p_type_mineral: any; p_zn_rt: any; }>

The properties of the fertilizer to update.

Returns

Promise<void>

A Promise that resolves when the fertilizer has been updated.

Throws

If updating the fertilizer fails.