Ejemplo n.º 1
0
 public void TestInitialize()
 {
     JournalEntryResource = new JournalEntryResource();
     Helpers.SetBaseAddress();
     Helpers.Wipe();
 }
Ejemplo n.º 2
0
 public JournalEntryController()
 {
     _journalEntryResource = new JournalEntryResource();
 }
        /// <summary>
        /// Creates a new journal entry.
        /// </summary>
        /// <returns>
        /// The <see cref="Task"/> object that represents the asynchronous task.
        /// </returns>
        private static JournalEntryResource CreateJournalEntry()
        {
            #region Build the journal entry that should be created

            JournalEntryResource journalEntry = new JournalEntryResource();

            journalEntry.Company     = "Default";
            journalEntry.Ledger      = "00";
            journalEntry.JournalType = "30";
            journalEntry.Currency    = "EUR";
            journalEntry.Party       = "SOFRIO";

            journalEntry.Lines = new List <JournalEntryLineResource>
            {
                new JournalEntryLineResource
                {
                    GLAccount   = "6311",
                    Description = "Ordenado",
                    DebitAmount = new Amount()
                    {
                        Value    = 2000,
                        Currency = "€"
                    }
                },

                new JournalEntryLineResource
                {
                    GLAccount   = "6315",
                    Description = "Subsidio de Refeição",
                    DebitAmount = new Amount()
                    {
                        Value    = 100,
                        Currency = "€"
                    }
                },

                new JournalEntryLineResource
                {
                    GLAccount   = "2451",
                    Description = "Segurança Social",
                    DebitAmount = new Amount()
                    {
                        Value    = 200,
                        Currency = "€"
                    }
                },

                new JournalEntryLineResource
                {
                    GLAccount   = "2311",
                    Description = "Total a pagar ao socio gerente",
                    DebitAmount = new Amount()
                    {
                        Value    = 1500,
                        Currency = "€"
                    }
                },

                new JournalEntryLineResource
                {
                    GLAccount    = "111",
                    Description  = string.Empty,
                    CreditAmount = new Amount()
                    {
                        Value    = 4225,
                        Currency = "€"
                    },
                    CashFlowItem  = "04",
                    PaymentMethod = "NUM"
                },

                new JournalEntryLineResource
                {
                    GLAccount   = "2451",
                    Description = string.Empty,
                    DebitAmount = new Amount()
                    {
                        Value    = 425,
                        Currency = "€"
                    }
                }
            };

            return(journalEntry);

            #endregion
        }