1. For delivery, using \sales\customer_delivery.php
2. We found that using hyperlink link
    1. $trans_type = ST_CUSTDELIVERY;
    2. hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), "filterType=$trans_type&trans_no=$dispatch_no");
3. We also copy this link command to AddedID and UpdateID menu session
4. Also make reight document type and reference
Then after create and update delivery note, will show the link for attacment

1. We found all sales document create, update, view are using
        a. \sales\sales_order_entry.php
        b. Each type have a menu session
    2. Found the applied menu link at invoice session
    3. submenu_option(_("Add an Attachment"), "/admin/attachments.php?filterType=".ST_SALESINVOICE."&trans_no=$invoice");
    4. That is the menu link with type of document and reference no.
    5. We just copy this link to right menu session
    6. And change the document type and reference variable
    7. ST_SALESORDER = sales order, ST_SALESQUOTE = Sales quotation, ST_CUSTDELIVERY = Sales delivery

Then all sales have the link to add attachment after create or update, like direct invoice

Front accounting 2.4.8 already have data table to store attachment for all type of document, also include sales quotation, sales order, sales delivery, sales invoice.
But only Invoice was applied the add attachment link after create or update the document.
We hope  to make the link "add attachment" for all sales document