Adding support for all Composite Fields while using the "import" functionality. This includes: - Currency - Address Edit : - Refactored a lot of types in the spreadsheet import module - Renamed a lot of functions, hooks and types that were not self-explanatory enough --------- Co-authored-by: Charles Bochet <charles@twenty.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
14 lines
323 B
TypeScript
14 lines
323 B
TypeScript
export const convertCurrencyAmountToCurrencyMicros = (
|
|
currencyAmount: number,
|
|
) => {
|
|
const currencyAmountAsMicros = currencyAmount * 1000000;
|
|
|
|
return currencyAmountAsMicros;
|
|
};
|
|
|
|
export const convertCurrencyMicrosToCurrencyAmount = (
|
|
currencyAmountMicros: number,
|
|
) => {
|
|
return currencyAmountMicros / 1000000;
|
|
};
|