[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards a rental tracking module






On Tue, Feb 25, 2014 at 2:11 PM, Erik Huelsmann <..hidden..> wrote:
Hi Chris,

On Tue, Feb 25, 2014 at 11:47 AM, Chris Travers <..hidden..> wrote:
Hi everyone,

I am beginning work on an add-on for 1.4 regarding tracking rental equipment, etc.  I wanted to toss my ideas in here for feedback.

MODELLING

I think the best way to model this would be to track rentals against fixed assets.  I.e. you rent out a fixed asset, and this should allow you to do more fine-grained profit/loss reporting on individual rentals than otherwise possible.

So my thinking is that you would have:

Fixed assets -> multiple "rental slots" (i.e. "units" available for rental).  For example, a building might be available to be rented for x events, but a piece of construction equipment might be available to be rented only once at a time.

I'm inclined to go with John here: decouple fixed assets and "rental means". Then, investments in fixed assets can be added to the list of rental means upon investment, if one needs to. However, there may be cases where a rental object doesn't become available through purchase/investment.

One thing we'd need to do is handle selling of fixed assets properly with regard to rentals.  This would require extending the asset disposal handling.  There are other cases too that may come to mind.  For example, taking previously rented equipment and offering it for sale (i.e. a "dispose to inventory" method).   I am not sure how much of this to do on the first iteration though.
 

Rental slot -> Service. Each rental slot would be associated any number of services.  This could be changed over time to include more services, but for now I only expect to support a 1:1 mapping in the front-end

Rental slot -> Usage Contract.  Each rental slot can be associated with any number of usage contracts, but only one at a time.

One of the first things that came to mind - and is also noted by John - is a "regeneration period" where an asset is unavailable after a rented period. This seems like a nice addition to the model.

Yeah, will add this. 

John also mentions a need to improve down payments handling - and probably associated returns. My idea would be that down payments would be handled by a different module. One that can be attached to orders, projects and rentals. This would be perfect to do administration of retainer-based project work, webshops which require payment to fullfil orders (and clear resulting invoices against the payment-to-order). And of course, it would also work wonders for the hotel description John is talking about.

Yeah, that's something we should look at as we rewrite the financial logic. 

Usage contract - Service.  The contract would contain all the information needed to fill out a line in the invoice and ar tables. A contract would be assumed to match to one line in orderitems or invoices.

Ok. Let me follow your example of the hotel room which is being rented. Lets say I rent a hotel room for a week and additionally, rent a bike for three days within the total rental period of the hotel room. Basically, the bike can be considered a "temporary add-on" to the room. Would those be two usage contracts? And would those two usage contracts lead to one invoice? Or two?

Hmmm if I extend the idea of the order link that occurred to me when I was replying to John, I wonder if we should just allow multiple rentals to apply against the same order.  Then billing could generate the order and the invoice from the order. 

I have another example - I'm not sure if this is in scope or not, but let me just bring it out here - what if I want to buy an option onto the room; like: an extra bed. The hotel has enough of those, so doesn't use rental slots to rent them out, but rather supplies this as an option to the room. Would this lead to a second line on the invoice? or two invoices? (still: do we want to support the case?)


WORKFLOW

1.  Adding Rental Slots:
   a.  Rentals/Manage Slots
   b.  Enter asset tag, continue
   c.  Add slots as needed (number, label, services) and save
   d.  Slots can be retired here as well (basically an end date would be added).

2.  Renting Unit.
   a.  Rentals/Rent
   b.  Search for customer, enter asset tag, start and end dates
   c.  Select available slot
   d.  Enter information and save

I liked John's question on the multi-exclusive rooms here :-) While I think that question would be a bit hard to tackle, I'm thinking a rental can be bought with an option, however, there's a limited number of total options to be sold. I'm thinking of a car rental where I'd like to rent a baby seat. Now, the baby seat can be rented with any car, but even though there are 200 cars up for rental, there are only 30 baby seats in total. Do we want to take that into scope?

I would rather not put that in scope because it is a very complex problem and, like the deposit management issue, rather generally applicable beyond rentals.  This problem ranges from:

"I would like a ham sandwich please, but no tomato"

to

"I would like to order laptop from you, but please upgrade the CPU to X, add an extra 2GB RAM, switch to an SSD drive, and add the extra warranty."

In order to really be viable in many industries we need to be able to support such an option/modifier system.  I don't see how we can do that without rewriting the financial side first.
 
Or maybe baby seats are the wrong example (they can still have an asset tag); what if you're renting VMs, like Istvan says; if the physical server has 100GB of storage, then each GB can't have an asset tag, but still, you can't rent out more than 100GB in total. 

3.  Return of rental
  a.  Rentals/Search
  b.  Enter asset tag, date, and/or customer information.  Search
  c.  Enter date of return, check "Returned" and save.
  d.  If desired you can also click "bill," "generate order" or "renew" (in which case a new usage contract will be created).

The basic workflow sounds about right. Trying to search for the boundaries here, looking for what we can reasonably implement without going too much into one specific industry or customer.
 
INTERFACES

SQL and Perl Interfaces:

1.  Wrapped in Asset/Rental.pm class:
     asset__list_rental_slots(in_id)
     asset__list_rental_slots_by_tag(in_tag)

2.  Wrapped in Asset/Rental/Slot.pm
     rental_slot__list_services(in_id)
     rental_slot__add(...)
     rental_slot__search(...)
     rental_slot__retire(...)

3.  Wrapped in Asset/Rental/Contract.pm
     rental_contract__add(...)
     rental_contract__renew(...)
     rental_contract__generate_order(...)
     rental_contract__bill(...)

DEPENDENCIES

PostgreSQL 9.2 (needed for range types and exclude constraints)
PGObject::Simple::Role 1.1 (not out yet, will probably be out tomorrow)
PGObject::Simple 1.6
PGObject::Util::DBMethod 1.0


The dependencies sound fine to me. 

--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel




--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.
http://www.efficito.com/learn_more