! -> Note
$ -> Affected files
+18-Aug-2010 Joe Hunt
+# View of backup scripts and attachments didn't work
+$ /admin/attachments.php
+ /admin/backups.php
+ /admin/db/attachments_db.inc
+! Added more memo info in advanced manufacture / Chaitanya
+$ /manufacturing/includes/db/work_orders_quick_db.inc
+! Added total debit/credit in gl_trans_view.inc / Chaitanya
+$ /gl/view/gl_trans_view.php
+
13-Aug-2010 Joe Hunt/infotechaccountant.com
+ Added arabic translation for install wizard (thanks to Hameed, infotechaccountants)
/install/isession.inc
$type = ($row['filetype']) ? $row['filetype'] : 'application/octet-stream';
header("Content-type: ".$type);
header('Content-Length: '.$row['filesize']);
- if ($type == 'application/octet-stream')
- header('Content-Disposition: attachment; filename='.$row['filename']);
- else
+ //if ($type == 'application/octet-stream')
+ // header('Content-Disposition: attachment; filename='.$row['filename']);
+ //else
header("Content-Disposition: inline");
echo file_get_contents(company_path(). "/attachments/".$row['unique_name']);
exit();
else {
header('Content-type: application/octet-stream');
header('Content-Length: '.filesize($filename));
- header("Content-Disposition: inline; filename=$filename");
+ header("Content-Disposition: inline");
readfile($filename);
exit();
}
echo "<td style='padding-left:20px'align='left'>".get_backup_file_combo()."</td>";
echo "<td valign='top'>";
start_table();
- submit_row('view',_("View Backup"), false, '', '', true);
+ submit_row('view',_("View Backup"), false, '', '', false);
submit_row('download',_("Download Backup"), false, '', '', false);
submit_row('restore',_("Restore Backup"), false, '','', 'process');
submit_js_confirm('restore',_("You are about to restore database from backup file.\nDo you want to continue?"));
$sql .= "filename=".db_escape($filename).",
unique_name=".db_escape($unique_name).",
filesize=".db_escape($filesize).",
- filetype=".db_escape($filetype);
+ filetype=".db_escape($filetype).",";
}
$sql .= "tran_date='$date' WHERE id=".db_escape($selected_id);
db_query($sql, "Attachment could not be updated");
$k = 0; //row colour counter
$heading_shown = false;
+$credit = $debit = 0;
while ($myrow = db_fetch($result))
{
if ($myrow['amount'] == 0) continue;
display_debit_or_credit_cells($myrow['amount']);
label_cell($myrow['memo_']);
end_row();
-
+ if ($myrow['amount'] > 0 )
+ $debit += $myrow['amount'];
+ else
+ $credit += $myrow['amount'];
}
+start_row("class='inquirybg' style='font-weight:bold'");
+label_cell(_("Total"), "colspan=2");
+if ($dim >= 1)
+ label_cell('');
+if ($dim > 1)
+ label_cell('');
+amount_cell($debit);
+amount_cell(-$credit);
+label_cell('');
+end_row();
+
//end of while loop
if ($heading_shown)
end_table(1);
$bom_item["loc_code"], $date_, "", -$bom_item["quantity"] * $units_reqd, 0);
}
$total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $bom_accounts["inventory_account"], 0, 0,
- null, -$bom_cost);
+ $bom_item["quantity"] ." * ".$bom_item["description"], -$bom_cost);
}
if ($advanced)
$standard_cost = get_standard_cost($item['stock_id']);
$issue_cost = $standard_cost * $item['qty_issued'] * $units_reqd / $wo['units_reqd'];
$issue = get_stock_gl_code($item['stock_id']);
- $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $issue["inventory_account"], 0, 0,
- null, -$issue_cost);
+ $stockitem = get_item($item['stock_id']);
+ $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $issue["inventory_account"], 0, 0,
+ _("Issue of")." ".$stockitem["description"], -$issue_cost);
$issue_total += $issue_cost;
}
if ($issue_total != 0)
PT_WORKORDER, WO_LABOUR);
}
// debit total components $total_cost
- add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $item_accounts["inventory_account"],
- 0, 0, null, -$total_cost);
+ $stockitem = get_item($stock_id);
+ add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $item_accounts["inventory_account"],
+ 0, 0, _("Produced")." ".$units_reqd. " * ".$stockitem["description"], -$total_cost);
}
//--------------------------------------------------------------------------------------