commit 8d0eaf7af1155f69039d692b7ef56d668428bd97 Author: Marius Mutu Date: Wed Aug 13 22:47:45 2025 +0300 commit initial diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fee8d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.env +efactura-generator/error_log +efactura-generator/temp/ +efactura-generator/config.json +efactura-generator/php.ini +Thumbs.db +*.zip +.svn \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..e69de29 diff --git a/blank.htm b/blank.htm new file mode 100644 index 0000000..e69de29 diff --git a/chatbot.html b/chatbot.html new file mode 100644 index 0000000..cd7782f --- /dev/null +++ b/chatbot.html @@ -0,0 +1,195 @@ + + + + + RomFast - Contact + + + + + + + + + \ No newline at end of file diff --git a/chatbot_maria.html b/chatbot_maria.html new file mode 100644 index 0000000..2e1bd08 --- /dev/null +++ b/chatbot_maria.html @@ -0,0 +1,842 @@ + + + + + + RomFast - Contact + + + + + + + + \ No newline at end of file diff --git a/chatbot_maria2.html b/chatbot_maria2.html new file mode 100644 index 0000000..f8b6bc4 --- /dev/null +++ b/chatbot_maria2.html @@ -0,0 +1,1013 @@ + + + + + + RomFast - Contact + + + + + + + + \ No newline at end of file diff --git a/demo.html b/demo.html new file mode 100644 index 0000000..b6a427d --- /dev/null +++ b/demo.html @@ -0,0 +1,218 @@ + + + + + + Demo Stil - Romfast + + + + + + + + +
+ + +
+ +
+ + +
+ +
+

Titlu de Sectiune (H2)

+

Acesta este un paragraf de text care descrie continutul sectiunii. Include un link de exemplu pentru a demonstra stilul. Textul este clar, lizibil si bine spatiat pentru o experienta de citire placuta.

+

Sub-titlu (H3)

+

Mai multe detalii pot fi adaugate aici, folosind elemente de text standard. Stilul este consistent pe intregul site.

+
    +
  • Lista cu puncte 1
  • +
  • Lista cu puncte 2
  • +
  • Lista cu puncte 3
  • +
+
+ + +
+

Servicii Principale

+
+
+
+
+
Serviciul 1
+

Descrierea pe scurt a primului serviciu oferit. Cardurile sunt o metoda excelenta de a organiza continutul.

+ Detalii +
+
+
+
+
+
+
Serviciul 2
+

Descrierea celui de-al doilea serviciu. Layout-ul pe grid se adapteaza automat pe dispozitive mobile.

+ Detalii +
+
+
+
+
+
+
Serviciul 3
+

Al treilea serviciu important. Stilul cardurilor este curat si modern, concentrandu-se pe lizibilitate.

+ Detalii +
+
+
+
+
+ + +
+

Galerie de Imagini

+
+
+ ROA +
+
+ Contafin +
+
+ ROA Auto +
+
+
+ + +
+

Formular de Contact

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + +
+ + + + + + + +
+ + diff --git a/efactura-generator/.htaccess b/efactura-generator/.htaccess new file mode 100644 index 0000000..010c610 --- /dev/null +++ b/efactura-generator/.htaccess @@ -0,0 +1,4 @@ + + Order Allow,Deny + Allow from all + diff --git a/efactura-generator/CHANGELOG.md b/efactura-generator/CHANGELOG.md new file mode 100644 index 0000000..54028cb --- /dev/null +++ b/efactura-generator/CHANGELOG.md @@ -0,0 +1,35 @@ +# Changelog + +## 0.9-beta-4 - 07.02.2025 + +### Bugfixes +- Fixed: Al doilea tag TaxTotal se generează doar când valuta documentului diferă de valuta TVA. + +## 0.9-beta-3 - 14.01.2025 + +### Bugfixes +- Fixed: Discounturile de pe articole nu se mai cumulează în discount global pe factură. + +### New Features +- Added: Se completează valoare reducere și cod reducere pe fiecare articol. + +## 0.9-beta-2 - 07.01.2025 + +### Bugfixes +- Fixed: Selecția judet București și afișare oraș. + +### New Features +- Added: Se completează codul și motivul scutirii în secțiunea "Defalcare TVA" pentru articole cu Tip TVA "E" Neimpozabil. +- Added: S-a tratat cazul în care furnizorul nu este plătitor de TVA (codul fiscal nu are atributul fiscal "RO"). +- Added: Citire din xml coduri identificare articole (vânzător, cumpărător, cod de bare, CPV, NC8, vamal). +- Added: Editare, adăugare, ștergere coduri identificare articole. + +### Modifications +- Modified: Afișare responsive pentru ecrane de diferite dimensiuni. + +### TODO +- Implement: citire și editare referință factura originală pentru factura storno. +- Implement: citire și editare modalități de plată. + +## 0.9-beta-1 - 06.01.2025 +- Initial beta release. diff --git a/efactura-generator/LICENSE.md b/efactura-generator/LICENSE.md new file mode 100644 index 0000000..46ac578 --- /dev/null +++ b/efactura-generator/LICENSE.md @@ -0,0 +1,663 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + +Copyright (C) 2025 Romfast SRL + +Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/efactura-generator/README.md b/efactura-generator/README.md new file mode 100644 index 0000000..5abf75f --- /dev/null +++ b/efactura-generator/README.md @@ -0,0 +1,61 @@ +# eFactura Editor / Editor Facturi Electronice + +## Demo +https://romfast.github.io/efactura-generator/ + +## Overview / Prezentare +Romanian electronic invoice (eFactura) editor - loads XML, allows editing, printing invoices and generates new XML files. + +Editor pentru facturi electronice (eFactura) - încarcă fișiere XML, permite editarea, printarea facturilor și generează fișiere XML noi. + +![Factura 1](screenshot1.jpg) +![Factura 2](screenshot2.jpg) +![Factura 3](screenshot3.jpg) + +## Installation & Usage / Instalare & Utilizare + +### Option 1: Web Server / Opțiunea 1: Server Web +- Copy all project files to your web server maintaining the directory structure. +- Access through your web server URL. +- Use "Printează" button to print the invoice. + +- Copiați toate fișierele pe server păstrând structura directoarelor. +- Accesați prin URL-ul serverului. +- Folosiți butonul "Printează" pentru a printa factura. + +### Option 2: Local Development / Opțiunea 2: Dezvoltare Locală +1. Install Node.js / Instalați Node.js +2. Clone/download repository / Clonați/descărcați repository-ul +3. Run / Rulați: `node server.js` +4. Open / Deschideți: http://localhost:3000 + +## Project Structure / Structura Proiect +``` +project/ +├── index.html +├── styles/ +│ ├── main.css +├── js/ +│ ├── script.js +│ ├── formatter.js +│ └── print.js +├── templates/ +│ └── print.html +└── server.js +``` + +## License / Licență +AGPL-3.0-or-later + +If you use this software, even as a web service, you must: +1. Give credit to the original project +2. Share all your modifications +3. Use the same AGPL-3 license + +Dacă folosiți acest software, chiar și ca serviciu web, trebuie să: +1. Menționați proiectul original +2. Partajați toate modificările făcute +3. Folosiți aceeași licență AGPL-3 + +## Changelog +[Istoric modificări](CHANGELOG.md) \ No newline at end of file diff --git a/efactura-generator/favicon.ico b/efactura-generator/favicon.ico new file mode 100644 index 0000000..2242b3a Binary files /dev/null and b/efactura-generator/favicon.ico differ diff --git a/efactura-generator/index.html b/efactura-generator/index.html new file mode 100644 index 0000000..4eedc24 --- /dev/null +++ b/efactura-generator/index.html @@ -0,0 +1,242 @@ + + + + + + Editor Factură Electronică + + + + + + +
+
+
+

Editor eFactura

+
Romfast SRL
+
+
+ + + + +
+
+ +
+ +
+ +
+

Detalii Factură

+
+
+ + +
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ + +
+
+ + +
+
+
+ + +
+

Detalii Furnizor

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

Detalii Client

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+

Text Adițional

+
+ +
0/900 caractere
+
+
+ + +
+

+ Reduceri și Taxe Suplimentare + +

+
+ + +
+

+ Articole Factură + +

+
+ + +
+
+ Subtotal: + 0.00 +
+
+ Total Reduceri: + 0.00 +
+
+ Total Taxe: + 0.00 +
+
+ Valoare Netă: + 0.00 +
+ + +
+

Defalcare TVA

