Skip to main content

I'm trying to create a event or addition, to set the Sales Quotation to state printed.

The Sales Quotation is released if the attached document is released, it is triggered with the below custom event. This works great.

But it does not trigger the print checkbox, and therefore the revision function is not triggered.

If a update is made for the Sales Quotation, the SQ is not revised, because it has to be in state printed.

Can someone give me a hint on how to get the state of the Sales Quotation to printed.

 

declare

  info_ varchar2(32000):= null;

  objid_ varchar2(32000);

  objversion_ varchar2(32000);

  null_ varchar2(32000):=null;

  pragma autonomous_transaction;

begin

 

  select q.objid, q.objversion into objid_, objversion_

  from order_quotation q where q.quotation_no=doc_title_api.Get_Title('&NEW:DOC_CLASS', '&NEW:DOC_NO');

 

  ORDER_QUOTATION_API.RELEASE__( info_ , objid_ , objversion_ , null_ , 'DO' );

 

  commit; 

 

end; 

 

 

hi, 

 

You can use the   Order_Quotation_API.Modify_Printed_Flag() to modify the 

printing state of the sales quotation.

 

begin
  -- Call the procedure
  order_quotation_api.modify_printed_flag(quotation_no_ => :quotation_no_,
                                          printed_ => :printed_);
end;
 

You need to pass the values to the parameters  quotation_no_  and printed_.

You can use the values to the parameter printed_ as PRINTED  or NOTPRINTED.

If the sales quotation is in Released state, this method will modify the printed flag 

accordingly.

 

Cheers,

Thilini