Topic: Request for Payment

Hi, we need to generate a Request for Payment document.
The functionality in FA is almost the same as Sales Order Entry, i.e. the information kept by FA is the same. One can see what is pending with each client, etc.  The heading is different and there should be a notice that: This is not a VAT Invoice.

I tried to copy the Sales Order Entry Report, but it is intertwind with the Direct Invoice and got stuck.
We cannot use the Sales Order Entry as this is also required.

Perhaps to be a bit clearer, the process would be as follows:
1. Issue Sales Order Entry
2. Deliver Service
3. Issue (or convert Sales Order Entry) Request for Payment
4. After client pays, issue Invoice

Any ideas how I can do this?
Thanks
Carmelo

Re: Request for Payment

Maybe you can use the "statements report" for this or change this report a bit..... see /reporting/reports_main.php?Class=0&REP_ID=108

Re: Request for Payment

I'm not sure what you have in mind when you said using the "statements report".
The Request for Payment (RFP) should be accessible like an invoice or a purchase order.

What I tried was to modify rep109.php around lines 80 to 90.
Here the $print_as_quote is used to print a Quote if it is set to 1 or a Sales Order otherwise.
But I could not find the source of $print_as_quote to set it as 2 and have the title set to "REQUEST FOR PAYMENT".

Ideally I would like to have a new link "Request for Payment" on the Sales Tab right under Sales Order Entry.

It seems to be a simple matter, but all my attempts failed.

Would appreciate anyone helping with this.
Cheers
Carmelo

Re: Request for Payment

you said using the "statements report". The statement Report  are the request for payment for a purchase order.
The Request for Payment (RFP) should be accessible like an invoice or a purchase order. What I tried was to modify the payment report. But I could not title set to "REQUEST FOR PAYMENT". Ideally I would like to have a new link "Request for Payment" on the Sales Tab right under Sales Order Entry. It seems to be a simple matter, but all my attempts failed. please help me for a Request for payment.

Re: Request for Payment

Anyone with a hint on how to duplicate the Sales Order Entry to provide another link on the Sales Tab named Request for Payment?

TIA
Carmelo

Re: Request for Payment

So I did a serious attempt to getting this extra function, the ability to print a Request for Payment, which is identical to Sales Order Entry, but without loosing the Sales Order Entry function. I almost succeeded. However, almost is not good enough.
I did the following changes to the following files:

-----------------------------------------------------------------------------------------------
    Request for Payment
-----------------------------------------------------------------------------------------------
fa/applications/customers.php

line 25 ADD:
        $this->add_lapp_function(0, _("Request for Payment"),
            "sales/sales_order_entry.php?ReqPayment=0", 'SA_SALESINVOICE', MENU_TRANSACTION);

           
-------------------------------------
fa/sales/sales_order_entry.php

line 68 ADD:
} elseif (isset($_GET['ReqPayment']) && is_numeric($_GET['ReqPayment'])) {

    $_SESSION['page_title'] = _($help_context = "Request for Payment");
    create_cart(ST_REQPAYMENT, 0);

line 186 ADD:
} elseif (isset($_GET['ReqPayment'])) {
    $delivery = $_GET['ReqPayment'];

    display_notification_centered(sprintf(_("Request for Payment # %d has been entered."),$delivery));

    submenu_view(_("&View This RFP"), ST_REQPAYMENT, $delivery);

    submenu_print(_("&Print RFP"), ST_REQPAYMENT, $delivery, 'prtopt');
    submenu_print(_("&Email RFP"), ST_REQPAYMENT, $delivery, null, 1);
    set_focus('prtopt');

    display_note(get_gl_view_str(ST_REQPAYMENT, $delivery, _("View the GL Journal Entries for this RFP")),0, 1);

    submenu_option(_("Make &Invoice Against This RFP"),
        "/sales/customer_invoice.php?DeliveryNumber=$delivery");

        submenu_option(_("Enter a &RFP"),
            "/sales/sales_order_entry.php?NewRFP=0");

    display_footer_exit();
   
line 624 ADD:
    } elseif ($_SESSION['Items']->trans_type == ST_REQPAYMENT)
    {
        display_notification(_("This request for payment has been cancelled as requested."), 1);
        submenu_option(_("Enter a New Request for Payment"), "/sales/sales_order_entry.php?NewRFP=Yes");

line 735 ADD:
} elseif ($_SESSION['Items']->trans_type == ST_REQPAYMENT) {
    $idate = _("RFP Date:");
    $orderitems = _("Request for Payment Items");
    $deliverydetails = _("Enter RFP Details and Confirm RFP");
    $cancelorder = _("Cancel RFP");
    $porder = _("Place RFP");
    $corder = _("Commit RFP Changes");

-------------------------------------
fa/includes/systypes.inc
line 63 ADD:

        case     ST_REQPAYMENT   : return array("".TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date");

-------------------------------------
fa/includes/sysnames.inc
line 41 ADD:
    ST_REQPAYMENT => _("Request for Payment"),

line 67 ADD:
    ST_REQPAYMENT => _("RFP"),

-------------------------------------
fa/includes/types.inc
line 41 ADD:

define('ST_REQPAYMENT', 34);

-------------------------------------
fa/reporting/includes/reporting.inc
line 51 ADD:

        case ST_REQPAYMENT :
            $rep = 109;
            // from, to, currency, email, quote, comments, orientation
            $ar = array(
                'PARAM_0' => $doc_no,
                'PARAM_1' => $doc_no,
                'PARAM_2' => '',
                'PARAM_3' => $email,
                'PARAM_4' => 2,
                'PARAM_5' => '',
                'PARAM_6' => $def_orientation);
            break;
           
-------------------------------------
fa/reporting/includes/doctext.inc
line 52 ADD:

        case ST_REQPAYMENT:
            $this->title = ($print_as_quote==1 ? _("QUOTE") : _("REQUEST FOR PAYMENT"));
            $this->formData['document_name'] =_("Order No.");
            $this->formData['document_date'] = $this->formData['ord_date'];
            $this->formData['document_number'] = $print_invoice_no == 0 && isset($this->formData['reference'])
                ? $this->formData['reference'] : $this->formData['order_no'];
            $this->formData['document_amount'] = $this->formData['order_no'];

            $aux_info = array(
                _("Customer's Reference") => $this->formData["customer_ref"],
                _("Sales Person") => get_salesman_name($this->formData['salesman']),
                _("Your VAT no.") => $this->formData['tax_id'],
                _("Our Order No") => $this->formData['order_no'],
                _("Delivery Date") => sql2date($this->formData['delivery_date']),
            );
            break;

-------------------------------------

My problems are at the end, when the Update or Accept is clicked. Is there anyone who can help with this?


Thanks in advance
Carmelo

7 (edited by apmuthu 04/22/2013 06:41:15 am)

Re: Request for Payment

A side note for standardisation:

The file reporting/includes/reporting.inc defines function print_link() that is called by function print_document_link() also in the same file.

The function print_document_link() is called in quite a few files, but the print_link() function is directly called from only these other files:

  • manufacturing/work_order_add_finished.php

  • manufacturing/work_order_entry.php

  • sales/create_recurrent_invoices.php