+
+ +
+
+ Total TVA: + 0.00 +
+
+
+ +
+ Total: + 0.00 +
+
+ +
+
+
+ + +
+ + + + + + + diff --git a/efactura-generator/info.php b/efactura-generator/info.php new file mode 100644 index 0000000..d2b25e4 --- /dev/null +++ b/efactura-generator/info.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/efactura-generator/js/formatter.js b/efactura-generator/js/formatter.js new file mode 100644 index 0000000..bd15bc7 --- /dev/null +++ b/efactura-generator/js/formatter.js @@ -0,0 +1,71 @@ +export class InvoiceFormatter { + constructor() { + this.locale = navigator.language; + + this.currencyFormatter = new Intl.NumberFormat(this.locale, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + useGrouping: true + }); + + this.quantityFormatter = new Intl.NumberFormat(this.locale, { + minimumFractionDigits: 3, + maximumFractionDigits: 3, + useGrouping: true + }); + + this.numberFormatter = new Intl.NumberFormat(this.locale, { + minimumFractionDigits: 4, + maximumFractionDigits: 4, + useGrouping: true + }); + } + + formatCurrency(value) { + const numValue = parseFloat(value); + return isNaN(numValue) ? '0,00' : this.currencyFormatter.format(numValue); + } + + formatQuantity(value) { + const numValue = parseFloat(value); + return isNaN(numValue) ? '0,000' : this.quantityFormatter.format(numValue); + } + + formatNumber(value) { + const numValue = parseFloat(value); + return isNaN(numValue) ? '0,0000' : this.numberFormatter.format(numValue); + } + + parseCurrency(value) { + if (typeof value !== 'string') { + value = value.toString(); + } + // Remove all non-digit characters except decimal and minus + const normalized = value.replace(/[^\d\-.,]/g, '') + // Replace thousands separator + .replace(/[.,](?=.*[.,])/g, '') + // Last dot/comma is decimal separator + .replace(/[.,]/, '.'); + return parseFloat(normalized) || 0; + } + + parseQuantity(value) { + if (typeof value !== 'string') { + value = value.toString(); + } + const normalized = value.replace(/[^\d\-.,]/g, '') + .replace(/[.,](?=.*[.,])/g, '') + .replace(/[.,]/, '.'); + return parseFloat(normalized) || 0; + } + + parseNumber(value) { + if (typeof value !== 'string') { + value = value.toString(); + } + const normalized = value.replace(/[^\d\-.,]/g, '') + .replace(/[.,](?=.*[.,])/g, '') + .replace(/[.,]/, '.'); + return parseFloat(normalized) || 0; + } +} \ No newline at end of file diff --git a/efactura-generator/js/print.js b/efactura-generator/js/print.js new file mode 100644 index 0000000..c33e8b2 --- /dev/null +++ b/efactura-generator/js/print.js @@ -0,0 +1,251 @@ +import { InvoiceFormatter } from './formatter.js'; + +export class InvoicePrintHandler { + constructor() { + this.printWindow = null; + this.formatter = new InvoiceFormatter(); + this.templates = { + standard: './templates/print.html', + compact: './templates/print-compact.html' + }; + this.currentTemplate = 'standard'; + } + + setTemplate(templateName) { + if (this.templates[templateName]) { + this.currentTemplate = templateName; + } + } + + collectInvoiceData() { + return { + // Basic details + invoiceNumber: document.querySelector('[name="invoiceNumber"]').value, + issueDate: document.querySelector('[name="issueDate"]').value, + dueDate: document.querySelector('[name="dueDate"]').value, + documentCurrencyCode: document.querySelector('[name="documentCurrencyCode"]').value.toUpperCase() || 'RON', + taxCurrencyCode: document.querySelector('[name="taxCurrencyCode"]').value.toUpperCase(), + exchangeRate: parseFloat(document.querySelector('[name="exchangeRate"]')?.value || 1), + + // Supplier details + supplier: { + name: document.querySelector('[name="supplierName"]').value, + vat: document.querySelector('[name="supplierVAT"]').value, + companyId: document.querySelector('[name="supplierCompanyId"]').value, + address: document.querySelector('[name="supplierAddress"]').value, + city: document.querySelector('[name="supplierCity"]').value, + county: document.querySelector('[name="supplierCountrySubentity"]').value, + country: document.querySelector('[name="supplierCountry"]').value, + phone: document.querySelector('[name="supplierPhone"]').value, + contactName: document.querySelector('[name="supplierContactName"]').value, + email: document.querySelector('[name="supplierEmail"]').value + }, + + // Customer details + customer: { + name: document.querySelector('[name="customerName"]').value, + vat: document.querySelector('[name="customerVAT"]').value, + companyId: document.querySelector('[name="customerCompanyId"]').value, + address: document.querySelector('[name="customerAddress"]').value, + city: document.querySelector('[name="customerCity"]').value, + county: document.querySelector('[name="customerCountrySubentity"]').value, + country: document.querySelector('[name="customerCountry"]').value, + phone: document.querySelector('[name="customerPhone"]').value, + contactName: document.querySelector('[name="customerContactName"]').value, + email: document.querySelector('[name="customerEmail"]').value + }, + + // Line items with formatted values + items: Array.from(document.querySelectorAll('.line-item')).map((item, index) => ({ + number: index + 1, + description: item.querySelector('[name^="description"]').value, + quantity: this.formatter.formatQuantity(item.querySelector('[name^="quantity"]').value), + unit: item.querySelector('[name^="unit"]').value, + price: this.formatter.formatCurrency(item.querySelector('[name^="price"]').value), + vatRate: this.formatter.formatCurrency(item.querySelector('[name^="vatRate"]').value), + totalAmount: this.formatter.formatCurrency( + this.formatter.parseQuantity(item.querySelector('[name^="quantity"]').value) * + this.formatter.parseCurrency(item.querySelector('[name^="price"]').value) + ) + })), + + // Note + note: document.querySelector('[name="invoiceNote"]')?.value, + + // Get totals directly from the display elements + totals: { + subtotal: document.getElementById('subtotal').textContent, + allowances: document.getElementById('totalAllowances').textContent, + charges: document.getElementById('totalCharges').textContent, + netAmount: document.getElementById('netAmount').textContent, + vat: document.getElementById('vat').textContent, + total: document.getElementById('total').textContent + }, + + // VAT Breakdown + vatBreakdown: Array.from(document.querySelectorAll('.vat-row')).map(row => ({ + type: row.querySelector('.vat-type').value, + rate: row.querySelector('.vat-rate').value, + base: row.querySelector('.vat-base').value, + amount: row.querySelector('.vat-amount').value + })) + }; + } + + createPartyHTML(party) { + return ` +

${party.name}

+

CUI: ${party.vat}

+

Nr. Reg. Com.: ${party.companyId}

+

${party.address}

+

${party.city}${party.county ? ', ' + party.county : ''}

+

${party.country}

+ ${party.phone ? `

Tel: ${party.phone}

` : ''} + ${party.contactName ? `

Contact: ${party.contactName}

` : ''} + ${party.email ? `

Email: ${party.email}

` : ''} + `; + } + + getVATTypeLabel(type) { + const labels = { + 'S': 'Standard', + 'AE': 'Taxare Inversă', + 'O': 'Neplătitor TVA', + 'Z': 'Cotă 0%', + 'E': 'Scutit' + }; + return labels[type] || type; + } + + async print() { + try { + // Collect all the data + const invoiceData = this.collectInvoiceData(); + + // Open new window and load the selected print template + this.printWindow = window.open( + this.templates[this.currentTemplate], + '_blank', + 'width=800,height=600' + ); + + // Wait for the window to load + await new Promise(resolve => { + this.printWindow.onload = resolve; + }); + + // Generate QR code + const qrData = { + invoiceNumber: invoiceData.invoiceNumber, + issueDate: invoiceData.issueDate, + supplier: invoiceData.supplier.name, + customer: invoiceData.customer.name, + total: this.formatter.parseCurrency(invoiceData.totals.total) + }; + + const qrElement = this.printWindow.document.getElementById('qrcode'); + if (qrElement) { + new this.printWindow.QRCode(qrElement, { + text: JSON.stringify(qrData), + width: 100, + height: 100, + colorDark: "#2563eb", + colorLight: "#ffffff", + correctLevel: this.printWindow.QRCode.CorrectLevel.L + }); + } + + // Populate the template with data + this.populatePrintWindow(invoiceData); + + // Print the window + this.printWindow.print(); + + // Clean up + this.printWindow.onafterprint = () => { + this.printWindow.close(); + this.printWindow = null; + }; + + } catch (error) { + console.error('Print failed:', error); + if (this.printWindow) { + this.printWindow.close(); + this.printWindow = null; + } + alert('A apărut o eroare la printare. Vă rugăm să încercați din nou.'); + } + } + + populatePrintWindow(data) { + if (!this.printWindow) return; + + const doc = this.printWindow.document; + + // Basic details + doc.getElementById('print-invoice-number').textContent = data.invoiceNumber; + doc.getElementById('print-issue-date').textContent = data.issueDate; + doc.getElementById('print-due-date').textContent = data.dueDate; + doc.getElementById('print-document-currency').textContent = data.documentCurrencyCode; + + // Currency information + const taxCurrencyContainer = doc.getElementById('print-tax-currency-container'); + if (data.taxCurrencyCode && data.taxCurrencyCode !== data.documentCurrencyCode) { + taxCurrencyContainer.style.display = 'block'; + doc.getElementById('print-tax-currency').textContent = data.taxCurrencyCode; + doc.getElementById('print-exchange-rate').textContent = this.formatter.formatNumber(data.exchangeRate); + } + + // Party details + doc.getElementById('print-supplier-details').innerHTML = this.createPartyHTML(data.supplier); + doc.getElementById('print-customer-details').innerHTML = this.createPartyHTML(data.customer); + + // Note + if (data.note) { + const noteSection = doc.getElementById('print-note'); + noteSection.style.display = 'block'; + noteSection.querySelector('div').textContent = data.note; + } + + // Line items - use formatted values from data + doc.getElementById('print-items').innerHTML = data.items.map(item => ` + + ${item.number} + ${item.description} + ${item.unit} + ${item.quantity} + ${item.price} + ${item.vatRate}% + ${item.totalAmount} + + `).join(''); + + // Totals - use values directly from display + doc.getElementById('print-subtotal').textContent = data.totals.subtotal; + doc.getElementById('print-allowances').textContent = data.totals.allowances; + doc.getElementById('print-charges').textContent = data.totals.charges; + doc.getElementById('print-net-amount').textContent = data.totals.netAmount; + doc.getElementById('print-total').textContent = data.totals.total; + + // VAT Breakdown - use values directly from display + doc.getElementById('print-vat-breakdown').innerHTML = data.vatBreakdown.map(vat => ` +
${this.getVATTypeLabel(vat.type)}
+
${vat.rate}%
+
${vat.base}
+
${vat.amount}
+ `).join(''); + + // VAT totals + doc.getElementById('print-vat-currency-main').textContent = data.documentCurrencyCode; + doc.getElementById('print-vat-main').textContent = data.totals.vat; + + const secondaryVatRow = doc.getElementById('print-vat-secondary'); + if (data.taxCurrencyCode && data.taxCurrencyCode !== data.documentCurrencyCode) { + secondaryVatRow.style.display = 'flex'; + doc.getElementById('print-vat-currency-secondary').textContent = data.taxCurrencyCode; + const vatInTaxCurrency = this.formatter.parseCurrency(data.totals.vat) * data.exchangeRate; + doc.getElementById('print-vat-secondary-amount').textContent = + this.formatter.formatCurrency(vatInTaxCurrency); + } + } +} \ No newline at end of file diff --git a/efactura-generator/js/script.js b/efactura-generator/js/script.js new file mode 100644 index 0000000..5e778ca --- /dev/null +++ b/efactura-generator/js/script.js @@ -0,0 +1,3239 @@ +import { InvoiceFormatter } from './formatter.js'; + +// Constants +const XML_NAMESPACES = { + ubl: "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2", + cbc: "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", + cac: "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" +}; + +const VAT_TYPES = { + "S": "Cotă Standard", + "AE": "Taxare Inversă", + "O": "Neplătitor TVA", + "Z": "Cotă 0% TVA", + "E": "Neimpozabil" +}; + +const VAT_EXEMPTION_CODES = { + 'AE': { + code: 'VATEX-EU-AE', + reason: 'Taxare inversa' + }, + 'K': { + code: 'VATEX-EU-IC', + reason: 'Livrare intracomunitara' + }, + 'O': { + code: 'VATEX-EU-O', + reason: 'Neplatitor TVA' + }, + 'E': [ + { + code: '', + reason: 'Scutit' + }, + { + code: 'VATEX-EU-F', + reason: 'Bunuri second hand' + }, + { + code: 'VATEX-EU-D', + reason: 'Regim special agentii de turism' + } + ] +}; + +const UNIT_CODES = new Map([ + ['EA', 'Bucată (EA)'], + ['XPP', 'Bucată (XPP)'], + ['KGM', 'Kilogram (KGM)'], + ['MTR', 'Metri (MTR)'], + ['LTR', 'Litru (LTR)'], + ['H87', 'Bucată (H87)'], + ['MTQ', 'Metri cubi (MTQ)'] +]); + +const ISO_3166_1_CODES = new Set([ + 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', + 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', + 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', + 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', + 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', + 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', + 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', + 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', + 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', + 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', + 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', + 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', + 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', + 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', + 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', + 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', + 'VN', 'VU', 'WF', 'WS', 'XI', 'YE', 'YT', 'ZA', 'ZM', 'ZW' +]); + +const ROMANIAN_COUNTY_CODES = new Set([ + 'RO-AB', 'RO-AG', 'RO-AR', 'RO-B', 'RO-BC', 'RO-BH', 'RO-BN', 'RO-BR', 'RO-BT', 'RO-BV', + 'RO-BZ', 'RO-CJ', 'RO-CL', 'RO-CS', 'RO-CT', 'RO-CV', 'RO-DB', 'RO-DJ', 'RO-GJ', 'RO-GL', + 'RO-GR', 'RO-HD', 'RO-HR', 'RO-IF', 'RO-IL', 'RO-IS', 'RO-MH', 'RO-MM', 'RO-MS', 'RO-NT', + 'RO-OT', 'RO-PH', 'RO-SB', 'RO-SJ', 'RO-SM', 'RO-SV', 'RO-TL', 'RO-TM', 'RO-TR', 'RO-VL', + 'RO-VN', 'RO-VS' +]); + +const CHARGE_REASON_CODES = { + 'TV': 'Cheltuieli de transport', + 'FC': 'Taxe transport', + 'ZZZ': 'Definite reciproc' +}; + +const ALLOWANCE_REASON_CODES = { + '95': 'Reducere', + '41': 'Bonus lucrări în avans', + '42': 'Alt bonus', + '60': 'Reducere volum', + '62': 'Alte reduceri', + '63': 'Reducere producător', + '64': 'Din cauza războiului', + '65': 'Reducere outlet nou', + '66': 'Reducere mostre', + '67': 'Reducere end-of-range', + '68': 'Cost ambalaj returnabil', + '70': 'Reducere Incoterm', + '71': 'Prag vânzări', + '88': 'Suprataxă/deducere materiale', + '100': 'Reducere specială', + '102': 'Termen lung fix', + '103': 'Temporar', + '104': 'Standard', + '105': 'Cifră de afaceri anuală' +}; + +// Structure for item identifications +const IDENTIFICATION_TYPES = { + SELLERS: { + type: 'sellers', + label: 'Cod Furnizor', + xmlTag: 'SellersItemIdentification' + }, + BUYERS: { + type: 'buyers', + label: 'Cod Client', + xmlTag: 'BuyersItemIdentification' + }, + STANDARD: { + type: 'standard', + label: 'Cod Bare', + xmlTag: 'StandardItemIdentification', + schemeID: '0160' + }, + COMMODITY: { + type: 'commodity', + label: 'Cod Clasificare', + xmlTag: 'CommodityClassification', + schemes: [ + { id: 'CV', name: 'Cod Vamal' }, + { id: 'TSP', name: 'Cod CPV' }, + { id: 'STI', name: 'Cod NC8' } + ] + } +}; + +const formatter = new InvoiceFormatter() + +const resolver = { + lookupNamespaceURI: prefix => { + const ns = { + 'cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2', + 'cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2', + 'ubl': 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2' + }; + return ns[prefix] || null; + } +}; + +// Global variables +let currentInvoice = null; +let originalTotals = null; +let vatRates = new Map(); +let manuallyEditedVatRows = new Set(); + +// Initialize event listeners +document.addEventListener('DOMContentLoaded', async function() { + document.getElementById('fileInput').addEventListener('change', handleFileSelect); + initializeUI(); + + if (!currentInvoice) { + currentInvoice = createEmptyInvoice(); + } + + const totalElements = [ + 'subtotal', 'totalAllowances', 'totalCharges', + 'netAmount', 'vat', 'total' + ]; + + totalElements.forEach(elementId => { + const element = document.getElementById(elementId); + setupInlineEditing(element); + }); + + // Add currency code validation + const currencyInputs = document.querySelectorAll('[name="documentCurrencyCode"], [name="taxCurrencyCode"]'); + currencyInputs.forEach(input => { + input.addEventListener('input', function(e) { + // Convert to uppercase + this.value = this.value.toUpperCase(); + // Remove any non-letter characters + this.value = this.value.replace(/[^A-Z]/g, ''); + // Limit to 3 characters + if (this.value.length > 3) { + this.value = this.value.slice(0, 3); + } + }); + }); + + // Make document currency code required + const documentCurrencyInput = document.querySelector('[name="documentCurrencyCode"]'); + if (documentCurrencyInput) { + documentCurrencyInput.required = true; + } + + const supplierVATInput = document.querySelector('[name="supplierVAT"]'); + if (supplierVATInput) { + supplierVATInput.addEventListener('change', function() { + updateAllVATTypes(); + }); + } + + addExchangeRateField(); + + initializeLocationSelectors(); + + // Verifică dacă avem parametru XML în URL + const urlParams = new URLSearchParams(window.location.search); + const xmlFileName = urlParams.get('xml'); + + if (xmlFileName) { + try { + // Încarcă XML-ul din fișierul temporar + const response = await fetch('temp/' + xmlFileName); + if (response.ok) { + const xmlContent = await response.text(); + parseXML(xmlContent); + + // Curăță fișierul temporar + fetch('receiver.php?cleanup=' + xmlFileName) + .catch(error => console.error('Eroare la ștergerea fișierului temporar:', error)); + } + } catch (error) { + console.error('Eroare la încărcarea XML:', error); + } + } +}); + +// Initialize event listeners for existing line items +document.querySelectorAll('.line-item').forEach((item, index) => { + handleLineItemChange(index); +}); + +// Inline editing setup function +function setupInlineEditing(element) { + let originalValue; + + element.addEventListener('click', function() { + this.setAttribute('contenteditable', 'true'); + // Store exact displayed value + originalValue = this.textContent; + this.focus(); + }); + + element.addEventListener('blur', function() { + this.setAttribute('contenteditable', 'false'); + if (this.textContent !== originalValue) { + updateTotals(); + } + }); + + element.addEventListener('keydown', function(event) { + if (event.key === 'Enter') { + event.preventDefault(); + this.blur(); + } + }); +} + +function updateTotalDisplay(elementId, value) { + const element = document.getElementById(elementId); + if (element) { + // Convertim la număr folosind parseFloat pentru a evita probleme de truncare + const numValue = parseFloat(value); + element.textContent = formatter.formatCurrency(numValue); + } +} + +function displayTotals(totals) { + // Actualizează toate totalurile cu formatare + updateTotalDisplay('subtotal', totals.subtotal); + updateTotalDisplay('totalAllowances', totals.allowances); + updateTotalDisplay('totalCharges', totals.charges); + updateTotalDisplay('netAmount', totals.netAmount); + updateTotalDisplay('vat', totals.totalVat); + updateTotalDisplay('total', totals.total); + + // Actualizează defalcarea TVA dacă există + const container = document.getElementById('vatBreakdownRows'); + if (container) { + container.innerHTML = ''; + if (totals.vatBreakdown) { + totals.vatBreakdown.forEach((data, key) => { + const [rate, type] = key.split('-'); + addVATBreakdownRow( + parseFloat(rate), + data.baseAmount, + data.vatAmount, + type + ); + }); + } + } +} + +function updateVATDisplay(row, amount, type = 'amount') { + const input = row.querySelector(`.vat-${type}`); + if (input) { + input.value = formatter.formatCurrency(amount); + } +} + +function validateVATExemption() { + const vatRows = document.querySelectorAll('.vat-row'); + let isValid = true; + + vatRows.forEach(row => { + const vatType = row.querySelector('.vat-type').value; + if (['E', 'K', 'AE', 'O'].includes(vatType)) { + const exemptionCodeInput = row.querySelector('.vat-exemption-code'); + const exemptionReasonInput = row.querySelector('.vat-exemption-reason'); + const exemptionCode = exemptionCodeInput?.value; + const exemptionReason = exemptionReasonInput?.value; + + // Pentru neplătitori de TVA (tip O), verificăm să aibă valorile corecte + if (vatType === 'O') { + if (exemptionCode !== 'VATEX-EU-O') { + isValid = false; + exemptionCodeInput?.classList.add('invalid'); + } + } + // Pentru celelalte tipuri de scutire, trebuie să aibă cel puțin unul dintre câmpuri completat + else if (!exemptionCode && !exemptionReason) { + isValid = false; + exemptionCodeInput?.classList.add('invalid'); + exemptionReasonInput?.classList.add('invalid'); + } else { + exemptionCodeInput?.classList.remove('invalid'); + exemptionReasonInput?.classList.remove('invalid'); + } + } + }); + + return isValid; +} + +function addDynamicVatExemptionCode(vatType, exemptionCode, exemptionReason) { + if (!vatType || !exemptionCode) return; + + if (vatType === 'E') { + // Verifică dacă codul există deja + const exists = VAT_EXEMPTION_CODES.E.some(e => e.code === exemptionCode); + if (!exists) { + VAT_EXEMPTION_CODES.E.push({ + code: exemptionCode, + reason: exemptionReason || exemptionCode + }); + } + } else if (!VAT_EXEMPTION_CODES[vatType]) { + // Adaugă un nou tip de TVA dacă nu există + VAT_EXEMPTION_CODES[vatType] = { + code: exemptionCode, + reason: exemptionReason || exemptionCode + }; + } +} + +function getDisplayValue(elementId) { + const element = document.getElementById(elementId); + return element ? formatter.parseCurrency(element.textContent) : 0; +} + +// Event delegation for dynamic elements +document.addEventListener('click', function(event) { + const target = event.target; + + if (target.matches('.delete-line-item')) { + const lineItem = target.closest('.line-item'); + if (lineItem) { + removeLineItem(parseInt(lineItem.dataset.index)); + } + } + + if (target.matches('.delete-allowance-charge')) { + const charge = target.closest('.allowance-charge'); + if (charge) { + removeAllowanceCharge(parseInt(charge.dataset.index)); + } + } +}); + +// File handling functions +function handleFileSelect(event) { + const file = event.target.files[0]; + if (file) { + const reader = new FileReader(); + reader.onload = function(e) { + const xmlContent = e.target.result; + parseXML(xmlContent); + }; + reader.readAsText(file); + } +} + +function parseXML(xmlContent) { + try { + const parser = new DOMParser(); + const xmlDoc = parser.parseFromString(xmlContent, "text/xml"); + + const parserError = xmlDoc.querySelector('parsererror'); + if (parserError) { + throw new Error('Eroare la parsarea XML: ' + parserError.textContent); + } + + // Extrage și adaugă codurile de scutire din TaxTotal + const taxSubtotals = xmlDoc.querySelectorAll('cac\\:TaxSubtotal, TaxSubtotal'); + taxSubtotals.forEach(subtotal => { + const taxCategory = subtotal.querySelector('cac\\:TaxCategory, TaxCategory'); + if (taxCategory) { + const vatType = getXMLValue(taxCategory, 'cbc\\:ID, ID'); + const exemptionCode = getXMLValue(taxCategory, 'cbc\\:TaxExemptionReasonCode, TaxExemptionReasonCode'); + const exemptionReason = getXMLValue(taxCategory, 'cbc\\:TaxExemptionReason, TaxExemptionReason'); + + if (vatType && exemptionCode) { + addDynamicVatExemptionCode(vatType, exemptionCode, exemptionReason); + } + } + }); + + currentInvoice = xmlDoc; + manuallyEditedVatRows.clear(); + + populateBasicDetails(xmlDoc); + populatePartyDetails(xmlDoc); + populateAllowanceCharges(xmlDoc); + populateLineItems(xmlDoc); + storeOriginalTotals(xmlDoc); + restoreOriginalTotals(); + displayVATBreakdown(xmlDoc); + + } catch (error) { + handleError(error, 'Eroare la parsarea fișierului XML'); + } +} + +// Create allowance charge HTML +function createAllowanceChargeHTML(index, charge) { + return ` +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ `; +} + +function createReasonCodeOptions(isCharge, selectedCode = '') { + const codes = isCharge ? CHARGE_REASON_CODES : ALLOWANCE_REASON_CODES; + return Object.entries(codes) + .map(([code, description]) => + `` + ).join(''); +} + +window.updateReasonCodeOptions = function(index) { + const chargeTypeSelect = document.querySelector(`[name="chargeType${index}"]`); + const reasonCodeSelect = document.querySelector(`[name="chargeReasonCode${index}"]`); + const reasonInput = document.querySelector(`[name="chargeReason${index}"]`); + + const isCharge = chargeTypeSelect.value === 'true'; + reasonCodeSelect.innerHTML = createReasonCodeOptions(isCharge); + + // Update reason text based on selected code + const selectedCode = reasonCodeSelect.value; + const codes = isCharge ? CHARGE_REASON_CODES : ALLOWANCE_REASON_CODES; + reasonInput.value = codes[selectedCode] || ''; +} + +// Create line item HTML +function createLineItemHTML(index, description = '', quantity = '1', price = '0', vatRate = '19', + unitCode = 'EA', vatTypeId = 'S', itemDescription = '', lineDiscount = '0', discountReasonCode = '') { + + return ` +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + +
+ `; +} + +function createLineDiscountReasonOptions(selectedCode = '') { + return Object.entries(ALLOWANCE_REASON_CODES) + .map(([code, description]) => + `` + ).join(''); +} + +// Add VAT breakdown row +function addVATBreakdownRow(rate, baseAmount, vatAmount, vatType = 'S', existingRowId = null, exemptionCode = '', exemptionReason = '') { + const container = document.getElementById('vatBreakdownRows'); + const rowId = existingRowId || `vat-row-${Date.now()}`; + + const rowHtml = ` +
+
+
+ + + + % + + + + +
+
+
+ + +
+
+ + +
+
+ +
+
+ `; + + container.insertAdjacentHTML('beforeend', rowHtml); + + // Add event listener for VAT type changes + const vatTypeSelect = document.querySelector(`#${rowId} .vat-type`); + vatTypeSelect.addEventListener('change', () => { + const exemptionContainer = document.querySelector(`#${rowId} .vat-exemption`); + const newVatType = vatTypeSelect.value; + + if (['E', 'K', 'O', 'AE'].includes(newVatType)) { + exemptionContainer.classList.remove('hidden'); + + // Update exemption code options + const codeSelect = document.querySelector(`#${rowId} .vat-exemption-code`); + codeSelect.innerHTML = generateExemptionCodeOptions(newVatType); + + // Set default values + const defaultExemption = getDefaultExemption(newVatType); + if (defaultExemption) { + codeSelect.value = defaultExemption.code; + document.querySelector(`#${rowId} .vat-exemption-reason`).value = defaultExemption.reason; + } + } else { + exemptionContainer.classList.add('hidden'); + } + }); +} + +function generateExemptionCodeOptions(vatType, selectedCode = '') { + if (vatType === 'E') { + return VAT_EXEMPTION_CODES.E.map(exemption => + `` + ).join(''); + } else if (vatType === 'K' || vatType === 'AE' || vatType === 'O') { + const exemption = VAT_EXEMPTION_CODES[vatType]; + return ``; + } + return ''; +} + +function getDefaultExemption(vatType) { + if (vatType === 'E') { + return VAT_EXEMPTION_CODES.E[0]; + } + return VAT_EXEMPTION_CODES[vatType]; +} + +// Add this to window object +window.updateExemptionReason = function(rowId) { + const row = document.getElementById(rowId); + if (!row) return; + + const vatType = row.querySelector('.vat-type').value; + const codeSelect = row.querySelector('.vat-exemption-code'); + const reasonInput = row.querySelector('.vat-exemption-reason'); + + if (vatType === 'E') { + const selectedExemption = VAT_EXEMPTION_CODES.E.find(e => e.code === codeSelect.value); + if (selectedExemption) { + reasonInput.value = selectedExemption.reason; + } + } else if (vatType === 'K' || vatType === 'AE') { + reasonInput.value = VAT_EXEMPTION_CODES[vatType].reason; + } +}; + +// Toggle optional details +window.toggleOptionalDetails = function(index) { + const optionalDetails = document.getElementById(`optionalDetails${index}`); + const button = optionalDetails.previousElementSibling.querySelector('button'); + + if (optionalDetails.style.display === 'none') { + optionalDetails.style.display = 'block'; + button.innerHTML = '▲ Detalii Suplimentare'; + } else { + optionalDetails.style.display = 'none'; + button.innerHTML = '▼ Detalii Suplimentare'; + } +} + +// Form validation +function validateForm(silent = false) { + let isValid = true; + let firstInvalidField = null; + + // Validare câmpuri existente... + const requiredFields = [ + 'invoiceNumber', + 'issueDate', + 'dueDate', + 'supplierName', + 'supplierVAT', + 'customerName', + ]; + + requiredFields.forEach(fieldName => { + const field = document.querySelector(`[name="${fieldName}"]`); + if (!field || !field.value.trim()) { + field.classList.add('invalid'); + isValid = false; + if (!firstInvalidField) + firstInvalidField = field; + } else { + field.classList.remove('invalid'); + } + }); + + // Adaugă validarea TVA + const vatExemptionValid = validateVATExemption(); + if (!vatExemptionValid) { + isValid = false; + if (!silent) { + alert('Vă rugăm să completați codul și/sau motivul scutirii de TVA pentru toate categoriile care necesită această informație.'); + } + } + + // Restul validărilor existente... + const lineItems = document.querySelectorAll('.line-item'); + if (lineItems.length === 0) { + isValid = false; + if (!silent) { + alert('Este necesară cel puțin o linie în factură'); + } + return false; + } + + lineItems.forEach((item, index) => { + const quantity = parseFloat(document.querySelector(`[name="quantity${index}"]`).value); + const price = parseFloat(document.querySelector(`[name="price${index}"]`).value); + const description = document.querySelector(`[name="description${index}"]`).value; + + if (!description.trim()) { + document.querySelector(`[name="description${index}"]`).classList.add('invalid'); + isValid = false; + } + if (isNaN(quantity)) { + document.querySelector(`[name="quantity${index}"]`).classList.add('invalid'); + isValid = false; + } + if (isNaN(price)) { + document.querySelector(`[name="price${index}"]`).classList.add('invalid'); + isValid = false; + } + }); + + const dateInputs = document.querySelectorAll('.date-input'); + dateInputs.forEach(input => { + if (!validateDateInput(input)) { + isValid = false; + if (!firstInvalidField) firstInvalidField = input; + } + }); + + // Validare curs valutar dacă este cazul + const taxCurrencyCode = document.querySelector('[name="taxCurrencyCode"]').value.trim(); + const documentCurrencyCode = document.querySelector('[name="documentCurrencyCode"]').value.trim(); + + if (taxCurrencyCode && taxCurrencyCode !== documentCurrencyCode) { + const exchangeRate = document.querySelector('[name="exchangeRate"]'); + if (!exchangeRate || !exchangeRate.value || parseFloat(exchangeRate.value) <= 0) { + exchangeRate.classList.add('invalid'); + isValid = false; + if (!firstInvalidField) { + firstInvalidField = exchangeRate; + } + } else { + exchangeRate.classList.remove('invalid'); + } + } + + if (!isValid && !silent) { + if (firstInvalidField) { + firstInvalidField.focus(); + } + alert('Vă rugăm să completați toate câmpurile obligatorii'); + } + + return isValid; +} + +function handleError(error, message) { + console.error(message, error); + alert(`${message}\nVă rugăm să verificați consola pentru detalii.`); +} + +function formatDateToRomanian(date) { + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const year = date.getFullYear(); + return `${day}.${month}.${year}`; +} + +function parseRomanianDate(dateStr) { + const [day, month, year] = dateStr.split('.'); + return `${year}-${month}-${day}`; +} + +function createDatePicker(input, button) { + const picker = new Pikaday({ + field: input, + trigger: button, + format: 'DD.MM.YYYY', + i18n: { + previousMonth: 'Luna anterioară', + nextMonth: 'Luna următoare', + months: ['Ianuarie', 'Februarie', 'Martie', 'Aprilie', 'Mai', 'Iunie', 'Iulie', 'August', 'Septembrie', 'Octombrie', 'Noiembrie', 'Decembrie'], + weekdays: ['Duminică', 'Luni', 'Marți', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], + weekdaysShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'] + }, + firstDay: 1, + onSelect: function(date) { + input.value = formatDateToRomanian(date); + validateDateInput(input); + } + }); + return picker; +} + +function validateDateInput(input) { + const value = input.value; + const regex = /^(\d{2})\.(\d{2})\.(\d{4})$/; + const match = value.match(regex); + + if (match) { + const day = parseInt(match[1]); + const month = parseInt(match[2]); + const year = parseInt(match[3]); + + // Create date object and verify if it's valid + const date = new Date(year, month - 1, day); + if (date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day) { + input.classList.remove('invalid'); + return true; + } + } + + if (value !== '') { + input.classList.add('invalid'); + } + return false; +} + +function restrictDateInput(input) { + input.addEventListener('input', function(e) { + let value = e.target.value; + + // Remove any non-digit characters except dots + value = value.replace(/[^\d.]/g, ''); + + // Auto-add dots after day and month + if (value.length >= 2 && value.charAt(2) !== '.') { + value = value.slice(0, 2) + '.' + value.slice(2); + } + if (value.length >= 5 && value.charAt(5) !== '.') { + value = value.slice(0, 5) + '.' + value.slice(5); + } + + // Restrict to exactly 10 characters (dd.mm.yyyy) + value = value.slice(0, 10); + + e.target.value = value; + }); + + input.addEventListener('blur', function() { + validateDateInput(input); + }); +} + +function createCountryOptions() { + return Array.from(ISO_3166_1_CODES).map(code => + `` + ).join(''); +} + +function createCountyOptions() { + return Array.from(ROMANIAN_COUNTY_CODES).map(code => { + const label = code.replace('RO-', ''); + const counties = { + 'AB': 'Alba', 'AR': 'Arad', 'AG': 'Argeș', 'BC': 'Bacău', 'BH': 'Bihor', + 'BN': 'Bistrița-Năsăud', 'BT': 'Botoșani', 'BV': 'Brașov', 'BR': 'Brăila', + 'B': 'București', 'BZ': 'Buzău', 'CS': 'Caraș-Severin', 'CL': 'Călărași', + 'CJ': 'Cluj', 'CT': 'Constanța', 'CV': 'Covasna', 'DB': 'Dâmbovița', + 'DJ': 'Dolj', 'GL': 'Galați', 'GR': 'Giurgiu', 'GJ': 'Gorj', 'HR': 'Harghita', + 'HD': 'Hunedoara', 'IL': 'Ialomița', 'IS': 'Iași', 'IF': 'Ilfov', + 'MM': 'Maramureș', 'MH': 'Mehedinți', 'MS': 'Mureș', 'NT': 'Neamț', + 'OT': 'Olt', 'PH': 'Prahova', 'SM': 'Satu Mare', 'SJ': 'Sălaj', + 'SB': 'Sibiu', 'SV': 'Suceava', 'TR': 'Teleorman', 'TM': 'Timiș', + 'TL': 'Tulcea', 'VS': 'Vaslui', 'VL': 'Vâlcea', 'VN': 'Vrancea' + }; + return ``; + }).join(''); +} + +function initializeLocationSelectors() { + // Replace country inputs with selects for both supplier and customer + ['supplier', 'customer'].forEach(party => { + const countryInput = document.querySelector(`[name="${party}Country"]`); + if (countryInput) { + const select = document.createElement('select'); + select.className = 'form-input'; + select.name = countryInput.name; + select.innerHTML = createCountryOptions(); + select.value = countryInput.dataset.xmlValue || countryInput.value || 'RO'; + countryInput.parentNode?.replaceChild(select, countryInput); + } + + const countyInput = document.querySelector(`[name="${party}CountrySubentity"]`); + if (countyInput) { + const select = document.createElement('select'); + select.className = 'form-input'; + select.name = countyInput.name; + select.innerHTML = createCountyOptions(); + select.value = countyInput.dataset.xmlValue || countyInput.value || ''; + countyInput.parentNode?.replaceChild(select, countyInput); + } + }); + + // Initialize location handlers for both parties + setupPartyLocationHandlers('supplier'); + setupPartyLocationHandlers('customer'); +} + +function updateCountyVisibility(countrySelect, countySelect) { + if (!countrySelect || !countySelect) return; + const showCounty = countrySelect.value === 'RO'; + countySelect.style.display = showCounty ? 'block' : 'none'; + countySelect.required = showCounty; +} + +function setupPartyLocationHandlers(party) { + const countrySelect = document.querySelector(`[name="${party}Country"]`); + const countySelect = document.querySelector(`[name="${party}CountrySubentity"]`); + const cityContainer = document.querySelector(`[name="${party}City"]`)?.parentNode; + + if (!countrySelect || !countySelect || !cityContainer) return; + + const handleLocationChange = () => { + const isBucharest = countrySelect.value === 'RO' && countySelect.value === 'RO-B'; + const currentElement = cityContainer.querySelector('input, select'); + const isCurrentlySector = currentElement.tagName.toLowerCase() === 'select'; + + if (isBucharest && !isCurrentlySector) { + const sectorSelect = document.createElement('select'); + sectorSelect.className = 'form-input'; + sectorSelect.name = `${party}City`; + sectorSelect.innerHTML = ` + + + + + + + + `; + + // Try to preserve any existing sector value + const currentValue = currentElement.value || ''; + if (currentValue.toUpperCase().includes('SECTOR')) { + sectorSelect.value = currentValue.toUpperCase().replace(/\s+/g, ''); + } + + cityContainer.replaceChild(sectorSelect, currentElement); + } else if (!isBucharest && isCurrentlySector) { + const cityInput = document.createElement('input'); + cityInput.type = 'text'; + cityInput.className = 'form-input'; + cityInput.name = `${party}City`; + cityInput.value = ''; + cityContainer.replaceChild(cityInput, currentElement); + } + }; + + // Set up event listeners + countrySelect.addEventListener('change', () => { + updateCountyVisibility(countrySelect, countySelect); + handleLocationChange(); + }); + + countySelect.addEventListener('change', handleLocationChange); + + // Initial setup + updateCountyVisibility(countrySelect, countySelect); + handleLocationChange(); +} + +function initializeUI() { + document.querySelectorAll('.form-input').forEach(input => { + input.addEventListener('input', function() { + this.classList.remove('invalid'); + updateTotals(); + }); + }); + + document.addEventListener('keydown', function(event) { + if (event.ctrlKey || event.metaKey) { + switch (event.key.toLowerCase()) { + case 's': + event.preventDefault(); + saveXML(); + break; + case 'o': + event.preventDefault(); + document.getElementById('fileInput').click(); + break; + case 'n': + event.preventDefault(); + addLineItem(); + break; + } + } + }); + + // Initialize date pickers + const dateInputs = document.querySelectorAll('.date-input'); + dateInputs.forEach(input => { + const button = input.parentElement.querySelector('.calendar-button'); + createDatePicker(input, button); + restrictDateInput(input); + }); + + if (!currentInvoice) { + const today = new Date(); + const dueDate = new Date(); + dueDate.setDate(today.getDate() + 30); + + document.querySelector('[name="issueDate"]').value = formatDateToRomanian(today); + document.querySelector('[name="dueDate"]').value = formatDateToRomanian(dueDate); + } + + // Add note counter event listener + const noteInput = document.querySelector('[name="invoiceNote"]'); + if (noteInput) { + noteInput.addEventListener('input', updateNoteCounter); + updateNoteCounter(); // Initial count + } + + // Initialize location selectors + initializeLocationSelectors(); + + window.addLineItem = addLineItem; + window.removeLineItem = removeLineItem; + window.addAllowanceCharge = addAllowanceCharge; + window.removeAllowanceCharge = removeAllowanceCharge; + window.handleStorno = handleStorno; + window.updateTotals = updateTotals; + window.saveXML = saveXML; + window.refreshTotals = refreshTotals; + window.displayVATBreakdown = displayVATBreakdown; +} + +// Handling VAT type changes +window.handleVatTypeChange = function(index) { + const vatTypeSelect = document.querySelector(`[name="vatType${index}"]`); + const vatRateInput = document.querySelector(`[name="vatRate${index}"]`); + + // Verifică dacă furnizorul este neplătitor TVA + if (!isVATRegistered()) { + vatTypeSelect.value = 'O'; + vatTypeSelect.disabled = true; // Dezactivează selectul pentru neplătitori + vatRateInput.value = '0'; + vatRateInput.disabled = true; + + // Setează codul și motivul scutirii pentru neplătitori + const row = document.querySelector(`.vat-row`); + if (row) { + const exemptionCode = row.querySelector('.vat-exemption-code'); + const exemptionReason = row.querySelector('.vat-exemption-reason'); + if (exemptionCode) exemptionCode.value = 'VATEX-EU-O'; + if (exemptionReason) exemptionReason.value = 'Operațiune efectuată de neplătitor de TVA'; + } + } else { + vatTypeSelect.disabled = false; // Activează selectul pentru plătitori + + switch(vatTypeSelect.value) { + case 'O': // Pentru neplătitori + vatRateInput.value = '0'; + vatRateInput.disabled = true; + break; + case 'AE': // Taxare inversă + case 'Z': // Cotă 0% + case 'E': // Scutit + vatRateInput.value = '0'; + vatRateInput.disabled = true; + break; + case 'S': // Standard + vatRateInput.value = '19'; + vatRateInput.disabled = false; + break; + } + } + + updateTotals(); +} + +function isVATRegistered() { + const supplierVAT = document.querySelector('[name="supplierVAT"]').value.trim().toUpperCase(); + return supplierVAT.startsWith('RO'); +} + +function handleChargeVatTypeChange(index) { + const vatTypeSelect = document.querySelector(`[name="chargeVatType${index}"]`); + const vatRateInput = document.querySelector(`[name="chargeVatRate${index}"]`); + + if (!vatTypeSelect || !vatRateInput) return; + + // Verifică dacă furnizorul este neplătitor TVA + if (!isVATRegistered()) { + vatTypeSelect.value = 'O'; + vatTypeSelect.disabled = true; // Dezactivează selectul pentru neplătitori + vatRateInput.value = '0'; + vatRateInput.disabled = true; + + // Setează codul și motivul scutirii pentru neplătitori + const row = document.querySelector(`.vat-row`); + if (row) { + const exemptionCode = row.querySelector('.vat-exemption-code'); + const exemptionReason = row.querySelector('.vat-exemption-reason'); + if (exemptionCode) exemptionCode.value = 'VATEX-EU-O'; + if (exemptionReason) exemptionReason.value = 'Operațiune efectuată de neplătitor de TVA'; + } + } else { + vatTypeSelect.disabled = false; // Activează selectul pentru plătitori + + switch(vatTypeSelect.value) { + case 'O': // Pentru neplătitori + vatRateInput.value = '0'; + vatRateInput.disabled = true; + break; + case 'AE': // Taxare inversă + case 'Z': // Cotă 0% + case 'E': // Scutit + vatRateInput.value = '0'; + vatRateInput.disabled = true; + break; + case 'S': // Standard + vatRateInput.value = '19'; + vatRateInput.disabled = false; + break; + } + } + + // Clear manual edits and refresh + manuallyEditedVatRows.clear(); + refreshTotals(); +} + +// Funcție pentru actualizarea tuturor categoriilor TVA când se modifică codul fiscal +function updateAllVATTypes() { + const isNotVATRegistered = !isVATRegistered(); + + // Actualizează toate liniile de articole + document.querySelectorAll('.line-item').forEach((item, index) => { + const vatTypeSelect = item.querySelector(`[name="vatType${index}"]`); + const vatRateInput = item.querySelector(`[name="vatRate${index}"]`); + + if (isNotVATRegistered) { + vatTypeSelect.value = 'O'; + vatTypeSelect.disabled = true; + vatRateInput.value = '0'; + vatRateInput.disabled = true; + } else { + vatTypeSelect.disabled = false; + // Restabilește valorile implicite pentru plătitori + if (vatTypeSelect.value === 'O') { + vatTypeSelect.value = 'S'; + vatRateInput.value = '19'; + vatRateInput.disabled = false; + } + } + }); + + // Actualizează breakdown-ul TVA + updateVATBreakdown(); + refreshTotals(); +} + +// XML modifications +function addUnitCode(code) { + if (!UNIT_CODES.has(code)) { + UNIT_CODES.set(code, `${code} (${code})`); + } +} + +function createUnitCodeOptionsHTML(selectedCode = 'EA') { + return Array.from(UNIT_CODES.entries()) + .map(([code, description]) => + `` + ) + .join(''); +} + +function storeOriginalTotals(xmlDoc) { + const taxTotal = xmlDoc.querySelector('cac\\:TaxTotal, TaxTotal'); + const monetaryTotal = xmlDoc.querySelector('cac\\:LegalMonetaryTotal, LegalMonetaryTotal'); + + originalTotals = { + subtotal: getXMLValue(monetaryTotal, 'cbc\\:LineExtensionAmount, LineExtensionAmount'), + allowances: getXMLValue(monetaryTotal, 'cbc\\:AllowanceTotalAmount, AllowanceTotalAmount', '0'), + charges: getXMLValue(monetaryTotal, 'cbc\\:ChargeTotalAmount, ChargeTotalAmount', '0'), + netAmount: getXMLValue(monetaryTotal, 'cbc\\:TaxExclusiveAmount, TaxExclusiveAmount'), + totalVat: getXMLValue(taxTotal, 'cbc\\:TaxAmount, TaxAmount'), + total: getXMLValue(monetaryTotal, 'cbc\\:TaxInclusiveAmount, TaxInclusiveAmount') + }; + + // console.log('Original totals from XML:', originalTotals); + + const vatBreakdown = []; + const taxSubtotals = xmlDoc.querySelectorAll('cac\\:TaxSubtotal, TaxSubtotal'); + taxSubtotals.forEach(subtotal => { + const taxCategory = subtotal.querySelector('cac\\:TaxCategory, TaxCategory'); + vatBreakdown.push({ + taxableAmount: getXMLValue(subtotal, 'cbc\\:TaxableAmount, TaxableAmount'), + taxAmount: getXMLValue(subtotal, 'cbc\\:TaxAmount, TaxAmount'), + percent: getXMLValue(taxCategory, 'cbc\\:Percent, Percent'), + type: getXMLValue(taxCategory, 'cbc\\:ID, ID', 'S'), + exemptionCode: getXMLValue(taxCategory, 'cbc\\:TaxExemptionReasonCode, TaxExemptionReasonCode'), + exemptionReason: getXMLValue(taxCategory, 'cbc\\:TaxExemptionReason, TaxExemptionReason') + }); + }); + originalTotals.vatBreakdown = vatBreakdown; +} + +function restoreOriginalTotals() { + if (!originalTotals) return; + + // Display exact values from XML with formatting + document.getElementById('subtotal').textContent = formatter.formatCurrency(originalTotals.subtotal); + document.getElementById('totalAllowances').textContent = formatter.formatCurrency(originalTotals.allowances); + document.getElementById('totalCharges').textContent = formatter.formatCurrency(originalTotals.charges); + document.getElementById('netAmount').textContent = formatter.formatCurrency(originalTotals.netAmount); + document.getElementById('vat').textContent = formatter.formatCurrency(originalTotals.totalVat); + + // Bypass formatting for total + document.getElementById('total').textContent = originalTotals.total; + + const container = document.getElementById('vatBreakdownRows'); + if (container) { + container.innerHTML = ''; + + if (originalTotals.vatBreakdown && originalTotals.vatBreakdown.length > 0) { + originalTotals.vatBreakdown.forEach(vat => { + addVATBreakdownRow( + vat.percent, + vat.taxableAmount, + vat.taxAmount, + vat.type, + null, + vat.exemptionCode, + vat.exemptionReason + ); + }); + } + } +} + +function updateNoteCounter() { + const noteInput = document.querySelector('[name="invoiceNote"]'); + const counter = document.querySelector('.note-counter'); + if (noteInput && counter) { + const length = noteInput.value.length; + counter.textContent = `${length}/900 caractere`; + } +} + +function splitNoteIntoChunks(text, maxLength) { + if (!text) return []; + const chunks = []; + let remainingText = text; + + while (remainingText.length > 0) { + if (remainingText.length <= maxLength) { + chunks.push(remainingText); + break; + } + + let splitPoint = remainingText.substr(0, maxLength).lastIndexOf('\n'); + if (splitPoint === -1) { + splitPoint = remainingText.substr(0, maxLength).lastIndexOf(' '); + } + if (splitPoint === -1) splitPoint = maxLength; + + chunks.push(remainingText.substr(0, splitPoint)); + remainingText = remainingText.substr(splitPoint + 1); + } + + return chunks.filter(chunk => chunk.trim().length > 0); +} + +function populateBasicDetails(xmlDoc) { + document.querySelector('[name="invoiceNumber"]').value = getXMLValue(xmlDoc, 'cbc\\:ID, ID'); + + // Get and combine all Note elements + const notes = xmlDoc.querySelectorAll('cbc\\:Note, Note'); + const combinedNotes = Array.from(notes).map(note => note.textContent).join('\n'); + document.querySelector('[name="invoiceNote"]').value = combinedNotes; + updateNoteCounter(); + + const issueDate = getXMLValue(xmlDoc, 'cbc\\:IssueDate, IssueDate'); + const dueDate = getXMLValue(xmlDoc, 'cbc\\:DueDate, DueDate'); + + if (issueDate) { + const [year, month, day] = issueDate.split('-'); + document.querySelector('[name="issueDate"]').value = `${day}.${month}.${year}`; + } + + if (dueDate) { + const [year, month, day] = dueDate.split('-'); + document.querySelector('[name="dueDate"]').value = `${day}.${month}.${year}`; + } + + // Add currency code handling + const documentCurrencyCode = getXMLValue(xmlDoc, 'cbc\\:DocumentCurrencyCode, DocumentCurrencyCode', 'RON'); + const taxCurrencyCode = getXMLValue(xmlDoc, 'cbc\\:TaxCurrencyCode, TaxCurrencyCode', ''); + + document.querySelector('[name="documentCurrencyCode"]').value = documentCurrencyCode; + document.querySelector('[name="taxCurrencyCode"]').value = taxCurrencyCode; + + // Store original totals and display them + storeOriginalTotals(xmlDoc); + restoreOriginalTotals(); +} + +function populatePartyDetails(xmlDoc) { + function extractPartyDetails(party, prefix) { + // Extract contact information + const contact = party.querySelector('cac\\:Contact, Contact'); + const phone = contact?.querySelector('cbc\\:Telephone, Telephone')?.textContent || ''; + const contactName = contact?.querySelector('cbc\\:Name, Name')?.textContent || ''; + const email = contact?.querySelector('cbc\\:ElectronicMail, ElectronicMail')?.textContent || ''; + + // Country Code Extraction + const countryCodeElement = party.querySelector('cac\\:Country cbc\\:IdentificationCode, Country IdentificationCode'); + const countryCode = countryCodeElement ? countryCodeElement.textContent.trim() : 'RO'; + + // Postal Address Details + const postalAddress = party.querySelector('cac\\:PostalAddress, PostalAddress'); + const streetName = postalAddress ? + getXMLValue(postalAddress, 'cbc\\:StreetName, StreetName') : ''; + const cityName = postalAddress ? + getXMLValue(postalAddress, 'cbc\\:CityName, CityName') : ''; + const countyCode = postalAddress ? + getXMLValue(postalAddress, 'cbc\\:CountrySubentity, CountrySubentity') : ''; + + // Set inputs + document.querySelector(`[name="${prefix}Name"]`).value = + getXMLValue(party, 'cac\\:PartyLegalEntity cbc\\:RegistrationName, PartyLegalEntity RegistrationName'); + document.querySelector(`[name="${prefix}VAT"]`).value = + getXMLValue(party, 'cac\\:PartyTaxScheme cbc\\:CompanyID, PartyTaxScheme CompanyID'); + document.querySelector(`[name="${prefix}CompanyId"]`).value = + getXMLValue(party, 'cac\\:PartyLegalEntity cbc\\:CompanyID, PartyLegalEntity CompanyID'); + document.querySelector(`[name="${prefix}Address"]`).value = streetName; + document.querySelector(`[name="${prefix}City"]`).value = cityName; + document.querySelector(`[name="${prefix}Phone"]`).value = phone; + document.querySelector(`[name="${prefix}ContactName"]`).value = contactName; + document.querySelector(`[name="${prefix}Email"]`).value = email; + + // Country Select + const countrySelect = document.querySelector(`[name="${prefix}Country"]`); + if (countrySelect) { + countrySelect.value = countryCode; + countrySelect.dataset.xmlValue = countryCode; + } + + // County Select + const countySelect = document.querySelector(`[name="${prefix}CountrySubentity"]`); + if (countySelect) { + countySelect.value = countyCode; + countySelect.dataset.xmlValue = countyCode; + } + } + + const supplierParty = xmlDoc.querySelector('cac\\:AccountingSupplierParty, AccountingSupplierParty'); + if (supplierParty) { + const supplierPartyDetails = supplierParty.querySelector('cac\\:Party, Party'); + if (supplierPartyDetails) { + extractPartyDetails(supplierPartyDetails, 'supplier'); + } + } + + const customerParty = xmlDoc.querySelector('cac\\:AccountingCustomerParty, AccountingCustomerParty'); + if (customerParty) { + const customerPartyDetails = customerParty.querySelector('cac\\:Party, Party'); + if (customerPartyDetails) { + extractPartyDetails(customerPartyDetails, 'customer'); + } + } + + initializeLocationSelectors(); + } + + function populateAllowanceCharges(xmlDoc) { + const charges = parseAllowanceCharges(xmlDoc); + displayAllowanceCharges(charges); + + charges.forEach((_, index) => { + setupAllowanceChargeListeners(index); + addChargeVatTypeChangeListener(index); + }); +} + +function populateLineItems(xmlDoc) { + const lineItems = xmlDoc.querySelectorAll('cac\\:InvoiceLine, InvoiceLine'); + const lineItemsContainer = document.getElementById('lineItems'); + lineItemsContainer.innerHTML = '

Articole Factură

'; + + lineItems.forEach((item, index) => { + const quantity = getXMLValue(item, 'cbc\\:InvoicedQuantity, InvoicedQuantity', '0'); + const unitCode = item.querySelector('cbc\\:InvoicedQuantity, InvoicedQuantity')?.getAttribute('unitCode') || 'EA'; + const price = getXMLValue(item, 'cac\\:Price cbc\\:PriceAmount, Price PriceAmount', '0'); + const itemElement = item.querySelector('cac\\:Item, Item'); + const description = getXMLValue(itemElement, 'cbc\\:Name, Name', ''); + const itemDescription = getXMLValue(itemElement, 'cbc\\:Description, Description', ''); + + const taxCategory = itemElement.querySelector('cac\\:ClassifiedTaxCategory, ClassifiedTaxCategory'); + const vatType = getXMLValue(taxCategory, 'cbc\\:ID, ID') || 'S'; + const vatRate = getXMLValue(taxCategory, 'cbc\\:Percent, Percent') || '19'; + + // Extragem discountul și codul de motiv de pe linie dacă există + let lineDiscount = 0; + let discountReasonCode = ''; + const allowanceCharge = item.querySelector('cac\\:AllowanceCharge, AllowanceCharge'); + if (allowanceCharge) { + const chargeIndicator = getXMLValue(allowanceCharge, 'cbc\\:ChargeIndicator, ChargeIndicator'); + if (chargeIndicator === 'false') { + lineDiscount = parseFloat(getXMLValue(allowanceCharge, 'cbc\\:Amount, Amount', '0')); + discountReasonCode = getXMLValue(allowanceCharge, 'cbc\\:AllowanceChargeReasonCode, AllowanceChargeReasonCode', ''); + } + } + + addUnitCode(unitCode); + const lineItemHtml = createLineItemHTML( + index, description, quantity, price, vatRate, unitCode, vatType, + itemDescription, lineDiscount, discountReasonCode + ); + lineItemsContainer.insertAdjacentHTML('beforeend', lineItemHtml); + + // Parse identifications after adding the line item HTML + if (itemElement) { + parseIdentifications(itemElement, index); + } + + if (!isVATRegistered()) { + const vatTypeSelect = document.querySelector(`[name="vatType${index}"]`); + const vatRateInput = document.querySelector(`[name="vatRate${index}"]`); + if (vatTypeSelect && vatRateInput) { + vatTypeSelect.value = 'O'; + vatTypeSelect.disabled = true; + vatRateInput.value = '0'; + vatRateInput.disabled = true; + } + } + + // Enable/disable discount reason code field based on discount value + const discountInput = document.querySelector(`[name="lineDiscount${index}"]`); + const reasonCodeSelect = document.querySelector(`[name="discountReasonCode${index}"]`); + if (discountInput && reasonCodeSelect) { + reasonCodeSelect.disabled = lineDiscount <= 0; + } + + handleLineItemChange(index); + }); + +} + +function setupAllowanceChargeListeners(index) { + const chargeAmountInput = document.querySelector(`[name="chargeAmount${index}"]`); + const chargeTypeInput = document.querySelector(`[name="chargeType${index}"]`); + const chargeVatTypeInput = document.querySelector(`[name="chargeVatType${index}"]`); + const chargeVatRateInput = document.querySelector(`[name="chargeVatRate${index}"]`); + const reasonCodeSelect = document.querySelector(`[name="chargeReasonCode${index}"]`); + const reasonInput = document.querySelector(`[name="chargeReason${index}"]`); + + // Add change listeners to all inputs + [chargeAmountInput, chargeTypeInput, chargeVatTypeInput, chargeVatRateInput].forEach(input => { + if (input) { + input.addEventListener('change', () => { + manuallyEditedVatRows.clear(); + refreshTotals(); + }); + } + }); + + // Add reason code change listener + if (reasonCodeSelect) { + reasonCodeSelect.addEventListener('change', () => { + const isCharge = chargeTypeInput.value === 'true'; + const codes = isCharge ? CHARGE_REASON_CODES : ALLOWANCE_REASON_CODES; + reasonInput.value = codes[reasonCodeSelect.value] || ''; + }); + } + + // Special handling for VAT type changes + if (chargeVatTypeInput) { + chargeVatTypeInput.addEventListener('change', () => handleChargeVatTypeChange(index)); + } +} + +function addChargeVatTypeChangeListener(index) { + const vatTypeSelect = document.querySelector(`[name="chargeVatType${index}"]`); + if (vatTypeSelect) { + vatTypeSelect.addEventListener('change', function() { + handleChargeVatTypeChange(index); + // Force refresh of VAT breakdown + displayVATBreakdown(); + updateTotals(); + }); + } +} + +function parseAllowanceCharges(xmlDoc) { + const charges = []; + // Folosim Set pentru a preveni dublarea elementelor din cauza namespace-urilor + const processedIds = new Set(); + + // Selectăm toate elementele AllowanceCharge care sunt copii direcți ai Invoice + const allowanceCharges = xmlDoc.querySelectorAll('cac\\:AllowanceCharge, AllowanceCharge'); + + allowanceCharges.forEach(ac => { + // Verificăm dacă elementul este copil direct al Invoice și nu a fost deja procesat + if (ac.parentElement === xmlDoc.documentElement) { + const amount = getXMLValue(ac, 'cbc\\:Amount, Amount'); + const reasonCode = getXMLValue(ac, 'cbc\\:AllowanceChargeReasonCode, AllowanceChargeReasonCode'); + + // Creăm un ID unic bazat pe cod și valoare pentru a evita duplicatele + const uniqueId = `${reasonCode}-${amount}`; + + if (!processedIds.has(uniqueId)) { + processedIds.add(uniqueId); + + const charge = { + isCharge: getXMLValue(ac, 'cbc\\:ChargeIndicator, ChargeIndicator') === 'true', + reasonCode: reasonCode, + reason: getXMLValue(ac, 'cbc\\:AllowanceChargeReason, AllowanceChargeReason'), + amount: parseFloat(amount) || 0, + baseAmount: parseFloat(getXMLValue(ac, 'cbc\\:BaseAmount, BaseAmount')) || 0, + vatRate: parseFloat(getXMLValue(ac, 'cac\\:TaxCategory cbc\\:Percent, TaxCategory Percent')) || 0, + vatTypeId: getXMLValue(ac, 'cac\\:TaxCategory cbc\\:ID, TaxCategory ID', 'S'), + multiplierFactorNumeric: parseFloat(getXMLValue(ac, 'cbc\\:MultiplierFactorNumeric, MultiplierFactorNumeric')) || 0 + }; + charges.push(charge); + } + } + }); + + return charges; +} + +function displayAllowanceCharges(charges) { + const container = document.getElementById('allowanceCharges'); + container.innerHTML = '

Reduceri și Taxe Suplimentare

'; + + charges.forEach((charge, index) => { + const html = createAllowanceChargeHTML(index, charge); + container.insertAdjacentHTML('beforeend', html); + }); +} + +function addAllowanceCharge() { + const container = document.getElementById('allowanceCharges'); + const index = document.querySelectorAll('.allowance-charge').length; + + // Create new charge with default values + const newCharge = { + isCharge: true, + reasonCode: 'TV', + reason: 'Cheltuieli transport', + amount: 0, + vatRate: 19.0, + vatTypeId: 'S' + }; + + // Add the HTML + const html = createAllowanceChargeHTML(index, newCharge); + container.insertAdjacentHTML('beforeend', html); + + // Setup event listeners + setupAllowanceChargeListeners(index); + + // Force refresh of totals and VAT + refreshTotals(); +} + +function removeAllowanceCharge(index) { + const charge = document.querySelector(`.allowance-charge[data-index="${index}"]`); + if (charge) { + // Remove the element + charge.remove(); + + // Renumber remaining charges + renumberAllowanceCharges(); + + // Clear manual edits and refresh totals + manuallyEditedVatRows.clear(); + refreshTotals(); + } +} + +function renumberAllowanceCharges() { + document.querySelectorAll('.allowance-charge').forEach((charge, newIndex) => { + // Update data-index + charge.dataset.index = newIndex; + + // Update all input names + charge.querySelectorAll('input, select').forEach(input => { + const name = input.getAttribute('name'); + if (name) { + const baseName = name.replace(/\d+$/, ''); + input.setAttribute('name', baseName + newIndex); + } + }); + }); +} + + +function addLineItem() { + const container = document.getElementById('lineItems'); + const index = document.querySelectorAll('.line-item').length; + + // Determină tipul implicit de TVA bazat pe statusul furnizorului + const defaultVatType = isVATRegistered() ? 'S' : 'O'; + const defaultVatRate = isVATRegistered() ? '19' : '0'; + + const lineItemHtml = createLineItemHTML(index, '', '1', '0', defaultVatRate, 'EA', defaultVatType); + container.insertAdjacentHTML('beforeend', lineItemHtml); + + const newItem = container.lastElementChild; + const vatTypeSelect = newItem.querySelector(`[name="vatType${index}"]`); + + if (!isVATRegistered()) { + vatTypeSelect.disabled = true; + newItem.querySelector(`[name="vatRate${index}"]`).disabled = true; + } + + // Adăugăm event handlers pentru noua linie + handleLineItemChange(index); + + manuallyEditedVatRows.clear(); + refreshTotals(); +} + +function removeLineItem(index) { + const lineItem = document.querySelector(`.line-item[data-index="${index}"]`); + if (lineItem) { + lineItem.remove(); + renumberLineItems(); + manuallyEditedVatRows.clear(); // Clear manual edits + refreshTotals(); // Recalculate all totals + } +} + +function handleLineItemChange(index) { + const quantityInput = document.querySelector(`[name="quantity${index}"]`); + const priceInput = document.querySelector(`[name="price${index}"]`); + const discountInput = document.querySelector(`[name="lineDiscount${index}"]`); + const reasonCodeSelect = document.querySelector(`[name="discountReasonCode${index}"]`); + + // Handler pentru schimbarea discount-ului + discountInput?.addEventListener('input', function() { + const discountValue = parseFloat(this.value) || 0; + if (reasonCodeSelect) { + reasonCodeSelect.disabled = discountValue == 0; // activat pentru orice valoare nenulă + // Dacă discount != 0 și nu e selectat niciun cod, selectăm codul implicit + if (discountValue != 0 && !reasonCodeSelect.value) { + reasonCodeSelect.value = '95'; // Cod implicit pentru reducere + } + } + updateTotals(); + }); + + // Handlers pentru cantitate și preț + quantityInput?.addEventListener('change', updateTotals); + priceInput?.addEventListener('change', updateTotals); + + // Force refresh + updateTotals(); +} + +function handleStorno() { + document.querySelectorAll('.line-item').forEach((item, index) => { + const quantityInput = document.querySelector(`[name="quantity${index}"]`); + const currentValue = parseFloat(quantityInput.value); + quantityInput.value = -currentValue; + }); + + document.querySelectorAll('.allowance-charge').forEach((item, index) => { + const amountInput = document.querySelector(`[name="chargeAmount${index}"]`); + const currentAmount = parseFloat(amountInput.value); + amountInput.value = -currentAmount; + }); + + document.querySelectorAll('.vat-row').forEach(row => { + const baseInput = row.querySelector('.vat-base'); + const amountInput = row.querySelector('.vat-amount'); + + if (baseInput) { + const currentBase = parseFloat(baseInput.value) || 0; + baseInput.value = (-currentBase).toFixed(2); + } + + if (amountInput) { + const currentAmount = parseFloat(amountInput.value) || 0; + amountInput.value = (-currentAmount).toFixed(2); + } + }); + + manuallyEditedVatRows.clear(); + refreshTotals(); + + if (currentInvoice) { + updateTaxTotals(currentInvoice); + } +} + +function updateTotals() { + // Calculăm totalurile liniilor (deja nete, după discount) + const lineItemTotals = calculateLineItemTotals(); + const chargeTotals = calculateChargeTotals(); + + const subtotal = lineItemTotals.subtotal; + const allowances = chargeTotals.allowances; + const charges = chargeTotals.charges; + const netAmount = subtotal - allowances + charges; + + // Calculate VAT breakdown + const { vatBreakdown } = calculateVATBreakdown(); + let totalVat = 0; + + vatBreakdown.forEach((entry) => { + if (entry.type === 'S') { + totalVat += entry.vatAmount; + } + }); + + // Display totals with 2 decimal places + displayTotals({ + subtotal: roundNumber(subtotal, 2), + allowances: roundNumber(allowances, 2), + charges: roundNumber(charges, 2), + netAmount: roundNumber(netAmount, 2), + totalVat: roundNumber(totalVat, 2), + total: roundNumber(netAmount + totalVat, 2), + vatBreakdown + }); +} + +function refreshTotals() { + // Calculate line items first + const lineItemTotals = calculateLineItemTotals(); + const chargeTotals = calculateChargeTotals(); + + const subtotal = lineItemTotals.subtotal; + const allowances = chargeTotals.allowances; + const charges = chargeTotals.charges; + const netAmount = subtotal - allowances + charges; + + // Calculate VAT breakdown + const { vatBreakdown } = calculateVATBreakdown(); + let totalVat = 0; + if (vatBreakdown) { + vatBreakdown.forEach(entry => { + totalVat += entry.vatAmount; + }); + } + + // Display totals + displayTotals({ + subtotal, + allowances, + charges, + netAmount, + totalVat, + total: netAmount + totalVat, + vatBreakdown + }); +} + +function calculateLineItemTotals() { + let subtotal = 0; + + document.querySelectorAll('.line-item').forEach((item, index) => { + const quantity = parseFloat(document.querySelector(`[name="quantity${index}"]`).value) || 0; + const price = parseFloat(document.querySelector(`[name="price${index}"]`).value) || 0; + const lineDiscount = parseFloat(document.querySelector(`[name="lineDiscount${index}"]`).value) || 0; + + // LineExtensionAmount = cantitate * preț - discount + const lineAmount = (quantity * price) - lineDiscount; + subtotal += lineAmount; + }); + + return { + subtotal: roundNumber(subtotal, 2) + }; +} + +function calculateChargeTotals() { + let allowances = 0; + let charges = 0; + + document.querySelectorAll('.allowance-charge').forEach((item, index) => { + const isCharge = document.querySelector(`[name="chargeType${index}"]`).value === 'true'; + const amount = parseFloat(document.querySelector(`[name="chargeAmount${index}"]`).value) || 0; + if (isCharge) { + charges += amount; + } else { + allowances += amount; + } + }); + + return { + allowances: roundNumber(allowances, 2), + charges: roundNumber(charges, 2) + }; +} + +function calculateTotals() { + let subtotal = 0; + let vatBreakdown = new Map(); + + // Calculăm totalurile liniilor + document.querySelectorAll('.line-item').forEach((item, index) => { + const quantity = parseFloat(document.querySelector(`[name="quantity${index}"]`).value) || 0; + const price = parseFloat(document.querySelector(`[name="price${index}"]`).value) || 0; + const lineDiscount = parseFloat(document.querySelector(`[name="lineDiscount${index}"]`).value) || 0; + const vatType = document.querySelector(`[name="vatType${index}"]`).value; + const vatRate = parseFloat(document.querySelector(`[name="vatRate${index}"]`).value) || 0; + + // LineExtensionAmount pentru linie = (cantitate * preț) - discount linie + const lineTotal = (quantity * price) - lineDiscount; + subtotal += lineTotal; + + // Actualizăm baza de TVA pentru această linie + const key = `${vatRate}-${vatType}`; + if (!vatBreakdown.has(key)) { + vatBreakdown.set(key, { + baseAmount: 0, + vatAmount: 0, + rate: vatRate, + type: vatType + }); + } + + const entry = vatBreakdown.get(key); + // Adăugăm la baza de TVA valoarea netă a liniei (după discount) + entry.baseAmount += lineTotal; + }); + + // Calculăm discounturile și taxele globale + const { allowances, charges } = calculateChargeTotals(); + + // Calculăm suma netă după aplicarea discount-urilor și taxelor globale + const netAmount = subtotal - allowances + charges; + + // Pentru fiecare discount/taxă globală, ajustăm baza de TVA corespunzătoare + document.querySelectorAll('.allowance-charge').forEach((item, index) => { + const amount = parseFloat(document.querySelector(`[name="chargeAmount${index}"]`).value) || 0; + const vatType = document.querySelector(`[name="chargeVatType${index}"]`).value; + const vatRate = parseFloat(document.querySelector(`[name="chargeVatRate${index}"]`).value) || 0; + const isCharge = document.querySelector(`[name="chargeType${index}"]`).value === 'true'; + + const key = `${vatRate}-${vatType}`; + if (!vatBreakdown.has(key)) { + vatBreakdown.set(key, { + baseAmount: 0, + vatAmount: 0, + rate: vatRate, + type: vatType + }); + } + + const entry = vatBreakdown.get(key); + // Ajustăm baza de TVA în funcție de tipul operațiunii (discount/taxă) + const adjustmentAmount = isCharge ? amount : -amount; + entry.baseAmount += adjustmentAmount; + }); + + // Calculăm TVA-ul pentru fiecare rată + let totalVat = 0; + vatBreakdown.forEach((entry, key) => { + if (entry.type === 'S') { + entry.vatAmount = roundNumber(entry.baseAmount * entry.rate / 100, 2); + totalVat += entry.vatAmount; + } + }); + + return { + subtotal: roundNumber(subtotal), + allowances: roundNumber(allowances), + charges: roundNumber(charges), + netAmount: roundNumber(netAmount), + totalVat: roundNumber(totalVat), + total: roundNumber(netAmount + totalVat), + vatBreakdown + }; +} + +function calculateVATBases(lines, globalAllowances, globalCharges) { + // Initialize VAT bases + const vatBases = {}; + + // First pass: calculate base amounts per VAT rate from lines + lines.forEach(line => { + const vatRate = line.vatRate; + if (!vatBases[vatRate]) { + vatBases[vatRate] = { + base: 0, + allowances: 0, + charges: 0 + }; + } + + const lineTotal = line.quantity * line.price; + const lineAfterDiscount = lineTotal - line.lineDiscount; + vatBases[vatRate].base += lineAfterDiscount; + }); + + // Second pass: apply global allowances and charges per VAT rate + globalAllowances.forEach(allowance => { + const vatRate = allowance.vatRate; + if (vatBases[vatRate]) { + vatBases[vatRate].allowances += allowance.amount; + } + }); + + globalCharges.forEach(charge => { + const vatRate = charge.vatRate; + if (vatBases[vatRate]) { + vatBases[vatRate].charges += charge.amount; + } + }); + + // Calculate final VAT amounts + Object.keys(vatBases).forEach(rate => { + const rateData = vatBases[rate]; + const netBase = rateData.base - rateData.allowances + rateData.charges; + rateData.vatAmount = netBase * (parseFloat(rate) / 100); + }); + + return vatBases; +} + +function calculateTotalVAT() { + let totalVat = Array.from(document.querySelectorAll('.vat-amount')) + .reduce((sum, input) => sum + formatter.parseCurrency(input.value), 0); + return roundNumber(totalVat, 2); +} + +function calculateVATBreakdown() { + let vatBreakdown = new Map(); + let totalVat = 0; + + // Process line items + document.querySelectorAll('.line-item').forEach((item, index) => { + const quantity = parseFloat(document.querySelector(`[name="quantity${index}"]`).value) || 0; + const price = parseFloat(document.querySelector(`[name="price${index}"]`).value) || 0; + const lineDiscount = parseFloat(document.querySelector(`[name="lineDiscount${index}"]`).value) || 0; + const vatType = document.querySelector(`[name="vatType${index}"]`).value; + const vatRate = parseFloat(document.querySelector(`[name="vatRate${index}"]`).value) || 0; + + const lineAmount = (quantity * price) - lineDiscount; + const key = `${vatRate}-${vatType}`; + + if (!vatBreakdown.has(key)) { + vatBreakdown.set(key, { + baseAmount: 0, + vatAmount: 0, + rate: vatRate, + type: vatType + }); + } + + const entry = vatBreakdown.get(key); + entry.baseAmount += lineAmount; + }); + + // Process allowances and charges + document.querySelectorAll('.allowance-charge').forEach((charge, index) => { + const amount = parseFloat(document.querySelector(`[name="chargeAmount${index}"]`).value) || 0; + const vatType = document.querySelector(`[name="chargeVatType${index}"]`).value; + const vatRate = parseFloat(document.querySelector(`[name="chargeVatRate${index}"]`).value) || 0; + const isCharge = document.querySelector(`[name="chargeType${index}"]`).value === 'true'; + + if (amount === 0) return; + + const key = `${vatRate}-${vatType}`; + + if (!vatBreakdown.has(key)) { + vatBreakdown.set(key, { + baseAmount: 0, + vatAmount: 0, + rate: vatRate, + type: vatType + }); + } + + const entry = vatBreakdown.get(key); + const adjustedAmount = isCharge ? amount : -amount; + entry.baseAmount += adjustedAmount; + }); + + // Calculate VAT for each rate + vatBreakdown.forEach((entry) => { + if (entry.type === 'S') { + entry.vatAmount = roundNumber(entry.baseAmount * entry.rate / 100, 2); + totalVat += entry.vatAmount; + } + }); + + return { vatBreakdown, totalVat: roundNumber(totalVat, 2) }; +} + +window.updateVATRow = function(rowId, source) { + const row = document.getElementById(rowId); + if (!row) return; + + const typeSelect = row.querySelector('.vat-type'); + const rateInput = row.querySelector('.vat-rate'); + const baseInput = row.querySelector('.vat-base'); + const amountInput = row.querySelector('.vat-amount'); + + if (source === 'manual') { + manuallyEditedVatRows.add(rowId); + // Keep existing values, just update totals + updateTotalVAT(); + refreshTotals(); + return; + } + + // Only calculate VAT amount for non-manual updates + if (!manuallyEditedVatRows.has(rowId)) { + const type = typeSelect.value; + const rate = parseFloat(rateInput.value) || 0; + const base = formatter.parseCurrency(baseInput.value) || 0; + + const calculatedAmount = type === 'S' ? roundNumber(base * rate / 100, 2) : 0; + amountInput.value = formatter.formatCurrency(calculatedAmount); + + updateTotalVAT(); + refreshTotals(); + } +}; + +window.updateVATRowFromAmount = function(rowId) { + const row = document.getElementById(rowId); + if (!row) return; + + // Just mark as manually edited and update the totals + // Do not recalculate base amount + manuallyEditedVatRows.add(rowId); + + const amountInput = row.querySelector('.vat-amount'); + if (amountInput) { + const value = formatter.parseCurrency(amountInput.value); + amountInput.value = formatter.formatCurrency(value); + } + + let totalVat = 0; + document.querySelectorAll('.vat-row').forEach(vatRow => { + const vatAmount = formatter.parseCurrency(vatRow.querySelector('.vat-amount').value) || 0; + totalVat += vatAmount; + }); + + // Update just total VAT and final total + const netAmount = formatter.parseCurrency(document.getElementById('netAmount').textContent); + document.getElementById('vat').textContent = formatter.formatCurrency(totalVat); + document.getElementById('total').textContent = formatter.formatCurrency(netAmount + totalVat); +}; + +window.removeVATRow = function(rowId) { + const row = document.getElementById(rowId); + if (row) { + manuallyEditedVatRows.delete(rowId); + row.remove(); + updateTotalVAT(); + refreshTotals(); + } +}; + +window.addVATRate = function() { + const container = document.getElementById('vatBreakdownRows'); + addVATBreakdownRow(19, 0, 0); + refreshTotals(); +}; + +function updateTotalVAT() { + const totalVat = Array.from(document.querySelectorAll('.vat-amount')) + .reduce((sum, input) => sum + (parseFloat(input.value) || 0), 0); + + document.getElementById('vat').textContent = totalVat.toFixed(2); + + const netAmount = parseFloat(document.getElementById('netAmount').textContent) || 0; + const total = netAmount + totalVat; + document.getElementById('total').textContent = total.toFixed(2); +} + +function updateVATBreakdown() { + // Șterge și reconstruiește rândurile TVA + const container = document.getElementById('vatBreakdownRows'); + if (!container) return; + + container.innerHTML = ''; + const { vatBreakdown } = calculateVATBreakdown(); + + vatBreakdown.forEach((data, key) => { + const [rate, type] = key.split('-'); + addVATBreakdownRow( + parseFloat(rate), + data.baseAmount, + data.vatAmount, + type + ); + }); +} + +function displayVATBreakdown(xmlDoc = null) { + const container = document.getElementById('vatBreakdownRows'); + if (!container) return; + + // Clear container + container.innerHTML = ''; + + // If XML is provided, use its VAT breakdown + if (xmlDoc && originalTotals && originalTotals.vatBreakdown) { + originalTotals.vatBreakdown.forEach((vat, index) => { + addVATBreakdownRow( + vat.percent, + vat.taxableAmount, + vat.taxAmount, + vat.type, + `vat-row-${index}`, + vat.exemptionCode, + vat.exemptionReason + ); + }); + } else { + // Calculate current VAT breakdown + const { vatBreakdown } = calculateVATBreakdown(); + vatBreakdown.forEach((data, key) => { + const [rate, type] = key.split('-'); + addVATBreakdownRow( + parseFloat(rate), + data.baseAmount, + data.vatAmount, + type + ); + }); + } +} + +function createEmptyInvoice() { + const parser = new DOMParser(); + const xmlString = ` + + urn:cen.eu:en16931:2017#compliant#urn:efactura.mfinante.ro:CIUS-RO:1.0.1 + + + + 380 + RON + + + + + + + + + + + RO + + + + RO + + VAT + + + + + + + + + + + + + + + + + + + + + + RO + + + + + + VAT + + + + + + + + + + + +`; + return parser.parseFromString(xmlString, "text/xml"); +} + +function saveXML() { + if (!validateForm()) return; + + try { + if (!currentInvoice) { + currentInvoice = createEmptyInvoice(); + } + + const xmlDoc = currentInvoice; + + // Update all the data + updateBasicDetails(xmlDoc); + updatePartyDetails(xmlDoc); + updateAllowanceCharges(xmlDoc); + + // Remove existing TaxTotal and LegalMonetaryTotal elements + const existingTaxTotals = xmlDoc.querySelectorAll('cac\\:TaxTotal, TaxTotal'); + existingTaxTotals.forEach(el => el.remove()); + + const existingMonetaryTotal = xmlDoc.querySelector('cac\\:LegalMonetaryTotal, LegalMonetaryTotal'); + if (existingMonetaryTotal) { + existingMonetaryTotal.remove(); + } + + // Remove existing InvoiceLine elements + const existingLines = xmlDoc.querySelectorAll('cac\\:InvoiceLine, InvoiceLine'); + existingLines.forEach(el => el.remove()); + + // Add elements in the correct order + updateTaxTotals(xmlDoc); + updateMonetaryTotals(xmlDoc); + updateLineItems(xmlDoc); + + downloadXML(xmlDoc); + } catch (error) { + handleError(error, 'Eroare la salvarea fișierului XML'); + } +} + +function updateBasicDetails(xmlDoc) { + setXMLValue(xmlDoc, 'cbc\\:ID, ID', document.querySelector('[name="invoiceNumber"]').value); + + // Remove existing Note elements + const existingNotes = xmlDoc.querySelectorAll('cbc\\:Note, Note'); + existingNotes.forEach(note => note.remove()); + + // Split note text and create new Note elements + const noteText = document.querySelector('[name="invoiceNote"]').value; + if (noteText) { + const insertAfter = xmlDoc.querySelector('cbc\\:InvoiceTypeCode, InvoiceTypeCode'); + const chunks = splitNoteIntoChunks(noteText, 300); + chunks.forEach(chunk => { + const noteElement = createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Note", chunk); + if (insertAfter && insertAfter.parentNode) { + insertAfter.parentNode.insertBefore(noteElement, insertAfter.nextSibling); + } + }); + } + + const issueDateValue = document.querySelector('[name="issueDate"]').value; + const dueDateValue = document.querySelector('[name="dueDate"]').value; + + setXMLValue(xmlDoc, 'cbc\\:IssueDate, IssueDate', parseRomanianDate(issueDateValue)); + setXMLValue(xmlDoc, 'cbc\\:DueDate, DueDate', parseRomanianDate(dueDateValue)); + + // Update currency codes + const documentCurrencyCode = document.querySelector('[name="documentCurrencyCode"]').value.toUpperCase() || 'RON'; + setXMLValue(xmlDoc, 'cbc\\:DocumentCurrencyCode, DocumentCurrencyCode', documentCurrencyCode); + + const taxCurrencyCode = document.querySelector('[name="taxCurrencyCode"]').value.toUpperCase(); + if (taxCurrencyCode) { + let taxCurrencyElement = xmlDoc.querySelector('cbc\\:TaxCurrencyCode, TaxCurrencyCode'); + if (!taxCurrencyElement) { + taxCurrencyElement = createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:TaxCurrencyCode"); + const insertAfter = xmlDoc.querySelector('cbc\\:DocumentCurrencyCode, DocumentCurrencyCode'); + if (insertAfter && insertAfter.parentNode) { + insertAfter.parentNode.insertBefore(taxCurrencyElement, insertAfter.nextSibling); + } + } + taxCurrencyElement.textContent = taxCurrencyCode; + } else { + // Remove TaxCurrencyCode if it exists and is empty + const taxCurrencyElement = xmlDoc.querySelector('cbc\\:TaxCurrencyCode, TaxCurrencyCode'); + if (taxCurrencyElement) { + taxCurrencyElement.parentNode.removeChild(taxCurrencyElement); + } + } +} + +function createPartyElement(xmlDoc, isSupplier, partyData) { + const party = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:Party"); + const hasVatPrefix = /^[A-Z]{2}/.test(partyData.vat?.trim() || ''); + const IsNeplatitor = vatHasO(); + + // Add PartyIdentification + if (partyData.companyId) { + const partyIdentification = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:PartyIdentification"); + partyIdentification.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", partyData.companyId)); + party.appendChild(partyIdentification); + } + + function validateCountryCode(countryCode) { + const code = countryCode?.trim().toUpperCase() || 'RO'; + return ISO_3166_1_CODES.has(code) ? code : 'RO'; + } + + function validateCountyCode(countryCode, countyCode) { + if (countryCode === 'RO') { + return ROMANIAN_COUNTY_CODES.has(countyCode) ? countyCode : 'RO-B'; + } + return countyCode; + } + + const postalAddress = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:PostalAddress"); + postalAddress.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:StreetName", partyData.address)); + postalAddress.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:CityName", partyData.city)); + postalAddress.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:CountrySubentity", partyData.county)); + + const country = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:Country"); + // Ensure country code is valid ISO 3166-1 format (2 uppercase letters) + const countryCode = partyData.country?.trim().toUpperCase() || 'RO'; + country.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:IdentificationCode", countryCode)); + postalAddress.appendChild(country); + party.appendChild(postalAddress); + + const vatTypesInUse = new Set(); + document.querySelectorAll('.line-item').forEach((item, index) => { + const vatType = document.querySelector(`[name="vatType${index}"]`).value; + vatTypesInUse.add(vatType); + }); + + // Add PartyTaxScheme for all suppliers VAT types except 'O' or all customers with VAT prefix + if (hasVatPrefix ) { + const partyTaxScheme = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:PartyTaxScheme"); + partyTaxScheme.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:CompanyID", partyData.vat.toUpperCase())); + const taxScheme = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxScheme"); + if (!IsNeplatitor) { + taxScheme.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", "VAT")); + } + else { + // console.log('not adding VAT ID'); + } + partyTaxScheme.appendChild(taxScheme); + + party.appendChild(partyTaxScheme); + } + + // Funcție pentru detectarea dacă există un VAT cu tipul 'O' Neplatitor de TVA + // În cazul în care există, nu se va adăuga un element TaxScheme cu ID-ul 'VAT' + function vatHasO() { + const vatTypesInUse = new Set(); + document.querySelectorAll('.line-item').forEach((item, index) => { + const vatType = document.querySelector(`[name="vatType${index}"]`).value; + vatTypesInUse.add(vatType); + }); + return vatTypesInUse.size > 0 && vatTypesInUse.has('O'); + } + + // Add PartyLegalEntity + const partyLegalEntity = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:PartyLegalEntity"); + partyLegalEntity.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:RegistrationName", partyData.name)); + + // Add CompanyID + if (!hasVatPrefix) { + // For non-VAT registered supplier, use VAT number in CompanyID + partyLegalEntity.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:CompanyID", partyData.vat)); + } else { + // For others, use companyId + partyLegalEntity.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:CompanyID", partyData.companyId)); + } + + party.appendChild(partyLegalEntity); + + // Add Contact if phone, email or contactName exists + if (partyData.phone || partyData.email || partyData.contactName) { + const contact = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:Contact"); + + if (partyData.contactName) { + contact.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Name", partyData.contactName)); + } + if (partyData.phone) { + contact.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Telephone", partyData.phone)); + } + if (partyData.email) { + contact.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ElectronicMail", partyData.email)); + } + party.appendChild(contact); + } + return party; +} + +function updatePartyDetails(xmlDoc) { + // Update supplier details + const supplierData = { + name: document.querySelector('[name="supplierName"]').value, + vat: document.querySelector('[name="supplierVAT"]').value, + companyId: document.querySelector('[name="supplierCompanyId"]').value, + address: document.querySelector('[name="supplierAddress"]').value, + city: document.querySelector('[name="supplierCity"]').value, + county: document.querySelector('[name="supplierCountrySubentity"]').value, + country: document.querySelector('[name="supplierCountry"]').value, + phone: document.querySelector('[name="supplierPhone"]').value, + contactName: document.querySelector('[name="supplierContactName"]').value, + email: document.querySelector('[name="supplierEmail"]').value + }; + + updatePartyXML(xmlDoc, true, supplierData); + + // Update customer details + const customerData = { + name: document.querySelector('[name="customerName"]').value, + vat: document.querySelector('[name="customerVAT"]').value, + companyId: document.querySelector('[name="customerCompanyId"]').value, + address: document.querySelector('[name="customerAddress"]').value, + city: document.querySelector('[name="customerCity"]').value, + county: document.querySelector('[name="customerCountrySubentity"]').value, + country: document.querySelector('[name="customerCountry"]').value, + phone: document.querySelector('[name="customerPhone"]').value, + contactName: document.querySelector('[name="customerContactName"]').value, + email: document.querySelector('[name="customerEmail"]').value + }; + + updatePartyXML(xmlDoc, false, customerData); +} + +function updatePartyXML(xmlDoc, isSupplier, partyData) { + const partyElement = createPartyElement(xmlDoc, isSupplier, partyData); + const parentTag = isSupplier ? 'AccountingSupplierParty' : 'AccountingCustomerParty'; + let parentElement = xmlDoc.querySelector(`cac\\:${parentTag}, ${parentTag}`); + + if (!parentElement) { + parentElement = createXMLElement(xmlDoc, XML_NAMESPACES.cac, `cac:${parentTag}`); + const insertPoint = isSupplier ? + xmlDoc.querySelector('cbc\\:DocumentCurrencyCode, DocumentCurrencyCode') : + xmlDoc.querySelector('cac\\:AccountingSupplierParty, AccountingSupplierParty'); + + if (insertPoint && insertPoint.parentNode) { + insertPoint.parentNode.insertBefore(parentElement, insertPoint.nextSibling); + } else { + xmlDoc.documentElement.appendChild(parentElement); + } + } + + // Remove existing Party element if it exists + const existingParty = parentElement.querySelector('cac\\:Party, Party'); + if (existingParty) { + existingParty.remove(); + } + + parentElement.appendChild(partyElement); +} + +function getAllowanceCharges() { + const charges = []; + document.querySelectorAll('.allowance-charge').forEach((item, index) => { + charges.push({ + isCharge: document.querySelector(`[name="chargeType${index}"]`).value === 'true', + reasonCode: document.querySelector(`[name="chargeReasonCode${index}"]`).value, + reason: document.querySelector(`[name="chargeReason${index}"]`).value, + amount: parseFloat(document.querySelector(`[name="chargeAmount${index}"]`).value) || 0, + vatRate: parseFloat(document.querySelector(`[name="chargeVatRate${index}"]`).value) || 19.0, + vatTypeId: document.querySelector(`[name="chargeVatType${index}"]`).value || 'S' + }); + }); + return charges; +} + +function updateAllowanceCharges(xmlDoc) { + const currencyID = document.querySelector('[name="documentCurrencyCode"]').value.toUpperCase() || 'RON'; + + // Remove existing global allowances/charges + const existingCharges = xmlDoc.querySelectorAll('Invoice > cac\\:AllowanceCharge, Invoice > AllowanceCharge'); + existingCharges.forEach(charge => charge.remove()); + + // Add global allowances + document.querySelectorAll('.allowance-charge').forEach((item, index) => { + const allowanceElement = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:AllowanceCharge"); + + const isCharge = document.querySelector(`[name="chargeType${index}"]`).value === 'true'; + const amount = parseFloat(document.querySelector(`[name="chargeAmount${index}"]`).value) || 0; + const baseAmount = parseFloat(document.querySelector(`[name="chargeBaseAmount${index}"]`).value) || 0; + const reasonCode = document.querySelector(`[name="chargeReasonCode${index}"]`).value; + const reason = document.querySelector(`[name="chargeReason${index}"]`).value; + const vatTypeId = document.querySelector(`[name="chargeVatType${index}"]`).value; + const vatRate = parseFloat(document.querySelector(`[name="chargeVatRate${index}"]`).value) || 0; + + allowanceElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ChargeIndicator", + isCharge.toString())); + + if (reasonCode) { + allowanceElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:AllowanceChargeReasonCode", reasonCode)); + } + + if (reason) { + allowanceElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:AllowanceChargeReason", reason)); + } + + // Add multiplier if exists + if (baseAmount > 0) { + const multiplier = (amount / baseAmount) * 100; + allowanceElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:MultiplierFactorNumeric", multiplier.toFixed(2))); + } + + allowanceElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Amount", + amount.toFixed(2), { currencyID })); + + if (baseAmount > 0) { + allowanceElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:BaseAmount", + baseAmount.toFixed(2), { currencyID })); + } + + // Add tax category + const taxCategory = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxCategory"); + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", vatTypeId)); + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Percent", + vatRate.toString())); + + const taxScheme = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxScheme"); + taxScheme.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", "VAT")); + taxCategory.appendChild(taxScheme); + + allowanceElement.appendChild(taxCategory); + + // Insert before TaxTotal + const taxTotal = xmlDoc.querySelector('cac\\:TaxTotal, TaxTotal'); + if (taxTotal) { + xmlDoc.documentElement.insertBefore(allowanceElement, taxTotal); + } else { + xmlDoc.documentElement.appendChild(allowanceElement); + } + }); +} + +function updateLineItems(xmlDoc) { + const currencyID = xmlDoc.querySelector('cbc\\:DocumentCurrencyCode, DocumentCurrencyCode').textContent; + + // Șterge liniile existente + const existingLines = xmlDoc.querySelectorAll('cac\\:InvoiceLine, InvoiceLine'); + existingLines.forEach(line => line.remove()); + + document.querySelectorAll('.line-item').forEach((item, index) => { + const invoiceLine = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:InvoiceLine"); + + // Obține valorile liniei + const quantity = document.querySelector(`[name="quantity${index}"]`)?.value || '0'; + const unitCode = document.querySelector(`[name="unit${index}"]`)?.value || 'EA'; + const price = document.querySelector(`[name="price${index}"]`)?.value || '0'; + const description = document.querySelector(`[name="description${index}"]`)?.value || ''; + const itemDescription = document.querySelector(`[name="itemDescription${index}"]`)?.value || ''; + const vatType = document.querySelector(`[name="vatType${index}"]`)?.value || 'S'; + const vatRate = vatType === 'AE' ? '0.00' : + (document.querySelector(`[name="vatRate${index}"]`)?.value || '0'); + const lineDiscount = parseFloat(document.querySelector(`[name="lineDiscount${index}"]`)?.value) || 0; + + // Calculează valorile liniei + const baseLineAmount = quantity * price; + const lineAmount = roundNumber(baseLineAmount - lineDiscount); + + // Adaugă elementele liniei + invoiceLine.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", (index + 1).toString())); + + const quantityElement = createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:InvoicedQuantity", quantity); + quantityElement.setAttribute('unitCode', unitCode); + invoiceLine.appendChild(quantityElement); + + // Adaugă LineExtensionAmount (valoarea după discount) + invoiceLine.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:LineExtensionAmount", + lineAmount.toFixed(2), { currencyID })); + + // Adaugă discount pe linie dacă există + if (lineDiscount != 0) { + const allowanceCharge = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:AllowanceCharge"); + allowanceCharge.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ChargeIndicator", + lineDiscount < 0 ? "true" : "false")); + + const reasonCode = document.querySelector(`[name="discountReasonCode${index}"]`)?.value || '95'; + allowanceCharge.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:AllowanceChargeReasonCode", reasonCode)); + allowanceCharge.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:AllowanceChargeReason", ALLOWANCE_REASON_CODES[reasonCode] || 'Reducere')); + + // BaseAmount trebuie să fie valoarea netă înainte de discount + const baseAmount = Math.abs(lineAmount); + const discountAmount = Math.abs(lineDiscount); + const multiplierFactor = (discountAmount / baseAmount * 100).toFixed(2); + + allowanceCharge.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:MultiplierFactorNumeric", multiplierFactor)); + + allowanceCharge.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Amount", + discountAmount.toFixed(2), { currencyID })); + + allowanceCharge.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:BaseAmount", + baseAmount.toFixed(2), { currencyID })); + + invoiceLine.appendChild(allowanceCharge); + } + + // Adaugă detaliile articolului + const itemElement = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:Item"); + + if (itemDescription) { + itemElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Description", + itemDescription)); + } + + itemElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Name", description)); + + // Adaugă identificările + const identificationsContainer = document.querySelector(`#identifications${index}`); + if (identificationsContainer) { + saveIdentificationsToXML(xmlDoc, itemElement, index); + } + + // Adaugă categoria de taxă + const taxCategory = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:ClassifiedTaxCategory"); + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", vatType)); + if (vatType !== 'O') { + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Percent", vatRate)); + } + + const taxScheme = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxScheme"); + taxScheme.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", "VAT")); + taxCategory.appendChild(taxScheme); + itemElement.appendChild(taxCategory); + + invoiceLine.appendChild(itemElement); + + // Adaugă prețul + const priceElement = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:Price"); + priceElement.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:PriceAmount", + price, { currencyID })); + invoiceLine.appendChild(priceElement); + + xmlDoc.documentElement.appendChild(invoiceLine); + }); +} + +function updateTaxTotals(xmlDoc) { + const currencyID = document.querySelector('[name="documentCurrencyCode"]').value.toUpperCase() || 'RON'; + const taxCurrencyCode = document.querySelector('[name="taxCurrencyCode"]').value.toUpperCase(); + + // Remove existing TaxTotal elements + const existingTaxTotals = xmlDoc.querySelectorAll('cac\\:TaxTotal, TaxTotal'); + existingTaxTotals.forEach(element => element.parentNode.removeChild(element)); + + // Create main TaxTotal for document currency + const taxTotal = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxTotal"); + + // Use precise currency parsing for total VAT + const uiTotalVat = formatter.parseCurrency(document.getElementById('vat').textContent); + const taxAmountElement = createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:TaxAmount", + uiTotalVat.toFixed(2), { currencyID }); + taxTotal.appendChild(taxAmountElement); + + // Add TaxSubtotal elements to the main TaxTotal + const vatRows = document.querySelectorAll('.vat-row'); + vatRows.forEach(row => { + const taxSubtotal = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxSubtotal"); + + const baseAmount = formatter.parseCurrency(row.querySelector('.vat-base').value) || 0; + const vatAmount = formatter.parseCurrency(row.querySelector('.vat-amount').value) || 0; + const vatType = row.querySelector('.vat-type').value; + const vatRate = parseFloat(row.querySelector('.vat-rate').value) || 0; + + taxSubtotal.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:TaxableAmount", + baseAmount.toFixed(2), { currencyID })); + taxSubtotal.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:TaxAmount", + vatAmount.toFixed(2), { currencyID })); + + const taxCategory = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxCategory"); + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", vatType)); + + const percent = vatType === 'AE' ? '0.00' : vatRate.toFixed(2); + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:Percent", percent)); + + // Add exemption code and reason for special VAT types + if (['E', 'K', 'O', 'AE'].includes(vatType)) { + const exemptionCode = row.querySelector('.vat-exemption-code')?.value; + const exemptionReason = row.querySelector('.vat-exemption-reason')?.value; + + if (exemptionCode) { + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:TaxExemptionReasonCode", exemptionCode)); + } + if (exemptionReason) { + taxCategory.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + "cbc:TaxExemptionReason", exemptionReason)); + } + } + + const taxScheme = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxScheme"); + taxScheme.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:ID", "VAT")); + taxCategory.appendChild(taxScheme); + + taxSubtotal.appendChild(taxCategory); + taxTotal.appendChild(taxSubtotal); + }); + + // Insert TaxTotal in the correct position + let insertionPoint = xmlDoc.querySelector('cac\\:AllowanceCharge, AllowanceCharge'); + if (insertionPoint) { + while (insertionPoint.nextElementSibling && + (insertionPoint.nextElementSibling.localName === 'AllowanceCharge' || + insertionPoint.nextElementSibling.localName === 'TaxTotal')) { + insertionPoint = insertionPoint.nextElementSibling; + } + insertionPoint.parentNode.insertBefore(taxTotal, insertionPoint.nextSibling); + } else { + const monetaryTotal = xmlDoc.querySelector('cac\\:LegalMonetaryTotal, LegalMonetaryTotal'); + if (monetaryTotal) { + monetaryTotal.parentNode.insertBefore(taxTotal, monetaryTotal); + } else { + xmlDoc.documentElement.appendChild(taxTotal); + } + } + + // If tax currency is specified, add another TaxTotal element + if (taxCurrencyCode && taxCurrencyCode !== currencyID) { + const taxCurrencyTotal = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:TaxTotal"); + + const exchangeRateInput = document.querySelector('[name="exchangeRate"]'); + const exchangeRate = exchangeRateInput ? parseFloat(exchangeRateInput.value) || 1 : 1; + const taxCurrencyVAT = uiTotalVat * exchangeRate; + + const taxCurrencyAmountElement = createXMLElement(xmlDoc, XML_NAMESPACES.cbc, "cbc:TaxAmount", + taxCurrencyVAT.toFixed(2), { currencyID: taxCurrencyCode }); + taxCurrencyTotal.appendChild(taxCurrencyAmountElement); + + // Insert after the main TaxTotal + taxTotal.parentNode.insertBefore(taxCurrencyTotal, taxTotal.nextSibling); + } +} + +function updateMonetaryTotals(xmlDoc) { + const currencyID = document.querySelector('[name="documentCurrencyCode"]').value.toUpperCase() || 'RON'; + + // Use direct parsing to preserve full precision and manual edits + const subtotal = formatter.parseCurrency(document.getElementById('subtotal').textContent); + const allowances = formatter.parseCurrency(document.getElementById('totalAllowances').textContent); + const charges = formatter.parseCurrency(document.getElementById('totalCharges').textContent); + const netAmount = formatter.parseCurrency(document.getElementById('netAmount').textContent); + const totalVat = formatter.parseCurrency(document.getElementById('vat').textContent); + const total = formatter.parseCurrency(document.getElementById('total').textContent); + + // Rest of the function remains the same... + const existingMonetaryTotal = xmlDoc.querySelector('cac\\:LegalMonetaryTotal, LegalMonetaryTotal'); + if (existingMonetaryTotal) { + existingMonetaryTotal.parentNode.removeChild(existingMonetaryTotal); + } + + const monetaryTotal = createXMLElement(xmlDoc, XML_NAMESPACES.cac, "cac:LegalMonetaryTotal"); + + const amounts = { + "LineExtensionAmount": subtotal, + "TaxExclusiveAmount": netAmount, + "TaxInclusiveAmount": total, + "AllowanceTotalAmount": allowances, + "ChargeTotalAmount": charges, + "PayableAmount": total + }; + + Object.entries(amounts).forEach(([elementName, value]) => { + monetaryTotal.appendChild(createXMLElement(xmlDoc, XML_NAMESPACES.cbc, + `cbc:${elementName}`, value.toFixed(2), { currencyID })); + }); + + // Insertion logic remains the same + let insertionPoint = xmlDoc.querySelector('cac\\:TaxTotal, TaxTotal'); + if (insertionPoint) { + while (insertionPoint.nextElementSibling && + insertionPoint.nextElementSibling.localName === 'TaxTotal') { + insertionPoint = insertionPoint.nextElementSibling; + } + insertionPoint.parentNode.insertBefore(monetaryTotal, insertionPoint.nextSibling); + } else { + const firstInvoiceLine = xmlDoc.querySelector('cac\\:InvoiceLine, InvoiceLine'); + if (firstInvoiceLine) { + firstInvoiceLine.parentNode.insertBefore(monetaryTotal, firstInvoiceLine); + } else { + xmlDoc.documentElement.appendChild(monetaryTotal); + } + } +} + +function getExchangeRate(fromCurrency, toCurrency) { + // For now, return 1 as default exchange rate + // TODO: Implement proper exchange rate handling + return 1; +} + +// Update the invoice form to include exchange rate when tax currency is different +function addExchangeRateField() { + const taxCurrencyInput = document.querySelector('[name="taxCurrencyCode"]'); + const documentCurrencyInput = document.querySelector('[name="documentCurrencyCode"]'); + + function updateExchangeRateVisibility() { + const taxCurrency = taxCurrencyInput.value.toUpperCase(); + const documentCurrency = documentCurrencyInput.value.toUpperCase(); + + let exchangeRateContainer = document.getElementById('exchangeRateContainer'); + if (taxCurrency && taxCurrency !== documentCurrency) { + if (!exchangeRateContainer) { + const container = document.createElement('div'); + container.id = 'exchangeRateContainer'; + container.className = 'form-group'; + container.innerHTML = ` + + + `; + taxCurrencyInput.parentNode.after(container); + } else { + // Update label if currencies changed + const label = exchangeRateContainer.querySelector('label'); + label.textContent = `Curs Valutar ${documentCurrency}/${taxCurrency}`; + } + } else if (exchangeRateContainer) { + exchangeRateContainer.remove(); + } + } + + taxCurrencyInput.addEventListener('input', updateExchangeRateVisibility); + documentCurrencyInput.addEventListener('input', updateExchangeRateVisibility); + + // Initial check + updateExchangeRateVisibility(); +} + + +// Utility functions +function getXMLValue(xmlDoc, selector, defaultValue = '') { + if (!xmlDoc) return defaultValue; + try { + const element = xmlDoc.querySelector(selector); + const value = element ? element.textContent : defaultValue; + // console.log(`getXMLValue: Selector: ${selector}, Value: ${value}`); + return value; + } catch (error) { + console.warn(`Eroare la obținerea valorii pentru selectorul ${selector}:`, error); + return defaultValue; + } +} + +function setXMLValue(xmlDoc, selector, value) { + try { + const element = xmlDoc.querySelector(selector); + if (element) { + element.textContent = value; + return true; + } + return false; + } catch (error) { + console.warn(`Eroare la setarea valorii pentru selectorul ${selector}:`, error); + return false; + } +} + +function createXMLElement(xmlDoc, namespace, elementName, value = '', attributes = {}) { + const element = xmlDoc.createElementNS(namespace, elementName); + if (value) { + element.textContent = value; + } + Object.entries(attributes).forEach(([key, value]) => { + element.setAttribute(key, value); + }); + return element; +} + +function formatXML(xmlString) { + let formatted = ''; + let indent = ''; + const tab = ' '; + + xmlString.split(/>\s* { + if (node.match(/^\/\w/)) { + indent = indent.substring(tab.length); + } + formatted += indent + '<' + node + '>\r\n'; + if (node.match(/^]*[^\/]$/) && !node.startsWith("?")) { + indent += tab; + } + }); + + return formatted.substring(1, formatted.length - 3); +} + +function downloadXML(xmlDoc) { + const serializer = new XMLSerializer(); + let xmlString = serializer.serializeToString(xmlDoc); + + if (!xmlString.startsWith('\n' + xmlString; + } + + xmlString = formatXML(xmlString); + + const blob = new Blob([xmlString], { type: 'application/xml' }); + const url = URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = 'factura_' + document.querySelector('[name="invoiceNumber"]').value + '.xml'; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); +} + +function roundNumber(number, decimals = 2) { + return Math.round(number * Math.pow(10, decimals)) / Math.pow(10, decimals); +} + +function renumberLineItems() { + document.querySelectorAll('.line-item').forEach((item, newIndex) => { + item.dataset.index = newIndex; + + item.querySelectorAll('input, select').forEach(input => { + const name = input.getAttribute('name'); + if (name) { + const baseName = name.replace(/\d+$/, ''); + input.setAttribute('name', baseName + newIndex); + } + }); + }); +} + + +function createIdentificationHTML(index, type, value = '', schemeId = '') { + const typeInfo = IDENTIFICATION_TYPES[type]; + const id = `${type.toLowerCase()}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; + + if (type === 'COMMODITY') { + return ` +
+
+ + + +
+
`; + } + + return ` +
+
+ ${type === 'STANDARD' ? `` : ''} + + +
+
`; +} + +window.addIdentification = function(lineItemIndex, type) { + const container = document.querySelector(`#identifications${lineItemIndex}`); + if (container) { + container.insertAdjacentHTML('beforeend', createIdentificationHTML(lineItemIndex, type)); + validateIdentifications(lineItemIndex); + } +} + +window.removeIdentification = function(id) { + const element = document.querySelector(`[data-id="${id}"]`); + if (element) { + const lineItem = element.closest('.line-item'); + element.remove(); + if (lineItem) { + validateIdentifications(parseInt(lineItem.dataset.index)); + } + } +}; + + +// Update XML parsing +function parseIdentifications(itemElement, lineItemIndex) { + // console.log("Parsing identifications for line", lineItemIndex); + + const container = document.querySelector(`#identifications${lineItemIndex}`); + if (!container) return; + + const listContainer = container.querySelector('.identifications-list'); + listContainer.innerHTML = ''; + + // Parse BuyersItemIdentification + const buyersId = itemElement.querySelector('cac\\:BuyersItemIdentification cbc\\:ID, BuyersItemIdentification ID'); + if (buyersId) { + listContainer.insertAdjacentHTML('beforeend', + createIdentificationHTML(lineItemIndex, 'BUYERS', buyersId.textContent) + ); + } + + // Parse SellersItemIdentification + const sellersId = itemElement.querySelector('cac\\:SellersItemIdentification cbc\\:ID, SellersItemIdentification ID'); + if (sellersId) { + listContainer.insertAdjacentHTML('beforeend', + createIdentificationHTML(lineItemIndex, 'SELLERS', sellersId.textContent) + ); + } + + // Parse StandardItemIdentification + const standardId = itemElement.querySelector('cac\\:StandardItemIdentification cbc\\:ID, StandardItemIdentification ID'); + if (standardId) { + listContainer.insertAdjacentHTML('beforeend', + createIdentificationHTML(lineItemIndex, 'STANDARD', standardId.textContent) + ); + } + + // Parse CommodityClassifications + const commodityClassifications = itemElement.querySelectorAll('cac\\:CommodityClassification cbc\\:ItemClassificationCode, CommodityClassification ItemClassificationCode'); + commodityClassifications.forEach(classification => { + const listId = classification.getAttribute('listID') || 'CV'; + const code = classification.textContent; + if (code && listId) { + listContainer.insertAdjacentHTML('beforeend', + createIdentificationHTML(lineItemIndex, 'COMMODITY', code, listId) + ); + } + }); +} + +// Update XML saving +function saveIdentificationsToXML(xmlDoc, itemElement, lineItemIndex) { + const container = document.querySelector(`#identifications${lineItemIndex}`); + if (!container) return; + + container.querySelectorAll('.identification-row').forEach(row => { + const type = row.dataset.type; + const id = row.dataset.id; + const schemeInput = document.querySelector(`[name="scheme_${id}"]`); + const valueInput = document.querySelector(`[name="value_${id}"]`); + + if (!valueInput?.value) return; + + if (type === 'COMMODITY') { + const schemeSelect = document.querySelector(`[name="scheme_${id}"]`); + if (!schemeSelect) return; + + const identificationElement = createXMLElement(xmlDoc, XML_NAMESPACES.cac, 'cac:CommodityClassification'); + const idElement = createXMLElement(xmlDoc, XML_NAMESPACES.cbc, 'cbc:ItemClassificationCode', valueInput.value); + idElement.setAttribute('listID', schemeSelect.value); + identificationElement.appendChild(idElement); + itemElement.appendChild(identificationElement); + } else { + const typeInfo = IDENTIFICATION_TYPES[type]; + const identificationElement = createXMLElement(xmlDoc, XML_NAMESPACES.cac, `cac:${typeInfo.xmlTag}`); + const idElement = createXMLElement(xmlDoc, XML_NAMESPACES.cbc, 'cbc:ID', valueInput.value); + + if (type === 'STANDARD') { + idElement.setAttribute('schemeID', '0160'); + } + + identificationElement.appendChild(idElement); + itemElement.appendChild(identificationElement); + } + }); +} + + +// Add validation +function validateIdentifications(lineItemIndex) { + const container = document.querySelector(`#identifications${lineItemIndex}`); + if (!container) return true; + + let isValid = true; + container.querySelectorAll('.identification-row').forEach(row => { + const type = row.dataset.type; + const id = row.dataset.id; + const input = row.querySelector(`[name="value_${id}"]`); + + if (type === 'COMMODITY') { + const scheme = row.querySelector('.scheme-select').value; + if (scheme === 'TSP' && !/^\d{8}-\d$/.test(input.value)) { + input.classList.add('invalid'); + isValid = false; + } else if (scheme === 'STI' && !/^\d{8}$/.test(input.value)) { + input.classList.add('invalid'); + isValid = false; + } else { + input.classList.remove('invalid'); + } + } + }); + + return isValid; +} + +// Export for testing if needed +if (typeof module !== 'undefined' && module.exports) { + module.exports = { + calculateTotals, + validateForm, + roundNumber, + formatXML, + createXMLElement, + getXMLValue, + setXMLValue, + formatter, + setupInlineEditing, + updateTotalDisplay, + displayTotals, + updateVATDisplay, + getDisplayValue + }; +} + +import { InvoicePrintHandler } from './print.js'; + +// Create print handler instance +const printHandler = new InvoicePrintHandler(); + +// Initialize when the document is ready +document.addEventListener('DOMContentLoaded', () => { + // Add print controls to the UI + const headerButtonGroup = document.querySelector('.button-group'); + if (headerButtonGroup) { + const printControls = document.createElement('div'); + printControls.className = 'print-controls'; + printControls.style.display = 'flex'; + printControls.style.gap = '8px'; + printControls.style.alignItems = 'center'; + + // Create template selector + const templateSelect = document.createElement('select'); + templateSelect.className = 'form-input'; + templateSelect.style.width = 'auto'; + templateSelect.innerHTML = ` + + + `; + templateSelect.addEventListener('change', (e) => { + printHandler.setTemplate(e.target.value); + }); + + // Create print button + const printButton = document.createElement('button'); + printButton.className = 'button'; + printButton.onclick = () => printHandler.print(); + printButton.innerHTML = 'Printează'; + + // Add elements to controls + printControls.appendChild(templateSelect); + printControls.appendChild(printButton); + + // Add controls to header + headerButtonGroup.appendChild(printControls); + } +}); \ No newline at end of file diff --git a/efactura-generator/js/server.js b/efactura-generator/js/server.js new file mode 100644 index 0000000..c011acf --- /dev/null +++ b/efactura-generator/js/server.js @@ -0,0 +1,42 @@ +// server.js +const http = require('http'); +const fs = require('fs'); +const path = require('path'); + +const PORT = 3000; +const MIME_TYPES = { + '.html': 'text/html', + '.css': 'text/css', + '.js': 'text/javascript', + '.json': 'application/json', + '.xml': 'application/xml' +}; + +const server = http.createServer((req, res) => { + // Convert URL to file path, using index.html for root + let filePath = req.url === '/' ? './index.html' : '.' + req.url; + + // Get file extension for MIME type + const ext = path.extname(filePath); + const contentType = MIME_TYPES[ext] || 'text/plain'; + + // Read and serve the file + fs.readFile(filePath, (err, content) => { + if (err) { + if (err.code === 'ENOENT') { + res.writeHead(404); + res.end('File not found'); + } else { + res.writeHead(500); + res.end('Server error: ' + err.code); + } + } else { + res.writeHead(200, { 'Content-Type': contentType }); + res.end(content); + } + }); +}); + +server.listen(PORT, () => { + console.log(`Server running at http://localhost:${PORT}/`); +}); \ No newline at end of file diff --git a/efactura-generator/receiver.php b/efactura-generator/receiver.php new file mode 100644 index 0000000..0ab1952 --- /dev/null +++ b/efactura-generator/receiver.php @@ -0,0 +1,217 @@ + $error->level, + 'code' => $error->code, + 'column' => $error->column, + 'message' => $error->message, + 'line' => $error->line + ]; + } + + libxml_clear_errors(); + + return [ + 'valid' => false, + 'errors' => $errorMessages + ]; + } + + // Verifică namespace-urile necesare + $namespaces = $xml->getNamespaces(true); + $requiredNamespaces = [ + 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2', + 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2', + 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2' + ]; + + foreach ($requiredNamespaces as $ns) { + $found = false; + foreach ($namespaces as $namespace) { + if ($namespace === $ns) { + $found = true; + break; + } + } + + if (!$found) { + return [ + 'valid' => false, + 'errors' => [ + ['message' => "Namespace lipsă: $ns"] + ] + ]; + } + } + + return [ + 'valid' => true, + 'errors' => [] + ]; +} + +// Verificare IP +function checkIP() { + global $config; + $clientIP = $_SERVER['REMOTE_ADDR']; + return in_array($clientIP, $config['allowed_ips']); +} + +// Verificare token +function validateToken() { + global $config; + $headers = getallheaders(); + $token = isset($headers['X-Api-Key']) ? $headers['X-Api-Key'] : ''; + return hash_equals($config['api_key'], $token); +} + +// Verificare origine request +if (false and !checkIP()) { + header('HTTP/1.1 403 Forbidden'); + error_log("Acces interzis pentru IP: " . $_SERVER['REMOTE_ADDR']); + die(json_encode([ + 'success' => false, + 'error' => 'Acces interzis', + 'details' => 'IP-ul nu este autorizat' + ])); +} + +// Verificare token +if ($_SERVER['REQUEST_METHOD'] !== 'GET' && !validateToken()) { + header('HTTP/1.1 401 Unauthorized'); + error_log("Token invalid de la IP: " . $_SERVER['REMOTE_ADDR']); + die(json_encode([ + 'success' => false, + 'error' => 'Token invalid', + 'details' => 'Autentificare eșuată' + ])); +} + +// Configurare director pentru fișiere temporare +$uploadDir = dirname(__FILE__) . '/temp/'; +if (!file_exists($uploadDir)) { + mkdir($uploadDir, 0777, true); +} + +// Procesare request POST (primire XML) +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + try { + // Citește conținutul XML din request + $xmlContent = file_get_contents('php://input'); + + // Validare XML + $validationResult = validateXML($xmlContent); + + if (!$validationResult['valid']) { + header('Content-Type: application/json'); + http_response_code(400); + echo json_encode([ + 'success' => false, + 'error' => 'XML invalid', + 'details' => $validationResult['errors'] + ]); + error_log("Validare XML eșuată: " . json_encode($validationResult['errors'])); + exit; + } + + // Generează nume unic pentru fișier + $fileName = uniqid('xml_') . '.xml'; + $filePath = $uploadDir . $fileName; + + // Salvează fișierul + if (file_put_contents($filePath, $xmlContent)) { + // Răspuns succes + header('Content-Type: application/json'); + echo json_encode([ + 'success' => true, + 'fileName' => $fileName + ]); + } else { + throw new Exception('Eroare la salvarea fișierului'); + } + } catch (Exception $e) { + header('Content-Type: application/json'); + http_response_code(500); + error_log("Eroare procesare XML: " . $e->getMessage()); + echo json_encode([ + 'success' => false, + 'error' => $e->getMessage() + ]); + } +} + +// Procesare request GET (curățare fișiere temporare) +if ($_SERVER['REQUEST_METHOD'] === 'GET' && isset($_GET['cleanup'])) { + $fileName = basename($_GET['cleanup']); // Sanitizare nume fișier + if (preg_match('/^xml_[a-f0-9]+\.xml$/', $fileName)) { // Verifică formatul numelui + $filePath = $uploadDir . $fileName; + + if (file_exists($filePath)) { + if (unlink($filePath)) { + header('Content-Type: application/json'); + echo json_encode(['success' => true]); + } else { + header('Content-Type: application/json'); + http_response_code(500); + error_log("Nu s-a putut șterge fișierul: " . $filePath); + echo json_encode([ + 'success' => false, + 'error' => 'Nu s-a putut șterge fișierul' + ]); + } + } else { + header('Content-Type: application/json'); + http_response_code(404); + echo json_encode([ + 'success' => false, + 'error' => 'Fișierul nu există' + ]); + } + } else { + header('Content-Type: application/json'); + http_response_code(400); + error_log("Nume fișier invalid solicitat: " . $fileName); + echo json_encode([ + 'success' => false, + 'error' => 'Nume fișier invalid' + ]); + } +} + +// Curățare automată a fișierelor vechi +$files = glob($uploadDir . 'xml_*.xml'); +$now = time(); +$maxAge = $config['temp_file_lifetime'] * 3600; // Conversie ore în secunde + +foreach ($files as $file) { + if ($now - filemtime($file) > $maxAge) { + @unlink($file); + error_log("Fișier vechi șters: " . basename($file)); + } +} +?> \ No newline at end of file diff --git a/efactura-generator/screenshot1.jpg b/efactura-generator/screenshot1.jpg new file mode 100644 index 0000000..0c8992b Binary files /dev/null and b/efactura-generator/screenshot1.jpg differ diff --git a/efactura-generator/screenshot2.jpg b/efactura-generator/screenshot2.jpg new file mode 100644 index 0000000..504870a Binary files /dev/null and b/efactura-generator/screenshot2.jpg differ diff --git a/efactura-generator/screenshot3.jpg b/efactura-generator/screenshot3.jpg new file mode 100644 index 0000000..6e3ee8a Binary files /dev/null and b/efactura-generator/screenshot3.jpg differ diff --git a/efactura-generator/styles/main.css b/efactura-generator/styles/main.css new file mode 100644 index 0000000..a29ac36 --- /dev/null +++ b/efactura-generator/styles/main.css @@ -0,0 +1,435 @@ +:root { + --primary-color: #0056b3; + --danger-color: #dc3545; + --border-color: #ced4da; + --bg-color: #f8f9fa; +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + line-height: 1.5; + color: #333; + background-color: #f0f2f5; +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 1rem; +} + +.header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 1rem; + padding: 1rem; + background-color: white; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +.app-author { + font-size: 0.9rem; + color: #666; +} + +.button-group { + display: flex; + gap: 0.5rem; + align-items: center; +} + +.form-section { + background-color: white; + padding: 1rem; + border-radius: 8px; + margin-bottom: 1rem; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +.section-title { + font-size: 1.25rem; + margin-bottom: 0.75rem; + display: flex; + justify-content: space-between; + align-items: center; +} + +.form-group { + margin-bottom: 0.5rem; +} + +.form-label { + display: block; + margin-bottom: 0.25rem; + font-weight: 500; +} + +.form-input { + width: 100%; + padding: 0.5rem; + border: 1px solid var(--border-color); + border-radius: 4px; + font-size: 1rem; +} + +.form-input:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: 0 0 0 2px rgba(0,86,179,0.25); +} + +.form-input.invalid { + border-color: var(--danger-color); +} + +.details-grid { + display: grid; + grid-template-areas: + "invoice" + "supplier" + "customer"; + gap: 1rem; + margin-bottom: 1rem; +} + +.invoice-details { + grid-area: invoice; +} + +.compact-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: 0.5rem; +} + +.grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); + gap: 0.5rem; +} + +.button { + padding: 0.5rem 1rem; + border: none; + border-radius: 4px; + font-size: 1rem; + cursor: pointer; + background-color: var(--primary-color); + color: white; + min-width: fit-content; +} + +.button:hover { + opacity: 0.9; +} + +.button-secondary { + background-color: #6c757d; +} + +.button-danger { + background-color: var(--danger-color); +} + +.button-small { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; +} + +.line-item, +.allowance-charge { + background-color: white; + padding: 1rem 2.5rem 1rem 1rem; + border-radius: 4px; + margin-bottom: 0.5rem; + border: 1px solid var(--border-color); + position: relative; +} + +.vat-row, +.identification-row { + background-color: white; + padding: 0.25rem; + border-radius: 4px; + margin-bottom: 0.25rem; + border: 1px solid var(--border-color); + position: relative; +} + +.delete-line-item, +.delete-allowance-charge, +.delete-identification { + position: absolute; + right: 0.5rem; + top: 50%; + transform: translateY(-50%); + width: 20px !important; + height: 20px !important; + padding: 0 !important; + font-size: 12px !important; + line-height: 1 !important; + min-width: auto !important; + flex: 0 0 auto !important; + display: flex !important; + align-items: center; + justify-content: center; + border-radius: 50%; +} + +.optional-details { + margin-top: 0.5rem; + padding: 0.75rem; + background-color: var(--bg-color); + border-radius: 4px; +} + +.optional-details-content { + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +.identifications-container { + width: 100%; +} + +.identifications-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.25rem; +} + +.identifications-header h4 { + margin: 0; + font-size: 0.9rem; +} + +.identification-buttons { + display: flex; + flex-wrap: wrap; + gap: 0.25rem; +} + +.identifications-list { + display: flex; + flex-direction: column; + margin-top: 0; +} + +.identification-row { + margin: 0; + padding: 0.25rem; +} + +.identification-content { + display: grid; + grid-template-columns: auto 1fr auto; + gap: 0.25rem; + align-items: center; +} + +.identification-content .scheme-select { + width: 150px; + min-width: 150px; +} + +.identification-content input[type="text"] { + flex: 1; + min-width: 0; +} + +.date-input-container { + display: flex; + gap: 0.5rem; +} + +.calendar-button { + padding: 0.5rem; + background: none; + border: 1px solid var(--border-color); + border-radius: 4px; + cursor: pointer; +} + +.totals { + background-color: white; + padding: 1.5rem; + border-radius: 8px; + margin-top: 1rem; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +.total-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.5rem 0; + border-bottom: 1px solid var(--border-color); +} + +.total-row:last-child { + border-bottom: none; +} + +.total-row-final { + font-weight: bold; + font-size: 1.2rem; + margin-top: 1rem; + border-top: 2px solid var(--border-color); +} + +.editable-total { + cursor: pointer; +} + +/* Updated VAT breakdown layout */ +.vat-row .total-row { + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: 0.5rem; + position: relative; +} + +.vat-inputs { + display: flex; + flex-wrap: wrap; + gap: 0.5rem 1rem; + width: 100%; + padding-right: 30px; +} + +.vat-inputs > label { + min-width: 100px; + text-align: left; + margin: 0; +} + +.vat-inputs > input, +.vat-inputs > select { + min-width: 150px; + flex: 1; + margin: 0; +} + +.vat-inputs > input[type="text"] { + min-width: 100px; +} + +.vat-exemption { + display: flex; + gap: 1rem; + width: 100%; +} + +.vat-exemption .form-group { + flex: 1; + display: flex; + align-items: center; + gap: 0.5rem; + margin: 0; +} + +.vat-exemption label { + white-space: nowrap; + margin: 0; + min-width: 100px; +} + +.vat-exemption .form-input { + flex: 1; +} + +.note-input { + resize: vertical; + min-height: 100px; +} + +.note-counter { + text-align: right; + font-size: 0.8rem; + color: #666; + margin-top: 0.25rem; +} + +.app-footer { + text-align: center; + margin-top: 2rem; + padding: 1rem; +} + +.app-footer a { + color: var(--primary-color); + text-decoration: none; +} + +.hidden { + display: none !important; +} + +.file-input { + display: none; +} + +@media (max-width: 1200px) { + .vat-inputs { + flex-wrap: wrap; + } + + .vat-exemption { + flex-direction: column; + } + + .vat-exemption .form-group { + width: 100%; + } +} + +@media (max-width: 768px) { + .header { + flex-direction: column; + gap: 1rem; + text-align: center; + } + + .button-group { + flex-wrap: wrap; + justify-content: center; + } + + .vat-inputs { + gap: 0.5rem; + } + + .vat-inputs > label { + min-width: 100px; + text-align: left; + } + + .vat-inputs > input, + .vat-inputs > select { + width: calc(100% - 110px); + } + + .vat-exemption { + flex-direction: column; + width: 100%; + } + + .identification-content { + grid-template-columns: 1fr auto; + } + + .scheme-select { + grid-column: 1 / -1; + } +} \ No newline at end of file diff --git a/efactura-generator/templates/print-compact.html b/efactura-generator/templates/print-compact.html new file mode 100644 index 0000000..d0780a2 --- /dev/null +++ b/efactura-generator/templates/print-compact.html @@ -0,0 +1,331 @@ + + + + + Factură + + + + +
+
+
+

FACTURĂ

+
Seria & Nr:
+
+ Data emiterii: | + Data scadentă: +
+
+
+
+
+
+
+ +
+
+
Furnizor
+ +
+
+
Client
+ +
+
+ + + + + + + + + + + + + + +
Nr.DenumireUMCant.PrețTVATotal
+ + + +
+
+

Monedă Factură:

+ +
+ +
+
+ Subtotal: + +
+ + +
+ Valoare Netă: + +
+ +
+
+
Tip TVA
+
Cotă
+
Bază
+
TVA
+
+ + +
+ Total TVA (): + +
+ +
+ +
+ Total cu TVA: + +
+
+
+ + +
+ + + + \ No newline at end of file diff --git a/efactura-generator/templates/print.html b/efactura-generator/templates/print.html new file mode 100644 index 0000000..914c4c0 --- /dev/null +++ b/efactura-generator/templates/print.html @@ -0,0 +1,378 @@ + + + + + Factură + + + + +
+
+
+

FACTURĂ

+
Seria & Nr:
+
+ Data emiterii: | + Data scadentă: +
+
+
+
+
+
+
+ +
+
+
Furnizor
+ +
+
+
Client
+ +
+
+ + + + + + + + + + + + + + +
Nr.DenumireUMCant.PrețTVATotal
+ + + +
+
+

Monedă Factură:

+ +
+ +
+
+ Subtotal: + +
+
+ Total Reduceri: + +
+
+ Total Taxe: + +
+
+ Valoare Netă: + +
+ +
+
Defalcare TVA
+
+
Tip TVA
+
Cotă
+
Bază
+
TVA
+
+ + + + +
+ +
+ Total cu TVA: + +
+
+
+ + +
+ + \ No newline at end of file diff --git a/efactura-generator/test-config.php b/efactura-generator/test-config.php new file mode 100644 index 0000000..8911d76 --- /dev/null +++ b/efactura-generator/test-config.php @@ -0,0 +1,208 @@ +uploadDir = dirname(__FILE__) . '/temp/'; + } + + public function runTests() { + echo "

Test Configurație eFactura

"; + + // Testează config.json + $this->testConfigFile(); + + // Testează directorul temp + $this->testTempDirectory(); + + // Testează permisiuni + $this->testPermissions(); + + // Testează request cu XML + $this->testXMLUpload(); + + // Afișează rezultate + $this->displayResults(); + } + + private function testConfigFile() { + echo "

1. Verificare config.json

"; + + try { + // Verifică dacă există config.json + if (!file_exists('config.json')) { + throw new Exception("config.json nu există!"); + } + + // Încearcă să citească config.json + $this->config = json_decode(file_get_contents('config.json'), true); + if (!$this->config) { + throw new Exception("config.json nu este un JSON valid!"); + } + + // Verifică structura + $required = ['api_key', 'allowed_ips', 'temp_file_lifetime']; + foreach ($required as $field) { + if (!isset($this->config[$field])) { + throw new Exception("Lipsește câmpul: $field"); + } + } + + $this->addResult('config', true, "config.json este valid și complet"); + } catch (Exception $e) { + $this->addResult('config', false, $e->getMessage()); + } + } + + private function testTempDirectory() { + echo "

2. Verificare Director Temp

"; + + try { + if (!file_exists($this->uploadDir)) { + mkdir($this->uploadDir, 0777, true); + $this->addResult('temp_create', true, "Directorul temp a fost creat"); + } + + if (!is_writable($this->uploadDir)) { + throw new Exception("Directorul temp nu are permisiuni de scriere!"); + } + + $testFile = $this->uploadDir . 'test.txt'; + if (file_put_contents($testFile, 'test')) { + unlink($testFile); + $this->addResult('temp_write', true, "Test scriere în temp reușit"); + } else { + throw new Exception("Nu se poate scrie în directorul temp!"); + } + } catch (Exception $e) { + $this->addResult('temp_write', false, $e->getMessage()); + } + } + + private function testPermissions() { + echo "

3. Verificare Permisiuni

"; + + // Verifică permisiuni config.json + $configPerms = fileperms('config.json'); + $this->addResult( + 'config_perms', + ($configPerms & 0x0092), + "Permisiuni config.json: " . substr(sprintf('%o', $configPerms), -4) + ); + + // Verifică permisiuni temp + $tempPerms = fileperms($this->uploadDir); + $this->addResult( + 'temp_perms', + ($tempPerms & 0x0777), + "Permisiuni temp/: " . substr(sprintf('%o', $tempPerms), -4) + ); + } + + private function testXMLUpload() { + echo "

4. Test Upload XML

"; + + // Creează un XML de test + $testXML = 'Test XML'; + + // Simulează un request către receiver.php + $ch = curl_init('http://' . $_SERVER['HTTP_HOST'] . + dirname($_SERVER['PHP_SELF']) . '/receiver.php'); + + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $testXML, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + 'Content-Type: application/xml', + 'X-Api-Key: ' . $this->config['api_key'] + ] + ]); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($httpCode === 200) { + $result = json_decode($response, true); + if ($result && $result['success']) { + $this->addResult('xml_upload', true, "Upload XML reușit"); + + // Încearcă să șteargă fișierul + if (isset($result['fileName'])) { + @unlink($this->uploadDir . $result['fileName']); + } + } else { + $this->addResult('xml_upload', false, "Răspuns invalid la upload"); + } + } else { + $this->addResult('xml_upload', false, "Upload eșuat cu codul: $httpCode"); + } + } + + private function addResult($test, $success, $message) { + $this->results[$test] = [ + 'success' => $success, + 'message' => $message + ]; + + $status = $success ? '✅' : '❌'; + echo "
"; + echo "$status $message"; + echo "
"; + } + + private function displayResults() { + echo "

Rezultate Finale

"; + + $allSuccess = true; + foreach ($this->results as $test => $result) { + if (!$result['success']) { + $allSuccess = false; + break; + } + } + + if ($allSuccess) { + echo "
"; + echo "✅ Toate testele au trecut cu succes!"; + echo "
"; + } else { + echo "
"; + echo "❌ Unele teste au eșuat. Verificați mesajele de mai sus."; + echo "
"; + } + } +} + +// Stilizare pagină +?> + + + + Test Configurație eFactura + + + +runTests(); +?> + + diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..1063cf5 Binary files /dev/null and b/favicon.ico differ diff --git a/googleb8af97b4c544f7b8.html b/googleb8af97b4c544f7b8.html new file mode 100644 index 0000000..8f10288 --- /dev/null +++ b/googleb8af97b4c544f7b8.html @@ -0,0 +1 @@ +google-site-verification: googleb8af97b4c544f7b8.html \ No newline at end of file diff --git a/images/back.gif b/images/back.gif new file mode 100644 index 0000000..20663f2 Binary files /dev/null and b/images/back.gif differ diff --git a/images/bg_content.jpg b/images/bg_content.jpg new file mode 100644 index 0000000..711847a Binary files /dev/null and b/images/bg_content.jpg differ diff --git a/images/bg_footer.jpg b/images/bg_footer.jpg new file mode 100644 index 0000000..be6e270 Binary files /dev/null and b/images/bg_footer.jpg differ diff --git a/images/bg_top_content.jpg b/images/bg_top_content.jpg new file mode 100644 index 0000000..700b48f Binary files /dev/null and b/images/bg_top_content.jpg differ diff --git a/images/bg_top_menu.jpg b/images/bg_top_menu.jpg new file mode 100644 index 0000000..ceb4206 Binary files /dev/null and b/images/bg_top_menu.jpg differ diff --git a/images/body-bg.gif b/images/body-bg.gif new file mode 100644 index 0000000..cce0d3f Binary files /dev/null and b/images/body-bg.gif differ diff --git a/images/box-bg.gif b/images/box-bg.gif new file mode 100644 index 0000000..2e61016 Binary files /dev/null and b/images/box-bg.gif differ diff --git a/images/contafin.gif b/images/contafin.gif new file mode 100644 index 0000000..c68a522 Binary files /dev/null and b/images/contafin.gif differ diff --git a/images/header-bg.jpg b/images/header-bg.jpg new file mode 100644 index 0000000..58fe177 Binary files /dev/null and b/images/header-bg.jpg differ diff --git a/images/left-bot-corner.gif b/images/left-bot-corner.gif new file mode 100644 index 0000000..e3eaf41 Binary files /dev/null and b/images/left-bot-corner.gif differ diff --git a/images/left-mid-corner.gif b/images/left-mid-corner.gif new file mode 100644 index 0000000..a8d0c2b Binary files /dev/null and b/images/left-mid-corner.gif differ diff --git a/images/left-top-corner.gif b/images/left-top-corner.gif new file mode 100644 index 0000000..b69edb2 Binary files /dev/null and b/images/left-top-corner.gif differ diff --git a/images/link1-bg.gif b/images/link1-bg.gif new file mode 100644 index 0000000..726777a Binary files /dev/null and b/images/link1-bg.gif differ diff --git a/images/link1-left.gif b/images/link1-left.gif new file mode 100644 index 0000000..4838bb2 Binary files /dev/null and b/images/link1-left.gif differ diff --git a/images/link1-right.gif b/images/link1-right.gif new file mode 100644 index 0000000..ca28dee Binary files /dev/null and b/images/link1-right.gif differ diff --git a/images/link2-bg.gif b/images/link2-bg.gif new file mode 100644 index 0000000..a90fa03 Binary files /dev/null and b/images/link2-bg.gif differ diff --git a/images/link2-left.gif b/images/link2-left.gif new file mode 100644 index 0000000..01ebb66 Binary files /dev/null and b/images/link2-left.gif differ diff --git a/images/link2-right.gif b/images/link2-right.gif new file mode 100644 index 0000000..c35da43 Binary files /dev/null and b/images/link2-right.gif differ diff --git a/images/link3-bg.gif b/images/link3-bg.gif new file mode 100644 index 0000000..5394d85 Binary files /dev/null and b/images/link3-bg.gif differ diff --git a/images/link3-left.gif b/images/link3-left.gif new file mode 100644 index 0000000..dbcf206 Binary files /dev/null and b/images/link3-left.gif differ diff --git a/images/link3-right.gif b/images/link3-right.gif new file mode 100644 index 0000000..c8e9ba3 Binary files /dev/null and b/images/link3-right.gif differ diff --git a/images/marker.gif b/images/marker.gif new file mode 100644 index 0000000..74aa4f4 Binary files /dev/null and b/images/marker.gif differ diff --git a/images/marker1.gif b/images/marker1.gif new file mode 100644 index 0000000..979e350 Binary files /dev/null and b/images/marker1.gif differ diff --git a/images/mid-bot-corner.gif b/images/mid-bot-corner.gif new file mode 100644 index 0000000..4e10663 Binary files /dev/null and b/images/mid-bot-corner.gif differ diff --git a/images/right-bot-corner.gif b/images/right-bot-corner.gif new file mode 100644 index 0000000..74610ab Binary files /dev/null and b/images/right-bot-corner.gif differ diff --git a/images/right-mid-corner.gif b/images/right-mid-corner.gif new file mode 100644 index 0000000..245017a Binary files /dev/null and b/images/right-mid-corner.gif differ diff --git a/images/right-top-corner_3.gif b/images/right-top-corner_3.gif new file mode 100644 index 0000000..3865911 Binary files /dev/null and b/images/right-top-corner_3.gif differ diff --git a/images/roa.gif b/images/roa.gif new file mode 100644 index 0000000..c67d013 Binary files /dev/null and b/images/roa.gif differ diff --git a/images/romfast_logo.png b/images/romfast_logo.png new file mode 100644 index 0000000..23a0e33 Binary files /dev/null and b/images/romfast_logo.png differ diff --git a/images/serviciisisuport.png b/images/serviciisisuport.png new file mode 100644 index 0000000..eb2ef77 Binary files /dev/null and b/images/serviciisisuport.png differ diff --git a/images/slogan/119a4edd7a91355.png b/images/slogan/119a4edd7a91355.png new file mode 100644 index 0000000..56f78f8 Binary files /dev/null and b/images/slogan/119a4edd7a91355.png differ diff --git a/images/spacer.gif b/images/spacer.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/images/spacer.gif differ diff --git a/imagini diverse/roapac.gif b/imagini diverse/roapac.gif new file mode 100644 index 0000000..8a44bf0 Binary files /dev/null and b/imagini diverse/roapac.gif differ diff --git a/imagini_header/fundal-header.png b/imagini_header/fundal-header.png new file mode 100644 index 0000000..3060040 Binary files /dev/null and b/imagini_header/fundal-header.png differ diff --git a/imagini_header/fundal-header3.png b/imagini_header/fundal-header3.png new file mode 100644 index 0000000..ad53be8 Binary files /dev/null and b/imagini_header/fundal-header3.png differ diff --git a/imagini_header/responsive/fundal-header-desktop.png b/imagini_header/responsive/fundal-header-desktop.png new file mode 100644 index 0000000..0c0d8f1 Binary files /dev/null and b/imagini_header/responsive/fundal-header-desktop.png differ diff --git a/imagini_header/responsive/fundal-header-desktop.webp b/imagini_header/responsive/fundal-header-desktop.webp new file mode 100644 index 0000000..6a82e75 Binary files /dev/null and b/imagini_header/responsive/fundal-header-desktop.webp differ diff --git a/imagini_header/responsive/fundal-header-large.png b/imagini_header/responsive/fundal-header-large.png new file mode 100644 index 0000000..69bb755 Binary files /dev/null and b/imagini_header/responsive/fundal-header-large.png differ diff --git a/imagini_header/responsive/fundal-header-large.webp b/imagini_header/responsive/fundal-header-large.webp new file mode 100644 index 0000000..8356315 Binary files /dev/null and b/imagini_header/responsive/fundal-header-large.webp differ diff --git a/imagini_header/responsive/fundal-header-mobile.png b/imagini_header/responsive/fundal-header-mobile.png new file mode 100644 index 0000000..35a7e49 Binary files /dev/null and b/imagini_header/responsive/fundal-header-mobile.png differ diff --git a/imagini_header/responsive/fundal-header-mobile.webp b/imagini_header/responsive/fundal-header-mobile.webp new file mode 100644 index 0000000..a3f2205 Binary files /dev/null and b/imagini_header/responsive/fundal-header-mobile.webp differ diff --git a/imagini_header/responsive/fundal-header-tablet.png b/imagini_header/responsive/fundal-header-tablet.png new file mode 100644 index 0000000..26830f2 Binary files /dev/null and b/imagini_header/responsive/fundal-header-tablet.png differ diff --git a/imagini_header/responsive/fundal-header-tablet.webp b/imagini_header/responsive/fundal-header-tablet.webp new file mode 100644 index 0000000..f90f1b7 Binary files /dev/null and b/imagini_header/responsive/fundal-header-tablet.webp differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..82bf2d6 --- /dev/null +++ b/index.html @@ -0,0 +1,207 @@ + + + + + + Romfast - Program de Contabilitate, Gestiune, Resurse Umane, Imobilizari, Salarizare. Sisteme Informatice pentru Contabilitate. + + + + + + + + + + +
+ + +
+ +
+ + +
+ + +
+
+
+

ROA AUTO

+
    +
  • 🔧 Factura, bonul fiscal si inregistrarea in contabilitate dureaza mai mult de 1 minut?

  • +
  • 🔧 Clientii asteapta prea mult la receptie pentru un deviz estimativ?

  • +
  • 🔧 Seful de service pregateste manual rapoartele de manopera pentru calculul salariilor?

  • +
  • 🔧 Contabilul are dureri de cap in fiecare luna din cauza productiei neterminate?

  • +
+ Eficientizeaza activitatea service-ului! +
+
+ ROA Auto +
+
+
+ + +
+
+
+
+
+ ROA +
ROA - Romfast Applications
+

Un sistem informatic complex de tip ERP destinat companiilor medii si mari, flexibil si capabil sa raspunda necesitatilor de dezvoltare.

+ Mai multe +
+
+
+
+
+
+ Servicii si Suport +
Servicii si Suport
+

Oferim suport tehnic si o serie de servicii pentru a asigura o implementare si utilizare cat mai eficienta a sistemelor noastre.

+ Suport Tehnic +
+
+
+
+
+ + +
+

Suport Tehnic

+ +
+ +
+ + + + + + + + +
+ + \ No newline at end of file diff --git a/menu/alteservicii.html b/menu/alteservicii.html new file mode 100644 index 0000000..5958c3b --- /dev/null +++ b/menu/alteservicii.html @@ -0,0 +1,150 @@ + + + + + + Servicii - Alte Servicii + + + + + + + + + + +
+ + +
+ +
+ + +
+
+
+

Alte Servicii

+

Ca si in multe alte domenii, industria de IT-software inglobeaza, in afara de tehnologie moderna, o cantitate deosebita de munca depusa de oameni, exprimata in servicii auxiliare productiei si vanzarii aplicatiilor informatice.

+

Serviciile acordate de oameni calificati sunt deosebit de pretioase si extrem de utile in acelasi timp.

+
+

Echipa Romfast este pregatita pentru o gama completa de servicii, incluzand:

+
+
+
    +
  • Analiza de business si de sistem
  • +
  • Managementul proiectului de implementare
  • +
  • Suport tehnic post-implementare
  • +
  • Instruirea personalului beneficiarului
  • +
  • Alte activitati ocazionate de implementarea aplicatiilor Romfast.
  • +
+
+
+
+
+
+ + + + + + + +
+ + \ No newline at end of file diff --git a/menu/analiza.html b/menu/analiza.html new file mode 100644 index 0000000..b349807 --- /dev/null +++ b/menu/analiza.html @@ -0,0 +1,180 @@ + + + + + + Servicii - Analiza Implementare ERP + + + + + + + + + + +
+ + +
+ +
+ + +
+
+
+

Analiza: Fundamentul unei Implementari de Succes

+

Analiza este o etapa esentiala in procesul de implementare. In faza de analiza preliminara se descopera si se sistematizeaza necesitatile de baza ale companiei beneficiare.

+ + Analiza si cercetare + +

In faza ulterioara, de analiza detaliata, se realizeaza studii amanuntite ale urmatoarelor:

+
    +
  • Fluxurilor informationale
  • +
  • Circuitelor documentelor
  • +
  • Organigramei functionale
  • +
  • Punctelor de decizie
  • +
  • Elementelor specifice domeniului de activitate al companiei beneficiare.
  • +
+ +
+ +
+

Motivatia Implementarii

+

De cele mai multe ori, motivatia implementarii unui sistem informatic nou decurge din necesitatea transformarii sistemului informational al organizatiei. La un moment dat, aceasta necesitate ajunge o prioritate pentru conducere, din motive importante cum ar fi:

+ +
    +
  • Informatia nu circula suficient de repede, cu acuratete sau sufera fracturi in interiorul organizatiei.
  • +
  • Raspunsul organizatiei spre partenerii externi este lent, imprecis sau nesatisfacator.
  • +
  • Urmarirea activitatii se realizeaza anevoios, iar rapoartele de executie ajung cu intarziere.
  • +
  • Conducerea obtine cu greu rapoarte de sinteza si de evolutie in lipsa informatiilor complete si corelate in timp real.
  • +
+ +

Pentru a crea premisele unei implementari reusite, in procesul de analiza trebuie nu numai sa identificam starea actuala a organizatiei beneficiare, dar si sa dam raspunsuri si solutii fezabile la probleme similare celor enuntate mai sus.

+

Echipa Romfast este specializata in parcurgerea acestor etape ce nu pot fi omise sau tratate cu superficialitate, fiind indispensabile unei implementari eficiente, de succes.

+
+
+ +
+
+
+ Testeaza ROA Online +
+
+ Acceseaza ROA +

Conecteaza-te la serverul nostru de demo pentru a testa capabilitatile sistemului ROA.

+ Acceseaza ROA DEMO +
+ +
+
+
+
+ + + + + + + +
+ + \ No newline at end of file diff --git a/menu/angajari.html b/menu/angajari.html new file mode 100644 index 0000000..0c87c94 --- /dev/null +++ b/menu/angajari.html @@ -0,0 +1,156 @@ + + + + + + Angajari - Alatura-te Echipei Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+
+
+

Oportunitati de Cariera

+

Suntem mereu in cautare de oameni talentati si pasionati pentru a se alatura echipei noastre. Pentru mai multe informatii despre posturile libere, va rugam sa ne contactati.

+ +
+
+ Date de Contact +
+
+

Adresa:
+ 900673 Constanta, Bd. Mamaia Nr. 17

+ +

Telefon/Fax:

+
    +
  • 0241 / 541000 (Romtelecom)
  • +
  • 0372 / 780218 (Vodafone)
  • +
  • 0341 / 101578 (UPC)
  • +
+ +

E-mail:
+ office@romfast.ro

+
+
+
+
+
+ + + + + + + +
+ + diff --git a/menu/blank.htm b/menu/blank.htm new file mode 100644 index 0000000..e69de29 diff --git a/menu/contact.html b/menu/contact.html new file mode 100644 index 0000000..0cc3379 --- /dev/null +++ b/menu/contact.html @@ -0,0 +1,226 @@ + + + + + + Contact - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+

Contactati-ne

+
+
+

Date de Contact

+
+
+

Adresa:
+ 900673 Constanta, Bd. Mamaia Nr. 17

+ +

Telefon:

+
    +
  • 0241 / 541000 (Romtelecom)
  • +
  • 0723 / 197939 (Vodafone)
  • +
+ +

E-mail:
+ office@romfast.ro

+
+
+
+
+ Harta Sediu +
+
+
+ +
+
+
+
+
+

Formular de Contact

+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
+
+
+ + + + + + + + + +
+ + diff --git a/menu/contact2.html b/menu/contact2.html new file mode 100644 index 0000000..f8f9be9 --- /dev/null +++ b/menu/contact2.html @@ -0,0 +1,242 @@ + + + + Romfast - Contact + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ +
+
+
+
Top Slogan
+
+
+
+ Bottom Slogan
+
+ + + +
+
+ + +
+ + + + +
+
+
+
+

Sediul Romfast

+

S.C. ROMFAST S.R.L.:

+

Adresa:

+

900673 Constanta, Bd. Mamaia Nr. 17

+

Telefon/Fax:

+

0241 / 541000 Romtelecom;

+

0372 / 780218 Vodafone;

+

0341 / 101578 UPC;

+

E-mail: office@romfast.ro

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

Locatia companiei Romfast SRL:

+

 

+


Vizualizare harta marita

+

 

+

 

+
+
+
+
+ +
+

 

+

Acceseaza online ROA!

+

 

+

+

 

+

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+

 

+
+


 

+

+
+ +
+
+
+
 
+
+ \ No newline at end of file diff --git a/menu/contactimages/contact.gif b/menu/contactimages/contact.gif new file mode 100644 index 0000000..cc36e11 Binary files /dev/null and b/menu/contactimages/contact.gif differ diff --git a/menu/contactimages/contact.png b/menu/contactimages/contact.png new file mode 100644 index 0000000..6ba9918 Binary files /dev/null and b/menu/contactimages/contact.png differ diff --git a/menu/desprenoi.html b/menu/desprenoi.html new file mode 100644 index 0000000..bc73d71 --- /dev/null +++ b/menu/desprenoi.html @@ -0,0 +1,182 @@ + + + + + + Despre Noi - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+
+
+

Despre Romfast

+

Romfast produce si comercializeaza produse software inovative de inalta calitate. Inca din 1991 ne-am specializat in producerea de software pentru domeniul economic.

+

Programele noastre sunt capabile sa ofere informatia necesara oricand, oriunde si in cel mai scurt timp posibil.

+ +
+ +
+

Totul incepe cu o idee buna

+

In cazul nostru, ideea de baza a fost crearea unui sistem informatic ergonomic si cuprinzator, astfel incat:

+
    +
  • sa poata fi folosit de majoritatea companiilor,
  • +
  • sa aiba in centru o organizare contabila moderna,
  • +
  • sa faciliteze circulatia informatiei prin intreaga firma,
  • +
  • sa fie un valoros instrument de management.
  • +
+

Astfel a luat nastere sistemul ROA (Romfast Applications), ce are o structura special dezvoltata pentru firmele medii si mari.

+
+ +
+ +
+

Solutii pentru toate tipurile de companii

+

Solutiile noastre informatice sunt folosite de firme mari si mici, de firme cu diverse domenii de activitate: comert en-gros sau en-detail, productie, constructii, prestari servicii. Cheia este in robustete si flexibilitate.

+
+ +
+ +
+

Creatie si inovatie prin experienta

+

In aplicatiile Romfast sta toata experienta noastra, acumulata de mai bine de 15 ani. De-a lungul timpului, in urma colaborarii cu numeroase firme din diferite domenii de activitate, proiectele software produse au fost permanent imbunatatite si dezvoltate, constituind azi un suport informatic stabil si eficient in managementul clientilor nostri.

+

Urmand preocuparea pentru satisfactia clientilor, Romfast a dezvoltat o serie de parteneriate prin care gradul de specializare al echipei si calitatea serviciilor au crescut.

+
+
+ +
+
+
+
Parteneri Tehnologici
+ Oracle Partner +

Romfast este Oracle Partner din anul 2004 si are expertiza in crearea de sisteme informatice de mari dimensiuni pe baze de date Oracle.

+
+
+
+
+ Microsoft Partner +

Din 2005 Romfast este Microsoft Certified Partner, fapt ce atesta experienta in dezvoltarea de produse software de calitate utilizand cele mai noi tehnologii Microsoft.

+
+
+
+
+
+ + + + + + + +
+ + diff --git a/menu/implementare.html b/menu/implementare.html new file mode 100644 index 0000000..99dc771 --- /dev/null +++ b/menu/implementare.html @@ -0,0 +1,248 @@ + + + + + + Servicii - Implementare ERP + + + + + + + + + + +
+ + +
+ +
+ + +
+

Metodologia de Implementare ROA

+

Implementarea este un proiect de anvergura ce genereaza transformari organizationale si de aceea trebuie sustinuta printr-un management bine fundamentat.

+ +
+

Pasii Implementarii

+

Metodologia de implementare Romfast presupune parcurgerea de catre echipa comuna (reprezentantii beneficiarului + reprezentantii ROMFAST) a urmatorilor pasi:

+
    +
  1. Analiza preliminara
  2. +
  3. Analiza detaliata
  4. +
  5. Pregatirea tehnica a sistemului
  6. +
  7. Migrarea si initializarea datelor
  8. +
  9. Instruirea utilizatorilor
  10. +
  11. Startul productiv
  12. +
  13. Predarea sistemului
  14. +
  15. Evaluarea implementarii
  16. +
+
+ +
+

Planul de Lucru si Responsabilitati

+

Metoda de implementare include executia pasilor urmatori, finalizati cu intocmirea documentelor mentionate:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Denumirea FazeiObservatiiResponsabil BeneficiarResponsabil RomfastDocumente
1Definirea si agrearea graficului de implementareRomfast propune graficulGraficul de implementare
Desemnarea persoanelor implicate si a responsabilitatilorLista posturilor
Stabilirea politicilor contabile si organizarea companieiRomfast ofera consultantaMonografia contabila
2Executia Proiectului
Lucrari informaticeComunicari/Buletine informative
Lucrari de implementareProcese verbale de implementare
Servicii de instruireProcese verbale de instruire
Sesizari/Comunicari de eroare/modificareBeneficiarul intocmeste si transmiteSesizari
3Finalizare
Finalizarea fazelorProces verbal de finalizare a fazei
Finalizarea proiectuluiProces verbal de finalizare a implementarii
+
+
+
+ + + + + + + +
+ + \ No newline at end of file diff --git a/menu/js/ddlevelsfiles/arrow-down.gif b/menu/js/ddlevelsfiles/arrow-down.gif new file mode 100644 index 0000000..0b25069 Binary files /dev/null and b/menu/js/ddlevelsfiles/arrow-down.gif differ diff --git a/menu/js/ddlevelsfiles/arrow-right.gif b/menu/js/ddlevelsfiles/arrow-right.gif new file mode 100644 index 0000000..43b522c Binary files /dev/null and b/menu/js/ddlevelsfiles/arrow-right.gif differ diff --git a/menu/js/ddlevelsfiles/bulletlist.gif b/menu/js/ddlevelsfiles/bulletlist.gif new file mode 100644 index 0000000..5734bfb Binary files /dev/null and b/menu/js/ddlevelsfiles/bulletlist.gif differ diff --git a/menu/noutati.html b/menu/noutati.html new file mode 100644 index 0000000..2d53a90 --- /dev/null +++ b/menu/noutati.html @@ -0,0 +1,242 @@ + + + + + + Enterprise - Read More Page 1. Business Company + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ +
+
+
+
Top Slogan
+
+
+
+ Bottom Slogan
+
+ + + +
+
+ + +
+ + + + +
+
+
+
+

Compania Romfast a participat la TINCOOP 2008.

+

 

+

Romfast a participat la prima editie regionala a Targului National Cooperatist - TINCOOP 2008 organizat la Tulcea in perioada 21-22 noiembrie.

+

 

+

In cadrul targului, vizitatorii nostri au primit un cadou foatre util: Sistemul Contafin, cu aplicatiile: Contabilitate, Gestiune, Situatii Financiare, Personal - Salarii, Imobilizari, Manager si au beneficiat de consultanta specifica in domeniul tehnologiei informatiei. A avut loc si prezentarea sistemelor noastre informatice ROA - Romfast Applications si Contafin - Sistem Informatic Integrat.

+

Romfast la TINCOOP 2008Romfast la TINCOOP 2008

+

 

+
+

 

+

Facilitati noi la dispozitia dumneavoastra.

+

 

+

Odata cu relansarea site-ului oficial al companiei noastre, va oferim posibilitatea de a incerca in mod gratuit produsele noastre. Astfel puteti accesa direct din fata calculatorului dumneavoastra sistemul ROA - Romfast Applications dand click pe urmatorul link: Accesati online sistemul ROA!
+ Astfel veti putea accesa versiunea demo a sistemului nostru E.R.P., versiune care cuprinde doar modulele de interes general. De exemplu: puteti vizualiza modulul ROA - Resurse Umane dar nu puteti accesa ROA - Managementul Service-ului Auto, etc.

+

 

+

Deasemenea puteti sa descarcati si sa instalati in calculatorul dumneavoastra programul Contafin - Sistem Informatic Integrat accesand urmatorul link: Click Aici pentru a descarca Gratuit sistemul Contafin!

+


+ Contafin Demo este complet functional, dar necesita licenta pentru a se putea deschide luni contabile noi.

+
+
+
+
+ +
+

 

+

Acceseaza online ROA!

+

 

+

+

 

+

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+

 

+
+

 

+

Descarca Gratuit Contafin!

+

 

+

+

 

+

 

+

+
+ +
+
+
+
 
+
+ + + + + + + + + + \ No newline at end of file diff --git a/menu/noutatiimages/noutati.png b/menu/noutatiimages/noutati.png new file mode 100644 index 0000000..588c403 Binary files /dev/null and b/menu/noutatiimages/noutati.png differ diff --git a/menu/politica-confidentialitate.html b/menu/politica-confidentialitate.html new file mode 100644 index 0000000..ca5d5de --- /dev/null +++ b/menu/politica-confidentialitate.html @@ -0,0 +1,217 @@ + + + + Romfast - Contact + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ +
+
+
+
Top Slogan
+
+
+
+ Bottom Slogan
+
+ + + +
+
+ + +
+ + + + +
+
+ +

 

+

 

+

Politica confidentialitate

+

 

+

La 25 mai 2018 a intrat in vigoare si au devenit aplicabile prevederile Regulamentului European 679/2016 privind protectia persoanelor fizice in ceea ce priveste prelucrarea datelor cu caracter personal si libera circulatie a acestor „date” (GDPR).

+

 

+

Prin aceasta politica dorim sa va comunicam felul in care ROMFAST se conformeaza acestui regulament.

+

 

+

 

+
    +
  1. ROMFAST prelucreaza datele dumneavoastra cu buna credinta, conform prevederilor Regulamentului.
  2. +
  3. Informatiile pe care ROMFAST le stocheaza despre dumneavoastra, in calitate de client, datorita produselor si serviciile pe care le-ati achizitionat, sunt strict legate de identificare si de contact, in scopul derularii relatiei contractuale (ex. nume si prenume, CNP, adresa, telefon, adresa de e-mail etc.) pentru intocmirea facturilor sau efectuarea declaratiilor obligatorii catre autoritati, conform legii.
  4. +
  5. ROMFAST se angajeaza sa pastreze confidentialitatea datelor personale din contractele de funizare software si suport tehnic.
  6. +
  7. In virtutea contractului de suport tehnic incheiat intre dumneavoastra si ROMFAST, bazele dumneavoastra de date nu sunt pastrate de catre ROMFAST. +

    Accesul la bazele dumneavoastra de date se face numai in urma sesizarilor efectuate de dumneavoastra, daca este cazul.  Informatiile din bazele de date sunt folosite strict pentru rezolvarea sesizarilor si numai pe durata rezolvarii sesizarilor. Accesarea acestor informatii se va face strict cu acordul punctual al responsabilului dumneavoastra cu securitatea datelor sau a responsabilului desemnat de dumneavoastra.

    +
  8. +
  9. Datele personale ale clientilor nu fac si nu vor face obiectul unor tranzactii ale ROMFAST cu terte persoane (fizice sau juridice).
  10. +
+

Responsabilul cu Protectia Datelor: Marius Mutu, Telefon: 0241541000, Email: office@romfast.ro.

+

 

+

Pentru orice alte informatii, va stam la dispozitie.

+

Cu respect,

+

ROMFAST

+ +
+
+
+ +
+

 

+ +
+ +
+
+
+
 
+
+ \ No newline at end of file diff --git a/menu/referinte.html b/menu/referinte.html new file mode 100644 index 0000000..0c00383 --- /dev/null +++ b/menu/referinte.html @@ -0,0 +1,182 @@ + + + + + + Referinte Clienti - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+

Referinte

+ +
+
+
+
+
UZINA TERMOELECTRICA MIDIA SA
+
+

"Sistemul ROA Romfast Applications indeplineste toate necesitatile companiei noastre in domeniile securitatii si integritatii datelor, ergonomiei in operare si ariei de acoperire a activitatii pe care o desfasuram. Romfast este un furnizor eficient de suport tehnic si solutii informatice noi."

+
Dl. Turgay Chemal, Director Economic
+
+
+
+
+
+
+
+
CONPRESS GROUP
+
+

"Lucram cu Romfast de 4 ani, timp in care compania noastra si-a continuat dezvoltarea. Avem siguranta ca echipa Romfast ne va furniza solutii informatice complete si performante care sa sustina ritmul de dezvoltare pe care ni l-am propus si in continuare."

+
Dna. Liliana Voicu, Director Economic
+
+
+
+
+
+ +
+ +

Portofoliu Clienti

+

Printre beneficiarii sistemelor create de echipa Romfast se numara:

+ +
    +
  • ABC VAL Constanta - Constructii ROA
  • +
  • ARGENTA Constanta - Constructii ROA
  • +
  • EXPROCONTI S.A. Constanta - Constructii ROA
  • +
  • (METACOM) STEELBUILDING Constanta - Constructii ROA
  • +
  • RENAV INVEST Constanta - Constructii ROA
  • +
  • CONPRESS GROUP Constanta, Bucuresti - Comert ROA
  • +
  • ARROW - Constanta - Service auto ROA
  • +
  • AUTO HAUS TUDOR - Constanta - Service auto ROA
  • +
  • AUTOMOTIVE SERVICE - Constanta - Service auto ROA
  • +
  • C.N. ADMINISTRATIA CANALELOR NAVIGABILE S.A. Constanta - Transporturi ROA
  • +
  • DIRECTIA DE PAZA A JUDETULUI CONSTANTA - Paza obiective ROA
  • +
  • EUROPEAN METAL SERVICES Constanta - Activitati anexe transporturi ROA
  • +
  • HANUL PIRATILOR Constanta - Camping, restaurant, bar ROA
  • +
  • INTREPRINDEREA METALURGICA PENTRU AERONAUTICA METAV S.A. Bucuresti - Produse metalice ROA
  • +
  • POLICLINICA IOWEMED Constanta - Asistenta medicala ROA
  • +
  • JORDAN TV CABLE AND INTERNET SERVICES Amman, Iordania - TV si Internet ROA, JCS
  • +
  • TELEGRAF ADVERTISING Constanta - Editare ziare ROA
  • +
  • UZINA TERMOELECTRICA MIDIA S.A. Constanta - Productie, distributie energie ROA
  • +
+
+ + + + + + + +
+ + diff --git a/menu/roa-suport-tehnic.html b/menu/roa-suport-tehnic.html new file mode 100644 index 0000000..a168511 --- /dev/null +++ b/menu/roa-suport-tehnic.html @@ -0,0 +1,215 @@ + + + + + + Servicii - Suport Tehnic ROA + + + + + + + + + + +
+ + +
+ +
+ + +
+

Suport Tehnic ROA

+

Romfast vine in intampinarea clientilor sai cu suport tehnic si upgrade de aplicatii pentru a asigura utilizarea eficienta si completa a sistemului ROA.

+ +
+
+
+

Serviciile Noastre de Suport

+

Oferim suport pentru a corecta eventualele erori, a repara defectiuni ale bazelor de date, si pentru a asigura actualizarea legislativa si optimizarea programelor.

+

Evolutia permanenta a economiei si modificarile legislative genereaza necesitatea optimizarii si actualizarii continue a aplicatiilor informatice create de noi, astfel incat acestea sa se mentina la standardele cerute de clientii nostri.

+
+ +
+ +
+

Metoda de Acordare a Suportului Tehnic

+

Suportul tehnic se realizeaza prin mai multe cai, in functie de calea optima de realizare si de problema concreta ce trebuie solutionata: telefon, fax, e-mail, conectare securizata, sau interventie la sediul Romfast/Client.

+
Mentenanta si Actualizarea
+
    +
  • Mentenanta si actualizarea schemelor ROA in baza de date Oracle se realizeaza prin conectare securizata la distanta.
  • +
  • Actualizarea aplicatiilor ROA se realizeaza prin punerea la dispozitie a aplicatiilor pe un server FTP, de unde sunt descarcate automat in toate statiile de lucru.
  • +
+
+ +
+ +
+

Metode de Comunicare

+
+
+

+ +

+
+
+

Comunicam periodic lista lucrarilor efectuate prin:

+
    +
  • Buletin informativ (lunar): Lista modificarilor, actualizari legislative, optimizari si instructiuni.
  • +
  • Rapoarte de lucrari speciale (lunar): Lista lucrarilor de dezvoltare custom.
  • +
  • Lista actualizarilor (lunar): Versiunile de programe livrate.
  • +
  • Buletine speciale (la nevoie): Comunicari urgente sau importante.
  • +
  • Raspunsuri scrise la sesizari.
  • +
+
+
+
+
+

+ +

+
+
+

Beneficiarul ne poate comunica oricand:

+
    +
  • Sesizari de functionare eronata.
  • +
  • Cereri de modificare sau dezvoltare.
  • +
  • Sesizari de modificare legislativa neimplementata.
  • +
  • Sugestii de optimizare.
  • +
+

Beneficiarul poate crea si gestiona sesizarile prin intermediul programului ROA Suport Tehnic. Romfast inregistreaza, prioritizeaza si urmareste rezolvarea tuturor sesizarilor.

+
+
+
+
+
+
+ +
+
+
+
Baza de Date si Backup
+

Mentenanta bazei de date Oracle este inclusa in serviciile de suport tehnic. De asemenea, furnizam o metoda automata si periodica de back-up a datelor.

+
+
+
+
+
Contract
+

Serviciile de suport tehnic post-implementare fac obiectul unui "Contract de suport tehnic" ce va fi incheiat intre parti.

+
+
+
+
+
+ + + + + + + +
+ + \ No newline at end of file diff --git a/menu/roaclient-instalare.html b/menu/roaclient-instalare.html new file mode 100644 index 0000000..b18b804 --- /dev/null +++ b/menu/roaclient-instalare.html @@ -0,0 +1,46 @@ + Romfast - ROACLIENT INSTALAREs
Top Slogan
Bottom Slogan
+ + +
+

Instalare ROACLIENT

+

Inapoi la Suport Files

+

 

+

Descarca ROACLIENT_DEMO.EXE (43 MB)

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+

 

+

+ +

 

Acceseaza online ROA!

 

 

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

 


 

Descarca Contafin!

 

 



+ +
+ +
+

 

+

+

 

+

+

 

+

+ +
 
\ No newline at end of file diff --git a/menu/suport.html b/menu/suport.html new file mode 100644 index 0000000..b78bee8 --- /dev/null +++ b/menu/suport.html @@ -0,0 +1,19 @@ + Romfast - Suport Files
Top Slogan
Bottom Slogan
+

 

+

 

+

Kit Client 4.1

+

 

+

Kit Client 5

+

 

+

VFP7 SP1 Runtime

+

 

+

VFP9 SP2 Runtime

+

 

+

Oracle InstantClient x32 11.2.0.2 (53 MB)

+

Pe Windows X64 folositi %WINDIR%\SysWOW64\odbcad32.exe pentru managerul ODBC 32bits

+

 

+

Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)

