Invoicing Partners Tests

From Opentaps Wiki
Revision as of 01:21, 28 November 2007 by LeonTorres (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The goal of these tests is to ensure that we can invoice a partner with whom we have an agreement with.

Suppose we are a major ISP that provides internet access products. We form an agreement with a University where they can sell our products to their staff and students. The University becomes our partner and at the end of each month, we can invoice the university for products they have sold. This test will ensure the critical aspects of this system work.

Test 1: Create Partner

Action

In CRMSFA [Partners] tab, create a partner as DemoSalesManager. Specify the name and at least one contact mech, such as the email. Suggested name: Springfield University.

Result

You are taken to the viewPartner page showing a screen very much like the viewAccount, viewLead and viewContact screens.

Action

Create notes, more contact mechs, bookmarks, and activities. (Skip Agreements for now.)

Result

These basic CRMSFA functions work.

Test 2: Find Partners

Action

Click on [Find Partners] in shortcuts.

Results

You can find the partner you created by name or by the default no condition find.

Action

Click on the partner name.

Results

Goes to the correct viewPartner page.


Test 3: Create Partner Sales agreement with Customer

Action

Create two Contacts. Suggested names: Professor Frink and Homer Simpson. View the partner created above (Springfield University), scroll down to the list of agreements and click [Create New]. Create an agreement for each contact.

Results

Two agreements are created and show up in viewPartner. Verify that the party links go to the right places. Verify pagination works. The rest is unimportant because these agreements are just for reference purposes and are not used in business logic (yet).

Test 4: Creating Agreement with Partner

The meat of the logic is the agreement between the Company and the partner. These agreements are created in financials. Since the rest of the test takes place in financials, you may ignore CRMSFA.

Action

As demofinadmin, go to financials [Partners] tab and click on [Create Partner Agreement]. Ensure that you can select the partner (Springfield University) as the To party of the agreement. Give it a description and some text. Suggested name: Resell agreement with Springfield University.

Results

The viewAgreement page loads successfully. The partner link goes to crmsfa viewPartner. There are two agreement Items: [Payment terms] and [Commission Rate Schedule].

Action

Remove the [Payment Terms] item.

Results

It goes away and a new box appears at the bottom allowing you to re-create [Payment Terms]. This item/term is unimportant for now.

Action

Select [Flat commission rate on entire order] for the commission rate schedule and press [Create Agreement Term] Enter 70 into the term value box and press [Update]. Press the [Activate] button to start the agreement.

Results

No errors. We now have an agreement where we will earn 70% of whatever the university sells for us.

Test 4: Noting What Partner Sells

This is done by creating invoices of type PARTNER_INVOICE between the partner and its customer. Eventually we will generate them from the PARTNER_SALES_AGR agreements we created in CRMSFA, but this test will ensure the manual process works.

Action

Click on the [Partners] tab. The index should show [Create Partner Invoice]. Click on that and select our partner (Springfield University) as the Partner and our Contact (Professor Frink) as the Customer.

Results

Invoice created successfully. There should be 7 invoice item types we can create:

Product, Digital Good, Digital/Finished Good, Service Product, Item Discount, Item Promotion

Action

Create a Product invoice item for GZ-1000 for some random amount and quantity. Create an Item Discount of some arbitrary value (no productId). Make sure the total is positive. Mark the invoice as ready.

Results

Invoice is ready to go.

Action

Create another invoice for the second contact (Homer Simpson) with the same Product GZ-1000 invoice item, but a different value/quantity combination. Add another Product item for GZ-1001. Provide an Item Discount as well (no productId). Mark the invoice as ready.

Results

Invoice is ready to go.

Action

Search for these invoices using [Find Partner Invoices].

Results

They show up correctly based on conditions used. They link to the correct viewPartnerInvoice page. The pagination works.

Test 5: Invoicing our Partner

Now let's pretend it's the end of a billing cycle and we need to send an invoice to our partner. We will be generating a sales invoice for a set of PARTNER_INVOICEs. Basically, we want to bill the University for their sales to Professor Frink and Homer Simpson, of which we should be earning 70%.

Action

Select [Invoice Partners]. Select our partner (Springfield University).

Results

Both partner invoices for our contacts show up.

Action

Click on the Select All checkbox next to [Outstanding] in this list to select all invoices. Click on the button [Invoice Selected Invoices] that appears.

Results

Button appears, clicking it takes you to a viewInvoice page in receivables tab. This is basically the sales invoice that was automatically generated. The To party should be our partner (Springfield University). The amount should be 70% of the sum of the two partner invoices. They should be grouped by productId and invoiceItemType. Invoice should be pending.