Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Release
    • Component/s: None
    • Labels:
      None

      Description

      The three-digit numeric code is useful when currency codes need to be understood in countries that do not use Latin scripts and for computerised systems. Where possible the 3 digit numeric code is the same as the numeric country code.

      https://www.iso.org/iso-4217-currency-codes.html
      https://www.currency-iso.org/en/home/tables/table-a1.html

      1. OFBIZ-9409.patch
        37 kB
        Deepak Dixit
      2. OFBIZ-9409.patch
        38 kB
        Deepak Dixit

        Issue Links

          Activity

          Hide
          deepak.dixit Deepak Dixit added a comment -

          For this we need to extend Uom entity and add new field numericCode (or better name)

          Show
          deepak.dixit Deepak Dixit added a comment - For this we need to extend Uom entity and add new field numericCode (or better name)
          Hide
          deepak.dixit Deepak Dixit added a comment - - edited

          While adding numericCode to currency UOM, I found we need to update some old currency UOM as well, as uomId has been modified.
          https://www.currency-iso.org/en/home/tables/table-a1.html
          https://www.currency-iso.org/en/home/amendments.html

          I'll create new ticket to honor currency amendments.

          Here is the short summary
          Following UOM not found

          • Santo Domiongo(CDP)
          • Brazil (BRR)
          • Argentinian Austral(ARA)
          • Andoran peseta(ADP)
          • Maltese Lira (MTL)
          • Mexican Peso (old)(MXP)
          • Peruvian Inti(PEI)
          • Peruvian Sol(PES)
          • Tadzhikistani Ruble(TJR)

          *Following UOM using other currency *
          Used Other

          • ANDORRA == Euro
          • Cyprus Pound(CYP) == Euro
          • Ecuador Sucre(ECS) = USD
          • Estonian Krone(EEK) = EURO
          • Lithuanian Lita(LTL) == EURO
          • Latvian Lat(LVL) == EURO
          • Timor Escudo(TPE) == US Dollor

          Following UOM has been changed

          Old New
          Belorussian Ruble(BYR) Belarusian Ruble(BYN)
          Bosnia-Herzogovinian Dinar(BAD) Convertible Mark(BAM)
          Azerbaijan Manat (AZM) Azerbaijan Manat(AZN)
          Angolan Kwanza (AOK) Kwanza (AOA)
          Afghani (AFA) Afghani(AFN)
          Dominican Republic Peso(DRP) Dominican Peso (DOP)
          Ghanian Cedi(GHC) Ghana Cedi(GHS)
          Guinea Peso(GWP) Guinean Franc(GNF)
          Kirghizstan Som(KIS) KYRGYZSTAN Som (KGS)
          Madagascan Franc(MGF) Malagasy Ariary(MGA)
          Mozambique Metical(MZM) Mozambique Metical(MZN)
          Nicaragua (NIC) Cordoba Oro (NIO)
          New Israeli Shekel(NIS) New Israeli Sheqel (ILS)
          Poland(PLZ) Zloty (PLN)
          Romanian Leu(ROL) Romanian Leu(RON)
          Russian Rouble(RUR) Russian Ruble(RUB)
          Sudanese Pound(SDP) Sudanese Pound(SDG)
          Peru (SOL) Sol (PEN)
          Surinam Guilder(SRG) Surinam Dollar (SRD)
          Turkmenistani Manat(TMM) Turkmenistan New Manat(TMT)
          Uganda Shilling(UGS) Uganda Shilling(UGX)
          Uruguayan New Peso(UYP) Uruguay Peso en Unidades Indexadas (URUIURUI)(UYI)
          Venezuelan Bolivar(VEB) Bolívar(VEF)
          Zambian Kwacha(ZMK) Zambian Kwacha(ZMW)
          Zimbabwean Dollar(ZWD) Zimbabwe Dollar(ZWL)
          Georgian Kupon (GEK) GEORGIA Lari (GEL)
          Show
          deepak.dixit Deepak Dixit added a comment - - edited While adding numericCode to currency UOM, I found we need to update some old currency UOM as well, as uomId has been modified. https://www.currency-iso.org/en/home/tables/table-a1.html https://www.currency-iso.org/en/home/amendments.html I'll create new ticket to honor currency amendments. Here is the short summary Following UOM not found Santo Domiongo(CDP) Brazil (BRR) Argentinian Austral(ARA) Andoran peseta(ADP) Maltese Lira (MTL) Mexican Peso (old)(MXP) Peruvian Inti(PEI) Peruvian Sol(PES) Tadzhikistani Ruble(TJR) *Following UOM using other currency * Used Other ANDORRA == Euro Cyprus Pound(CYP) == Euro Ecuador Sucre(ECS) = USD Estonian Krone(EEK) = EURO Lithuanian Lita(LTL) == EURO Latvian Lat(LVL) == EURO Timor Escudo(TPE) == US Dollor Following UOM has been changed Old New Belorussian Ruble(BYR) Belarusian Ruble(BYN) Bosnia-Herzogovinian Dinar(BAD) Convertible Mark(BAM) Azerbaijan Manat (AZM) Azerbaijan Manat(AZN) Angolan Kwanza (AOK) Kwanza (AOA) Afghani (AFA) Afghani(AFN) Dominican Republic Peso(DRP) Dominican Peso (DOP) Ghanian Cedi(GHC) Ghana Cedi(GHS) Guinea Peso(GWP) Guinean Franc(GNF) Kirghizstan Som(KIS) KYRGYZSTAN Som (KGS) Madagascan Franc(MGF) Malagasy Ariary(MGA) Mozambique Metical(MZM) Mozambique Metical(MZN) Nicaragua (NIC) Cordoba Oro (NIO) New Israeli Shekel(NIS) New Israeli Sheqel (ILS) Poland(PLZ) Zloty (PLN) Romanian Leu(ROL) Romanian Leu(RON) Russian Rouble(RUR) Russian Ruble(RUB) Sudanese Pound(SDP) Sudanese Pound(SDG) Peru (SOL) Sol (PEN) Surinam Guilder(SRG) Surinam Dollar (SRD) Turkmenistani Manat(TMM) Turkmenistan New Manat(TMT) Uganda Shilling(UGS) Uganda Shilling(UGX) Uruguayan New Peso(UYP) Uruguay Peso en Unidades Indexadas (URUIURUI)(UYI) Venezuelan Bolivar(VEB) Bolívar(VEF) Zambian Kwacha(ZMK) Zambian Kwacha(ZMW) Zimbabwean Dollar(ZWD) Zimbabwe Dollar(ZWL) Georgian Kupon (GEK) GEORGIA Lari (GEL)
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Here is the patch for numericCode field for currency UOM.

          Show
          deepak.dixit Deepak Dixit added a comment - Here is the patch for numericCode field for currency UOM.
          Hide
          pfm.smits Pierre Smits added a comment -

          Hi Deepak Dixit,

          I reviewed your patch file.

          Maybe you should consider changing the field type for the numericCode field. The 'short-varchar' field type also allows alpha numeric entries (and in the case of PostgreSQL up to 60 characters). I suspect that also applies for other RDBMSes.

          Best regards,

          Pierre

          Show
          pfm.smits Pierre Smits added a comment - Hi Deepak Dixit , I reviewed your patch file. Maybe you should consider changing the field type for the numericCode field. The 'short-varchar' field type also allows alpha numeric entries (and in the case of PostgreSQL up to 60 characters). I suspect that also applies for other RDBMSes. Best regards, Pierre
          Hide
          deepak.dixit Deepak Dixit added a comment - - edited

          Thanks Pierre for review, I took reference from geo.geoSecCode that store numericCode value for Geo

          I think we can use numeric as field type for this case.

          Show
          deepak.dixit Deepak Dixit added a comment - - edited Thanks Pierre for review, I took reference from geo.geoSecCode that store numericCode value for Geo I think we can use numeric as field type for this case.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Pierre,

          Why would you want to use the 'short-varchar' field type when it's only a 3 digits code?

          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Pierre, Why would you want to use the 'short-varchar' field type when it's only a 3 digits code?
          Hide
          mbrohl Michael Brohl added a comment -

          Jacques, seems to be a misunderstanding: the patch already contains short-varchar as type for the numeric field, I think Pierre suggested to change this to a field type which only allows numbers.
          I second this.

          Show
          mbrohl Michael Brohl added a comment - Jacques, seems to be a misunderstanding: the patch already contains short-varchar as type for the numeric field, I think Pierre suggested to change this to a field type which only allows numbers. I second this.
          Hide
          mbrohl Michael Brohl added a comment -

          Hi Deepak Dixit,

          +1 for your patch with a change to use numeric field type for the numericCode field.

          Show
          mbrohl Michael Brohl added a comment - Hi Deepak Dixit , +1 for your patch with a change to use numeric field type for the numericCode field.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Michael,

          Ah, indeed, I did not look down to the end of the patch, and thought the numericCode field type was already numeric
          + 1 for numeric type for numericCode field

          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Michael, Ah, indeed, I did not look down to the end of the patch, and thought the numericCode field type was already numeric + 1 for numeric type for numericCode field
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Here is the patch with fieldtype update for numeericCode,

          Show
          deepak.dixit Deepak Dixit added a comment - Here is the patch with fieldtype update for numeericCode,
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Thanks Michael Brohl and Jacques Le Roux for review and suggestion.

          This has been committed at ofbiz-framework trunk r#1798907

          Show
          deepak.dixit Deepak Dixit added a comment - Thanks Michael Brohl and Jacques Le Roux for review and suggestion. This has been committed at ofbiz-framework trunk r#1798907
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Created OFBIZ-9413 for currency uom update.

          Show
          deepak.dixit Deepak Dixit added a comment - Created OFBIZ-9413 for currency uom update.

            People

            • Assignee:
              deepak.dixit Deepak Dixit
              Reporter:
              deepak.dixit Deepak Dixit
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development