Garradin Plugins

Check-in [8cdd30ce8f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Nom de facture plus pratique
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8cdd30ce8fee9f597a32e66437679b7e620c792d
User & Date: bohwaz 2020-05-22 22:50:32
Context
2020-05-23
21:04
Correctif : faire la correspondance avec le numéro du membre, pas son ID check-in: 9556cec9a7 user: bohwaz tags: trunk
2020-05-22
22:50
Nom de facture plus pratique check-in: 8cdd30ce8f user: bohwaz tags: trunk
22:50
Ajout n° chèque et autre option de paiement dans contrat de vente check-in: 9719f39fc3 user: bohwaz tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to caisse/lib/Session.php.

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
			FROM (SELECT *,
				(SELECT SUM(qty * price) FROM @PREFIX_tabs_items WHERE tab = t.id) AS total,
				(SELECT SUM(amount) FROM @PREFIX_tabs_payments WHERE tab = t.id) AS paid
				FROM @PREFIX_tabs t WHERE session = ? ORDER BY opened
			);'), $this->id);

		foreach ($tabs as &$tab) {
			$t = new Tab($tab->id);
			$tab->items = $t->listItems();
		}

		return $tabs;
	}

	public function listTotalsByCategory()







|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
			FROM (SELECT *,
				(SELECT SUM(qty * price) FROM @PREFIX_tabs_items WHERE tab = t.id) AS total,
				(SELECT SUM(amount) FROM @PREFIX_tabs_payments WHERE tab = t.id) AS paid
				FROM @PREFIX_tabs t WHERE session = ? ORDER BY opened
			);'), $this->id);

		foreach ($tabs as &$tab) {
			$t = new Tab($tab->id, false);
			$tab->items = $t->listItems();
		}

		return $tabs;
	}

	public function listTotalsByCategory()

Changes to caisse/templates/tab.tpl.

7
8
9
10
11
12
13

14
15
16
17
18
19
20
		<a href="{$self_url_no_qs}?id={$tab.id}">
			{$tab.id}. {$tab.opened|date_format:"%H:%M"}
			{if $tab.total} — {$tab.total|escape|pos_money}{/if}
			{if $tab.name} — {$tab.name}{/if}
		</a>
	</li>
{/foreach}

</ul>

{if $tab_id}
<section class="pos">
	<section class="tab">
		<header>
			<h2>







>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
		<a href="{$self_url_no_qs}?id={$tab.id}">
			{$tab.id}. {$tab.opened|date_format:"%H:%M"}
			{if $tab.total} — {$tab.total|escape|pos_money}{/if}
			{if $tab.name} — {$tab.name}{/if}
		</a>
	</li>
{/foreach}
	<li><a href="session.php?id={$pos_session.id}"><strong>Clôturer la caisse</strong></a>
</ul>

{if $tab_id}
<section class="pos">
	<section class="tab">
		<header>
			<h2>

Changes to caisse/www/admin/pdf.php.

70
71
72
73
74
75
76
77
78
79
80

    // It is important that you close any pipes before calling
    // proc_close in order to avoid a deadlock
    $return_value = proc_close($process);

    header('Content-type: application/pdf');
    //header(sprintf('Content-Length: %d', strlen($pdf_content)));
    header(sprintf('Content-Disposition: attachment; filename="Facture - %d.pdf"', qg('id')));
    echo $pdf_content;
}








|



70
71
72
73
74
75
76
77
78
79
80

    // It is important that you close any pipes before calling
    // proc_close in order to avoid a deadlock
    $return_value = proc_close($process);

    header('Content-type: application/pdf');
    //header(sprintf('Content-Length: %d', strlen($pdf_content)));
    header(sprintf('Content-Disposition: attachment; filename="Facture %04d - %s.pdf"', qg('id'), preg_replace('/[^\w]+/Ui', ' ', $tab->name)));
    echo $pdf_content;
}

Changes to caisse/www/admin/style.css.

65
66
67
68
69
70
71
72

73
74








.list small.cat {
	font-size: 7pt;
	font-weight: normal;
	color: #666;
	display: block;
}

ul.actions a {

	margin-top: .4rem;
}















|
>
|
|
>
>
>
>
>
>
>
>
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.list small.cat {
	font-size: 7pt;
	font-weight: normal;
	color: #666;
	display: block;
}

ul.actions li {
	padding: .2rem .1rem;
	margin: 0;
}

ul.actions li a {
	border-radius: .5rem;
}

ul.actions {
	padding: 0;
}