+

 

+

Romfast Suport

+

 

+

 

Acceseaza online ROA!

 

 

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

 


 

Descarca Contafin!

 

 



 
\ No newline at end of file diff --git a/menu/suportimages/suport.png b/menu/suportimages/suport.png new file mode 100644 index 0000000..68da08a Binary files /dev/null and b/menu/suportimages/suport.png differ diff --git a/new-style.css b/new-style.css new file mode 100644 index 0000000..02b1b0b --- /dev/null +++ b/new-style.css @@ -0,0 +1,1046 @@ +/* Paleta de culori inspirata de logoul Romfast si design-ul modern */ +:root { + --primary-color: #08819c; /* Albastru principal din meniul vechi */ + --secondary-color: #424242; /* Gri inchis pentru text */ + --accent-color: #c01b14; /* Rosu pentru accent, link-uri etc. */ + --light-gray: #f8f9fa; /* Fundaluri deschise */ + --white: #ffffff; + + /* Dark Mode Colors */ + --dark-bg: #222222; + --dark-text: #cccccc; + --dark-card-bg: #2a2a2a; + --dark-card-border: #444444; +} + +html, body { + height: 100%; + margin: 0; + padding: 0; +} + +body { + font-family: 'Arial', sans-serif; + color: var(--secondary-color); + background: linear-gradient(to bottom, #003A4A, #005A6E) no-repeat fixed; /* Darker gradient, no repeat, fixed */ + background-size: 100% 100%; + transition: background 0.3s ease, color 0.3s ease; + padding: 50px; /* Increased padding to reveal more body gradient */ +} + +.page-wrapper { + background-color: var(--white); /* Solid background for content area */ + border: 10px solid rgba(0, 0, 0, 0.5); /* Solid milky black border */ + border-radius: 20px; /* Increased border-radius for the wrapper */ + overflow: hidden; /* Ensures content stays within rounded corners */ + margin: 0 auto; /* Center the wrapper */ + max-width: 1200px; /* Limit width for better visual */ + box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */ +} + +body.dark-mode .page-wrapper { + background-color: var(--dark-card-bg); /* Dark background for content area in dark mode */ + border: 10px solid rgba(0, 0, 0, 0.7); /* Darker milky black border in dark mode */ + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* Darker shadow in dark mode */ +} + +html.dark-mode { + /* No border on html */ +} + +main.container { + background-color: var(--white); /* White background for content in light mode */ + padding: 30px; /* Add some padding */ + border-radius: 0; /* No specific border-radius here, let wrapper handle it */ + box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */ +} + +body.dark-mode main.container { + background-color: var(--dark-card-bg); /* Dark background for content in dark mode */ + box-shadow: 0 0 15px rgba(0, 0, 0, 0.3); /* Darker shadow */ +} + +body.dark-mode { + color: var(--dark-text); + background-color: var(--dark-bg); +} + +body.dark-mode .card { + background-color: var(--dark-card-bg); + border-color: var(--dark-card-border); + color: var(--dark-text); /* Ensure card text is visible */ +} + +body.dark-mode .card-title { + color: var(--primary-color); /* Keep primary color for titles */ +} + +body.dark-mode .form-control { + background-color: var(--dark-card-bg); + color: var(--dark-text); + border-color: var(--dark-card-border); +} + +body.dark-mode .form-control:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 0.25rem rgba(8, 129, 156, 0.5); +} + +body.dark-mode .form-select { + background-color: var(--dark-card-bg); + color: var(--dark-text); + border-color: var(--dark-card-border); +} + +body.dark-mode .form-select option { + background-color: var(--dark-card-bg); + color: var(--dark-text); +} + +body.dark-mode .navbar-dark .navbar-nav .nav-link { + color: var(--dark-text); +} + +body.dark-mode .navbar-dark .navbar-nav .nav-link.active { + color: var(--white); +} + +body.dark-mode .navbar-dark .navbar-toggler-icon { + filter: invert(1); +} + +body.dark-mode footer.bg-dark { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text); +} + +body.dark-mode footer.bg-dark a { + color: var(--primary-color); +} + +/* === CLASE THEME-RESPONSIVE PERSONALIZATE === */ + +/* Secțiuni cu fundal adaptabil la temă */ +.theme-bg-section { + background-color: var(--light-gray); + transition: background-color 0.3s ease, color 0.3s ease; +} + +body.dark-mode .theme-bg-section { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; +} + +/* Carduri cu fundal adaptabil la temă */ +.theme-card { + background-color: var(--white); + transition: background-color 0.3s ease, color 0.3s ease; + border: 1px solid #ddd; +} + +body.dark-mode .theme-card { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; + border-color: var(--dark-card-border) !important; +} + +/* Override pentru bg-light să funcționeze corect */ +body.dark-mode .bg-light { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; +} + +/* Carduri cu bg-light specifice */ +body.dark-mode .card.bg-light { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; + border-color: var(--dark-card-border) !important; +} + +/* --- Componente Bootstrap Suprascrise --- */ + +.bg-primary { + background-color: var(--primary-color) !important; +} + +.btn-primary { + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.btn-primary:hover { + background-color: #066a82; /* O nuanta mai inchisa la hover */ + border-color: #066a82; +} + +.btn-outline-primary { + color: var(--primary-color); + border-color: var(--primary-color); +} + +.btn-outline-primary:hover { + background-color: var(--primary-color); + color: var(--white); +} + +.btn-secondary { + background-color: var(--secondary-color); + border-color: var(--secondary-color); +} + +a { + color: var(--accent-color); +} + +a:hover { + color: #9a1510; /* Rosu mai inchis la hover */ +} + +.form-control:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 0.25rem rgba(8, 129, 156, 0.25); +} + +/* --- Stiluri Specifice Demo --- */ + +.slogan { + font-size: 0.9rem; + color: rgba(255, 255, 255, 0.85); /* Alb-translucid pentru lizibilitate */ +} + + +/* Bara de Navigatie */ +.navbar-brand img { + transition: transform 0.3s ease; +} + +.navbar-brand img:hover { + transform: scale(1.1); +} + +.nav-link { + font-weight: bold; +} + +.dropdown-item:active { + background-color: var(--primary-color); +} + +/* Header with Responsive Background Images */ +header { + background-color: var(--primary-color); /* Fallback color */ + background-size: cover; + background-position: center; + background-repeat: no-repeat; + border-top-left-radius: 15px; /* Rounded top-left corner for header */ + border-top-right-radius: 15px; /* Rounded top-right corner for header */ + /* Removed overflow: hidden to fix dropdown clipping */ + + /* Default mobile background - WebP with PNG fallback */ + background-image: url('imagini_header/responsive/fundal-header-mobile.png'); +} + +/* WebP support detection - modern browsers will use this */ +.webp header { + background-image: url('imagini_header/responsive/fundal-header-mobile.webp'); +} + +/* Responsive backgrounds for different screen sizes */ +@media (min-width: 768px) { + header { + background-image: url('imagini_header/responsive/fundal-header-tablet.png'); + } + + .webp header { + background-image: url('imagini_header/responsive/fundal-header-tablet.webp'); + } +} + +@media (min-width: 1200px) { + header { + background-image: url('imagini_header/responsive/fundal-header-desktop.png'); + } + + .webp header { + background-image: url('imagini_header/responsive/fundal-header-desktop.webp'); + } +} + +@media (min-width: 1920px) { + header { + background-image: url('imagini_header/responsive/fundal-header-large.png'); + } + + .webp header { + background-image: url('imagini_header/responsive/fundal-header-large.webp'); + } +} + +header.sticky-top { + background-color: var(--primary-color); /* Ensure background color is applied for sticky header */ +} + +/* Carduri */ +.card { + border: 1px solid #ddd; + transition: box-shadow 0.3s ease, transform 0.3s ease; +} + +.card:hover { + transform: translateY(-5px); + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); +} + +.card-title { + color: var(--primary-color); + font-weight: bold; +} + +/* Footer */ +footer.bg-dark { + background-color: #343a40 !important; + border-bottom-left-radius: 15px; /* Rounded bottom-left corner for footer */ + border-bottom-right-radius: 15px; /* Rounded bottom-right corner for footer */ + overflow: hidden; /* Clip content to rounded corners */ +} + +/* === EXTENDED THEME-RESPONSIVE CLASSES FOR BOOTSTRAP COMPONENTS === */ + +/* Alert components with theme-aware backgrounds */ +.theme-alert-info, .theme-alert-warning, .theme-alert-success, +.theme-alert-primary, .theme-alert-secondary { + /* Light mode: inherit Bootstrap default colors */ + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; +} + +body.dark-mode .theme-alert-info { + background-color: #1e3a5f !important; + color: #b3d7ff !important; + border-color: #2d5a87 !important; +} + +body.dark-mode .theme-alert-warning { + background-color: #5c4a00 !important; + color: #fff3cd !important; + border-color: #997a00 !important; +} + +body.dark-mode .theme-alert-success { + background-color: #0a3622 !important; + color: #c6f6d5 !important; + border-color: #155724 !important; +} + +body.dark-mode .theme-alert-primary { + background-color: #1e3a5f !important; + color: #b3d7ff !important; + border-color: #2d5a87 !important; +} + +body.dark-mode .theme-alert-secondary { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; + border-color: var(--dark-card-border) !important; +} + +/* List-group components with theme support */ +.theme-list-group { + background-color: var(--white); + transition: background-color 0.3s ease; +} + +.theme-list-group-item { + background-color: var(--white); + border-color: #dee2e6; + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; +} + +body.dark-mode .theme-list-group { + background-color: var(--dark-card-bg) !important; +} + +body.dark-mode .theme-list-group-item { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; + border-color: var(--dark-card-border) !important; +} + +/* Breadcrumb navigation with dark mode support */ +body.dark-mode .breadcrumb { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; +} + +body.dark-mode .breadcrumb-item > a { + color: var(--dark-text) !important; + opacity: 0.8; +} + +body.dark-mode .breadcrumb-item > a:hover { + color: var(--dark-text) !important; + opacity: 1; +} + +body.dark-mode .breadcrumb-item.active { + color: var(--dark-text) !important; +} + +/* Dropdown menus with dark theme */ +body.dark-mode .dropdown-menu { + background-color: var(--dark-card-bg) !important; + border-color: var(--dark-card-border) !important; + box-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.075) !important; +} + +body.dark-mode .dropdown-item { + color: var(--dark-text) !important; +} + +body.dark-mode .dropdown-item:hover, +body.dark-mode .dropdown-item:focus { + background-color: var(--dark-card-border) !important; + color: var(--dark-text) !important; +} + +body.dark-mode .dropdown-divider { + border-color: var(--dark-card-border) !important; +} + +/* Accordion components with dark theme */ +body.dark-mode .accordion { + background-color: transparent !important; +} + +body.dark-mode .accordion-item { + background-color: var(--dark-card-bg) !important; + border-color: var(--dark-card-border) !important; +} + +body.dark-mode .accordion-button { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; + border-color: var(--dark-card-border) !important; +} + +body.dark-mode .accordion-button:not(.collapsed) { + background-color: var(--dark-card-border) !important; + color: var(--dark-text) !important; + box-shadow: none !important; +} + +body.dark-mode .accordion-body { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; +} + +body.dark-mode .accordion-button::after { + filter: invert(1); +} + +/* Table components with dark theme */ +body.dark-mode .table { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; +} + +body.dark-mode .table > tbody > tr > td, +body.dark-mode .table > thead > tr > th { + background-color: var(--dark-card-bg) !important; + color: var(--dark-text) !important; + border-color: var(--dark-card-border) !important; +} + +body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > td { + background-color: var(--dark-card-border) !important; +} + +body.dark-mode .table-bordered { + border-color: var(--dark-card-border) !important; +} + +body.dark-mode .table-primary { + background-color: var(--primary-color) !important; + color: var(--white) !important; +} + +/* ============================================================ */ +/* === RESPONSIVE MEDIA QUERIES - MOBILE-FIRST APPROACH === */ +/* ============================================================ */ + +/* === MOBILE RESPONSIVITY (320px - 767px) === */ +@media (max-width: 767px) { + /* Body padding reduction for mobile screens */ + body { + padding: 10px !important; /* Reduced from 50px to give more usable space on mobile */ + } + + /* Page wrapper adjustments for mobile */ + .page-wrapper { + border-width: 5px !important; /* Reduced from 10px for less intrusive border */ + border-radius: 10px !important; /* Reduced from 20px for subtle rounding */ + max-width: 100% !important; /* Ensure full width usage on mobile */ + } + + /* Main container padding optimization */ + main.container { + padding: 15px !important; /* Reduced from 30px for better mobile spacing */ + } + + /* Logo size reduction in navbar */ + .navbar-brand img { + height: 50px !important; /* Reduced from 70px for mobile navbar */ + margin-bottom: 3px !important; /* Adjust spacing */ + } + + /* Slogan font-size optimization */ + .slogan { + font-size: 0.8rem !important; /* Reduced from 0.9rem for mobile readability */ + line-height: 1.2; /* Better line spacing on small screens */ + } + + /* Typography responsive adjustments */ + h1 { + font-size: 1.5rem !important; /* Reduced for mobile */ + } + + h2 { + font-size: 1.3rem !important; /* Reduced for mobile */ + } + + h3 { + font-size: 1.2rem !important; /* Reduced for mobile */ + } + + h4 { + font-size: 1.1rem !important; /* Reduced for mobile */ + } + + h5 { + font-size: 1rem !important; /* Reduced for mobile */ + } + + h6 { + font-size: 0.95rem !important; /* Reduced for mobile */ + } + + p { + font-size: 0.95rem !important; /* Slightly reduced for mobile */ + line-height: 1.4; /* Better readability */ + } + + /* Card spacing optimizations */ + .card { + margin-bottom: 1rem !important; /* Optimized spacing between cards */ + } + + .card-body { + padding: 1rem 0.75rem !important; /* Reduced padding for mobile cards */ + } + + .card img { + max-height: 60px !important; /* Smaller card images on mobile */ + } + + /* Card hover effects reduced for mobile */ + .card:hover { + transform: translateY(-2px) !important; /* Reduced from -5px */ + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important; + } + + /* Button sizing for mobile */ + .btn { + font-size: 0.9rem !important; /* Slightly smaller text */ + padding: 0.5rem 1rem !important; /* Optimized button padding */ + min-height: 42px; /* Touch-friendly minimum height */ + } + + .btn-lg { + font-size: 1rem !important; + padding: 0.6rem 1.2rem !important; + min-height: 48px; + } + + .btn-sm { + font-size: 0.8rem !important; + padding: 0.4rem 0.8rem !important; + min-height: 36px; + } + + /* Navbar adjustments for mobile */ + .navbar { + padding-top: 0.75rem !important; /* Reduced navbar padding */ + padding-bottom: 0.75rem !important; + } + + .navbar-brand { + margin-right: 0.5rem !important; /* Reduced brand margin */ + } + + .nav-link { + font-size: 0.9rem !important; + padding: 0.5rem 0.75rem !important; + } + + /* Container adjustments for mobile */ + .container { + padding-left: 10px !important; /* Reduced container padding */ + padding-right: 10px !important; + } + + /* Hero section adjustments */ + .row.align-items-center { + text-align: center !important; /* Center align hero content on mobile */ + } + + .col-md-8, .col-md-4 { + margin-bottom: 1rem !important; /* Add spacing between columns on mobile */ + } + + /* List adjustments for mobile */ + .list-unstyled li { + margin-bottom: 0.5rem !important; /* Better list spacing */ + font-size: 0.9rem !important; + } + + /* Dropdown menu improvements for mobile */ + .dropdown-menu { + font-size: 0.9rem !important; /* Smaller dropdown text */ + min-width: 150px !important; + } + + .dropdown-item { + padding: 0.5rem 1rem !important; + } + + /* Footer adjustments */ + footer.bg-dark { + padding: 1rem 0 !important; /* Reduced footer padding */ + border-radius: 5px 5px 0 0 !important; /* Reduced border radius */ + } + + footer p { + font-size: 0.85rem !important; + margin-bottom: 0.5rem !important; + } + + /* Form elements optimization */ + .form-control { + font-size: 16px !important; /* Prevents zoom on iOS devices */ + padding: 0.5rem 0.75rem !important; /* Optimized form padding */ + } + + .form-select { + font-size: 16px !important; /* Prevents zoom on iOS devices */ + padding: 0.5rem 0.75rem !important; + } + + .form-label { + font-size: 0.9rem !important; + margin-bottom: 0.4rem !important; + } + + /* Table responsivity */ + .table-responsive { + font-size: 0.85rem !important; /* Smaller table text on mobile */ + } + + .table th, .table td { + padding: 0.5rem 0.25rem !important; + font-size: 0.85rem !important; + } + + /* Alert components spacing */ + .alert { + margin-bottom: 0.75rem !important; /* Reduced alert spacing */ + padding: 0.5rem 0.75rem !important; /* Smaller alert padding */ + font-size: 0.9rem !important; + } + + /* Accordion adjustments */ + .accordion-button { + font-size: 0.9rem !important; + padding: 0.75rem 1rem !important; + } + + .accordion-body { + padding: 0.75rem 1rem !important; + font-size: 0.9rem !important; + } + + /* Breadcrumb adjustments */ + .breadcrumb { + font-size: 0.85rem !important; + padding: 0.5rem 0.75rem !important; + } +} + +/* === SMALL MOBILE DEVICES (320px - 480px) === */ +@media (max-width: 480px) { + /* Extra small mobile adjustments */ + body { + padding: 5px !important; /* Even smaller padding for very small screens */ + } + + .page-wrapper { + border-width: 3px !important; /* Minimal border for small screens */ + border-radius: 8px !important; /* Subtle rounding */ + } + + main.container { + padding: 10px !important; /* Minimal container padding */ + } + + .navbar-brand img { + height: 45px !important; /* Further reduced logo for small screens */ + } + + .slogan { + font-size: 0.75rem !important; /* Even smaller slogan text */ + } + + h1 { font-size: 1.25rem !important; } + h2 { font-size: 1.15rem !important; } + h3 { font-size: 1.1rem !important; } + h4 { font-size: 1.05rem !important; } + h5 { font-size: 1rem !important; } + h6 { font-size: 0.9rem !important; } + + p { + font-size: 0.9rem !important; + line-height: 1.3; + } + + .btn { + font-size: 0.85rem !important; /* Smaller buttons */ + padding: 0.4rem 0.8rem !important; + min-height: 40px; + } + + .btn-lg { + font-size: 0.95rem !important; + padding: 0.5rem 1rem !important; + min-height: 44px; + } + + .card-body { + padding: 0.75rem 0.5rem !important; /* Minimal card padding */ + } + + .card img { + max-height: 50px !important; + } + + .container { + padding-left: 5px !important; /* Minimal container padding */ + padding-right: 5px !important; + } + + .navbar { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .nav-link { + font-size: 0.85rem !important; + padding: 0.4rem 0.6rem !important; + } + + .dropdown-menu { + font-size: 0.85rem !important; + } + + .form-control, .form-select { + font-size: 16px !important; + padding: 0.4rem 0.6rem !important; + } +} + +/* === TABLET RANGE (768px - 1199px) === */ +@media (min-width: 768px) and (max-width: 1199px) { + /* Tablet intermediate values */ + body { + padding: 25px !important; /* Intermediate padding for tablet */ + } + + .page-wrapper { + border-width: 8px !important; /* Intermediate border width */ + border-radius: 15px !important; /* Intermediate border radius */ + } + + main.container { + padding: 25px !important; /* Intermediate container padding */ + } + + .navbar-brand img { + height: 60px !important; /* Intermediate logo size */ + } + + .slogan { + font-size: 0.85rem !important; /* Intermediate slogan size */ + } + + /* Typography for tablet */ + h1 { font-size: 1.75rem !important; } + h2 { font-size: 1.5rem !important; } + h3 { font-size: 1.35rem !important; } + h4 { font-size: 1.2rem !important; } + h5 { font-size: 1.1rem !important; } + h6 { font-size: 1rem !important; } + + p { + font-size: 1rem !important; + line-height: 1.5; + } + + /* Card optimizations for tablet */ + .card-body { + padding: 1.2rem !important; /* Balanced card padding */ + } + + .card img { + max-height: 70px !important; /* Intermediate card image size */ + } + + .card:hover { + transform: translateY(-3px) !important; /* Intermediate hover effect */ + box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1) !important; + } + + /* Button sizing for tablet */ + .btn { + font-size: 0.95rem !important; + padding: 0.6rem 1.2rem !important; + min-height: 44px; + } + + .btn-lg { + font-size: 1.1rem !important; + padding: 0.7rem 1.4rem !important; + min-height: 50px; + } + + /* Navigation for tablet */ + .navbar { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .nav-link { + font-size: 0.95rem !important; + padding: 0.6rem 1rem !important; + } + + /* Footer for tablet */ + footer.bg-dark { + padding: 1.5rem 0 !important; + border-radius: 10px 10px 0 0 !important; + } + + /* Form elements for tablet */ + .form-control, .form-select { + padding: 0.6rem 0.8rem !important; + font-size: 0.95rem !important; + } + + /* Table for tablet */ + .table th, .table td { + padding: 0.6rem 0.4rem !important; + font-size: 0.9rem !important; + } +} + +/* === DESKTOP RANGE (1200px+) - Preserve Current Design === */ +@media (min-width: 1200px) { + /* Desktop - keep existing values */ + body { + padding: 50px; /* Original desktop padding */ + } + + .page-wrapper { + border-width: 10px; /* Original border width */ + border-radius: 20px; /* Original border radius */ + } + + main.container { + padding: 30px; /* Original container padding */ + } + + .navbar-brand img { + height: 70px; /* Original logo size - will be set in HTML */ + } + + .slogan { + font-size: 0.9rem; /* Original slogan size */ + } + + /* Enhanced typography for large screens */ + h1 { font-size: 2rem; } + h2 { font-size: 1.75rem; } + h3 { font-size: 1.5rem; } + h4 { font-size: 1.25rem; } + h5 { font-size: 1.1rem; } + h6 { font-size: 1rem; } + + p { + font-size: 1rem; + line-height: 1.6; + } + + /* Full card experience for desktop */ + .card-body { + padding: 1.5rem; /* Generous desktop padding */ + } + + .card img { + max-height: 80px; /* Full desktop image size */ + } + + .card:hover { + transform: translateY(-5px); /* Full desktop hover effect */ + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); + } + + /* Professional button sizing for desktop */ + .btn { + font-size: 1rem; + padding: 0.7rem 1.5rem; + min-height: 46px; + } + + .btn-lg { + font-size: 1.2rem; + padding: 0.8rem 1.8rem; + min-height: 52px; + } + + /* Navigation for desktop */ + .navbar { + padding-top: 1rem; + padding-bottom: 1rem; + } + + .nav-link { + font-size: 1rem; + padding: 0.7rem 1.2rem; + } + + /* Footer for desktop */ + footer.bg-dark { + padding: 2rem 0; + border-radius: 15px 15px 0 0; + } + + /* Form elements for desktop */ + .form-control, .form-select { + padding: 0.7rem 1rem; + font-size: 1rem; + } + + /* Table for desktop */ + .table th, .table td { + padding: 0.75rem; + font-size: 1rem; + } +} + +/* === LARGE DESKTOP (1600px+) === */ +@media (min-width: 1600px) { + /* Enhanced spacing for very large screens */ + body { + padding: 60px; + } + + main.container { + padding: 40px; + } + + h1 { font-size: 2.25rem; } + h2 { font-size: 2rem; } + + .card-body { + padding: 2rem; + } + + .btn { + font-size: 1.1rem; + padding: 0.8rem 1.8rem; + min-height: 50px; + } +} + +/* === RESPONSIVE UTILITIES === */ + +/* Responsive spacing utilities */ +@media (max-width: 767px) { + .mobile-p-1 { padding: 0.25rem !important; } + .mobile-p-2 { padding: 0.5rem !important; } + .mobile-p-3 { padding: 1rem !important; } + .mobile-m-1 { margin: 0.25rem !important; } + .mobile-m-2 { margin: 0.5rem !important; } + .mobile-m-3 { margin: 1rem !important; } + .mobile-mb-1 { margin-bottom: 0.25rem !important; } + .mobile-mb-2 { margin-bottom: 0.5rem !important; } + .mobile-mb-3 { margin-bottom: 1rem !important; } + .mobile-text-center { text-align: center !important; } + .mobile-text-left { text-align: left !important; } + .mobile-d-none { display: none !important; } + .mobile-d-block { display: block !important; } +} + +/* Responsive display utilities */ +@media (min-width: 768px) and (max-width: 1199px) { + .tablet-d-none { display: none !important; } + .tablet-d-block { display: block !important; } + .tablet-text-center { text-align: center !important; } +} + +@media (min-width: 1200px) { + .desktop-d-none { display: none !important; } + .desktop-d-block { display: block !important; } +} + +/* === ACCESSIBILITY IMPROVEMENTS === */ + +/* Focus states for mobile devices */ +@media (max-width: 767px) { + .btn:focus, .form-control:focus, .form-select:focus { + outline: 2px solid var(--primary-color) !important; + outline-offset: 2px !important; + } + + .nav-link:focus { + background-color: rgba(8, 129, 156, 0.1) !important; + outline: 2px solid var(--primary-color) !important; + outline-offset: 2px !important; + } +} + +/* High contrast mode support */ +@media (prefers-contrast: high) { + .card { + border-width: 2px !important; + } + + .btn { + border-width: 2px !important; + } + + .page-wrapper { + border-width: 12px !important; + } +} + +/* Reduced motion preferences */ +@media (prefers-reduced-motion: reduce) { + .card, .btn, .navbar-brand img { + transition: none !important; + } + + .card:hover { + transform: none !important; + } + + .navbar-brand img:hover { + transform: none !important; + } +} diff --git a/oauth2/index.php b/oauth2/index.php new file mode 100644 index 0000000..9b5b90a --- /dev/null +++ b/oauth2/index.php @@ -0,0 +1,136 @@ + $value) { + $query_string .= $key . '=' . $value . '&'; + } + // echo($query_string); + parse_str($query_string); + + $client_id = 'f4c59081e488ac326f32f8ab52620023e996dd82d7d01163'; + $client_secret = 'e65b9127acac254c5b9bfbbe68b9a6ca07b0d6df6dbb0023e996dd82d7d01163'; + $redirect_uri = 'https://romfast.ro/oauth2/'; + + // REFRESH TOKEN se apeleaza din ROA cu parametrul ?refresh_token=REFRESH_TOKEN pentru prelungirea valabilitatii tokenului + if (!empty($refresh_token)){ + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/token'; + + //The data you want to send via POST + $fields = [ + 'client_id' => $client_id, + 'client_secret' => $client_secret, + 'refresh_token' => $refresh_token, + 'redirect_uri' => $redirect_uri, + 'grant_type' => 'refresh_token' + ]; + + //url-ify the data for the POST + $fields_string = http_build_query($fields); + + //open connection + $ch = curl_init(); + + //set the url, number of POST vars, POST data + curl_setopt($ch,CURLOPT_URL, $url); + curl_setopt($ch,CURLOPT_POST, true); + curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); + + //So that curl_exec returns the contents of the cURL; rather than echoing it + curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); + + //execute post + $jsonobj = curl_exec($ch); + + // $arr = json_decode($jsonobj, true); + +/* $json = json_encode($jsonobj, JSON_UNESCAPED_SLASHES); + if ($json === false) { + // Avoid echo of empty string (which is invalid JSON), and + // JSONify the error message instead: + $json = json_encode(["error" => json_last_error_msg()]); + if ($json === false) { + // This should not happen, but we go all the way now: + $json = '{"error":"unknown"}'; + } + // Set HTTP response status code to: 500 - Internal Server Error + http_response_code(500); + } + */ + header("Content-Type: application/json"); + echo $jsonobj; + + // Close handle + //curl_close($ch); + + exit(); + } + + // COD AUTORIZARE se apeleaza din ROA fara parametri pentru obtinerea codului de autorizare de la ANAF. ANAF apeleaza aceasta pagina (callback) cu codul de autorizare + if (empty($code)) { + // Obtinere cod autorizare + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/authorize'; + $url .='?client_id='.$client_id; + $url .='&client_secret='.$client_secret; + $url .='&response_type=code'; + $url .='&redirect_uri='.$redirect_uri; + $url .='&token_content_type=jwt'; + + + // Redirectionez la pagina de autorizare ANAF pentru obtinerea codului de autorizare + // echo $url; + header('Location: '.$url); + exit(); + } + else { + // NEW TOKEN + // callback ANAF: https://romfast.ro/oauth2/?code=COD_AUTORIZARE + + // Obtinere token pe baza codului de autorizare + // print_r('Codul de autorizare este: '.$code); + + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/token'; + + //The data you want to send via POST + $fields = [ + 'client_id' => $client_id, + 'client_secret' => $client_secret, + 'code' => $code, + 'redirect_uri' => $redirect_uri, + 'grant_type' => 'authorization_code', + 'token_content_type' => 'jwt' + ]; + + //url-ify the data for the POST + $fields_string = http_build_query($fields); + + //open connection + $ch = curl_init(); + + //set the url, number of POST vars, POST data + curl_setopt($ch,CURLOPT_URL, $url); + curl_setopt($ch,CURLOPT_POST, true); + curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); + + //So that curl_exec returns the contents of the cURL; rather than echoing it + curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); + + //execute post + $jsonobj = curl_exec($ch); + //echo $jsonobj; + + $arr = json_decode($jsonobj, true); + + echo '

Copiati ANAF Access Token si Refresh Token de pe liniile urmatoare si completati-le in aplicatie

'; + echo '

Access Token:

'.$arr["access_token"].'

'; + + echo '

Refresh Token:

'.$arr["refresh_token"].'

'; + + // Close handle + curl_close($ch); + + } + + +?> \ No newline at end of file diff --git a/oauth2/index1.php b/oauth2/index1.php new file mode 100644 index 0000000..5941437 --- /dev/null +++ b/oauth2/index1.php @@ -0,0 +1,133 @@ + $value) { + $query_string .= $key . '=' . $value . '&'; + } + // echo($query_string); + parse_str($query_string); + + $client_id = 'f4c59081e488ac326f32f8ab52620023e996dd82d7d01163'; + $client_secret = 'e65b9127acac254c5b9bfbbe68b9a6ca07b0d6df6dbb0023e996dd82d7d01163'; + $redirect_uri = 'https://romfast.ro/oauth2/'; + + // REFRESH TOKEN se apeleaza din ROA cu parametrul ?refresh_token=REFRESH_TOKEN pentru prelungirea valabilitatii tokenului + if (!empty($refresh_token)){ + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/token'; + + //The data you want to send via POST + $fields = [ + 'client_id' => $client_id, + 'client_secret' => $client_secret, + 'refresh_token' => $refresh_token, + 'redirect_uri' => $redirect_uri, + 'grant_type' => 'refresh_token' + ]; + + //url-ify the data for the POST + $fields_string = http_build_query($fields); + + //open connection + $ch = curl_init(); + + //set the url, number of POST vars, POST data + curl_setopt($ch,CURLOPT_URL, $url); + curl_setopt($ch,CURLOPT_POST, true); + curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); + + //So that curl_exec returns the contents of the cURL; rather than echoing it + curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); + + //execute post + $jsonobj = curl_exec($ch); + + // $arr = json_decode($jsonobj, true); + +/* $json = json_encode($jsonobj, JSON_UNESCAPED_SLASHES); + if ($json === false) { + // Avoid echo of empty string (which is invalid JSON), and + // JSONify the error message instead: + $json = json_encode(["error" => json_last_error_msg()]); + if ($json === false) { + // This should not happen, but we go all the way now: + $json = '{"error":"unknown"}'; + } + // Set HTTP response status code to: 500 - Internal Server Error + http_response_code(500); + } + */ + header("Content-Type: application/json"); + echo $jsonobj; + + // Close handle + //curl_close($ch); + + exit(); + } + + // COD AUTORIZARE se apeleaza din ROA fara parametri pentru obtinerea codului de autorizare de la ANAF. ANAF apeleaza aceasta pagina (callback) cu codul de autorizare + if (empty($code)) { + // Obtinere cod autorizare + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/authorize'; + $url .='?client_id='.$client_id; + $url .='&client_secret='.$client_secret; + $url .='&response_type=code'; + $url .='&redirect_uri='.$redirect_uri; + + // Redirectionez la pagina de autorizare ANAF pentru obtinerea codului de autorizare + // echo $url; + header('Location: '.$url); + exit(); + } + else { + // NEW TOKEN + // callback ANAF: https://romfast.ro/oauth2/?code=COD_AUTORIZARE + + // Obtinere token pe baza codului de autorizare + // print_r('Codul de autorizare este: '.$code); + + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/token'; + + //The data you want to send via POST + $fields = [ + 'client_id' => $client_id, + 'client_secret' => $client_secret, + 'code' => $code, + 'redirect_uri' => $redirect_uri, + 'grant_type' => 'authorization_code' + ]; + + //url-ify the data for the POST + $fields_string = http_build_query($fields); + + //open connection + $ch = curl_init(); + + //set the url, number of POST vars, POST data + curl_setopt($ch,CURLOPT_URL, $url); + curl_setopt($ch,CURLOPT_POST, true); + curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); + + //So that curl_exec returns the contents of the cURL; rather than echoing it + curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); + + //execute post + $jsonobj = curl_exec($ch); + //echo $jsonobj; + + $arr = json_decode($jsonobj, true); + + echo '

Copiati ANAF Access Token si Refresh Token de pe liniile urmatoare si completati-le in aplicatie

'; + echo '

'.$arr["access_token"].'

'; + + echo 'refresh_token: '.$arr["refresh_token"]; + + // Close handle + curl_close($ch); + + } + + +?> \ No newline at end of file diff --git a/oauth2/index2.php b/oauth2/index2.php new file mode 100644 index 0000000..25e92dd --- /dev/null +++ b/oauth2/index2.php @@ -0,0 +1,133 @@ + $value) { + $query_string .= $key . '=' . $value . '&'; + } + echo($query_string); + parse_str($query_string); + + $client_id = 'f4c59081e488ac326f32f8ab52620023e996dd82d7d01163'; + $client_secret = 'e65b9127acac254c5b9bfbbe68b9a6ca07b0d6df6dbb0023e996dd82d7d01163'; + $redirect_uri = 'https://romfast.ro/oauth2/'; + + // REFRESH TOKEN se apeleaza din ROA cu parametrul ?refresh_token=REFRESH_TOKEN pentru prelungirea valabilitatii tokenului + if (!empty($refresh_token)){ + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/token'; + + //The data you want to send via POST + $fields = [ + 'client_id' => $client_id, + 'client_secret' => $client_secret, + 'refresh_token' => $refresh_token, + 'redirect_uri' => $redirect_uri, + 'grant_type' => 'refresh_token' + ]; + + //url-ify the data for the POST + $fields_string = http_build_query($fields); + + //open connection + $ch = curl_init(); + + //set the url, number of POST vars, POST data + curl_setopt($ch,CURLOPT_URL, $url); + curl_setopt($ch,CURLOPT_POST, true); + curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); + + //So that curl_exec returns the contents of the cURL; rather than echoing it + curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); + + //execute post + $jsonobj = curl_exec($ch); + + // $arr = json_decode($jsonobj, true); + +/* $json = json_encode($jsonobj, JSON_UNESCAPED_SLASHES); + if ($json === false) { + // Avoid echo of empty string (which is invalid JSON), and + // JSONify the error message instead: + $json = json_encode(["error" => json_last_error_msg()]); + if ($json === false) { + // This should not happen, but we go all the way now: + $json = '{"error":"unknown"}'; + } + // Set HTTP response status code to: 500 - Internal Server Error + http_response_code(500); + } + */ + header("Content-Type: application/json"); + echo $jsonobj; + + // Close handle + //curl_close($ch); + + exit(); + } + + // COD AUTORIZARE se apeleaza din ROA fara parametri pentru obtinerea codului de autorizare de la ANAF. ANAF apeleaza aceasta pagina (callback) cu codul de autorizare + if (empty($code)) { + // Obtinere cod autorizare + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/authorize'; + $url .='?client_id='.$client_id; + $url .='&client_secret='.$client_secret; + $url .='&response_type=code'; + $url .='&redirect_uri='.$redirect_uri; + + // Redirectionez la pagina de autorizare ANAF pentru obtinerea codului de autorizare + echo $url; + //header('Location: '.$url); + exit(); + } + else { + // NEW TOKEN + // callback ANAF: https://romfast.ro/oauth2/?code=COD_AUTORIZARE + + // Obtinere token pe baza codului de autorizare + // print_r('Codul de autorizare este: '.$code); + + $url = 'https://logincert.anaf.ro/anaf-oauth2/v1/token'; + + //The data you want to send via POST + $fields = [ + 'client_id' => $client_id, + 'client_secret' => $client_secret, + 'code' => $code, + 'redirect_uri' => $redirect_uri, + 'grant_type' => 'authorization_code' + ]; + + //url-ify the data for the POST + $fields_string = http_build_query($fields); + + //open connection + $ch = curl_init(); + + //set the url, number of POST vars, POST data + curl_setopt($ch,CURLOPT_URL, $url); + curl_setopt($ch,CURLOPT_POST, true); + curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); + + //So that curl_exec returns the contents of the cURL; rather than echoing it + curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); + + //execute post + $jsonobj = curl_exec($ch); + //echo $jsonobj; + + $arr = json_decode($jsonobj, true); + + echo '

Copiati ANAF Access Token si Refresh Token de pe liniile urmatoare si completati-le in aplicatie

'; + echo '

'.$arr["access_token"].'

'; + + echo 'refresh_token: '.$arr["refresh_token"]; + + // Close handle + curl_close($ch); + + } + + +?> \ No newline at end of file diff --git a/oauth2/info.php b/oauth2/info.php new file mode 100644 index 0000000..4baf9d2 --- /dev/null +++ b/oauth2/info.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/oauth2/php.ini b/oauth2/php.ini new file mode 100644 index 0000000..79bbdba --- /dev/null +++ b/oauth2/php.ini @@ -0,0 +1,2 @@ +log_errors = On +error_log = /oauth2/error_log.txt \ No newline at end of file diff --git a/politica-confidentialitate.html b/politica-confidentialitate.html new file mode 100644 index 0000000..41ba676 --- /dev/null +++ b/politica-confidentialitate.html @@ -0,0 +1,158 @@ + + + + + + Politica de Confidentialitate - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+
+
+

Politica de Confidentialitate

+

La 25 mai 2018 a intrat in vigoare si au devenit aplicabile prevederile Regulamentului European 679/2016 privind protectia persoanelor fizice in ceea ce priveste prelucrarea datelor cu caracter personal si libera circulatie a acestor „date” (GDPR).

+

Prin aceasta politica dorim sa va comunicam felul in care ROMFAST se conformeaza acestui regulament.

+ +
+ +
    +
  1. ROMFAST prelucreaza datele dumneavoastra cu buna credinta, conform prevederilor Regulamentului.
  2. +
  3. Informatiile pe care ROMFAST le stocheaza despre dumneavoastra, in calitate de client, datorita produselor si serviciile pe care le-ati achizitionat, sunt strict legate de identificare si de contact, in scopul derularii relatiei contractuale (ex. nume si prenume, CNP, adresa, telefon, adresa de e-mail etc.) pentru intocmirea facturilor sau efectuarea declaratiilor obligatorii catre autoritati, conform legii.
  4. +
  5. ROMFAST se angajeaza sa pastreze confidentialitatea datelor personale din contractele de funizare software si suport tehnic.
  6. +
  7. In virtutea contractului de suport tehnic incheiat intre dumneavoastra si ROMFAST, bazele dumneavoastra de date nu sunt pastrate de catre ROMFAST. Accesul la bazele dumneavoastra de date se face numai in urma sesizarilor efectuate de dumneavoastra, daca este cazul. Informatiile din bazele de date sunt folosite strict pentru rezolvarea sesizarilor si numai pe durata rezolvarii sesizarilor. Accesarea acestor informatii se va face strict cu acordul punctual al responsabilului dumneavoastra cu securitatea datelor sau a responsabilului desemnat de dumneavoastra.
  8. +
  9. Datele personale ale clientilor nu fac si nu vor face obiectul unor tranzactii ale ROMFAST cu terte persoane (fizice sau juridice).
  10. +
+ +
+
+

Responsabilul cu Protectia Datelor: Marius Mutu

+

Telefon: 0241 541 000

+

Email: office@romfast.ro

+
+
+ +

Pentru orice alte informatii, va stam la dispozitie.

+

Cu respect,
Echipa ROMFAST

+
+
+
+ + + + + + + +
+ + diff --git a/roa/2.html b/roa/2.html new file mode 100644 index 0000000..9692133 --- /dev/null +++ b/roa/2.html @@ -0,0 +1,270 @@ + + + ROA - Sistem Informatic ERP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ Sisteme informatice ERP +
+
+
+
Romfast
+
+
+
+ Informatia in mainile tale
+
+ + + +
+
+ + +
+ + + + +
+
+

Home

+

 

+ ROA - romfast applications
+
+ +
+ + + +

ROAROA este un sistem informatic complex destinat companiilor medii si mari.

+

 

+

Specificatii

+

 

+

+ + ROA - Romfast Applications este un sistem E.R.P. (Enterprise Resource Planning) care inglobeaza aplicatii de tipul C.R.M. (Customer Relationship Management), S.C.M. (Supply Chain Management), H.R. (Human Resources), B.I. (Business Intelligence).

+

 

+

Sistemul E.R.P. (Enterprise Resource Planning) este instrumentul software care faciliteaza integrarea tuturor informatiilor dintr-o organizatie într-o platforma unica asigurand astfel transparenta datelor în cadrul companiei si accesul la orice tip de informatie utila în desfasurarea activitatii. Multi oameni de afaceri au numit ERP-ul ca fiind "modalitatea de a pune in ordine informatiile din cadrul companiei." +

+
+

+ +

 

+

Aplicatii ROA

+

 

+

ROA cuprinde module care rezolva principalele probleme ale organizatiilor medii si mari: gestiunea economica, automatizarea fluxurilor de date, regasirea si raportarea rapida a informatiilor, reproiectarea fluxurilor informatice.

+

 

+

ROA cuprinde mai multe aplicatii in care fluxurile economice sunt aprofundate separat:

+

 

+ +

 

+
+

Avantaje

+

 

+

Aplicatiile ROA isi partajeaza perfect problematica ridicata de gestionarea si conducerea unei companii, din cele mai diferite domenii de activitate si fara a acoperi in mod redundant aceeasi problema. +

+


+

+

 

+
+

+

+

+

+

 

+
+

+
+
+
+ +
+

 

+

Acceseaza online ROA!

+

 

+

Acceseaza ROA

+

 

+

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+

 

+
+

 

+

Suport tehnic ROA

+

 

+
+

 

+ +

 

+

+
+ +
+
+
+
 
+
+ + + \ No newline at end of file diff --git a/roa/3.html b/roa/3.html new file mode 100644 index 0000000..bcc2c37 --- /dev/null +++ b/roa/3.html @@ -0,0 +1,254 @@ + + + ROA - Sistem Informatic ERP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ +
+
+
+
Top Slogan
+
+
+
+ Bottom Slogan
+
+ + + +
+
+ + +
+ + + + +
+ + +
+ + + +

696fa1ff538c811 ROA - Romfast Applications este un sistem E.R.P. (Enterprise Resource Planning) care inglobeaza aplicatii de tipul C.R.M. (Customer Relationship Management), S.C.M. (Supply Chain Management), H.R. (Human Resources), B.I. (Business Intelligence).

+

 

+

Sistemul E.R.P. (Enterprise Resource Planning) este instrumentul software care faciliteaza integrarea tuturor informatiilor dintr-o organizatie într-o platforma unica asigurand astfel transparenta datelor în cadrul companiei si accesul la orice tip de informatie utila în desfasurarea activitatii. Multi oameni de afaceri au numit ERP-ul ca fiind "modalitatea de a pune in ordine informatiile din cadrul companiei."

+

 

+

Aplicatia C.R.M. (Customer Relationship Management) este un instrument puternic de raportare si analiza care ajuta la o mai buna intelegere a nevoilor si comportamentului clientilor. Un sistem eficient de CRM permite identificarea oportunitatilor in timp cat mai scurt, identificarea trend-urilor si stabilirea relatiilor intre clientii cei mai profitabili si produsele folosite de acestia, masurarea eficacitatii noilor produse si servicii.

+

 

+

Aplicatia S.C.M. (Supply Chain Management) este o combinatie de procedee care vizeaza imbunatatirea modului in care o companie gaseste componentele de care are nevoie pentru a oferi mai departe un produs sau un serviciu clientilor sai.

+

Managementul Lantului de Aprovizionare este compus din 5 parti principale:

+

 

+
    +
  1. Planul - o strategie pentru administrarea tuturor resurselor care sunt necesare pentru produsele sau serviciile unei companii;
  2. +
  3. Sursa - furnizorii de la care se obtin produsele si serviciile necesare crearii produselor companiei;
  4. +
  5. Produsul - planificarea activitatilor necesare pentru productie, testare, ambalare si pregatire pentru livrare;
  6. +
  7. Livrarea sau logistica - primirea ordinelor de livrare de la clienti, dezvoltarea unei retele de depozite, alegerea curierilor pentru transportul produselor si sistemul de receptionare a platilor;
  8. +
  9. Returul - creerea unei retele pentru primirea produselor defecte si/sau in exces si suportul pentru clientii care au probleme cu produsele cumparate.
  10. +
+

 

+

H.R. (Human Resources) este o aplicatie de management al Resurselor Umane din cadrul companiei. Informatiile referitoare la personal sunt de natura personala, profesionala si financiara. In baza acestor informatii se pot genera o serie de rapoarte ce pot fi vizualizate si/sau listate, se creaza state de salarii ce pot fi modificate interactiv de utilizator si se calculeaza drepturile de natura salariala cu privire la concedii, sporuri si popriri.

+

 

+

Aplicatia B.I. (Business Intelligence) permite companiilor sa isi gestioneze numarul mare de baze de date si sa ofere angajatilor, echipei de management si partenerilor lor o privire de ansamblu, usor de inteles. Aceasta aplicatie este folosita pentru a gasi noi oportunitati de crestere a veniturilor organizatiei, pentru a reduce costurile, realoca resursele si pentru imbunatatirea eficientei operationale.

+

 

+

ROA - Romfast Applications este solutia care centralizeaza toate aceste informatii, iar C.R.M.-ul, S.C.M.-ul si H.R.-ul beneficiaza de pe urma existentei unei singure surse de informatii la zi.

+

+


+

+ +
+
+
+ +
+

 

+

Acceseaza online ROA!

+

 

+

Acceseaza ROA

+

 

+

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+

 

+
+

 

+

Suport tehnic ROA

+

 

+
+

 

+

Specificatii ROA

+

 

+
+

 

+

Avantaje ROA

+

 

+

+
+ +
+
+
+
 
+
+ + + + \ No newline at end of file diff --git a/roa/4.html b/roa/4.html new file mode 100644 index 0000000..f1b4fe0 --- /dev/null +++ b/roa/4.html @@ -0,0 +1,253 @@ + + + ROA - Sistem Informatic ERP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ Sisteme informatice ERP +
+
+
+
Romfast
+
+
+
+ Informatia in mainile tale
+
+ + + +
+
+ + +
+ + + + +
+

Avantajele Sistemului ROA:


+
+ +
+ + + +

- functionare integrata: permite operarea unui document o singura data si reflectarea sa in rapoartele financiar-contabile si comerciale;

+

- recuperarea investitiei: ROA Romfast Applications duce la cresterea productivitatii angajatilor si a profitului companiei;

+

- siguranta datelor: este asigurata de tehnologiile Oracle care garanteaza rapiditatea operarii unui volum mare de informatii din locatii diferite. Sistemul de securitate a datelor permite accesul diferentiat al utilizatorilor la anumite aplicatii din cadrul programului, functie de statutul utilizatorului in organigrama beneficiarului.

+

- disponibilitate: echipa de suport sta la dispozitia clientului oferind solutiile optime cu promptitudine;

+

- confidentialitate: toate informatiile implicate in colaborarea cu Romfast sunt strict confidentiale;

+

- eficienta in implementare: experienta si profesionalismul echipei Romfast conduc la implementarea Sistemului Roa in termenul stabilit;

+

- conformitate cu legislatia: implementarea modificarilor legislative se realizeaza in timp util.

+

Prin aplicatiile ROA utilizam tehnologie Oracle.

+

 

+

 

+

Oracle este unul dintre liderii industriei mondiale de software si cel mai mare furnizor de solutii de gestiune a informatiilor de intreprindere. Tehnologia Oracle poate fi regasita in aproape orice industrie de pe glob si in infrastructura a 98 din companiile listate in Fortune 100.

+

 

+

Exploatarea acestei tehnologii de catre programatori nu este o sarcina usoara, si necesita experienta, efort si dedicare, dar avantajele pentru utilizatori sunt hotaratoare:

+
    +
  1. Viteza crescuta in lucrul cu cantitati de date mari si foarte mari. Aceasta tehnologie este speciala pentru firme medii si mari.
  2. +
  3. Securitatea datelor. Independent de securitatea generala a retelei informatice (hardware si software), bazele de date sunt aparate prin sistemul propriu de securitate.
  4. +
  5. Siguranta datelor. Siguranta tranzactiilor este asigurata si in conditii mai dificile de lucru: accesare concomitenta (aceleasi date sunt accesate de multe persoane in acelasi timp), accesare prin medii de transmisie intermitente (internet, retea metropolitana), accidente frecvente hardware (caderi de tensiune, intreruperea conexiunilor de retea).
  6. +
  7. Posibilitatea de a lucra in puncte aflate la distanta. In conditiile mentinerii unei conectari corespunzatoare cu serverul, prin retea securizata se poate lucra excelent de la distanta – in oricate puncte din oras sau din tara.
  8. +
  9. Posibilitatea deschiderii catre exterior. Schimbul de informatii online intre firme / parteneri de afaceri / piata si societate este o tendinta mondiala si o necesitate in stransa legatura cu reducerea costurilor. Tehnologia Oracle permite dezvoltarea de aplicatii web-based ce pot publica si atrage informatii prin intermediul internetului, prin folosirea celor mai noi standarde deschise.
  10. +
  11. Flexibilitate. Aplicatiile ROA au fost proiectate avand in atentie in mod special problema flexibilitatii.
  12. +
  13. Ergonomie. Eforturile noastre sustinute de cresterea ergonomiei sunt permanente.
  14. +
+

+

+


+

+ +
+
+
+ +
+

 

+

Acceseaza online ROA!

+

 

+

Acceseaza ROA

+

 

+

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+

 

+
+

 

+

Suport tehnic ROA

+

 

+
+

 

+

Specificatii ROA

+

 

+
+

 

+

Aplicatii ROA

+

 

+

+
+ +
+
+
+
 
+
+ + + + + \ No newline at end of file diff --git a/roa/5.html b/roa/5.html new file mode 100644 index 0000000..89451ce --- /dev/null +++ b/roa/5.html @@ -0,0 +1,317 @@ + + + ROA - Sistem Informatic ERP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ sisteme informatice ERP +
+
+
+
Romfast
+
+
+
+ Informatia in mainile tale
+
+ + + +
+
+ + +
+ + + + +
+ + +
+

 

+ +

Analiza globala  Analiza globala a companiei

+

 

+

   ROA Manager

+

   ROA Situatii operative

+

  

+

     

+

     

+
+

 

+ +

Management activitate  Managementul Activitatii

+

 

+

  Contine aplicatii specifice ficarei activitati.

+

 

+

   ROA Retail & Distributie

+

   ROA Service Auto.

+

   ROA Cablu & TV.

+

   ROA Productie

+

   ROA Servicii

+

   ROA Restaurant

+

   ROA Hotel

+

 

+

Alte tipuri de activitati.     

+

     

+
+ + + +

Financiar contabilitate  Managementul Financiar-Contabil

+

 

+

  ROA Financiar-Contabilitate.

+

  ROA Situatii financiare.

+

 

+

 

+
+

 

+

Gestiuni         Managementul Gestiunilor

+

 

+

              ROA Gestiune generala

+

              ROA Vanzare en-detali

+

+

+

 

+
+

 

+

Imobilizari       Managementul Imobilizarilor

+

 

+

          ROA Managementul imobilizarilor corporale, necorporale si in curs

+

          ROA Gestiunea obiectelor de inventar in folosinta

+

     

+

     

+
+

 

+ +

Resurse umane  Managementul Resurselor Umane

+

 

+

   ROA Resurse umane

+

   ROA Salarizarea personalului

+

   ROA Normarea muncii

+

   ROA Declaratii de salarii

+

     

+

     

+
+

 

+ +

Relatii clienti  Managementul Relatiilor cu Clientii

+

 

+

   ROA Contracte clienti

+

   ROA Comenzi clienti

+

   ROA Ofertare

+

   ROA Comercial facturare

+

   ROA Politici de preturi si tarife

+

     

+

     

+
+

 

+ +

Relatii furnizori  Managementul Relatiilor cu Furnizorii

+

 

+

   ROA Contracte furnizori

+

   ROA Aprovizionare

+

  

+

     

+

     

+
+ + +

+


+

+ +
+
+
+ +
+

 

+

Acceseaza online ROA!

+

 

+

Acceseaza ROA

+

 

+

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+

 

+
+

 

+

Suport tehnic ROA

+

 

+
+

 

+

Specificatii ROA

+

 

+
+

 

+

Avantaje ROA

+

 

+

+
+ +
+
+
+
 
+
+ + + \ No newline at end of file diff --git a/roa/aplicatii-erp.html b/roa/aplicatii-erp.html new file mode 100644 index 0000000..cacdf89 --- /dev/null +++ b/roa/aplicatii-erp.html @@ -0,0 +1,188 @@ + + + + + + ROA - Sistem Informatic ERP + + + + + + + + + + +
+ + +
+ +
+ + +
+
+
+

ROA - Romfast Applications

+

ROA este un sistem informatic complex de tip E.R.P. (Enterprise Resource Planning), destinat companiilor medii si mari, care inglobeaza aplicatii de tipul C.R.M., S.C.M., H.R. si B.I.

+ +
+ +
+

Ce este un sistem ERP?

+

Sistemul E.R.P. este instrumentul software care faciliteaza integrarea tuturor informatiilor dintr-o organizatie intr-o platforma unica, asigurand astfel transparenta datelor in cadrul companiei si accesul la orice tip de informatie utila in desfasurarea activitatii. Multi oameni de afaceri au numit ERP-ul ca fiind "modalitatea de a pune in ordine informatiile din cadrul companiei."

+
+ +
+

Aplicatii ROA

+

ROA cuprinde module care rezolva principalele probleme ale organizatiilor medii si mari: gestiunea economica, automatizarea fluxurilor de date, regasirea si raportarea rapida a informatiilor, si reproiectarea fluxurilor informatice.

+

Sistemul este format din urmatoarele aplicatii principale:

+ +
+ +
+

Avantaje ROA

+

Aplicatiile ROA isi partajeaza perfect problematica ridicata de gestionarea si conducerea unei companii, din cele mai diferite domenii de activitate si fara a acoperi in mod redundant aceeasi problema.

+
+
+ +
+
+
+ Testeaza ROA Online +
+
+ Acceseaza ROA +

Conecteaza-te la serverul nostru de demo pentru a testa capabilitatile sistemului ROA.

+ Acceseaza ROA DEMO +
+ +
+
+
+
Suport Tehnic
+

Ai nevoie de ajutor? Echipa noastra de suport este aici pentru tine.

+ Contacteaza Suportul +
+
+
+
+
+ + + + + + + +
+ + \ No newline at end of file diff --git a/roa/aplicatii.html b/roa/aplicatii.html new file mode 100644 index 0000000..275ea33 --- /dev/null +++ b/roa/aplicatii.html @@ -0,0 +1,316 @@ + + + + + + ROA - Sistem Informatic ERP + + + + + + + + + + +
+ + +
+ +
+ +
+ + + + +
+
+

ROA - Aplicatii ERP

+

Sistem informatic complex pentru managementul companiei

+
+
+
+
+
Acceseaza online ROA!
+ + Acceseaza ROA + +

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+ +
+
+
+
+ + +
+ +
+
+
+ + +
+
+
+ + +
+
+
+ +

Contine aplicatii specifice fiecarei activitati.

+
    +
  • ROA Retail & Distributie
  • +
  • ROA Service Auto
  • +
  • ROA Cablu & TV
  • +
  • ROA Productie
  • +
  • ROA Servicii
  • +
  • ROA Restaurant
  • +
  • ROA Hotel
  • +
+
+
+
+ + + + + +
+
+
+ + +
+
+
+ + + + + +
+
+
+ +
    +
  • ROA Resurse umane
  • +
  • ROA Salarizarea personalului
  • +
  • ROA Normarea muncii
  • +
  • ROA Declaratii de salarii
  • +
+
+
+
+ + + + + +
+
+
+ + +
+
+
+
+
+ + + + + + +
+ + \ No newline at end of file diff --git a/roa/avantaje.html b/roa/avantaje.html new file mode 100644 index 0000000..ba55228 --- /dev/null +++ b/roa/avantaje.html @@ -0,0 +1,305 @@ + + + + + + ROA - Avantaje + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + +
+
+
+

Avantaje ROA

+

Descoperiți beneficiile sistemului integrat ROA - Romfast Applications pentru afacerea dumneavoastră

+
+
+
+ + +
+
+ +
+
+
+
+ +
+
Integrare Completă
+

Toate departamentele companiei lucrează cu aceeași bază de date. Informațiile sunt actualizate în timp real în toate modulele sistemului.

+
+
+
+ + +
+
+
+
+ +
+
Reducerea Costurilor
+

Eliminarea dublării activităților și optimizarea proceselor conduc la reduceri semnificative de costuri operaționale.

+
+
+
+ + +
+
+
+
+ +
+
Eficiență Crescută
+

Automatizarea proceselor repetitive și fluxurile de lucru optimizate cresc productivitatea angajaților.

+
+
+
+ + +
+
+
+
+ +
+
Raportare Avansată
+

Rapoarte detaliate și analize în timp real care ajută la luarea deciziilor informate de management.

+
+
+
+ + +
+
+
+
+ +
+
Conformitate Legală
+

Sistemul este actualizat permanent conform legislației românești în vigoare pentru contabilitate și fiscal.

+
+
+
+ + +
+
+
+
+ +
+
Scalabilitate
+

Sistemul se adaptează la creșterea companiei, suportând un număr crescut de utilizatori și volume mari de date.

+
+
+
+
+
+ + +
+

Beneficii Detaliate

+
+
+
+

Managementul Integrat al Informațiilor

+

Exploatarea tehnologiei moderne de către programatorii Romfast nu este o sarcină ușoară și necesită experiență, efort și dedicare, dar avantajele pentru utilizatori sunt hotărâtoare:

+ +
    +
  • Transparența datelor: Toate informațiile sunt centralizate într-o singură platformă, eliminând contradicțiile și duplicările.
  • +
  • Accesul rapid la informații: Orice tip de informație utilă în desfășurarea activității este disponibilă instant.
  • +
  • Controlul proceselor: Monitorizarea în timp real a tuturor activităților companiei.
  • +
  • Securitatea datelor: Sistem robust de backup și protecție a informațiilor critice ale companiei.
  • +
+ +

Avantaje Specifice pentru Fiecare Departament

+ +

Contabilitate

+
    +
  • Automatizarea înregistrărilor contabile
  • +
  • Generarea automată a declarațiilor fiscale
  • +
  • Rapoarte financiare în timp real
  • +
  • Conformitate cu legislația în vigoare
  • +
+ +

Gestiune

+
    +
  • Controlul stocurilor în timp real
  • +
  • Optimizarea aprovizionării
  • +
  • Urmărirea mișcării marfurilor
  • +
  • Reducerea pierderilor
  • +
+ +

Resurse Umane

+
    +
  • Calculul automat al salariilor
  • +
  • Gestiunea concediilor și absențelor
  • +
  • Rapoarte privind activitatea personalului
  • +
  • Conformitate cu legislația muncii
  • +
+ +

Management

+
    +
  • Dashboard-uri executive cu indicatori cheie
  • +
  • Analize de trend și prognoze
  • +
  • Rapoarte consolidate
  • +
  • Suport pentru luarea deciziilor
  • +
+ +
+ +
+
+
+ + +
+
+
+
+

Testează ROA Online!

+ + Acceseaza ROA + +

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+
+ +
+

Suport tehnic ROA

+ +
+

Specificații ROA

+ +
+

Implementare ROA

+
+
+
+
+
+
+ + +
+
+

Copyright 2024 © Romfast SRL.

+
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/roa/images/auto1p-generare.jpg b/roa/images/auto1p-generare.jpg new file mode 100644 index 0000000..82b2419 Binary files /dev/null and b/roa/images/auto1p-generare.jpg differ diff --git a/roa/images/auto2p-normare.jpg b/roa/images/auto2p-normare.jpg new file mode 100644 index 0000000..2bcfd15 Binary files /dev/null and b/roa/images/auto2p-normare.jpg differ diff --git a/roa/images/auto3p-validare.jpg b/roa/images/auto3p-validare.jpg new file mode 100644 index 0000000..6856e0c Binary files /dev/null and b/roa/images/auto3p-validare.jpg differ diff --git a/roa/images/auto4p-facturare.jpg b/roa/images/auto4p-facturare.jpg new file mode 100644 index 0000000..1241e08 Binary files /dev/null and b/roa/images/auto4p-facturare.jpg differ diff --git a/roa/images/fincont.gif b/roa/images/fincont.gif new file mode 100644 index 0000000..80921e8 Binary files /dev/null and b/roa/images/fincont.gif differ diff --git a/roa/images/roaauto3.jpg b/roa/images/roaauto3.jpg new file mode 100644 index 0000000..28d1c60 Binary files /dev/null and b/roa/images/roaauto3.jpg differ diff --git a/roa/images/roacontracteclienti.png b/roa/images/roacontracteclienti.png new file mode 100644 index 0000000..f99645b Binary files /dev/null and b/roa/images/roacontracteclienti.png differ diff --git a/roa/images/roacontractefurnizori.png b/roa/images/roacontractefurnizori.png new file mode 100644 index 0000000..29fcd1a Binary files /dev/null and b/roa/images/roacontractefurnizori.png differ diff --git a/roa/images/roafacturare.png b/roa/images/roafacturare.png new file mode 100644 index 0000000..922fde9 Binary files /dev/null and b/roa/images/roafacturare.png differ diff --git a/roa/images/roafinanciarcontab.png b/roa/images/roafinanciarcontab.png new file mode 100644 index 0000000..50ebdc1 Binary files /dev/null and b/roa/images/roafinanciarcontab.png differ diff --git a/roa/images/roagestiune.png b/roa/images/roagestiune.png new file mode 100644 index 0000000..978f473 Binary files /dev/null and b/roa/images/roagestiune.png differ diff --git a/roa/images/roaimobilizari.png b/roa/images/roaimobilizari.png new file mode 100644 index 0000000..47eac38 Binary files /dev/null and b/roa/images/roaimobilizari.png differ diff --git a/roa/images/roamanager.png b/roa/images/roamanager.png new file mode 100644 index 0000000..443c2d4 Binary files /dev/null and b/roa/images/roamanager.png differ diff --git a/roa/images/roaobiecteinventar.png b/roa/images/roaobiecteinventar.png new file mode 100644 index 0000000..a016346 Binary files /dev/null and b/roa/images/roaobiecteinventar.png differ diff --git a/roa/images/roapac.gif b/roa/images/roapac.gif new file mode 100644 index 0000000..8a44bf0 Binary files /dev/null and b/roa/images/roapac.gif differ diff --git a/roa/images/roasitfin.png b/roa/images/roasitfin.png new file mode 100644 index 0000000..716b2ff Binary files /dev/null and b/roa/images/roasitfin.png differ diff --git a/roa/images/roaspecificatii.png b/roa/images/roaspecificatii.png new file mode 100644 index 0000000..915b909 Binary files /dev/null and b/roa/images/roaspecificatii.png differ diff --git a/roa/roa-auto.html b/roa/roa-auto.html new file mode 100644 index 0000000..5dc364d --- /dev/null +++ b/roa/roa-auto.html @@ -0,0 +1,9 @@ + + +404 Not Found + +

Not Found

+

The requested URL /roa/roa-auto.html was not found on this server.

+
+
Apache/2.2.6 (Fedora) Server at www.romfast.ro Port 80
+ diff --git a/roa/roa-comenzi-clienti.html b/roa/roa-comenzi-clienti.html new file mode 100644 index 0000000..5f85f36 --- /dev/null +++ b/roa/roa-comenzi-clienti.html @@ -0,0 +1,205 @@ + + + + + + ROA Comenzi clienti - Romfast + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+
+ ROA Comenzi clienti +
+
+
+
+ + +
+
+
+
+
+
+

Scopul acestui program este acela de a facilita preluarea si prelucrarea comenzilor de la clienti.

+
+ +

Organizarea programului:

+
+
    +
  • este in 4 pagini cu urmatoarele roluri:
  • +
  • Initializari: date despre agenti, delegati, responsabili, articole, etc.
  • +
  • Comenzi: lista comenzilor cu functiile:
  • +
  • filtrare si ordonare a comenzilor;
  • +
  • adaugare de comenzi noi;
  • +
  • modificare/stergere; duplicarea unei comenzi;
  • +
  • lansarea de dispozitii de livrare;
  • +
  • gruparea mai multor lucrari pe o lucrare interna in scopul de a:
  • +
  • dimensiona productia – in cazul in care compania este producatoare,
  • +
  • calcula cantitatile de articole (marfuri) ce trebuie livrate si deci aprovizionate de la furnizori.
  • +
  • Lucrari lista lucrarilor interne create, cu atributele:
  • +
  • - o lucrare contine articole din mai multe comenzi;
  • +
  • - o lucrare are termen de executie.
  • +
  • Rapoarte diverse.
  • +
+
+ +

Legaturile cu alte programe din suita ROA:

+
+
    +
  • lucrarile interne se constituie punct de plecare in economia programului de productie, de aici rezultand dimensionarea productiei: cantitativa dar si ca termene de executie.
  • +
+
+ +
+ +
+
+
+
+
+
+ +
+ + +
+
+
+
+

Copyright 2018 © Romfast SRL.

+
+
+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/roa/roa-contracte-clienti.html b/roa/roa-contracte-clienti.html new file mode 100644 index 0000000..4862ade --- /dev/null +++ b/roa/roa-contracte-clienti.html @@ -0,0 +1,212 @@ + + + + + + ROA Contracte clienti - Romfast + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+
+ ROA Contracte clienti +
+
+
+
+ + +
+
+
+
+
+
+

Scopul acestui program este acela de a monitoriza evolutia contractelor de vanzari din punct de vedere financiar.

+
+ +

Organizarea programului:

+
+
    +
  • este in 5 pagini cu urmatoarele roluri:
  • +
  • Definire: se definesc tipuri de contracte, agenti, responsabili, valute, clienti, s.a.
  • +
  • Lista contractelor: formular cu posibilitati de filtrare si ordonare a contractelor;
  • +
  • Datele contractelor;
  • +
  • Facturi: instrumente pentru urmarirea facturilor aferente contractului ales;
  • +
  • Incasari: instrumente pentru urmarirea facturilor si platilor aferente contractului ales.
  • +
+
+ +

Contractele sunt descrise prin urmatoarele grupuri de caracteristici:

+
+
    +
  • date generale: clientul, data si numarul contractului, tipul de contract, perioada de valabilitate, s.a.
  • +
  • Obiectul si valoarea contractului: articolele vandute (marfuri si/sau servicii), discount-uri pe articole, discount total, valoarea contractului, valuta;
  • +
  • Termene de facturare si achitare – sub forma de tabel: rate, scadente;
  • +
  • Termene de livrare si receptie;
  • +
  • Setari speciale pentru facturarea contractului;
  • +
  • Clauze speciale si observatii;
  • +
  • Documente atasate: lista cu link-uri ale documentelor in format electronic.
  • +
+
+ +

Legaturile cu alte programe din suita ROA:

+
+
    +
  • la definirea unui contract, anumite informatii (nr, data, client) devin vizibile si in alte programe: in contabilitate, de exemplu: se pot ulterior introduce facturi sau alte documente aferente acestui contract, asociindu-se la acesta.
  • +
  • la un contract cu scadentar de facturi se pot atasa facturi deja inregistrate in contabilitate – in scopul urmaririi stadiul contractului d.p.d.v. financiar;
  • +
  • incasarile la facturile aferente unui contract se pot vedea in rapoarte speciale in programul de contracte.
  • +
+
+ +
+ +
+
+
+
+
+
+ +
+ + +
+
+
+
+

Copyright 2018 © Romfast SRL.

+
+
+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/roa/roa-contracte-furnizori.html b/roa/roa-contracte-furnizori.html new file mode 100644 index 0000000..140e980 --- /dev/null +++ b/roa/roa-contracte-furnizori.html @@ -0,0 +1,181 @@ + + + + + + ROA Contracte furnizori + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + +
+
+
+ ROA Contracte furnizori +
+
+
+ + +
+
+
+
+
    +
  • Scopul acestui program este acela de a monitoriza evolutia contractelor de achizitie din punct de vedere financiar.
  • +
+ +

Organizarea programului:

+
    +
  • este in 5 pagini cu urmatoarele roluri:
  • +
  • Definire: se definesc tipuri de contracte, responsabili, valute, furnizori, s.a.
  • +
  • Lista contractelor: formular cu posibilitati de filtrare si ordonare a contractelor;
  • +
  • Datele contractelor;
  • +
  • Facturi: instrumente pentru urmarirea facturilor aferente contractului ales;
  • +
  • Incasari: instrumente pentru urmarirea facturilor si platilor aferente contractului ales.
  • +
+ +

Contractele sunt descrise prin urmatoarele grupuri de caracteristici:

+
    +
  • date generale: furnizorul, data si numarul contractului, tipul de contract, perioada de valabilitate, s.a.
  • +
  • Obiectul si valoarea contractului: articolele achizitionate (marfuri si/sau servicii), discount-uri pe articole, discount total, valoarea contractului, valuta;
  • +
  • Termene de facturare si achitare – sub forma de tabel: rate, scadente;
  • +
  • Termene de receptie;
  • +
  • Clauze speciale si observatii;
  • +
  • Documente atasate: lista cu link-uri ale documentelor in format electronic.
  • +
+ +

Legaturile cu alte programe din suita ROA:

+
    +
  • la definirea unui contract, anumite informatii (nr, data, furnizor) devin vizibile si in alte programe: in contabilitate, de exemplu: se pot ulterior introduce facturi sau alte documente aferente acestui contract, asociindu-se la acesta.
  • +
  • la un contract cu scadentar de facturi se pot atasa facturi deja inregistrate in contabilitate – in scopul urmaririi stadiul contractului d.p.d.v. financiar;
  • +
  • platile la facturile aferente unui contract se pot vedea in rapoarte speciale in programul de contracte.
  • +
+ +
+ +
+
+
+
+
+
+ + +
+
+

Copyright 2024 © Romfast SRL.

+
+
+ +
+ + + + + + + \ No newline at end of file diff --git a/roa/roa-facturare.html b/roa/roa-facturare.html new file mode 100644 index 0000000..d5c9f70 --- /dev/null +++ b/roa/roa-facturare.html @@ -0,0 +1,215 @@ + + + + + + ROA Comercial Facturare - Romfast + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+
+ ROA Comercial facturare +
+
+
+
+ + +
+
+
+
+
+
+

Scopul principal al acestui program este acela de a emite facturi.

+
+ +
+
    +
  • Dupa cum se stie exista multe metode de a emite facturi, ce difera in special in domeniile:
  • +
  • articolele ce se comercializeaza: marfuri, servicii;
  • +
  • metodele de tarifare a serviciilor;
  • +
  • metodele de gestionare a marfurilor (gestionate sau nu);
  • +
  • metodele de stabilire a preturilor de vanzare a marfurilor;
  • +
  • documentele premergatoare facturarii: contracte, comenzi, avize de expeditie.
  • +
  • Prin acest program ne propunem facturarea marfurilor si serviciilor pe baza de lista de preturi.
  • +
  • Listele de preturi se definesc cu ajutorul programului ROA Politici de preturi si tarife.
  • +
  • Articolele comercializate pot fi gestionabile sau nu (acesta este un atribut individual al articolelor). In cazul articolelor gestionabile acestea pot fi scazute din stoc odata cu facturarea.
  • +
+
+ +

Organizarea programului:

+
+
    +
  • este in 4 pagini cu urmatoarele roluri:
  • +
  • Initializare: se pot defini date despre modelele de facturi si avize, despre agenti, responsabili si delegati, clienti.
  • +
  • Facturare: se emit facturi: pe baza de liste de preturi, pe baza de contract, pe baza de comanda, pe baza de aviz de expeditie.
  • +
  • Avize de expeditie: se emit avize de expeditie in doua forme: catre clienti sau ca transfer intre doua subunitati ale companiei.
  • +
  • Rapoarte. Programul dispune de un generator de rapoarte din cubul: clienti-facturi-incasari-agenti-delegati-masini (de transport)- articole.
  • +
+
+ +

Legaturile cu alte programe din suita ROA:

+
+
    +
  • Odata cu facturarea se produc automat inregistrari contabile, vizibile in programul de contabilitate.
  • +
  • Daca articolele facturate sunt gestionabile se va inregistra si scaderea lor din stoc , cu efecte vizibile in programul de gestiune. Precizare: daca articolele vandute se regasesc in mai multe gestiuni – la care operatorul are drepturi – programul va cere alegerea celor din care se face scaderea.
  • +
  • Programul poate factura pe baza de comenzi – introduse in programul de comenzi.
  • +
  • Programul poate factura pe baza de contracte – urmarind scadentarul introdus in programul de contracte.
  • +
  • Facturarea direct din lista de preturi se realizeaza pe baza listelor de preturi create in programul Politici de preturi si tarife, unde se dau si drepturile de acces operatorilor asupra listelor.
  • +
  • Precizare in ceea ce priveste metoda de gestionare a marfurilor: aceste sunt organizate prin intermediul programului de gestiune in gestiuni la pret de achizitie sau la pret de vanzare. In functie de tipul gestiunii alese, programul de facturare creaza automat notele contabile aferente iesirii din gestiune.
  • +
+
+ +
+ +
+
+
+
+
+
+ +
+ + +
+
+
+
+

Copyright 2018 © Romfast SRL.

+
+
+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/roa/roa-financiar-contabilitate.html b/roa/roa-financiar-contabilitate.html new file mode 100644 index 0000000..32a4078 --- /dev/null +++ b/roa/roa-financiar-contabilitate.html @@ -0,0 +1,315 @@ + + + + + + ROA - Financiar-Contabilitate + + + + + + + + + + +
+ + +
+ +
+ +
+ + + + +
+
+

ROA Financiar-Contabilitate

+

Managementul complet al proceselor financiar-contabile

+
+
+ ROA Financiar Contabilitate +
+
+ + +
+

Avantaje

+

Utilizarea aplicatiei ROA Financiar-Contabilitate conduce la:

+
+
+
    +
  • + + Colectarea si obtinerea de informatii bogate in legatura cu evenimentele economice +
  • +
  • + + Cresterea vitezei de introducere a datelor datorita ergonomiei deosebite +
  • +
  • + + Cresterea responsabilitatii individuale a angajatilor implicati in procesele economico-financiare +
  • +
+
+
+
    +
  • + + Obtinerea informatiilor financiare in timp util +
  • +
  • + + Analiza amanuntita sau sintetica a informatiilor contabile si extra-contabile +
  • +
  • + + Crearea de baze de date istorice complexe, ce pot fi analizate oricand +
  • +
+
+
+
+ + +
+

Organizarea programului

+
+
+
+
+

Structura intuitiva

+
+
+
    +
  • • Organizarea programului este intuitiva, atat pentru contabilul experimentat cat si pentru operatorul fara studii de contabilitate
  • +
  • • Este alcatuit din 7 pagini reprezentand clasele de conturi, fiecare pagina avand 3 sectiuni cu continut specific: introducerea, vizualizarea datelor si generarea rapoartelor
  • +
  • • Ferestrele de vizualizare contin mijloace de selectare a datelor folosind criterii diverse
  • +
  • • Generarea si tiparirea rapoartelor este independenta de configuratia hardware
  • +
+
+
+
+
+
+
Formule predefinite
+

Sunt predefinite peste 500 de formule contabile uzuale care aduc beneficii:

+
    +
  • Contabilului - usureaza munca de operatiuni de rutina
  • +
  • Operatorului fara studii - furnizeaza solutii de inregistrare consacrate
  • +
+
+
+
+
+ + +
+

Facilitati

+

ROA Financiar-Contabilitate rezolva problemele legate de:

+ +
+ +
+

+ +

+
+
+
    +
  • • Definirea analitica a politicii contabile a firmei
  • +
  • • Definirea si utilizarea de conturi analitice
  • +
  • • Introducerea datelor conform reglementarilor contabile armonizate cu Directiva a IV-a CEE si Standardele Internationale de Contabilitate (O.M.F.94/2001)
  • +
+
+
+
+ + +
+

+ +

+
+
+
    +
  • • Inregistrarea cronologica a tuturor documentelor primare cu efecte financiar-contabile
  • +
  • • Inregistrarea in contabilitate folosind formule predefinite, de viteza sporita
  • +
  • • Inregistrarea cu flexibilitate a oricaror evenimente economice si a datelor extra-contabile
  • +
  • • Gestionarea si ordonarea operatiunilor de trezorerie
  • +
+
+
+
+ + +
+

+ +

+
+
+
    +
  • • Controlul riguros al scadentarelor si relatiilor financiare cu tertii
  • +
  • • Compensarea cu parteneri comerciali prin echivalarea creantelor si datoriilor
  • +
  • • Lucrul cu valute si obtinerea situatiilor analitice in valuta
  • +
  • • Introducerea de date in mai multe luni contabile neinchise
  • +
+
+
+
+ + +
+

+ +

+
+
+
    +
  • • Vizualizarea balantei de verificare, registrelor (jurnal, vanzari, cumparari, casa, banca)
  • +
  • • Balantele de clienti, furnizori, debitori, creditori
  • +
  • • Inchideri automate: venituri, cheltuieli, TVA, amortizare, salarii, impozit pe venit
  • +
  • • Calculul automat al bilantului si anexelor
  • +
  • • Evaluarea rezultatelor financiare cu inchidere automata provizorie
  • +
  • • Raportarea contabila catre stat conform prevederilor legale
  • +
  • • Raportarea catre patronat a situatiei economico-financiare
  • +
+
+
+
+
+
+ + +
+
+

Solutie completa pentru contabilitate

+

ROA Financiar-Contabilitate oferă toate instrumentele necesare pentru managementul eficient al proceselor financiar-contabile ale companiei dumneavoastră.

+
+
+
+ + + + + + + +
+ + \ No newline at end of file diff --git a/roa/roa-gestiune.html b/roa/roa-gestiune.html new file mode 100644 index 0000000..9a467b5 --- /dev/null +++ b/roa/roa-gestiune.html @@ -0,0 +1,352 @@ + + + + + + ROA Gestiune - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+ ROA Gestiune +

ROA Gestiune Generala

+
+
+
+ + +
+
+
+

+ ROA Gestiune generala este o componenta importanta a sistemului. Pentru eficienta maxima, ea trebuie utilizata impreuna cu ROA Financiar-Contabilitate cu care se integreaza perfect, datorita formulelor contabile automate pe care le contine. Operarea in programul de gestiuni are efecte contabile directe ce se gestioneaza cu ajutorul programului de contabilitate, intr-un sistem riguros de corelare si verificare continua. +

+
+
+
+ + +
+
+
+

Avantaje

+
+
+

Utilizarea programului ROA Gestiune generala conduce la:

+
+
+
    +
  • cresterea eficientei generale a gestionarii stocurilor
  • +
  • diminuarea cheltuielilor cu gestiunea stocurilor
  • +
  • cresterea vitezei de operare a evenimentelor
  • +
  • reducerea si controlul stocurilor fara miscare
  • +
+
+
+
    +
  • reducerea aprovizionarii supranormative
  • +
  • evidentierea clara si in timp real a miscarii stocurilor
  • +
  • controlul si corelarea permanenta a stocului cantitativ cu valoarea acestuia
  • +
+
+
+
+
+
+ + +
+
+
+

Aria de aplicabilitate

+
+
+ +
+
+
+ + +
+
+
+

Organizarea

+
+
+
+
+
    +
  • + + Organizarea programului de gestiune este intuitiva, atat pentru contabilul experimentat cat si pentru operatorul fara studii de contabilitate. +
  • +
  • + + Este alcatuit din 6 pagini reprezentand grupe ale clasei III-"Conturi de stocuri si productie in curs de executie" din planul de conturi. +
  • +
+
+
+ +
+
+ +
+
+
+
+
Pentru Gestionari
+

Nu trebuie sa aiba studii de contabilitate, pentru a opera documentele primare, atat cantativ cat si valoric.

+
+
+
+
+
+
+
Pentru Contabili
+

Nu trebuie sa opereze marile cantitati de documente provenite din gestiuni, ci doar sa verifice corecta lor introducere.

+
+
+
+
+
+
+
+ + +
+
+
+

Producerea documentelor

+
+
+

Foarte importanta este capacitatea programului de a facilita producerea rapida a documentelor primare, atat in format electronic cat si pe hartie in formularele obisnuite:

+ +
+
+
Documente de intrare:
+
    +
  • NIR-uri
  • +
  • Facturi de achizitie
  • +
+
+
+
Documente de consum:
+
    +
  • Bonuri de consum
  • +
  • Bonuri de retur
  • +
  • Bonuri de transfer
  • +
+
+
+
Documente de vanzare:
+
    +
  • Facturi de vanzare
  • +
  • Facturi de retur marfa
  • +
  • Avize de insotire
  • +
+
+
+ + +
+
+
+ + +
+
+
+

Facilitati

+
+
+

ROA Gestiune rezolva problemele legate de:

+ +
+
+
    +
  • definirea articolelor impreuna cu atributele lor
  • +
  • gestionarea datelor privind intrarile de articole in stocuri
  • +
  • gestionarea cantitatilor de articole in stoc detaliata dupa criterii multiple
  • +
  • inregistrarea iesirilor din gestiune pe baza mai multor metode de evaluare
  • +
  • inregistrarea consumurilor de materiale pe lucrari
  • +
+
+
+
    +
  • inregistrarea vanzarilor de marfuri pe contracte
  • +
  • inregistrarea intrarilor si iesirilor de articole pe sectii
  • +
  • vizualizarea situatiei stocurilor pe perioade definite
  • +
  • obtinerea rapida a informatiilor asociate unui articol
  • +
  • producerea unui istoric complex al evenimentelor
  • +
+
+
+
+
+
+ + +
+ +
+ +
+ + + + + + + +
+ + \ No newline at end of file diff --git a/roa/roa-hotel.html b/roa/roa-hotel.html new file mode 100644 index 0000000..0c5208b --- /dev/null +++ b/roa/roa-hotel.html @@ -0,0 +1,297 @@ + + + ROA - Hotel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ sisteme informatice ERP +
+
+
+
Romfast
+
+
+
+ Informatia in mainile tale
+
+ + + +
+
+ + +
+ + + +
+ + +
+

CONFIGURĂRI :

+
    +
  • 1. Adăugare tip cameră +
  • +
  • 2. Sezoane şi tarife +
      +
    • Definire / modificare sezoane ( 0:04 )
    • +
    • Definire / modificare tarife ( 1:10 )
    • +
    +
  • +
  • 3. Modificare detalii cameră ( număr cameră, număr maxim de copii cazaţi în cameră pentru care nu se plăteşte suplimentar ) +
  • + +

    OPERAŢII :

    +
      +
    • 1. Adăugare cazare +
        +
      • Adăugare client ( 0:07 )
      • +
      • Adăugare detalii adresă ( 0:30 )
      • +
      +
    • +
    • 2. Modificare date client pe cazare +
        +
      • Resetare date client de pe cazare ( 0:06 )
      • +
      • Căutare client în baza de date după nume, prenume sau CNP ( 0:13 )
      • +
      +
    • +
    • 3. Adăugare cazare +
        +
      • Modificarea preţului standard pentru situaţii speciale ( 0:18 )
      • +
      • Adăugarea a încă unei adrese ( 0:27 )
      • +
      • Alegerea unei adrese dintre mai multe existente ( 0:48 )
      • +
      +
    • +
    • 4. Deschidere de zi +
        +
      • Eroare la deschiderea de zi ( 0:08 )
      • +
      +
    • +
    • 5. Facturare +
        +
      • Facturare cazare cameră ( 0:02 )
      • +
      • Împărţire servicii pe mai multe facturi ( 0:07 )
      • +
      • Modificare client pentru care se va emite factura ( 0:10 )
      • +
      • Adăugare date client nou pentru facturare ( 0:16 )
      • +
      • Modificare modalitate achitare factură ( 1:07 )
      • +
      +
    • +
    • 6. Relistare factură şi desfăşurător +
    • +
    • 7. Reemitere factură +
        +
      • Ştergere factură emisă ( 0:10 )
      • +
      • Modificare număr factură următoare / chitanţă următoare / bon fiscal următor ( 0:33 )
      • +
      • Emitere factură fără achitare ( 0:46 )
      • +
      • Adăugare text adiţional pe factură ( 0:49 )
      • +
      +
    • +
    • 8. Eliberare cameră +
        +
      • Curăţare cameră ( 0:26 )
      • +
      • Cameră vacantă - disponibilă pentru cazare ( 0:31 )
      • +
      +
    • +
    • 9. Rezervări +
        +
      • Rezervare nouă ( 0:02 )
      • +
      • Alegere tip cameră rezervare sau o cameră anume ( 0:09 )
      • +
      • Accesare listă rezervări / rezervare nouă ( 0:39 )
      • +
      • Anulare rezervare ( 0:52 )
      • +
      • Rezervare nouă ( din fereastra cu lista rezervărilor ) ( 1:00 )
      • +
      • Modificare date rezervare ( 1:32 )
      • +
      • Transformare rezervare cameră în cazare ( 1:46 )
      • +
      +
    • +
    • 10. Grupuri +
        +
      • Creare grup nou din cazare existentă ( 0:04 )
      • +
      • Detalii grup ( 0:12 )
      • +
      • Adăugare cameră / mutare servicii / mutare cazare pe grup existent ( 0:31 )
      • +
      • Facturare grup ( 0:43 )
      • +
      • Împărţire cazare / servicii grup pe mai mult de 4 facturi ( 0:55 )
      • +
      • Alegere facturi grup pentru emitere ( 1:06 )
      • +
      • Alegere metodă achitare pe loc a facturii ( 1:09 )
      • +
      • Emitere facturi grup ( 1:20 )
      • +
      +
    • +
    + +
+

 

+
+
 
+
+ + + + + \ No newline at end of file diff --git a/roa/roa-imobilizari.html b/roa/roa-imobilizari.html new file mode 100644 index 0000000..6523664 --- /dev/null +++ b/roa/roa-imobilizari.html @@ -0,0 +1,377 @@ + + + + + + ROA Imobilizari - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+ ROA Imobilizari +

ROA Imobilizari

+
+
+
+ + +
+
+
+

+ Aplicatia ROA Imobilizari este realizata pentru a facilita urmarirea imobilizarilor din proprietatea societatii si calculul automat al amortismentului lunar pana la amortizarea completa si/sau pana la iesirea din gestiune. +

+ +
+
+
+
+
Imobilizari corporale
+

Echipamente, masini, cladiri

+
+
+
+
+
+
+
Imobilizari necorporale
+

Software, licente, brevete

+
+
+
+
+
+
+
Imobilizari in curs
+

Investitii nefinalizate

+
+
+
+
+
+
+
+ + +
+
+
+

Organizarea

+
+
+ +
+
+
+ + +
+
+
+

Functiuni

+
+
+
+
+
Clasificare si incadrare
+
    +
  • + + Stabilirea clasei de incadrare a mijloacelor fixe si a duratei normale de functionare +
  • +
  • + + Transpunerea legii privind clasificarea mijloacelor fixe (HG 964/23.12.1998) +
  • +
+
+
+
Moduri de inregistrare
+
+
+
+
+
1. Introducere directa
+

Prin introducerea directa a documentelor de achizitie

+
+
+
+
+
+
+
2. Preluare automata
+

Din modulul ROA Financiar-Contabilitate a tuturor notelor de achizitii

+
+
+
+
+
+
+ + +
+
+
+ + +
+
+
+

Integrarea in Sistemul Informatic ROA

+
+
+

ROA Imobilizari comunica cu programul de contabilitate ROA Financiar-Contabilitate in scopul indeplinirii urmatoarelor functiuni:

+ +
+
+
+
+
Preluare selectiva
+

In evidenta imobilizarilor a documentelor de achizitie a mijloacelor fixe, precum si a altor documente in legatura cu imobilizarile necorporale si a celor in curs.

+
+
+
+
+
+
+
Nota de inchidere
+

Obtinerea notei de inchidere a amortizarii in mod automat.

+
+
+
+
+
+
+
+ + +
+
+
+

Facilitati

+
+
+

ROA Imobilizari rezolva problemele legate de:

+ +
+
+
Calcule si evidenta
+
    +
  • calculul amortizarii lunare, a valorii totale amortizate, a valorii ramase de amortizat
  • +
  • calculul altor valori adiacente, pentru fiecare mijloc fix in parte
  • +
  • inregistrarea vanzarii, casarii si a iesirii din evidenta
  • +
  • transformarea imobilizarilor in curs in mijloace fixe
  • +
+
+
+
Vizualizare si rapoarte
+
    +
  • vizualizarea listei de mijloace fixe pe grupe, pe luni, pe gestiuni
  • +
  • vizualizarea si listarea situatiei amortizarilor lunare
  • +
  • vizualizarea si listarea rulajelor si sumelor totale pe conturi
  • +
  • facilitarea calculelor de reevaluare a mijloacelor fixe
  • +
+
+
+ + +
+
+
+ + +
+
+
+

Beneficii cheie

+
+
+
+
+
+
+
Automatizare
+

Calcul automat al amortismentului conform legii

+
+
+
+
+
🔗
+
Integrare
+

Conectare perfecta cu modulul de contabilitate

+
+
+
+
+
📊
+
Raportare
+

Rapoarte detaliate si istoric complet

+
+
+
+
+
+
+ + +
+ +
+ +
+ + + + + + + +
+ + \ No newline at end of file diff --git a/roa/roa-manager.html b/roa/roa-manager.html new file mode 100644 index 0000000..058dd0f --- /dev/null +++ b/roa/roa-manager.html @@ -0,0 +1,257 @@ + + + + + + ROA Manager + + + + + + + + + + +
+ + +
+ +
+ +
+ + + + +
+
+

ROA Manager

+

Analiza indicatorilor economici si managementul performantei companiei

+
+
+ ROA Manager +
+
+ + +
+
+ +
+

Scopul programului

+

Scopul acestui program este descoperirea evolutiei indicatorilor economici si tendintei de desfasurare a activitatii, elemente necesare conducerii cu succes a firmei.

+
+ + +
+

Cui se adreseaza?

+

Tipuri de utilizatori ROA Manager in cadrul companiei:

+
+
+
+
+
Departamentul IT
+

Cel care ofera celorlalte departamente instrumentele necesare desfasurarii activitatii; utilizand ROA Manager poate crea o solutie de raportare si analiza, care sa le asigure accesul rapid la informatiile necesare.

+
+
+
+
+
+
+
Marketing si Vanzari
+

Poate analiza rezultatele campaniilor de marketing (generarea de lead-uri), estimarea veniturilor din vanzari si analizarea trendurilor pe piata.

+
+
+
+
+
+
+
Departamentul Financiar
+

Realizeaza analiza statisticilor financiare si genereaza rapoarte asigurand astfel suportul pentru decizie.

+
+
+
+
+
+
+
Departamentul de Achizitie
+

Prin ROA Manager poate calcula estimativ volumul stocurilor anticipand cerinta de pe piata, poate imbunatati rezultatele procesului de productie.

+
+
+
+
+
+ + +
+

Functionalitati

+
+
+

Capacitati generale

+
    +
  • Creare de rapoarte si analize variate folosind instrumente puternice
  • +
  • Rezultate in format tabular si grafic
  • +
  • Formule predefinite pentru indicatori obisnuiti
  • +
  • Rapoarte specifice firmei cu instrumente de creare formule
  • +
+
+
+

Indicatori disponibili

+
    +
  • Contul de profit si pierdere
  • +
  • Analiza structurii veniturilor si cheltuielilor
  • +
  • Analiza incadrarii firmei (formule banci pentru credite)
  • +
  • Evolutia veniturilor vs cheltuieli si profit brut
  • +
+
+
+
+ + +
+
+
+
+
+

Analize pe Centre de Cost/Profit

+
+
+

Se pot defini centre de profit dar si centre virtuale. Programul poate calcula veniturile si cheltuielile direct repartizate pe aceste centre dar poate si repartiza cheltuielile si veniturile indirecte.

+

In final rezulta analiza eficientei pe fiecare centru – in rapoarte detaliate sau sintetice.

+
+
+
+
+
+
+

Managementul Bugetelor

+
+
+

ROA Manager faciliteaza:

+
    +
  • Definirea formulei de buget
  • +
  • Definirea valorica a bugetelor
  • +
  • Urmarirea comparativa a executiei bugetare
  • +
+

Urmarirea executiei bugetare se face analizand comparativ valorile bugetate si valorile inregistrate in contabilitate.

+
+
+
+
+
+
+
+
+ + + + + + +
+ + \ No newline at end of file diff --git a/roa/roa-noutati.html b/roa/roa-noutati.html new file mode 100644 index 0000000..5e4c4cd --- /dev/null +++ b/roa/roa-noutati.html @@ -0,0 +1,173 @@ + + +ROMFAST - Noutati ROA + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + +
+
+
+
+
+
+
Top Slogan
+
+
+
Bottom Slogan
+
+
+
+
+
+ +
+ + + + + + +
+
ROA +NOUTATI
+
+
+

ROACONT v 2.0.105 - +20.07.2009

+
+
    +
  • modificari ROACONT.
  • +
+

ROAGEST v 2.0.131 - +20.07.2009

+
+
    +
  • modificari +ROAGEST.
  • +
+

 

+

+


+

+
+ +
+
+

 

+
+
+
 
+
+ \ No newline at end of file diff --git a/roa/roa-obiecte-inventar.html b/roa/roa-obiecte-inventar.html new file mode 100644 index 0000000..b9c75a8 --- /dev/null +++ b/roa/roa-obiecte-inventar.html @@ -0,0 +1,436 @@ + + + + + + ROA Obiecte de inventar - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+ ROA Obiecte de inventar in folosinta +

ROA Obiecte de Inventar in Folosinta

+
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+

Functii

+
+
+
+
+
+
+
In stocuri
+
+
+
    +
  • achizitie, NIR, intrare in gestiune
  • +
  • transfer intre gestiuni de obiecte de inventar
  • +
  • dare in folosinta si inregistrarea cheltuielii
  • +
  • retur la magazie
  • +
  • casare din magazie
  • +
+
+
+
+
+
+
+
In folosinta
+
+
+
    +
  • darea folosita se face pe un responsabil si/sau pe o gestiune de obiecte de inventar in folosinta (ex: echipa de muncitori)
  • +
  • transfer in folosinta, intre responsabili sau gestiuni
  • +
+
+
+
+
+ +
+
+
+
+
Rapoarte diverse
+
+
+
    +
  • lista obiectelor de inventar in stocuri
  • +
  • rulajele (intrari, iesiri, transferuri)
  • +
  • lista obiectelor de inventar in folosinta
  • +
  • rulajele pe responsabili si gestiuni
  • +
+
+
+
+
+
+
+
In plus
+
+
+

Se pot defini necesare de echipamente pentru personal (de exemplu: ghete, cascheta, salopeta, s.a.) – toate avand caracteristicile de masura corespunzatoare (numarul de la ghete, etc.).

+

Se pot obtine rapoarte combinate despre personal si necesarul de echipamente pentru diverse situatii.

+
+
+
+
+
+
+
+ + +
+
+
+

Management Echipamente Personal

+
+
+
+
+
+
+
La venirea unui angajat nou
+

Pentru echiparea lui corespunzatoare cu toate echipamentele necesare, inclusiv masurile specifice.

+
    +
  • Ghete (cu numarul corespunzator)
  • +
  • Cascheta de protectie
  • +
  • Salopeta (cu marimea corespunzatoare)
  • +
  • Alte echipamente de protectie
  • +
+
+
+
+
+
+
+
La plecarea unui angajat
+

Pentru verificarea fisei personale de lichidare si recuperarea tuturor echipamentelor.

+
    +
  • Verificarea echipamentelor date in folosinta
  • +
  • Returnarea echipamentelor in stare buna
  • +
  • Calculul costurilor pentru echipamente deteriorate
  • +
  • Actualizarea fisei de lichidare
  • +
+
+
+
+
+
+
+
+ + +
+
+
+

Legaturile cu alte programe din suita ROA

+
+
+
+
+
+
+
+ + Contabilitate si Gestiune +
+

Pentru toate tranzactiile cu stocuri programul produce automat inregistrari contabile si inregistrari de rulaje in magazie.

+
+
+
+
+
+
+
+ + Programe de Personal +
+

Responsabilii de obiecte de inventar au calitatea de salariat si anumite date de personal se pot vizualiza si obtine in rapoarte.

+
+
+
+
+
+
+
+ + +
+
+
+

Caracteristici cheie

+
+
+
+
+
+
📦
+
Gestiune Completa
+

De la achizitie la casare

+
+
+
+
+
👤
+
Responsabili
+

Urmarirea pe responsabili

+
+
+
+
+
📏
+
Masuri Specifice
+

Gestionarea marimilor

+
+
+
+
+
🔗
+
Integrare
+

Cu contabilitatea si HR

+
+
+
+
+
+
+ + +
+
+
+

Fluxul proceselor

+
+
+
+
+
+
+
1
+
Achizitie
+

NIR, intrare in gestiune

+
+
+
+
+
+
+
2
+
Dare in folosinta
+

Pe responsabili

+
+
+
+
+
+
+
3
+
Transfer
+

Intre responsabili

+
+
+
+
+
+
+
4
+
Retur
+

La magazie

+
+
+
+
+
+
+
5
+
Casare
+

Din evidenta

+
+
+
+
+
+
+
📊
+
Rapoarte
+

Complete si detaliate

+
+
+
+
+
+
+
+ + +
+ +
+ +
+ + + + + + + +
+ + \ No newline at end of file diff --git a/roa/roa-politici-preturi.html b/roa/roa-politici-preturi.html new file mode 100644 index 0000000..a3f84ca --- /dev/null +++ b/roa/roa-politici-preturi.html @@ -0,0 +1,166 @@ + + + + + + ROA Politici de preturi si tarife + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + +
+
+
+ ROA Politici de preturi si tarife +
+
+
+ + +
+
+
+
+
    +
  • Aceasta aplicatie are rolul de a facilita definirea listelor de preturi pentru articolele furnizate de companie clientilor. Aceste articole pot fi atat marfuri cat si servicii.
  • +
  • Programul permite organizare preturilor si tarifelor pe liste de preturi avand valabilitati distincte pe numite perioade de timp.
  • +
  • Un articol poate fi cuprins in mai multe liste de preturi avand preturi diferite: de exemplu, in cazul comercializarii aceluiasi produs in mai multe puncte de vanzare aflate la distanta.
  • +
  • Listele de preturi au asociate seturi de note contabile aferente vanzarii articolelor componente.
  • +
  • Este posibila acordarea de drepturi de utilizare a listelor de preturi pe grupuri de utilizatori.
  • +
+ +

Legaturile cu alte programe din suita ROA:

+
    +
  • Nomenclatorul de articole este unic in intreg sistemul. Anumite articole sunt pentru vanzare si atunci au pret de lista (de catalog). Anumite articole sunt gestionabile si vor fi vizibile in programul de gestiune. Articolele negestionabile – cum sunt serviciile – nu pot fi vazute in programul de gestiune. Atributele unui articol pot fi schimbate de catre persoanele abilitate (care au acces la aceasta optiune).
  • +
  • Listele de preturi sunt utilizate in programul de facturare.
  • +
  • Notele contabile de vanzare sunt utilizate pentru a inregistra contabil facturile emise. Notele pot fi vizualizate prin intermediul programului ROA Financiar-Contabilitate.
  • +
  • Listele de preturi sunt utilizate in programul ROA Vanzare en-detail la introducerea NIR-urilor de marfa la pret de vanzare.
  • +
+ +
+ +
+
+
+
+
+
+ + +
+
+

Copyright 2024 © Romfast SRL.

+
+
+ +
+ + + + + + + \ No newline at end of file diff --git a/roa/roa-resurse-umane.html b/roa/roa-resurse-umane.html new file mode 100644 index 0000000..dd77b0f --- /dev/null +++ b/roa/roa-resurse-umane.html @@ -0,0 +1,248 @@ + + + + + + ROA Resurse umane - Romfast + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+
+ ROA Resurse umane +
+
+
+
+ + +
+
+
+
+
+
+

Informatiile referitoare la personal sunt de natura personala, profesionala si financiara. In baza acestor informatii se pot genera o serie de rapoarte ce pot fi vizualizate si/sau listate, se creaza state de salarii ce pot fi modificate interactiv de utilizator si se calculeaza drepturile de natura salariala cu privire la concedii, sporuri si popriri.

+
+ +

Avantaje:

+
+
    +
  • Utilizarea aplicatiei ROA Resurse Umane conduce la:
  • +
  • cresterea eficientei activitatii in cadrul departamentului de resurse umane;
  • +
  • diminuarea eforturilor depuse in activitatile curente privind salarizarea si evidenta personalului;
  • +
  • crearea si pastrarea unui istoric bogat al datelor de personal si salarizare, ce poate fi consultat oricand;
  • +
  • Efectuarea tuturor calculelor in conformitate cu legislatia in vigoare si actualizarea permanenta a legislatiei fara a afecta lunile precedente.
  • +
+
+ +

Actualizare rapida la legislatie:

+
+
    +
  • Programele includ posibilitati de actualizare rapida a diferitilor parametri necesari in calculul drepturilor salariale lunare si a taxelor aferente.
  • +
  • Astfel, la deschiderea fiecarei luni contabile, se pot actualiza numarul de zile lucratoare al lunii respective, grila de impozitare pentru calculul impozitului pe venit in functie de reglementarile legislative, grila zilelor de concediu de odihna cuvenite in functie de vechimea in munca, procentele stabilite de lege pentru calculul contributiei la asigurarile sociale, fondului de somaj, deducerilor personale, etc.
  • +
+
+ +

Calcul flexibil al statelor:

+
+
    +
  • Introducerea datelor despre personal se realizeaza avand la baza documentele primare - fisa personala, cartea de munca, deciziile de majorare a salariului sau de schimbare a incadrarii in munca etc. Programul ofera posibilitatea realizarii operatiilor privind avansurile, concediile, avansurile pentru concedii, stabilirea premiilor sau a altor drepturi salariale, precum si a popririlor.
  • +
  • Dupa realizarea acestor operatii, calcul statelor se realizeaza simplu prin stabilirea sumelor reprezentand salariul brut sau salariul net.
  • +
  • In momentul scrierii salariului brut, netul este recalculat automat si invers, schimbarea sumei nete determina recalcularea salariului brut.
  • +
+
+ +

Facilitati:

+
+
    +
  • ROA Resurse Umane rezolva problemele legate de:
  • +
  • inregistrarea datelor personalul angajat al firmei;
  • +
  • pontajul lunar al angajatilor;
  • +
  • calculul drepturilor salariale lunare si a taxelor aferente;
  • +
  • generarea de state de plata;
  • +
  • rapoarte in format electronic ale declaratiilor de CAS, CASS, somaj, in conformitate cu legislatia in vigoare;
  • +
  • fise fiscale;
  • +
  • crearea si mentinerea istoricului privind datele angajatilor si salarizarii.
  • +
+
+ +

Raportari interne si catre stat:

+
+
    +
  • Dupa realizarea operatiei de calcul a statelor de plata, programul ofera utilizatorului raportarile necesare interne sau catre stat. Astfel se pot obtine diferite situatii:
  • +
  • situatia salariatilor si a persoanelor aflate in intretinerea acestora;
  • +
  • situatia concediilor cuvenite;
  • +
  • fisele anuale;
  • +
  • situatiile avansurilor si premiilor;
  • +
  • statele de plata din luna curenta pentru toate formatiile, o singura formatie, anumite persoane sau exceptand anumite persoane;
  • +
  • foaia de lucru, fluturasi, state concedii;
  • +
  • documentele speciale privind CAS-ul, CASS-ul si fondul de somaj, atat listate cat si in format electronic;
  • +
  • fise fiscale atat listate cat si in format electronic;
  • +
  • situatiile centralizatoare ale statelor si foii de lucru pe formatii, situatia concediilor si a retinerilor, calculul impozitului si componenta brutului;
  • +
  • borderoul general al societatii;
  • +
  • nota de salarii completa, eventual defalcata pe formatii/sectii.
  • +
+
+ +

Integrarea in Sistemul Informatic ROA:

+
+
    +
  • ROA Managementul Resurselor Umane si Salarizarea Personalului conlucreaza cu celelalte aplicatii ale sistemului pentru indeplinirea urmatoarelor functiuni:
  • +
  • Preluarea sumelor reprezentand drepturile salariale brute ale angajatilor direct productivi, sume ce se calculeaza prin intermediul programelor specifice de productie. Aceste valori sunt transmise automat din programele de productie catre ROA Salarizarea personalului, pentru a fi prelucrate din punct de vedere financiar;
  • +
  • Exportarea valorilor drepturilor salariale in vederea transmiterii catre banca a borderourilor de plati pe card a salariilor;
  • +
  • Calcularea si transmiterea catre ROA Fianciar-Contabilitate a setului de note contabile lunare aferente salarizarii.
  • +
+
+ +
+ +
+
+
+
+
+
+ +
+ + +
+
+
+
+

Copyright 2018 © Romfast SRL.

+
+
+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/roa/roa-service-auto.html b/roa/roa-service-auto.html new file mode 100644 index 0000000..62b9c6f --- /dev/null +++ b/roa/roa-service-auto.html @@ -0,0 +1,333 @@ + + + + + + ROA - Program pentru service auto + + + + + + + + + + +
+ + +
+ +
+ +
+ + + + +
+
+

ROA Service Auto

+

Managementul complet al activitatii de service auto

+
+
+ + +
+
+
+

Descriere

+

Aplicatia ROA-AUTO este realizata pentru managementul activitatii de service auto si are ca scop urmarirea completa a ciclului de executie a reparatiilor auto, de la intrarea autovehiculului in service pana la emiterea facturii de reparatii.

+
+
+
+
Testeaza acum!
+ + Testeaza ROA AUTO! + +
+
+
+
+ + +
+

Ciclul de executie

+
+
+
    +
  • + + Generarea comenzii (documentul care insoteste autovehiculul pe tot parcursul reparatiei) +
  • +
  • + + Normare pe operatii a reparatiilor ce vor fi efectuate, precum si repartizarea pe mecanici a manoperei aferente +
  • +
  • + + Inregistrarea consumului de materiale pentru reparatie (ROA Gestiune generala) +
  • +
+
+
+
    +
  • + + Verificarea si validarea devizului de reparatii +
  • +
  • + + Emiterea devizului si facturarea (se pot emite facturi de avans sau finale; se poate emite o singura factura pentru mai multe comenzi ale aceluiasi client) +
  • +
+
+
+
+ + +
+

Etapele procesului

+
+
+
+
+
Generarea comenzii
+
+
+ + ROAAUTO - Generare comanda + +
+
+
+
+
+
+
Normare pe operatii
+
+
+ + ROAAUTO - Normare comanda + +
+
+
+
+
+
+
Verificarea si validarea devizului
+
+
+ + ROAAUTO - Validare comanda + +
+
+
+
+
+
+
Emiterea devizului si facturarea
+
+
+ + ROAAUTO - Facturare comanda + +
+
+
+
+
+ + +
+
+
+
+

Automatizare

+
+
+

Toate etapele se realizeaza integral cu ajutorul calculatorului. Documentele se emit electronic si apoi pe hartie. O singura intrare in sistem pentru orice document.

+
    +
  • • Inregistrarea datelor urmata de emiterea documentelor
  • +
  • • Devizele se calculeaza automat
  • +
  • • Facturile se calculeaza automat pe baza devizelor
  • +
  • • Inregistrarea automata in contabilitate
  • +
+
+
+
+
+
+
+

Lucru in timp real

+
+
+

Programul comunica cu modulele de contabilitate si salarizare in timp real astfel incat datele sunt preluate automat realizandu-se balanta contabila cat si statele de salarii fara alte introduceri de date.

+

Vizualizarea si listarea de rapoarte, avand posibilitatea de a sti in orice moment activitatea efectuata pe perioada de referinta, cat si istoricul activitatii anterioare.

+
+
+
+
+
+
+

Eficienta maxima

+
+
+

Cat mai putine introduceri, cat mai multe rezultate!

+
    +
  • • Documentele sunt operate o singura data, la sursa
  • +
  • • Introducerea de catre gestionar a documentelor de consum materiale
  • +
  • • Operatorii pot avea sau nu cunostinte de contabilitate
  • +
+
+
+
+
+ + +
+

Rapoarte disponibile

+
+
+
    +
  • Facturi emise in luna aleasa
  • +
  • Rapoarte de verificare articole
  • +
  • Rapoarte despre productia realizata si nefacturata
  • +
  • Rapoarte despre manopera: totala, detaliata pe comenzi sau operatii
  • +
  • Rapoarte despre orele de manopera pentru societatile de asigurare
  • +
  • Rapoarte de salarizare personal direct productiv
  • +
+
+
+
    +
  • Raport de verificare venituri din manopera si materiale
  • +
  • Facturile emise: pe clienti, asiguratori, facturi ITP, spalare, pe sectii
  • +
  • Comenzi validate pe marci de masini
  • +
  • Facturare automata a devizelor
  • +
  • Centralizatoare de comenzi validate
  • +
+
+
+
+ + +
+
+

Normative de reparatii

+

Programul este insotit de normative de reparatii pentru mai multe tipuri de autovehicule, existand posibilitatea ca aceasta baza de date sa fie completata si de catre utilizator.

+
+
+
+ + + + + + +
+ + \ No newline at end of file diff --git a/roa/roa-situatii-financiare.html b/roa/roa-situatii-financiare.html new file mode 100644 index 0000000..106873e --- /dev/null +++ b/roa/roa-situatii-financiare.html @@ -0,0 +1,208 @@ + + + + + + ROA Situatii financiare - Romfast + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + + +
+
+
+ ROA Situatii Financiare +

ROA Situatii Financiare

+
+
+ ROA Situatii Financiare Screenshot +
+
+
+ + +
+
+
+
+
+

Descriere Aplicatie

+ +
    +
  • + + Aceasta aplicatie are rolul de a facilita raportarea situatiilor financiare: bilant, contul de profit si pierdere, si alte rapoarte semestriale din aceeasi categorie. +
  • +
  • + + O observatie importanta: formulele de calcul ale acestor rapoarte sunt extrem de flexibile, ele putand fi definite chiar de utilizator. Programul contine un instrument puternic de constructie de formule de indicatori utilizand valorile din baza de date (in special Balanta de verificare). +
  • +
+ + +
+
+
+
+
+ + +
+ +
+ +
+ + + + + + + +
+ + \ No newline at end of file diff --git a/roa/sitfin.gif b/roa/sitfin.gif new file mode 100644 index 0000000..2cb7804 Binary files /dev/null and b/roa/sitfin.gif differ diff --git a/roa/specificatii-erp.html b/roa/specificatii-erp.html new file mode 100644 index 0000000..37baca0 --- /dev/null +++ b/roa/specificatii-erp.html @@ -0,0 +1,215 @@ + + + + + + ROA - Sistem Informatic ERP + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + + +
+
+
+ ROA Specificatii ERP +
+
+
+ + +
+
+
+
+
+
+ Enterprise Solution +
+
+

ROA - Romfast Applications este un sistem E.R.P. (Enterprise Resource Planning) care inglobeaza aplicatii de tipul C.R.M. (Customer Relationship Management), S.C.M. (Supply Chain Management), H.R. (Human Resources), B.I. (Business Intelligence).

+
+
+ +
+

Sistemul E.R.P. (Enterprise Resource Planning) este instrumentul software care faciliteaza integrarea tuturor informatiilor dintr-o organizatie într-o platforma unica asigurand astfel transparenta datelor în cadrul companiei si accesul la orice tip de informatie utila în desfasurarea activitatii. Multi oameni de afaceri au numit ERP-ul ca fiind "modalitatea de a pune in ordine informatiile din cadrul companiei."

+
+ +
+

Aplicatia C.R.M. (Customer Relationship Management) este un instrument puternic de raportare si analiza care ajuta la o mai buna intelegere a nevoilor si comportamentului clientilor. Un sistem eficient de CRM permite identificarea oportunitatilor in timp cat mai scurt, identificarea trend-urilor si stabilirea relatiilor intre clientii cei mai profitabili si produsele folosite de acestia, masurarea eficacitatii noilor produse si servicii.

+
+ +
+

Aplicatia S.C.M. (Supply Chain Management) este o combinatie de procedee care vizeaza imbunatatirea modului in care o companie gaseste componentele de care are nevoie pentru a oferi mai departe un produs sau un serviciu clientilor sai.

+

Managementul Lantului de Aprovizionare este compus din 5 parti principale:

+ +
    +
  1. Planul - o strategie pentru administrarea tuturor resurselor care sunt necesare pentru produsele sau serviciile unei companii;
  2. +
  3. Sursa - furnizorii de la care se obtin produsele si serviciile necesare crearii produselor companiei;
  4. +
  5. Produsul - planificarea activitatilor necesare pentru productie, testare, ambalare si pregatire pentru livrare;
  6. +
  7. Livrarea sau logistica - primirea ordinelor de livrare de la clienti, dezvoltarea unei retele de depozite, alegerea curierilor pentru transportul produselor si sistemul de receptionare a platilor;
  8. +
  9. Returul - creerea unei retele pentru primirea produselor defecte si/sau in exces si suportul pentru clientii care au probleme cu produsele cumparate.
  10. +
+
+ +
+

H.R. (Human Resources) este o aplicatie de management al Resurselor Umane din cadrul companiei. Informatiile referitoare la personal sunt de natura personala, profesionala si financiara. In baza acestor informatii se pot genera o serie de rapoarte ce pot fi vizualizate si/sau listate, se creaza state de salarii ce pot fi modificate interactiv de utilizator si se calculeaza drepturile de natura salariala cu privire la concedii, sporuri si popriri.

+
+ +
+

Aplicatia B.I. (Business Intelligence) permite companiilor sa isi gestioneze numarul mare de baze de date si sa ofere angajatilor, echipei de management si partenerilor lor o privire de ansamblu, usor de inteles. Aceasta aplicatie este folosita pentru a gasi noi oportunitati de crestere a veniturilor organizatiei, pentru a reduce costurile, realoca resursele si pentru imbunatatirea eficientei operationale.

+
+ +
+

ROA - Romfast Applications este solutia care centralizeaza toate aceste informatii, iar C.R.M.-ul, S.C.M.-ul si H.R.-ul beneficiaza de pe urma existentei unei singure surse de informatii la zi.

+
+ +
+ +
+
+
+ + +
+
+
+
+

Acceseaza online ROA!

+ + Acceseaza ROA + +

Pentru conectarea la serverul ROA DEMO folositi Internet Explorer.

+
+ +
+

Suport tehnic ROA

+ +
+

Specificatii ROA

+ +
+

Avantaje ROA

+
+
+
+
+
+
+ + +
+
+

Copyright 2024 © Romfast SRL.

+
+
+ +
+ + + + + + + \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..0db9ec7 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Crawl-Delay: 20 diff --git a/romfastsuport/index.html b/romfastsuport/index.html new file mode 100644 index 0000000..e1a49bd --- /dev/null +++ b/romfastsuport/index.html @@ -0,0 +1,9 @@ + + + +Your Page Title + + + + + \ No newline at end of file diff --git a/sitemap.html b/sitemap.html new file mode 100644 index 0000000..76d7d5b --- /dev/null +++ b/sitemap.html @@ -0,0 +1,236 @@ + + + +Site Map Page 1 - Generated by www.xml-sitemaps.com + + + + + +
+

Site Map

+

Homepage

+Last updated: 2009, July 21 + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
/ +2 pages
+ + + + + +
Romfast - Program de Contabilitate, Gestiune, Resurse +Umane, Imobilizari, Salarizare. Sisteme Informatice pentru +Contabilitate.
Romfast - Program de Contabilitate, Gestiune, Resurse +Umane, Imobilizari, Salarizare. Sisteme Informatice pentru +Contabilitate.
+
    
contafin/ +7 pages
+ + + + + + + + + + +
Contafin - Program de Contabilitate. Sistem Informatic Integrat.
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
+
    
menu/ +11 pages
+ + + + + + + + + + + + + + +
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Preturile programelor CONTAFIN
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
+
    
roa/ +20 pages
+ + + + + + + + + + + + + + + + + + + + + + + +
ROA - Sistem Informatic ERP
ROA - Program pentru service auto
ROA - Sistem Informatic ERP
ROA - Sistem Informatic ERP
ROA - Sistem Informatic ERP
ROA - Sistem Informatic ERP
ROA - Sistem Informatic ERP
ROA - Sistem Informatic ERP
ROA Manager
ROA - Financiar-Contabilitate
Enterprise - Read More Page 1. Business Company
ROA Gestiune
ROA Imobilizari
ROA Obiecte de inventar
ROA Resurse umane
ROA Contracte clienti
ROA Comenzi clienti
ROA Comercial Facturare
Enterprise - Read More Page 1. Business Company
Enterprise - Read More Page 1. Business Company
+
        
ROA-SERVICE-AUTO/ +4 pages
+ + + + + + + +
ROAAUTO GENERARE
+ROAAUTO NORMARE +
+ROAAUTO VALIDARE +
ROAAUTO FACTURARE
+
    
romfastsuport/ +1 pages
+ + + + +
http://www.romfast.ro/romfastsuport/download.asp?DownloadID=14
+
    
servicii/ +5 pages
+ + + + + + + + +
ROA - Sistem Informatic ERP
Enterprise - Read More Page 1. Business Company
Noutati
Noutati
Enterprise - Read More Page 1. Business Company
+
+ + +

+
+ + +
+ + diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..713fded --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,208 @@ + + + + + + http://www.romfast.ro/ + 2009-07-21T07:03:37+00:00 + + + http://www.romfast.ro/index.html + 2009-07-21T07:03:37+00:00 + + + http://www.romfast.ro/menu/desprenoi.html + 2009-06-02T07:19:05+00:00 + + + http://www.romfast.ro/menu/referinte.html + 2009-06-22T14:24:39+00:00 + + + http://www.romfast.ro/menu/angajari.html + 2009-06-02T07:20:17+00:00 + + + http://www.romfast.ro/menu/contact.html + 2009-06-02T07:19:51+00:00 + + + http://www.romfast.ro/menu/preturicontafin.html + 2009-06-11T12:18:08+00:00 + + + http://www.romfast.ro/roa/aplicatii-erp.html + 2009-07-21T07:00:41+00:00 + + + http://www.romfast.ro/contafin/management.html + 2009-07-21T07:01:49+00:00 + + + http://www.romfast.ro/menu/analiza.html + 2009-06-02T07:23:27+00:00 + + + http://www.romfast.ro/menu/implementare.html + 2009-06-02T07:18:53+00:00 + + + http://www.romfast.ro/menu/roa-suport-tehnic.html + 2009-06-11T07:12:33+00:00 + + + http://www.romfast.ro/menu/contafin-suport-tehnic.html + 2009-06-01T12:16:17+00:00 + + + http://www.romfast.ro/menu/alteservicii.html + 2009-06-02T07:19:16+00:00 + + + http://www.romfast.ro/servicii/acceseazaroaonline.html + 2009-07-21T07:03:23+00:00 + + + http://www.romfast.ro/servicii/descarcacontafin.html + 2009-06-11T07:12:22+00:00 + + + http://www.romfast.ro/servicii/roa-noutati.html + 2009-07-20T15:15:51+00:00 + + + http://www.romfast.ro/servicii/contafin-noutati.html + 2009-07-20T15:15:51+00:00 + + + http://www.romfast.ro/servicii/coduriactivare.html + 2009-06-11T07:12:22+00:00 + + + http://www.romfast.ro/menu/noutati.html + 2009-06-02T07:20:09+00:00 + + + http://www.romfast.ro/roa/roa-service-auto.html + 2009-07-21T07:02:12+00:00 + + + http://www.romfast.ro/roa/2.html + 2009-06-11T13:13:31+00:00 + + + http://www.romfast.ro/contafin/2.html + 2009-06-01T12:09:58+00:00 + + + http://www.romfast.ro/roa/specificatii-erp.html + 2009-07-21T07:00:46+00:00 + + + http://www.romfast.ro/roa/aplicatii.html + 2009-07-21T07:00:36+00:00 + + + http://www.romfast.ro/roa/5.html + 2009-06-11T13:11:26+00:00 + + + http://www.romfast.ro/roa/4.html + 2009-06-11T07:12:01+00:00 + + + http://www.romfast.ro/contafin/contafin-contabilitate.html + 2009-06-01T12:09:58+00:00 + + + http://www.romfast.ro/contafin/contafin-gestiune.html + 2009-06-01T12:09:58+00:00 + + + http://www.romfast.ro/contafin/contafin-salarii.html + 2009-06-01T12:09:59+00:00 + + + http://www.romfast.ro/contafin/contafin-imobilizari.html + 2009-06-01T12:09:59+00:00 + + + http://www.romfast.ro/contafin/contafin-manager.html + 2009-06-01T12:09:59+00:00 + + + http://www.romfast.ro/romfastsuport/download.asp?DownloadID=14 + + + http://www.romfast.ro/roa/ROA-SERVICE-AUTO/roaauto_generare.html + 2009-06-01T12:10:41+00:00 + + + http://www.romfast.ro/roa/ROA-SERVICE-AUTO/roaauto_normare.html + 2009-06-01T12:10:41+00:00 + + + http://www.romfast.ro/roa/ROA-SERVICE-AUTO/roaauto_validare.html + 2009-06-01T12:10:43+00:00 + + + http://www.romfast.ro/roa/ROA-SERVICE-AUTO/roaauto_facturare.html + 2009-06-01T12:10:40+00:00 + + + http://www.romfast.ro/roa/3.html + 2009-06-11T13:15:32+00:00 + + + http://www.romfast.ro/roa/roa-manager.html + 2009-07-21T07:02:05+00:00 + + + http://www.romfast.ro/roa/roa-financiar-contabilitate.html + 2009-07-21T07:02:18+00:00 + + + http://www.romfast.ro/roa/roa-situatii-financiare.html + 2009-06-11T07:12:04+00:00 + + + http://www.romfast.ro/roa/roa-gestiune.html + 2009-07-21T07:02:28+00:00 + + + http://www.romfast.ro/roa/roa-imobilizari.html + 2009-07-21T07:02:33+00:00 + + + http://www.romfast.ro/roa/roa-obiecte-inventar.html + 2009-07-21T07:02:39+00:00 + + + http://www.romfast.ro/roa/roa-resurse-umane.html + 2009-07-21T07:02:44+00:00 + + + http://www.romfast.ro/roa/roa-contracte-clienti.html + 2009-07-21T07:02:50+00:00 + + + http://www.romfast.ro/roa/roa-comenzi-clienti.html + 2009-07-21T07:02:56+00:00 + + + http://www.romfast.ro/roa/roa-facturare.html + 2009-07-21T07:03:01+00:00 + + + http://www.romfast.ro/roa/roa-politici-preturi.html + 2009-06-11T07:12:03+00:00 + + + http://www.romfast.ro/roa/roa-contracte-furnizori.html + 2009-06-11T07:12:02+00:00 + + \ No newline at end of file